/* ============================================================
   EPS European Pathway Consultancy — global stylesheet
   Fonts are loaded via <link> in <head> (not @import) for speed.
   Page-specific rules live in assets/css/pages/<page>.css.
   ============================================================ */

:root {
  --black: #37474f;
  --deep:  #455a64;
  --ink:   #546e7a;
  --gold:  #c9a84c;
  --gl:    #e2c97e;
  --gp:    #f5edd8;
  --white: #faf9f6;
  --off:   #f0ece2;
  --muted: #8a8680;
  --line:  rgba(201, 168, 76, 0.25);
  --fd: 'Cormorant Garamond', Georgia, serif;
  --fb: 'DM Sans', system-ui, sans-serif;
  --fm: 'DM Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--fb); background: var(--white); color: var(--ink); }
img { max-width: 100%; display: block; }
main { display: block; }

/* Accessibility: skip link.
   Hidden by sliding it up (block-start overflow is always clipped, so this is
   RTL-safe — `left:-9999px` would add scrollable width on the right-to-left page). */
.skip-link {
  position: absolute; top: 0; inset-inline-start: 0; z-index: 200;
  transform: translateY(-120%); transition: transform .15s ease;
  background: var(--gold); color: var(--deep);
  padding: .6rem 1rem; font-family: var(--fm); font-size: .7rem;
  text-transform: uppercase; letter-spacing: .1em; text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

/* ── Navigation ─────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 3rem; background: rgba(69, 90, 100, 0.97);
  backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
}
.nav-logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.nav-badge { height: 40px; width: auto; flex-shrink: 0; display: block; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-logo-text strong { font-family: var(--fd); font-size: 1.1rem; font-weight: 800; color: var(--white); letter-spacing: .02em; }
.nav-logo-text small { font-size: .72rem; font-weight: 600; color: var(--white); opacity: .85; letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 1.3rem; list-style: none; }
.nav-links a {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(250, 249, 246, .75); text-decoration: none; transition: color .2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-cta {
  padding: .5rem 1.3rem !important; border: 1px solid var(--gold) !important;
  color: var(--gold) !important; transition: background .2s, color .2s !important;
}
.nav-cta:hover { background: var(--gold) !important; color: var(--deep) !important; }
.hbg { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hbg span { display: block; width: 24px; height: 1.5px; background: var(--white); }

/* ── Language switcher ──────────────────────────────────────── */
.lang-switcher { position: relative; }
.lang-toggle {
  display: flex; align-items: center; gap: .35rem; background: none;
  border: 1px solid var(--line); color: var(--white); padding: .4rem .65rem;
  font-family: var(--fm); font-size: .6rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; cursor: pointer;
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold); }
.lang-toggle svg { transition: transform .2s; }
.lang-switcher.open .lang-toggle svg { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + .5rem); right: 0; min-width: 150px;
  background: rgba(55, 71, 79, .99); border: 1px solid var(--line);
  list-style: none; padding: .4rem 0; display: none; flex-direction: column; z-index: 120;
}
.lang-switcher.open .lang-menu { display: flex; }
.lang-menu a { display: block; padding: .55rem 1.1rem; font-size: .85rem; color: rgba(250, 249, 246, .8); text-decoration: none; }
.lang-menu a:hover, .lang-menu a.current { color: var(--gold); background: rgba(201, 168, 76, .08); }

/* ── Marquee strip ──────────────────────────────────────────── */
.marquee-strip { background: #f5d97a; padding: .85rem 0; overflow: hidden; }
.marquee-track { display: flex; gap: 3rem; animation: mq 30s linear infinite; white-space: nowrap; }
.marquee-track span {
  font-family: var(--fm); font-size: .65rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--deep); display: flex; align-items: center; gap: 1rem; flex-shrink: 0;
}
.marquee-track span::after { content: '◆'; font-size: .4rem; }
@keyframes mq { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ── Sections & typography ──────────────────────────────────── */
.sec { padding: 6rem 4rem; }
.lbl { display: inline-flex; align-items: center; gap: .8rem; margin-bottom: 1.75rem; }
.lbl::before { content: ''; width: 36px; height: 2px; background: var(--gold); flex-shrink: 0; }
.lbl span {
  font-family: var(--fm); font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); background: rgba(201, 168, 76, .1); padding: .35rem .9rem; border: 1px solid rgba(201, 168, 76, .35);
}
h2.d { font-family: var(--fd); font-size: clamp(2.8rem, 5vw, 4.8rem); font-weight: 400; line-height: 1.05; color: var(--ink); letter-spacing: -.01em; }
h2.d em { font-style: italic; color: var(--gold); font-weight: 500; }
h2.d.lt { color: var(--white); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-g, .btn-o {
  display: inline-block; padding: .9rem 2.4rem; font-family: var(--fm); font-size: .7rem;
  font-weight: 500; letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background .2s, color .2s, transform .2s;
}
.btn-g { background: var(--gold); color: var(--deep); border: none; }
.btn-g:hover { background: var(--gl); transform: translateY(-2px); }
.btn-o { border: 1px solid var(--gold); color: var(--gold); background: none; }
.btn-o:hover { background: var(--gold); color: var(--deep); }
.btn-dim { border-color: rgba(250, 249, 246, .3) !important; color: rgba(250, 249, 246, .7) !important; }
.btn-dim:hover { border-color: var(--gold) !important; color: var(--gold) !important; background: transparent !important; }

/* ── Page hero (inner pages) ────────────────────────────────── */
.ph { min-height: 40vh; background: var(--deep); display: flex; align-items: flex-end; padding: 6rem 4rem 3rem; position: relative; overflow: hidden; }
.ph-grid { position: absolute; inset: 0; opacity: .04; background-image: linear-gradient(var(--gold) 1px, transparent 1px), linear-gradient(90deg, var(--gold) 1px, transparent 1px); background-size: 60px 60px; }
.ph-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 80% at 80% 30%, rgba(201, 168, 76, .12) 0%, transparent 60%); }
.ph-in { position: relative; z-index: 2; }
.ph-tag { font-family: var(--fm); font-size: .75rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); background: rgba(201, 168, 76, .12); border: 1px solid rgba(201, 168, 76, .35); padding: .35rem .9rem; display: inline-block; margin-bottom: 1.25rem; }
.ph h1 { font-family: var(--fd); font-size: clamp(3rem, 7vw, 6rem); font-weight: 300; color: var(--white); line-height: 1; letter-spacing: -.01em; }
.ph h1 em { font-style: italic; color: var(--gl); }

/* ── Mission / vision ───────────────────────────────────────── */
.mv-wrap { display: grid; grid-template-columns: 1fr 1fr; }
.mvc { padding: 5rem 4rem; }
.mvc.dk { background: var(--ink); }
.mvc.lt { background: var(--off); border-left: 1px solid rgba(201, 168, 76, .2); }
.mvc-lbl { font-family: var(--fm); font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); background: rgba(201, 168, 76, .12); border: 1px solid rgba(201, 168, 76, .4); padding: .38rem .9rem; display: inline-block; margin-bottom: 2rem; }
.mvc h3 { font-family: var(--fd); font-size: clamp(2rem, 3.5vw, 3.2rem); font-weight: 400; line-height: 1.15; margin-bottom: 1.5rem; }
.mvc.dk h3 { color: var(--white); }
.mvc.lt h3 { color: var(--ink); }
.mvc.dk p { font-size: 1.1rem; font-weight: 300; color: rgba(250, 249, 246, .75); line-height: 1.9; }
.mvc.lt p { font-size: 1.1rem; font-weight: 300; color: #4a4740; line-height: 1.9; }

/* ── Values grid ────────────────────────────────────────────── */
.val-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: rgba(201, 168, 76, .12); margin-top: 2rem; }
.vc { background: var(--deep); padding: 2.75rem; transition: background .25s; }
.vc:hover { background: var(--ink); }
.vc h3 { font-family: var(--fd); font-size: 1.6rem; font-weight: 600; color: var(--gl); margin-bottom: .75rem; }
.vc p { font-size: .83rem; font-weight: 300; color: rgba(250, 249, 246, .6); line-height: 1.75; }

/* ── Call to action ─────────────────────────────────────────── */
.cta { background: var(--black); text-align: center; padding: 8rem 4rem; position: relative; overflow: hidden; }
.cta-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(201, 168, 76, .12) 0%, transparent 65%); }
.cta h2 { position: relative; font-family: var(--fd); font-size: clamp(2.5rem, 6vw, 5.5rem); font-weight: 300; color: var(--white); margin-bottom: 1.25rem; line-height: 1.05; }
.cta h2 em { font-style: italic; color: var(--gold); }
.cta p { position: relative; font-size: 1rem; font-weight: 300; color: rgba(250, 249, 246, .55); max-width: 440px; margin: 0 auto 3rem; line-height: 1.75; }
.cta-a { position: relative; display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }

/* ── Forms (shared primitives) ──────────────────────────────── */
.field { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }
.field > label { font-family: var(--fm); font-size: .6rem; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.field input, .field select, .field textarea {
  background: var(--white); border: 1px solid rgba(201, 168, 76, .25); padding: .85rem 1rem;
  font-family: var(--fb); font-size: .9rem; color: var(--ink); outline: none; transition: border-color .2s; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field textarea { min-height: 130px; resize: vertical; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #b00020; }
.req { color: var(--gold); }
.field-error { color: #b00020; font-size: .72rem; font-weight: 400; margin-top: .1rem; }
/* Honeypot: visually hidden without `left:-9999px` (which scrolls in RTL). */
.honeypot {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap;
}

.flash { padding: 1rem 1.25rem; margin-bottom: 1.75rem; border-left: 3px solid; font-size: .9rem; font-weight: 400; line-height: 1.6; }
.flash-success { background: rgba(45, 106, 45, .1); border-color: #2d6a2d; color: #1f4d1f; }
.flash-error { background: rgba(176, 0, 32, .08); border-color: #b00020; color: #8a0019; }

/* ── Footer ─────────────────────────────────────────────────── */
footer { background: var(--black); padding: 5rem 4rem 2rem; border-top: 1px solid var(--line); }
.fg { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.fb h4 { font-family: var(--fd); font-size: 1.6rem; font-weight: 500; color: var(--white); margin-bottom: .3rem; }
.ft { font-family: var(--fm); font-size: .56rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 1.25rem; }
.fb p { font-size: .82rem; font-weight: 300; color: rgba(250, 249, 246, .45); line-height: 1.7; max-width: 260px; }
.fc h5 { font-family: var(--fm); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.25rem; }
.fc ul { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.fc a { font-size: .82rem; font-weight: 300; color: rgba(250, 249, 246, .5); text-decoration: none; transition: color .2s; }
.fc a:hover { color: var(--gold); }
.fb-btm { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; border-top: 1px solid var(--line); }
.fb-btm p { font-size: .7rem; color: rgba(250, 249, 246, .3); }
.fb-btm span { font-family: var(--fm); font-size: .58rem; letter-spacing: .15em; text-transform: uppercase; color: rgba(201, 168, 76, .45); }

/* ── Right-to-left (Arabic) ─────────────────────────────────── */
[dir="rtl"] .mvc.lt { border-left: none; border-right: 1px solid rgba(201, 168, 76, .2); }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .marquee-track { animation-name: mq-rtl; }
@keyframes mq-rtl { 0% { transform: translateX(0); } 100% { transform: translateX(50%); } }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links {
    display: none; flex-direction: column; position: fixed; top: 65px; left: 0; right: 0;
    background: rgba(69, 90, 100, .98); padding: 2rem; gap: 1.5rem; border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1rem; }
  .nav-lang { margin-top: .5rem; }
  .lang-menu { position: static; background: transparent; border: none; padding: 0; }
  .hbg { display: flex; }
  .sec { padding: 4rem 1.5rem; }
  .ph { padding: 6rem 1.5rem 2.5rem; }
  .mv-wrap { grid-template-columns: 1fr; }
  .mvc { padding: 3rem 1.5rem; }
  .mvc.lt { border-left: none; border-top: 1px solid rgba(201, 168, 76, .2); }
  .val-grid { grid-template-columns: 1fr; }
  .cta { padding: 5rem 1.5rem; }
  .fg { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
@media (max-width: 600px) { .fg { grid-template-columns: 1fr; } }
