/* ===================================================================
   ANVESHNA — design tokens and base styles
   Palette: deep purple + antique gold, serif headings, calm and grounded.
   =================================================================== */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/newsreader-400.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/newsreader-500.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/newsreader-600.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/newsreader-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/instrument-500.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/instrument-600.woff2") format("woff2");
}

:root {
  /* brand colours */
  --main: #2B1659;        /* royal night — dark panels, header */
  --accent: #4A2A85;      /* amethyst — links, primary buttons */
  --light: #F8F6FB;       /* ivory violet — page background */
  --muted: #5C5372;       /* muted text */
  --white: #FFFFFF;       /* surface / cards */
  --line: #DED8EA;        /* hairlines, borders */
  --accent-soft: #ECE6F7; /* soft panels */
  --gold: #C19A3B;        /* rules, marks, accents on dark backgrounds */
  --gold-text: #8A6512;   /* gold text on light backgrounds (contrast-safe) */
  --on-main: #F3EEFC;     /* text on dark panels */

  /* type */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* layout */
  --page-width: 1180px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --header-h: 88px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--light);
  color: #1D1233;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.18; margin: 0; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
ul, ol { margin: 0; }
button, input, textarea { font: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

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

/* ---------- layout helpers ---------- */
.container { max-width: var(--page-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.eyebrow {
  font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--gold-text); font-weight: 600;
}
.lede { color: var(--muted); max-width: 66ch; font-size: 1.08rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--main); color: var(--on-main); padding: 12px 18px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 246, 251, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 2px 16px rgba(43, 22, 89, 0.06); }
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #1D1233; }
.brand svg { width: 40px; height: 40px; flex: none; color: var(--accent); }
.brand span { font-family: var(--font-display); font-size: 1.35rem; color: #1D1233; }

.site-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 26px; padding: 0; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #1D1233; }
.site-nav a[aria-current="page"] { color: #1D1233; border-bottom-color: var(--gold); }

.header-cta { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none; border: 1px solid var(--line); background: var(--white);
  border-radius: var(--radius-sm); width: 44px; height: 44px;
  align-items: center; justify-content: center; cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; color: #1D1233; }

@media (max-width: 1260px) {
  .site-nav { position: fixed; inset: var(--header-h) 0 0 0; background: var(--light);
    flex-direction: column; align-items: stretch; padding: 24px; gap: 18px;
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
    overflow-y: auto;
  }
  .site-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a { display: block; padding: 14px 6px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .header-cta { flex-direction: column; align-items: stretch; width: 100%; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 0.97rem; text-decoration: none; cursor: pointer;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  min-height: 44px; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(74, 42, 133, 0.3); }
.btn-ghost { background: transparent; color: #1D1233; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-on-dark { background: var(--gold); color: #241305; }
.btn-on-dark:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(193, 154, 59, 0.35); }
.btn-ghost-on-dark { background: transparent; color: var(--on-main); border-color: rgba(243,238,252,0.35); }
.btn-ghost-on-dark:hover { border-color: var(--gold); color: var(--gold); }
.btn-small { padding: 9px 16px; font-size: 0.88rem; min-height: 38px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--main) 0%, #3a1f73 100%);
  color: var(--on-main);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  margin-top: 28px;
  border-bottom: 4px solid var(--gold);
}
.hero .eyebrow { color: var(--gold); }
.hero p.lede { color: #D9D0EE; }
.hero h1 { color: var(--on-main); }

/* ---------- photo / illustration frame ---------- */
.photo {
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--main) 0%, #3a1f73 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 32px; aspect-ratio: 4 / 3; overflow: hidden;
}
.photo.illus img, .photo.illus svg { width: 100%; height: 100%; }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
}
.card .tag { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-text); }
.card p { color: var(--muted); font-size: 0.97rem; }
.card.on-main { background: var(--main); border-color: transparent; color: var(--on-main); }
.card.on-main p { color: #cfc3ea; }
.card.on-main .tag { color: var(--gold); }

.statement {
  font-family: var(--font-display); font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.35;
  padding: 28px 30px; background: var(--accent-soft); border-radius: var(--radius-md);
  border-left: 4px solid var(--gold);
}

/* loop diagram (two-way idea) */
.loop { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch; }
.loop .arrows { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--gold); font-size: 1.5rem; gap: 2px; }
.loop .arrows span { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* numbered steps / method */
.steps { display: flex; flex-direction: column; gap: 14px; counter-reset: step; }
.steps .step {
  display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px;
}
.steps .step::before {
  counter-increment: step; content: counter(step);
  font-family: var(--font-display); font-size: 1.4rem; color: var(--gold-text);
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* counters */
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.counter { text-align: center; }
.counter b { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--main); }
.counter span { color: var(--muted); font-size: 0.9rem; }

/* ---------- CTA band (partial) ---------- */
.cta-band {
  background: var(--main); color: var(--on-main);
  border-radius: var(--radius-lg); padding: 44px 40px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-band h2 { color: var(--on-main); }
.cta-band p { color: #cfc3ea; }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.9rem; font-weight: 600; color: #1D1233; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
  background: var(--white); color: #1D1233;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-status { font-size: 0.92rem; padding: 10px 14px; border-radius: var(--radius-sm); display: none; }
.form-status.is-visible { display: block; }
.form-status.ok { background: #e7f3e9; color: #1c5a2c; }
.form-status.err { background: #fbeaea; color: #8a1f1f; }

/* ---------- footer ---------- */
.site-footer { background: var(--main); color: var(--on-main); margin-top: 80px; padding: 56px 0 32px; }
.site-footer a { color: #cfc3ea; }
.site-footer .foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: var(--on-main); font-size: 1rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(243,238,252,0.15);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: #b2a3d4; font-size: 0.85rem;
}

/* ---------- WhatsApp floating button ---------- */
.whatsapp-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  text-decoration: none;
}
.whatsapp-btn svg { width: 28px; height: 28px; }
.whatsapp-btn:hover { transform: translateY(-2px); }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 100px 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .loop { grid-template-columns: 1fr; }
  .loop .arrows { flex-direction: row; }
  .site-footer .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero { padding: 36px 22px; }
  .cta-band { padding: 32px 24px; }
  .site-footer .foot-grid { grid-template-columns: 1fr; }
  .steps .step { grid-template-columns: 36px 1fr; }
}
