/* ============================================================
   IPAF INDIA 
   Corporate design system, aligned with IPAF brand language.
   ============================================================ */

:root {
  /* IPAF-aligned palette */
  --bg:           oklch(1    0     0);          /* white */
  --surface:      oklch(0.985 0.003 250);       /* very light cool */
  --surface-2:    oklch(0.965 0.005 250);       /* card hover */
  --line:         oklch(0.92  0.008 250);       /* subtle border */
  --line-strong:  oklch(0.85  0.01  250);

  --ink:          oklch(0.22  0.025 255);       /* near-black slate */
  --ink-2:        oklch(0.42  0.02  255);       /* secondary text */
  --ink-3:        oklch(0.58  0.02  255);       /* tertiary */

  --brand:        oklch(0.36  0.13  255);       /* IPAF deep blue */
  --brand-2:      oklch(0.28  0.14  258);       /* darker for hover */
  --brand-soft:   oklch(0.94  0.04  255);       /* blue tint surface */

  --accent:       oklch(0.85  0.165 90);        /* IPAF caution yellow */
  --accent-ink:   oklch(0.25  0.08  85);        /* readable on yellow */

  --warn:         oklch(0.58  0.21  27);        /* hazard accent */

  /* type stacks */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* scale */
  --t-xs: 0.78rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.1rem;
  --t-lg: 1.25rem;
  --t-xl: 1.5rem;
  --t-2xl: 1.875rem;
  --t-3xl: 2.5rem;
  --t-4xl: clamp(2.4rem, 4.2vw, 3.6rem);
  --t-5xl: clamp(3rem, 6vw, 5rem);

  /* radius + shadow */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.08), 0 6px 12px rgba(15, 23, 42, 0.04);

  /* layout */
  --gutter: clamp(1rem, 3vw, 1.75rem);
  --shell-max: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brand); color: white; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

p { max-width: 70ch; }

/* ============================================================
   SHELL
   ============================================================ */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================================
   UTILITY TOP BAR
   ============================================================ */
.util-bar {
  background: var(--ink);
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  padding: 0.5rem 0;
}
.util-bar .shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.util-bar a { color: rgba(255,255,255,0.85); transition: color 0.18s; }
.util-bar a:hover { color: var(--accent); }
.util-bar .left { display: flex; gap: 1.4rem; align-items: center; }
.util-bar .right { display: flex; gap: 1.4rem; align-items: center; }
.util-bar .badge {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-pill);
  letter-spacing: 0.02em;
}
@media (max-width: 720px) {
  .util-bar .left .hide-mobile { display: none; }
}

/* ============================================================
   PRIMARY NAV
   ============================================================ */
nav.primary {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(6px);
  background: rgba(255,255,255,0.92);
}
nav.primary .shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
}
nav.primary .brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
nav.primary .brand .logo {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: var(--ink);
  font-weight: 900;
  font-size: 0.95rem;
  border-radius: var(--r-sm);
  letter-spacing: -0.02em;
}
nav.primary .brand .name { line-height: 1.05; }
nav.primary .brand .name small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0;
}
nav.primary ul {
  list-style: none;
  display: flex;
  gap: 0.4rem;
  justify-content: center;
}
nav.primary ul a {
  padding: 0.55rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--r-sm);
  transition: background 0.16s, color 0.16s;
}
nav.primary ul a:hover { background: var(--surface); color: var(--ink); }
nav.primary ul a[aria-current="page"] {
  color: var(--brand);
  font-weight: 600;
  background: var(--brand-soft);
}
nav.primary .cta-right { display: flex; gap: 0.6rem; align-items: center; }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.18s, opacity 0.18s;
}
@media (max-width: 880px) {
  nav.primary .shell { grid-template-columns: auto auto auto; gap: 0.75rem; }
  .nav-toggle {
    display: inline-flex;
    justify-self: end;
    grid-column: 3;
    grid-row: 1;
  }
  nav.primary ul {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    padding: 0.7rem 0 0.2rem;
    border-top: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
  }
  nav.primary.is-open ul { display: flex; }
  nav.primary.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  nav.primary.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  nav.primary.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  nav.primary .cta-right {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }
  @media (max-width: 500px) {
    nav.primary .cta-right .btn {
      padding: 0.45rem 0.7rem;
      font-size: 0.8rem;
    }
    nav.primary .cta-right .btn .arr { display: none; }
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-3); }
.btn-yellow {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-yellow:hover { background: oklch(0.78 0.18 88); border-color: oklch(0.78 0.18 88); }
.btn .arr { transition: transform 0.2s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ============================================================
   TAGS, CHIPS, BADGES
   ============================================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: "";
  width: 24px; height: 2px;
  background: var(--brand);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-2);
}
.chip.brand { background: var(--brand-soft); border-color: oklch(0.86 0.05 255); color: var(--brand); }
.chip.yellow { background: oklch(0.96 0.08 90); border-color: oklch(0.88 0.12 88); color: var(--accent-ink); }
.chip.dark { background: var(--ink); border-color: var(--ink); color: white; }
.chip.featured {
  background: linear-gradient(0deg, var(--accent), var(--accent));
  color: var(--accent-ink);
  border-color: oklch(0.78 0.18 88);
  font-weight: 700;
  padding: 0.35rem 0.7rem;
}
.chip.featured::before {
  content: "★";
  font-size: 0.78rem;
}

/* ============================================================
   SECTION HEADS
   ============================================================ */
.sec-h {
  display: flex; flex-direction: column; gap: 0.7rem;
  max-width: 720px;
  margin-bottom: 2.4rem;
}
.sec-h.center { text-align: center; align-self: center; align-items: center; margin: 0 auto 2.4rem; }
.sec-h.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1.6rem;
  max-width: none;
}
.sec-h h2 {
  font-size: var(--t-4xl);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.sec-h p.lede {
  color: var(--ink-2);
  font-size: var(--t-md);
  line-height: 1.55;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.6rem;
  transition: border-color 0.18s ease, box-shadow 0.22s ease, transform 0.22s ease;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
a.card { display: block; color: inherit; }
.card, .centre, .course .spec, .why .point {
  will-change: transform;
}
.card:hover,
.centre:hover,
.why .point:hover {
  transform: translateY(-4px);
}

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.field .hint { font-size: 0.78rem; color: var(--ink-3); }
.field input, .field select, .field textarea {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 0.72rem 0.9rem;
  font: inherit;
  font-size: 0.96rem;
  color: var(--ink);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px oklch(0.36 0.13 255 / 0.15);
}
.field textarea { min-height: 120px; resize: vertical; }

/* ============================================================
   FOOTER
   ============================================================ */
footer.site {
  background: var(--ink);
  color: rgba(255,255,255,0.78);
  padding: 4rem 0 0;
  margin-top: 5rem;
}
footer.site .shell {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.4rem;
  padding-bottom: 3rem;
}
footer.site .brand-block { color: white; }
footer.site .brand-block .top {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1rem;
}
footer.site .brand-block .top .logo {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  border-radius: var(--r-sm);
}
footer.site .brand-block .top .name { font-weight: 800; font-size: 1.05rem; }
footer.site .brand-block .top small { display: block; font-size: 0.74rem; font-weight: 500; color: rgba(255,255,255,0.6); }
footer.site .brand-block p { font-size: 0.9rem; line-height: 1.6; max-width: 36ch; }

footer.site h4 {
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
footer.site ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
footer.site ul a {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.78);
  transition: color 0.18s;
}
footer.site ul a:hover { color: var(--accent); }
footer.site address {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.78);
}
footer.site address a { color: var(--accent); transition: color 0.18s; }
footer.site address a:hover { color: white; }

footer.site .baseline {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1.2rem 0;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}
footer.site .baseline .shell {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1.2rem; flex-wrap: wrap;
}

@media (max-width: 880px) {
  footer.site .shell { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  footer.site .shell { grid-template-columns: 1fr; }
}

/* ============================================================
   ANNOUNCEMENT STRIP
   ============================================================ */
.strip-yellow {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 1rem 0;
}
.strip-yellow .shell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.2rem; flex-wrap: wrap;
  font-size: 0.92rem;
  font-weight: 600;
}
.strip-yellow .lead { display: flex; align-items: center; gap: 0.7rem; }
.strip-yellow .lead .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ink); }
.strip-yellow .arr { color: var(--accent-ink); transition: transform 0.2s; }
.strip-yellow a:hover .arr { transform: translateX(3px); }

/* ============================================================
   INTERACTIVE HELPERS
   ============================================================ */
.finder {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg), var(--surface));
}
.finder-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2rem;
  align-items: stretch;
  background: var(--ink);
  color: white;
  border-radius: var(--r-lg);
  padding: clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--shadow-lg);
}
.finder-copy h2 {
  font-size: clamp(1.8rem, 3.8vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0.65rem 0 1rem;
}
.finder-copy p { color: rgba(255,255,255,0.72); }
.finder-tool {
  background: white;
  color: var(--ink);
  border-radius: var(--r-md);
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}
.step-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.segmented.compact { grid-template-columns: repeat(3, 1fr); }
.segmented button,
.filter-buttons button {
  min-height: 42px;
  padding: 0.55rem 0.65rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-2);
  border-right: 1px solid var(--line);
}
.segmented button:last-child { border-right: 0; }
.segmented button:hover,
.filter-buttons button:hover { background: var(--surface); color: var(--ink); }
.segmented button.is-active,
.filter-buttons button.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}
.finder-result {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 1rem;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}
.finder-tool.is-updated .finder-result {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.finder-result .tag {
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand);
}
.finder-result h3 { font-size: 1.35rem; margin: 0.25rem 0; }
.finder-result p { color: var(--ink-2); font-size: 0.92rem; }
.finder-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.course-filter {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 1.2rem 0;
}
.course-filter .shell {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 1.2rem;
  align-items: center;
}
.course-filter h2 {
  font-size: 1.25rem;
  line-height: 1.2;
  margin-top: 0.2rem;
}
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}
.filter-buttons button {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
  min-height: 38px;
  border-right: 1px solid var(--line-strong);
}
.course.is-hidden { display: none; }

@media (max-width: 820px) {
  .finder-panel,
  .course-filter .shell { grid-template-columns: 1fr; }
  .filter-buttons { justify-content: flex-start; }
  .segmented,
  .segmented.compact { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.65s cubic-bezier(.2,.7,.2,1), transform 0.65s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--stagger, 0) * 60ms);
}
.reveal.in { opacity: 1; transform: none; }
.motion-ready .quick .item .v,
.motion-ready .facts .v {
  transition: color 0.25s ease;
}
.motion-ready .quick .item:hover .v,
.motion-ready .facts .item:hover .v {
  color: var(--brand);
}
.is-filtering .course {
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.is-filtering .course.is-hidden {
  opacity: 0;
  transform: translateY(8px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
