/* ==========================================================================
   Oroopa — Core styles (shared by all pages)
   Fonts are bundled with the site: no Google Fonts / public CDN requests
   ========================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-wght.woff2") format("woff2-variations"),
       url("../fonts/Vazirmatn-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Surfaces */
  --paper: #F7F5EF;
  --paper-2: #EFEBE1;
  --card: #FFFFFF;
  /* Ink */
  --ink: #0A1A3F;
  --ink-2: #33415F;
  --ink-3: #5B6582;
  --line: rgba(10, 26, 63, .12);
  --line-2: rgba(10, 26, 63, .22);
  /* Europe */
  --eu: #003399;
  --eu-700: #00277A;
  --eu-900: #001A57;
  --eu-950: #00113D;
  --eu-50: #EEF2FC;
  --eu-100: #DCE5F9;
  --gold: #FFCC00;
  --gold-300: #FFE27A;
  --gold-ink: #8A6A00;
  /* Germany */
  --de-black: #121212;
  --de-red: #DD0000;
  --de-gold: #FFCE00;
  /* WhatsApp */
  --wa: #1DAA54;
  --wa-700: #0B7A4B;

  --ff: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --ff-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --ff-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(10, 26, 63, .05), 0 14px 34px -14px rgba(10, 26, 63, .20);
  --shadow-lg: 0 2px 6px rgba(10, 26, 63, .05), 0 34px 70px -24px rgba(10, 26, 63, .32);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --header-h: 76px;

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff);
  font-size: clamp(15.5px, .3vw + 14.4px, 17.5px);
  line-height: 1.95;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--ink); }

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Utilities ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.mono { font-family: var(--ff-mono); font-size: .78em; letter-spacing: .06em; }
.de { font-family: var(--ff-serif); font-style: italic; font-weight: 400; letter-spacing: .005em; }
.hl {
  background-image: linear-gradient(transparent 64%, rgba(255, 204, 0, .55) 64% 90%, transparent 90%);
  background-repeat: no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.t-blue { color: var(--eu); }

.skip-link {
  position: fixed; top: 12px; right: 12px; z-index: 1000;
  padding: 10px 18px; border-radius: 999px;
  background: var(--eu); color: #fff; text-decoration: none; font-weight: 700;
  transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip-link:focus { transform: none; }

:focus-visible {
  outline: 2px solid var(--eu);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255, 204, 0, .55);
  border-radius: 8px;
}

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink);
  --fg: #fff;
  --hover: rgba(255, 255, 255, .16);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  min-height: 54px;
  padding: .85em 1.55em;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), background-color .3s, color .3s, border-color .3s;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--hover);
  transform: translateY(102%);
  transition: transform .6s var(--ease);
}
.btn:hover::before { transform: none; }
.btn:active { transform: scale(.97); }
.btn svg { width: 1.3em; height: 1.3em; flex: none; }
.btn--wa {
  background: linear-gradient(180deg, #1A4FCC 0%, var(--eu) 52%, #002A85 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 16px 32px -14px rgba(0, 51, 153, .7);
  padding-inline-start: .5em;
}
.btn.btn--wa svg {
  width: 2.1em; height: 2.1em;
  padding: .42em;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 12px -3px rgba(37, 211, 102, .65);
}
.btn--wa.btn--sm { padding-inline-start: .4em; }
.btn--wa.btn--sm svg { width: 1.95em; height: 1.95em; padding: .4em; }
.btn--eu { --bg: var(--eu); box-shadow: 0 14px 30px -12px rgba(0, 51, 153, .6); }
.btn--ghost { --bg: transparent; --fg: var(--ink); --hover: rgba(10, 26, 63, .06); border-color: var(--line-2); }
.btn--light { --bg: #fff; --fg: var(--ink); --hover: rgba(10, 26, 63, .06); }
.btn--line-light { --bg: transparent; --fg: #fff; --hover: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); }
.btn--sm { min-height: 44px; padding: .55em 1.15em; font-size: 14.5px; }
.btn--lg { min-height: 64px; padding: 1em 2em; font-size: 17.5px; }
.btn .arrow { transition: transform .5s var(--ease); }
.btn:hover .arrow { transform: translateX(-4px); }

/* ---------- Station sign (chapter label) ---------- */
.station {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-block: 6px;
  padding-inline: 6px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .65);
  font-size: 14.5px;
  line-height: 1.4;
}
.station__no {
  display: grid; place-items: center;
  min-width: 34px; height: 34px;
  padding-inline: 8px;
  border-radius: 9px;
  background: var(--eu);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
}
.station__name { font-weight: 700; }
.station__de { color: var(--ink-3); font-size: 18px; }
.station__de::before { content: "·"; margin-inline-end: 10px; color: var(--gold-ink); font-style: normal; }


/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.logo__mark { width: 38px; height: 38px; flex: none; }
.logo__mark .ring-o { stroke: currentColor; }
.logo__mark .star-o { fill: var(--gold); stroke: var(--ink); stroke-width: .12; }
.logo__text { display: grid; line-height: 1; gap: 5px; }
.logo__en { font-weight: 750; font-size: 17px; letter-spacing: .32em; direction: ltr; margin-inline-end: -.32em; }
.logo__fa { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  transition: transform .7s var(--ease);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(247, 245, 239, .78);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity .5s;
}
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-hidden { transform: translateY(-105%); }
.site-header__inner {
  position: relative;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-inline: var(--gutter);
  max-width: 1440px;
  margin-inline: auto;
}
.nav ul { display: flex; gap: clamp(16px, 2.2vw, 34px); list-style: none; margin: 0; padding: 0; }
.nav a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: color .3s;
}
.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 2px;
  height: 1.5px;
  background: var(--eu);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.site-header__actions { display: flex; align-items: center; gap: 10px; }

.menu-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute; left: 50%; top: 50%;
  width: 18px; height: 1.6px; border-radius: 2px;
  background: var(--ink);
  transition: transform .5s var(--ease);
}
.menu-toggle span:nth-child(1) { transform: translate(-50%, -4px); }
.menu-toggle span:nth-child(2) { transform: translate(-50%, 4px); }
.menu-open .menu-toggle span:nth-child(1) { transform: translate(-50%, 0) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { transform: translate(-50%, 0) rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 28px) var(--gutter) 32px;
  background: var(--paper);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .8s var(--ease-io), visibility 0s .8s;
}
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .8s var(--ease-io), visibility 0s 0s; }
.menu ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: m; }
.menu li { counter-increment: m; border-bottom: 1px solid var(--line); }
.menu ol a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 14px 0;
  font-size: clamp(26px, 7vw, 40px);
  font-weight: 800;
  text-decoration: none;
}
.menu ol a::before {
  content: "۰" counter(m, persian);
  font-size: 13px; font-weight: 600; color: var(--eu);
}
.menu__contact { display: grid; gap: 10px; }
.menu__contact .btn { width: 100%; }

@media (max-width: 1023px) {
  .nav { display: none; }
  .menu-toggle { display: inline-block; }
  .site-header__actions .btn { display: none; }
}

/* ---------- Floating WhatsApp ---------- */
.fab {
  position: fixed;
  left: clamp(14px, 2vw, 26px);
  bottom: clamp(14px, 2vw, 26px);
  z-index: 50;
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  box-shadow: 0 16px 34px -10px rgba(29, 170, 84, .7);
  transition: opacity .4s, visibility .4s;
}
.fab.is-away { opacity: 0; visibility: hidden; pointer-events: none; }
.fab svg { width: 30px; height: 30px; transition: transform .5s var(--ease); }
.fab::before, .fab::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--wa);
  animation: fab-pulse 2.8s var(--ease) infinite;
}
.fab::after { animation-delay: 1.4s; }
.fab:hover svg { transform: scale(1.12) rotate(-8deg); }
.fab__label {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  translate: -6px -50%;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s, translate .5s var(--ease);
}
.fab:hover .fab__label, .fab:focus-visible .fab__label { opacity: 1; translate: 0 -50%; }
@keyframes fab-pulse {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--eu-950);
  color: rgba(255, 255, 255, .78);
  padding-top: clamp(64px, 9vw, 120px);
}
.site-footer::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(0, 51, 153, .55), transparent 70%),
    radial-gradient(40% 40% at 10% 100%, rgba(255, 204, 0, .10), transparent 70%);
  pointer-events: none;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer__ring {
  position: absolute;
  top: -120px;
  left: -120px;
  width: 300px;
  height: 300px;
  fill: var(--gold);
  opacity: .38;
  pointer-events: none;
  animation: footer-spin 150s linear infinite;
}
@keyframes footer-spin { to { rotate: 360deg; } }

.footer__top {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.2fr 1fr;
  grid-template-areas: "brand chapters contact legal";
  gap: 48px 36px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer__brand { grid-area: brand; }
.footer__col--chapters { grid-area: chapters; }
.footer__col--contact { grid-area: contact; }
.footer__col--legal { grid-area: legal; }
.footer__brand .logo { color: #fff; }
.footer__brand .logo__fa { color: rgba(255, 255, 255, .6); }
.footer__brand .logo__mark .star-o { stroke: var(--eu-950); }
.footer__brand p { margin-top: 20px; max-width: 34ch; font-size: 15px; line-height: 2; }
.footer__title { margin-bottom: 18px; font-size: 13px; font-weight: 700; color: var(--gold); }
.footer__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.footer__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .85);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* contact cards */
.footer__contact { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fc {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 16px;
  background: rgba(255, 255, 255, .05);
  transition: background-color .3s, border-color .3s, transform .45s var(--ease);
}
.site-footer a.fc:hover { color: #fff; background: rgba(255, 255, 255, .09); border-color: rgba(255, 204, 0, .4); transform: translateY(-2px); }
.fc__ic {
  display: grid; place-items: center;
  flex: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  color: var(--gold);
}
.fc__ic svg { width: 20px; height: 20px; }
.fc--wa .fc__ic { background: #25D366; color: #fff; box-shadow: 0 6px 16px -6px rgba(37, 211, 102, .7); }
.fc__txt { display: grid; gap: 1px; min-width: 0; line-height: 1.5; }
.fc__txt small { font-size: 11.5px; color: rgba(255, 255, 255, .55); }
.fc__txt b { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 700; color: #fff; }

.footer__disclaimer {
  position: relative;
  max-width: 100ch;
  padding-block: 28px;
  font-size: 13px;
  line-height: 2.1;
  color: rgba(255, 255, 255, .58);
}
.footer__bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  padding-block: 20px calc(26px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 13.5px;
}
.footer__copy { margin-inline-end: auto; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.footer__credit a {
  font-weight: 700;
  background: linear-gradient(90deg, var(--gold), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer__credit a:hover { -webkit-text-fill-color: var(--gold); }
.to-top {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  transition: background-color .3s, border-color .3s, color .3s, transform .45s var(--ease);
}
.site-footer a.to-top:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); transform: translateY(-3px); }
.to-top svg { width: 18px; height: 18px; transform: rotate(90deg); }

/* tablet: brand on top, the three columns side by side */
@media (max-width: 900px) {
  .footer__top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas: "brand brand brand" "chapters contact legal";
    gap: 36px 20px;
  }
}

/* mobile: centred brand, then chapters · contact · legal in one row */
@media (max-width: 560px) {
  .site-footer { padding-top: 60px; border-radius: 50% 50% 0 0 / 34px 34px 0 0; }
  .footer__ring { top: -100px; left: -100px; width: 230px; height: 230px; opacity: .34; }
  .footer__top { gap: 26px 12px; padding-bottom: 26px; }
  .footer__brand { display: grid; justify-items: center; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .1); text-align: center; }
  .footer__brand p { margin: 16px auto 0; max-width: 32ch; font-size: 14.5px; line-height: 2; }
  .footer__badges { justify-content: center; margin-top: 18px; gap: 6px; }
  .badge { padding: 5px 10px; font-size: 12px; }
  .footer__title { margin-bottom: 8px; font-size: 12.5px; }
  .footer__list { gap: 0; font-size: 13.5px; }
  .footer__list a { display: block; padding-block: 6px; color: rgba(255, 255, 255, .86); }
  .fl-x { display: none; }
  /* contact becomes a compact list like the other columns */
  .footer__contact { grid-template-columns: 1fr; gap: 0; }
  .fc { gap: 8px; height: auto; padding: 5px 0; border: 0; border-radius: 0; background: none; }
  .site-footer a.fc:hover { background: none; transform: none; color: var(--gold); }
  .fc__ic { width: 26px; height: 26px; border-radius: 8px; }
  .fc__ic svg { width: 14px; height: 14px; }
  .fc--wa .fc__ic { box-shadow: none; }
  .fc__txt b { display: none; }
  .fc__txt small { font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, .86); }
  .site-footer a.fc:hover .fc__txt small { color: var(--gold); }
  .footer__disclaimer {
    margin-top: 4px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .03);
    font-size: 12.5px;
    line-height: 2;
  }
  .footer__bottom { flex-direction: column; gap: 14px; padding-top: 26px; border-top: 0; text-align: center; }
  .footer__legal { display: none; }
  .to-top { order: -1; }
  .footer__copy { margin: 0; font-size: 12.5px; color: rgba(255, 255, 255, .55); }
  .footer__credit { padding: 7px 16px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: rgba(255, 255, 255, .04); font-size: 12.5px; }
}

/* ---------- Grain ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
