/* =====================================================================
   MUSLIM CHAPLAINCY INDONESIA — Arsitektur Rahmah
   Design system: warm paper + deep teal-ink, sapphire primary,
   emerald & gold from the mark. Soft-serif display (Fraunces) over a
   humanist grotesque (Hanken Grotesk). Deliberate asymmetry, quiet motion.
   ===================================================================== */

/* ----------------------------- Tokens ----------------------------- */
:root {
  /* Core palette */
  --sapphire:        #2596be;   /* primary — requested */
  --sapphire-deep:   #1a7195;
  --sapphire-soft:   #6fb9d4;
  --sapphire-wash:   #e8f2f6;

  --emerald:         #1d5346;   /* from the mark — institutional gravitas */
  --emerald-deep:    #103a31;
  --emerald-ink:     #0c2a24;

  --gold:            #c39a4e;   /* from the mark — hairline detail only */
  --gold-soft:       #e6cf9d;
  --gold-deep:       #8c6f33;

  /* Neutrals — warm, never pure */
  --ink:             #122220;   /* near-black, warm green-bias */
  --ink-2:           #2c3b38;
  --slate:           #4d5b58;   /* body on light */
  --slate-soft:      #6f7c79;
  --line:            #e4ddd0;   /* hairline on paper */
  --line-strong:     #d2c8b6;

  --paper:           #f7f3ea;   /* base */
  --paper-2:         #fbf8f1;   /* raised cards */
  --paper-3:         #efe9db;   /* sunk panels */
  --cream-line:      rgba(255,255,255,.6);

  /* On dark */
  --on-dark:         #eef3f0;
  --on-dark-soft:    #a7b8b2;
  --dark-line:       rgba(238,243,240,.12);

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing scale — intentional, large */
  --s-1: 8px;  --s-2: 16px; --s-3: 24px; --s-4: 40px;
  --s-5: 64px; --s-6: 96px; --s-7: 144px; --s-8: 200px;

  --radius: 18px;
  --radius-lg: 26px;
  --radius-sm: 12px;

  --maxw: 1240px;
  --gutter: clamp(22px, 5vw, 72px);

  --shadow-soft: 0 1px 2px rgba(18,34,32,.04), 0 8px 30px -12px rgba(18,34,32,.14);
  --shadow-lift: 0 2px 6px rgba(18,34,32,.05), 0 26px 60px -22px rgba(18,34,32,.30);

  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ----------------------- Cinematic ambient & pattern --------------- */
/* Soft aura glow at the top of every page — gives a cinematic entrance. */
body { position: relative; }
body::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: min(960px, 96vh);
  z-index: 0; pointer-events: none;
  background:
    radial-gradient(116% 78% at 84% -12%, rgba(37,150,190,.20), transparent 58%),
    radial-gradient(92% 70% at 6% -10%, rgba(29,83,70,.16), transparent 55%),
    radial-gradient(60% 50% at 50% -6%, rgba(195,154,78,.10), transparent 60%),
    linear-gradient(180deg, rgba(37,150,190,.06), transparent 72%);
}
.site-header, main, .site-footer { position: relative; z-index: 1; }

/* Khatam motif — used sparingly, only as a luxury accent on deep surfaces. */
.dark, .site-footer { position: relative; }
.dark::before, .site-footer::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("../img/khatam.svg"); background-size: 150px; background-repeat: repeat;
  opacity: .14;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
}
.dark > *, .site-footer > * { position: relative; z-index: 1; }
/* CTA / Kemitraan: deep-green khatam texture, rising from the bottom upward */
.cta-banner.dark::before {
  background-image: url("../img/khatam-green.svg");
  -webkit-mask-image: radial-gradient(120% 95% at 50% 100%, #000 34%, transparent 82%);
          mask-image: radial-gradient(120% 95% at 50% 100%, #000 34%, transparent 82%);
  opacity: .55;
}
/* Footer: texture rises from the bottom upward */
.site-footer::before {
  -webkit-mask-image: radial-gradient(120% 90% at 50% 100%, #000 30%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 50% 100%, #000 30%, transparent 78%);
}
.has-pattern { position: relative; } /* legacy no-op alias */

/* Hero: a gold khatam lattice rises softly through the bottom third — mahal. */
.hero { position: relative; }
.hero > .wrap { position: relative; z-index: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("../img/khatam.svg"); background-size: 150px; background-repeat: repeat;
  opacity: .42;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.55) 12%, transparent 33%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.55) 12%, transparent 33%);
}

/* Smooth tonal sections (replace flat paper-3 blocks). */
.tone-sunk {
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-3) 24%, var(--paper-3) 76%, var(--paper) 100%);
}

/* ----------------------------- Reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--slate);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv05";
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--sapphire); color: #fff; }

/* ----------------------------- Type ------------------------------- */
h1,h2,h3,h4 { font-family: var(--display); color: var(--ink); font-weight: 480; line-height: 1.06; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.1rem); letter-spacing: -.035em; font-weight: 460; }
h2 { font-size: clamp(2rem, 4.2vw, 3.35rem); letter-spacing: -.028em; }
h3 { font-size: clamp(1.35rem, 2.3vw, 1.85rem); letter-spacing: -.02em; font-weight: 520; }
h4 { font-size: 1.1rem; letter-spacing: -.01em; font-weight: 560; }
p  { margin: 0 0 1.1em; }
em { font-style: italic; }

.serif-em { font-family: var(--display); font-style: italic; font-weight: 420; }

/* Eyebrow / small-caps label with a gold tick */
.eyebrow {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 620;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--slate-soft);
  display: inline-flex;
  align-items: center;
  gap: .7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.eyebrow.center::before { width: 18px; background: var(--gold); }
.eyebrow.on-dark { color: var(--on-dark-soft); }

.index-num {
  font-family: var(--display);
  font-style: italic;
  font-weight: 380;
  color: var(--gold-deep);
  font-size: .95rem;
  letter-spacing: .02em;
}

.lead { font-size: clamp(1.12rem, 1.7vw, 1.33rem); line-height: 1.62; color: var(--ink-2); }

/* ----------------------------- Layout ----------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 11vw, 144px); position: relative; }
.section.tight { padding-block: clamp(48px, 7vw, 88px); }

.dark { color: var(--on-dark); background:
   radial-gradient(120% 82% at 50% -12%, rgba(37,150,190,.18), transparent 56%),
   radial-gradient(88% 64% at 88% 4%, rgba(195,154,78,.10), transparent 52%),
   linear-gradient(178deg, #103a31 0%, var(--emerald-ink) 60%); }
.dark h1, .dark h2, .dark h3, .dark h4 { color: #fff; }
.dark .lead { color: var(--on-dark); }
.ink-bg { background: var(--ink); color: var(--on-dark); }
.ink-bg h1,.ink-bg h2,.ink-bg h3 { color:#fff; }

.cols { display: grid; gap: clamp(28px, 4vw, 64px); }
@media (min-width: 880px){
  .cols-2-asym { grid-template-columns: 1.15fr .85fr; }
  .cols-2-asym.flip { grid-template-columns: .85fr 1.15fr; }
  .cols-2 { grid-template-columns: 1fr 1fr; }
  .cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ----------------------------- Buttons ---------------------------- */
.btn {
  --bg: var(--ink); --fg: #fff;
  position: relative;
  display: inline-flex; align-items: center; gap: .65em;
  padding: 15px 26px;
  background: var(--bg); color: var(--fg);
  border: 1px solid transparent;
  border-radius: 100px;
  font-size: .95rem; font-weight: 560; letter-spacing: -.005em;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), background .35s, filter .35s;
  will-change: transform;
}
.btn .arr { transition: transform .45s var(--ease-out); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); filter: brightness(1.06); }
.btn:hover .arr { transform: translateX(4px); }
.btn:active { transform: translateY(0); }
.btn-primary { --bg: var(--sapphire); --fg: #fff; box-shadow: 0 12px 30px -14px rgba(37,150,190,.7); }
.btn-emerald { --bg: var(--emerald); --fg: #fff; }
.btn-gold { --bg: linear-gradient(135deg, #d9b56a 0%, #c39a4e 48%, #b1842f 100%); --fg: #1a2c20; box-shadow: 0 12px 30px -14px rgba(195,154,78,.7); }
.btn-gold:hover { filter: brightness(1.05) saturate(1.05); }
.btn-ghost {
  --bg: transparent; --fg: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); filter: none; background: transparent; }
.dark .btn-ghost { --fg: var(--on-dark); border-color: var(--dark-line); }
.dark .btn-ghost:hover { border-color: var(--gold-soft); color: #fff; }

/* Text link with animated underline */
.tlink { position: relative; display: inline-flex; align-items: center; gap:.5em; font-weight: 560; color: var(--ink); }
.tlink::after {
  content:""; position:absolute; left:0; bottom:-3px; height:1px; width:100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.tlink:hover::after { transform: scaleX(1); }
.dark .tlink { color: var(--gold-soft); }

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  transition: background .5s var(--ease), border-color .5s, backdrop-filter .5s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(247,243,234,.78);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: var(--s-3); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; }
.brand .bt { display:flex; flex-direction:column; line-height:1; }
.brand .bt b { font-family: var(--display); font-weight: 520; font-size: 1.04rem; letter-spacing: -.01em; color: var(--ink); }
.brand .bt span { font-size: .62rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-deep); margin-top: 3px; }

.nav-links { display: none; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
@media (min-width: 1000px){ .nav-links { display: flex; } }
.nav-links a { font-size: .94rem; font-weight: 500; color: var(--ink-2); position: relative; padding-block: 6px; transition: color .3s; }
.nav-links a::after { content:""; position:absolute; left:0; bottom:0; height:1.5px; width:0; background: var(--sapphire); transition: width .4s var(--ease-out); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--ink); }

.nav-cta { display: none; }
@media (min-width: 1000px){ .nav-cta { display: inline-flex; } }

.burger { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; padding: 10px; }
@media (min-width: 1000px){ .burger { display: none; } }
.burger span { width: 24px; height: 1.6px; background: var(--ink); transition: transform .4s var(--ease), opacity .3s; }
.burger.open span:nth-child(1){ transform: translateY(6.6px) rotate(45deg); }
.burger.open span:nth-child(2){ opacity: 0; }
.burger.open span:nth-child(3){ transform: translateY(-6.6px) rotate(-45deg); }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 55;
  background: var(--paper);
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: var(--gutter);
  transform: translateY(-100%); transition: transform .6s var(--ease-out);
  visibility: hidden;
}
.drawer.open { transform: translateY(0); visibility: visible; }
.drawer a { font-family: var(--display); font-size: 1.9rem; letter-spacing: -.02em; color: var(--ink); padding: 10px 0; border-bottom: 1px solid var(--line); }
.drawer a:last-of-type { border-bottom: 0; }
.drawer .btn { margin-top: var(--s-3); align-self: flex-start; }

/* ----------------------------- Hero ------------------------------- */
.hero { position: relative; padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(56px, 9vw, 130px); overflow: hidden; }
.hero-grid { display: grid; gap: clamp(32px, 5vw, 56px); align-items: center; }
@media (min-width: 940px){ .hero-grid { grid-template-columns: 1.08fr .92fr; } }
.hero h1 { margin-bottom: var(--s-3); }
.hero h1 .accent { color: var(--sapphire-deep); font-style: italic; font-weight: 420; }
.hero .lead { max-width: 33ch; margin-bottom: var(--s-4); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { position: relative; }
.hero-figure {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/5; background: var(--emerald-deep);
  box-shadow: var(--shadow-lift);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
/* floating credential chip */
.float-chip {
  position: absolute; left: -22px; bottom: 34px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 18px;
  box-shadow: var(--shadow-lift); max-width: 230px;
  display: flex; gap: 12px; align-items: center;
}
.float-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sapphire); box-shadow: 0 0 0 4px var(--sapphire-wash); flex: none; }
.float-chip small { font-size: .78rem; line-height: 1.35; color: var(--slate); }
.float-chip b { color: var(--ink); }
@media (max-width: 600px){ .float-chip { left: 12px; right: 12px; bottom: 12px; max-width: none; } }

/* recurring crescent/arc motif */
.arc-motif { position: absolute; pointer-events: none; opacity: .5; }

/* ----------------------------- Marquee / trust strip -------------- */
.trust-strip { position: relative; overflow: hidden; border: 0; color: var(--on-dark); background:
   radial-gradient(90% 200% at 100% 0%, rgba(37,150,190,.16), transparent 60%),
   linear-gradient(100deg, var(--emerald-ink) 0%, var(--emerald-deep) 55%, var(--emerald) 100%); }
.trust-strip > * { position: relative; z-index: 1; }
.trust-strip .wrap { display: flex; align-items: center; gap: clamp(24px,5vw,64px); flex-wrap: wrap; padding-block: 22px; }
.trust-strip .lbl { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); font-weight: 600; }
.trust-strip .items { display: flex; flex-wrap: wrap; gap: clamp(18px, 3vw, 40px); align-items: center; }
.trust-strip .items span { font-family: var(--display); font-size: 1.02rem; color: #fff; letter-spacing: -.01em; }
/* institution logos — light marks set directly on the green strip, no cards */
.trust-strip .items { gap: clamp(22px, 3.6vw, 54px); }
.logo-chip { display: grid; place-items: center; }
.logo-chip img, .logo-chip svg { max-height: 40px; max-width: 172px; width: auto; height: auto; display: block; opacity: .95; transition: opacity .4s, transform .5s var(--ease-out); }
.logo-chip:hover img, .logo-chip:hover svg { opacity: 1; transform: translateY(-2px); }
.logo-chip.is-nusantara img { max-height: 48px; }
@media (max-width: 600px){ .logo-chip img, .logo-chip svg { max-height: 30px; max-width: 132px; } }

/* ----------------------------- Pillars ---------------------------- */
.pillar {
  position: relative;
  padding: var(--s-4) var(--s-3) var(--s-3);
  border-radius: var(--radius);
  background: var(--paper-2);
  border: 1px solid var(--line);
  transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out), border-color .4s;
  overflow: hidden;
}
.pillar::before {
  content:""; position:absolute; inset:0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out);
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.pillar:hover::before { transform: scaleX(1); }
.pillar .ico { width: 52px; height: 52px; margin-bottom: var(--s-3); color: var(--emerald); }
.pillar h3 { margin-bottom: 6px; }
.pillar .id-term { font-family: var(--display); font-style: italic; font-size: .92rem; color: var(--gold-deep); display:block; margin-bottom: var(--s-2); }
/* stagger heights — deliberate asymmetry */
@media (min-width: 880px){
  .pillars-grid .pillar:nth-child(2){ transform: translateY(26px); }
  .pillars-grid .pillar:nth-child(2):hover{ transform: translateY(20px); }
}

/* ----------------------------- Quote / testimonial --------------- */
.quote-card {
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 56px);
  background: var(--paper-2); border: 1px solid var(--line);
  position: relative;
}
.quote-card .mark { font-family: var(--display); font-size: 4.4rem; line-height: .6; color: var(--gold-soft); height: 34px; display:block; }
.quote-card blockquote { font-family: var(--display); font-weight: 380; font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.34; letter-spacing: -.02em; color: var(--ink); margin: 0 0 var(--s-3); }
.quote-card .cite { display: flex; align-items: center; gap: 14px; }
.quote-card .cite .av { width: 56px; height: 56px; border-radius: 50%; background: var(--emerald); color:#fff; display:grid; place-items:center; font-family: var(--display); font-size: 1.1rem; flex:none; overflow:hidden; box-shadow: 0 0 0 1px var(--line), 0 6px 18px -8px rgba(18,34,32,.5); }
.quote-card .cite .av img { width: 100%; height: 100%; object-fit: cover; }
.quote-card .cite b { display:block; color: var(--ink); font-family: var(--sans); font-size: .98rem; }
.quote-card .cite span { font-size: .85rem; color: var(--slate-soft); }

/* ----------------------------- Cluster accordion ----------------- */
.cluster { border-top: 1px solid var(--line); }
.cluster:last-child { border-bottom: 1px solid var(--line); }
.cluster-head {
  width: 100%; background: none; border: 0; text-align: left;
  display: grid; grid-template-columns: auto 1fr auto; gap: clamp(16px, 3vw, 36px);
  align-items: center; padding: clamp(22px, 3vw, 34px) 4px;
  transition: padding-left .4s var(--ease);
}
.cluster-head:hover { padding-left: 14px; }
.cluster-head .c-num { font-family: var(--display); font-style: italic; font-size: 1.05rem; color: var(--gold-deep); }
.cluster-head .c-title { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.95rem); letter-spacing: -.02em; color: var(--ink); }
.cluster-head .c-sub { display:block; font-family: var(--sans); font-size: .92rem; color: var(--slate); margin-top: 4px; max-width: 62ch; font-weight: 400; }
.cluster-head .c-plus { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; flex: none; transition: background .4s, border-color .4s, transform .5s var(--ease); }
.cluster-head .c-plus::before, .cluster-head .c-plus::after { content:""; position:absolute; inset:0; margin:auto; background: var(--ink); }
.cluster-head .c-plus::before { width: 13px; height: 1.5px; }
.cluster-head .c-plus::after { width: 1.5px; height: 13px; transition: transform .5s var(--ease); }
.cluster.open .c-plus { background: var(--sapphire); border-color: var(--sapphire); }
.cluster.open .c-plus::before, .cluster.open .c-plus::after { background: #fff; }
.cluster.open .c-plus::after { transform: rotate(90deg); }
.cluster-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease-out); }
.cluster.open .cluster-body { grid-template-rows: 1fr; }
.cluster-body > div { overflow: hidden; }
.cluster-sectors { padding: 4px 4px 32px clamp(40px, 6vw, 86px); columns: 2; column-gap: 48px; }
@media (max-width: 720px){ .cluster-sectors { columns: 1; } }
.cluster-sectors li { break-inside: avoid; list-style: none; padding: 9px 0 9px 22px; position: relative; color: var(--ink-2); font-size: .96rem; border-bottom: 1px solid var(--line); }
.cluster-sectors li::before { content:""; position:absolute; left:0; top: 17px; width: 7px; height: 7px; border: 1.5px solid var(--sapphire); border-radius: 2px; transform: rotate(45deg); }

/* ----------------------------- Stat band -------------------------- */
.stats { display: grid; gap: clamp(20px,3vw,40px); grid-template-columns: repeat(2,1fr); }
@media (min-width: 760px){ .stats { grid-template-columns: repeat(4,1fr); } }
.stat .n { font-family: var(--display); font-size: clamp(2.6rem,5vw,3.6rem); letter-spacing: -.04em; line-height: 1; color: #fff; }
.stat .n .u { color: var(--gold-soft); }
.stat .l { margin-top: 10px; font-size: .9rem; color: var(--on-dark-soft); max-width: 22ch; }

/* ----------------------------- Highlight box (terminology) -------- */
.note-box {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--sapphire-wash), var(--paper-2));
  border: 1px solid #cfe2ea;
  padding: clamp(26px, 4vw, 52px);
  position: relative; overflow: hidden;
}
.note-box .tag { position:absolute; top: 22px; right: 26px; font-size:.7rem; letter-spacing:.2em; text-transform:uppercase; color: var(--sapphire-deep); font-weight:700; }
.note-box .ar { font-family: var(--display); font-style: italic; color: var(--sapphire-deep); }

/* ----------------------------- Generic card grid ----------------- */
.feature {
  padding: var(--s-4) var(--s-3);
  border-radius: var(--radius); background: var(--paper-2); border: 1px solid var(--line);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.feature .ico { color: var(--sapphire); margin-bottom: var(--s-2); }

/* ----------------------------- Figure w/ caption ----------------- */
.figure { border-radius: var(--radius-lg); overflow: hidden; background: var(--emerald-deep); position: relative; box-shadow: var(--shadow-soft); }
.figure img { width:100%; height:100%; object-fit: cover; aspect-ratio: 3/4; }
.figure.wide img { aspect-ratio: 16/11; }
.figure .cap { position:absolute; left:0; right:0; bottom:0; padding: 26px; background: linear-gradient(0deg, rgba(12,42,36,.86), transparent); color: var(--on-dark); font-size: .86rem; }

/* art-directed fallback panel (when no photo) */
.art-panel { position: relative; width:100%; height:100%; min-height: 320px; background:
   radial-gradient(120% 90% at 18% 12%, rgba(111,185,212,.42), transparent 55%),
   radial-gradient(120% 120% at 92% 100%, rgba(195,154,78,.30), transparent 50%),
   linear-gradient(160deg, var(--emerald-deep), var(--emerald-ink)); }

/* ---- Media component: art-directed base + optional photo overlay ---- */
.media {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background:
    radial-gradient(130% 100% at 16% 8%, rgba(111,185,212,.55), transparent 52%),
    radial-gradient(120% 120% at 96% 104%, rgba(195,154,78,.40), transparent 46%),
    linear-gradient(155deg, #1a5d4e 0%, var(--emerald-deep) 42%, var(--emerald-ink) 100%);
  background-color: var(--emerald-ink);
  box-shadow: var(--shadow-soft);
}
.media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; transition: transform 1.2s var(--ease-out), opacity .8s; }
.media .motif { position: absolute; inset: 0; z-index: 1; opacity: .9; color: rgba(230,207,157,.5); }
.media .motif svg { width: 100%; height: 100%; }
.media .glyph { position: absolute; z-index: 1; right: -8%; bottom: -10%; width: 62%; color: rgba(255,255,255,.06); pointer-events: none; }
.media.no-img > img { display: none; }
.media:hover > img { transform: scale(1.035); }
.media[data-r="45"] { aspect-ratio: 4/5; }
.media[data-r="34"] { aspect-ratio: 3/4; }
.media[data-r="11"] { aspect-ratio: 1/1; }
.media[data-r="1611"] { aspect-ratio: 16/11; }
.media[data-r="169"] { aspect-ratio: 16/9; }
.media .m-cap { position:absolute; z-index:3; left:0; right:0; bottom:0; padding: 24px; color: var(--on-dark); font-size:.85rem; background: linear-gradient(0deg, rgba(12,42,36,.82), transparent); }

/* ----------------------------- Cinematic band --------------------- */
.cine-band { position: relative; min-height: clamp(420px, 60vh, 640px); display: flex; align-items: center; overflow: hidden; }
.cine-band > img { position: absolute; inset: 0; width: 100%; height: 126%; top: -13%; object-fit: cover; object-position: 72% 38%; z-index: 0; }
/* Darken the left (text) side; keep the subjects on the right clearly visible. */
.cine-band::after { content: ""; position: absolute; inset: 0; z-index: 1; background:
   linear-gradient(90deg, rgba(8,28,23,.90) 0%, rgba(8,28,23,.66) 36%, rgba(8,28,23,.16) 66%, transparent 100%),
   linear-gradient(180deg, rgba(8,28,23,.45) 0%, transparent 26%, transparent 82%, rgba(8,28,23,.45) 100%); }
.cine-band .wrap { position: relative; z-index: 2; }
.cine-band .inner { color: #fff; text-align: left; max-width: 32rem; }
.cine-band .eyebrow { color: var(--gold-soft); justify-content: flex-start; }
.cine-band .eyebrow::before { background: var(--gold); }
.cine-band blockquote { font-family: var(--display); font-weight: 340; font-style: italic; font-size: clamp(1.55rem, 3.3vw, 2.7rem); line-height: 1.2; letter-spacing: -.022em; margin: 22px 0 0; color: #fff; text-shadow: 0 2px 40px rgba(0,0,0,.45); }
.cine-band blockquote::after { content: ""; display: block; width: 56px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); margin: 30px 0 0; }
@media (max-width: 640px){
  .cine-band::after { background: linear-gradient(180deg, rgba(8,28,23,.55), rgba(8,28,23,.78)); }
  .cine-band .inner { max-width: none; }
}

/* ----------------------------- CTA banner ------------------------- */
.cta-banner { position: relative; overflow: hidden; }
.cta-banner h2 { max-width: 18ch; }
.cta-inner { display: grid; gap: clamp(28px,4vw,56px); align-items: end; }
@media (min-width: 860px){ .cta-inner { grid-template-columns: 1.2fr .8fr; } }

/* ----------------------------- Forms ------------------------------ */
.field { position: relative; margin-bottom: var(--s-3); }
.field input, .field textarea, .field select {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 26px 16px 10px;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field label {
  position: absolute; left: 16px; top: 17px; color: var(--slate-soft);
  font-size: 1rem; pointer-events: none; transition: all .25s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--sapphire); box-shadow: 0 0 0 4px var(--sapphire-wash); background: #fff; }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select:valid + label, .field select:focus + label {
  top: 8px; font-size: .7rem; letter-spacing: .04em; color: var(--sapphire-deep); font-weight: 600;
}
.field select { appearance: none; }

/* ----------------------------- Footer ----------------------------- */
.site-footer { color: var(--on-dark); padding-block: clamp(56px,8vw,96px) 32px; position: relative; overflow: hidden; background:
   radial-gradient(80% 60% at 88% -10%, rgba(37,150,190,.14), transparent 55%),
   radial-gradient(70% 60% at 8% -10%, rgba(195,154,78,.08), transparent 55%),
   linear-gradient(180deg, #0f342c, var(--emerald-ink) 70%); }
.footer-grid { display: grid; gap: clamp(32px,4vw,56px); }
@media (min-width: 820px){ .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.1fr; } }
.footer-brand .medallion { display: inline-flex; margin-bottom: 20px; }
.footer-brand .medallion img { width: auto; height: 76px; opacity: .96; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 18px; font-weight: 600; color: var(--gold-soft); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.site-footer ul a { color: var(--on-dark-soft); font-size: .95rem; transition: color .3s, padding-left .3s; }
.site-footer ul a:hover { color: #fff; padding-left: 5px; }
.site-footer .desc { color: var(--on-dark-soft); font-size: .95rem; max-width: 34ch; }
.footer-base { border-top: 1px solid var(--dark-line); margin-top: clamp(40px,5vw,64px); padding-top: 26px; display:flex; flex-wrap:wrap; gap: 14px; justify-content: space-between; align-items:center; color: var(--on-dark-soft); font-size: .84rem; }

/* ----------------------------- Page hero (interior) -------------- */
.page-hero { padding-top: clamp(56px,8vw,104px); padding-bottom: clamp(36px,5vw,64px); position: relative; }
.page-hero .crumb { font-size:.8rem; letter-spacing:.04em; color: var(--slate-soft); margin-bottom: var(--s-3); }
.page-hero .crumb a:hover { color: var(--sapphire-deep); }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { max-width: 56ch; margin-top: var(--s-3); }

/* ----------------------------- Reveal animation ------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
/* No-JS / no-anim safety: never hide content when scripts are unavailable */
.no-js .reveal { opacity: 1 !important; transform: none !important; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

/* utilities */
.mt-0{margin-top:0}.mb-0{margin-bottom:0}
.measure { max-width: 60ch; }
.measure-sm { max-width: 46ch; }
.center { text-align: center; }
.muted { color: var(--slate-soft); }
.hair { height:1px; background: var(--line); border:0; margin:0; }
.spacer-sm{height:24px}.spacer{height:48px}
.grid-label { display:flex; align-items:baseline; gap: 14px; margin-bottom: var(--s-4); }
.kicker-row { display:flex; align-items: flex-end; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: clamp(36px,5vw,64px); }
.kicker-row .lead { max-width: 42ch; }

/* teaser list rows */
.tlrow { position: relative; padding: 11px 0 11px 30px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 1.02rem; font-weight: 500; transition: padding-left .4s var(--ease), color .3s; }
.tlrow::before { content: ""; position: absolute; left: 2px; top: 18px; width: 9px; height: 9px; border: 1.5px solid var(--sapphire); border-radius: 2px; transform: rotate(45deg); transition: background .3s; }
.tlrow:hover { padding-left: 38px; color: var(--ink); }
.tlrow:hover::before { background: var(--sapphire); }
.dark .tlrow { color: var(--on-dark); border-color: var(--dark-line); }

/* mission items */
.mission-item { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--dark-line); }
.mission-item:last-child { border-bottom: 0; }
.mission-item .m-n { font-family: var(--display); font-style: italic; font-size: 1.1rem; color: var(--gold-soft); }
.mission-item p { margin: 0; color: var(--on-dark); }

/* ---- Contact page ---- */
.contact-form { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px,3.5vw,44px); box-shadow: var(--shadow-soft); }
.field { --label-bg: var(--paper-2); }
.field .sel-arrow { position: absolute; right: 16px; top: 18px; color: var(--slate-soft); pointer-events: none; font-size: .9rem; }
.contact-aside { position: sticky; top: 100px; }
.contact-row { display: flex; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); transition: padding-left .4s var(--ease); }
.contact-row:hover { padding-left: 8px; }
.contact-row b { color: var(--ink); font-size: .98rem; }
.cr-ico { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--sapphire-wash); color: var(--sapphire-deep); transition: background .4s, color .4s, transform .5s var(--ease); }
.contact-row:hover .cr-ico { background: var(--sapphire); color: #fff; transform: rotate(-6deg) scale(1.05); }
.aside-quote { margin-top: 34px; padding: 24px; border-left: 2px solid var(--gold); background: var(--paper-3); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.aside-quote p { font-size: 1.2rem; line-height: 1.4; color: var(--ink); margin: 0; }
.form-note-ok { background: var(--sapphire-wash); border: 1px solid #cfe2ea; color: var(--sapphire-deep); padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .92rem; }

/* ============================================================
   Mobile polish & horizontal-overflow safety (audit pass)
   ============================================================ */
html { overflow-x: clip; }
/* let flex/grid children shrink below their min-content so a long
   eyebrow / heading never forces the track wider than the viewport */
.hero-grid > *, .cols > *, .kicker-row > *, .cta-inner > *,
.footer-grid > *, .cluster-head > *, .hero-cta, .hero-copy { min-width: 0; }
/* eyebrow wraps gracefully instead of overflowing */
.eyebrow { flex-wrap: wrap; max-width: 100%; }

@media (max-width: 620px){
  h1 { font-size: clamp(2.05rem, 8.6vw, 2.8rem); letter-spacing: -.03em; }
  h2 { font-size: clamp(1.7rem, 6.6vw, 2.3rem); }
  .page-hero h1 { max-width: none; }
  .hero .lead, .page-hero .lead, .measure, .measure-sm { max-width: none; }
  .eyebrow { letter-spacing: .14em; font-size: .68rem; }
  /* full-width, comfortably tappable CTAs */
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
  .cta-inner .btn { width: 100%; justify-content: center; }
  /* trust strip: tidy wrapping logo row */
  .trust-strip .wrap { gap: 16px; }
  .trust-strip .items { gap: 20px 26px; }
  /* cinematic band: text spans the column */
  .cine-band .inner { max-width: none; }
  /* quote card & forms breathe */
  .quote-card { padding: 26px 22px; }
  .section, .section.tight { padding-block: clamp(48px, 13vw, 72px); }
  /* float chip never overflows the hero image */
  .float-chip { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media (max-width: 420px){
  .nav { height: 66px; }
  .brand img { height: 38px; }
  .brand .bt b { font-size: .92rem; }
}
