/* Shaan Rais landing system. Shared by /rais-institute and /120-day-brand.
   Antonio stands in for Dharma Gothic E, Archivo for Acumin Pro (brand-guideline substitutes). */

@font-face {
  font-family: "Antonio";
  src: url("../fonts/antonio.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --ink: #02040f;
  --ink-2: #080b18;
  --ink-3: #0e1424;
  --slate: #1e2a38;
  --navy: #08134b;
  --navy-2: #111d5e;

  --tx-1: #f4f1ec;
  --tx-2: #cfcbd6;
  --tx-3: #9a97a3;

  --copper: #63260e;
  --bronze: #9d7257;
  --gold: #ecc182;
  --champagne: #ffe9ce;
  --metal: linear-gradient(100deg, #9d7257 0%, #ecc182 22%, #ffe9ce 42%, #ecc182 58%, #9d7257 82%, #ecc182 100%);

  --crimson: #a6001a;
  --crimson-hover: #bf0020;
  --crimson-press: #910207;

  --line: rgba(236, 193, 130, 0.2);
  --line-soft: rgba(244, 241, 236, 0.09);

  --display: "Antonio", "Arial Narrow", sans-serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --section: clamp(88px, 12vw, 168px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --z-sticky: 40;
  --z-header: 50;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  scrollbar-color: var(--bronze) var(--ink);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--tx-1);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 96%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--ink); }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--bronze); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--gold); }

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: 10px 16px; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */

.display,
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 7.4vw, 6rem); }
h2 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); }
h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); line-height: 1.05; letter-spacing: 0.01em; }

p { margin: 0; }
.lead { font-size: clamp(1.125rem, 1.5vw, 1.3rem); line-height: 1.55; color: var(--tx-2); max-width: 46ch; }
.body { color: var(--tx-2); max-width: 62ch; }
.body + .body { margin-top: 1em; }
.fine { font-size: 0.8125rem; line-height: 1.5; color: var(--tx-3); }

/* the brand metal, one phrase per section */
.metal {
  background: var(--metal);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ---------- Buttons ---------- */

.btn {
  --h: 58px;
  --cut: 16px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: var(--h);
  padding: 0 calc(var(--cut) + 22px);
  border: 0;
  background: none;
  color: #fff;
  font: 700 0.95rem/1 var(--text);
  font-stretch: 100%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.2s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--crimson) 0%, #99000d 100%);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 50%);
  transition: background 0.2s var(--ease), filter 0.2s var(--ease);
  filter: drop-shadow(0 10px 24px rgba(166, 0, 26, 0.28));
}
.btn:hover::before { background: linear-gradient(180deg, var(--crimson-hover) 0%, var(--crimson) 100%); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:active::before { background: var(--crimson-press); }
.btn .ph { font-size: 1.15em; transition: transform 0.25s var(--ease); }
.btn:hover .ph { transform: translateX(4px); }
.btn[disabled] { cursor: progress; opacity: 0.6; }

.btn--small { --h: 44px; --cut: 12px; font-size: 0.8rem; padding: 0 calc(var(--cut) + 14px); }
.btn--small::before { filter: none; }

.btn--ghost { color: var(--tx-1); }
.btn--ghost::before { background: transparent; filter: none; box-shadow: inset 0 0 0 1px var(--gold); clip-path: none; }
.btn--ghost:hover::before { background: rgba(236, 193, 130, 0.08); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.cta-note { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--tx-2); }
.cta-note .ph { color: var(--gold); font-size: 1.1rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(2, 4, 15, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 42px; height: 42px; }
.brand span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.brand small {
  display: block;
  font-family: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--tx-3);
  margin-top: 4px;
}
@media (max-width: 560px) {
  .site-header .btn--small { display: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section); position: relative; }
.section--slate { background: linear-gradient(180deg, var(--ink-2), var(--ink-3)); }
.section--navy { background: radial-gradient(120% 90% at 85% 0%, var(--navy) 0%, var(--ink-2) 55%, var(--ink) 100%); }
.rule { height: 1px; border: 0; margin: 0; background: linear-gradient(90deg, transparent, var(--bronze) 20%, var(--gold) 50%, var(--bronze) 80%, transparent); opacity: 0.55; }

.stack > * + * { margin-top: 24px; }
.stack-lg > * + * { margin-top: 40px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: clip;
  min-height: min(calc(100dvh - 72px), 880px);
  display: grid;
  align-items: center;
  padding-block: clamp(40px, 6vw, 72px) 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(52% 70% at 78% 46%, rgba(17, 29, 94, 0.85) 0%, rgba(8, 19, 75, 0.35) 45%, transparent 72%),
    radial-gradient(40% 40% at 12% 100%, rgba(99, 38, 14, 0.25), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 4vw, 64px); align-items: end; }
.hero-copy { padding-bottom: clamp(48px, 8vw, 112px); }
.hero-copy .lead { margin-top: 28px; }
.hero-copy .cta-row { margin-top: 40px; }
.hero-figure { position: relative; align-self: end; margin: 0; }
/* floor fade on the cut-out itself, so it stands on the field without an overlay box showing over the navy light */
.hero-figure img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.55));
  -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent);
  mask-image: linear-gradient(180deg, #000 74%, transparent);
}

@media (max-width: 900px) {
  .hero { min-height: 0; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 8px; }
  .hero-figure { max-width: 440px; margin-inline: auto; margin-top: -8px; }
  .hero-copy .btn { width: 100%; }
}

/* ---------- Reveal motion (one grammar, content visible by default) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .reveal.is-in { opacity: 1; transform: none; filter: none; }
  .js .hero .reveal { transition-duration: 1.1s; }
}

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 26px 0;
  cursor: pointer;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ph { flex: none; color: var(--gold); font-size: 1.3rem; transition: transform 0.3s var(--ease); }
.faq details[open] summary .ph { transform: rotate(45deg); }
.faq summary:hover { color: var(--champagne); }
.faq .answer { padding: 0 0 28px; max-width: 64ch; color: var(--tx-2); }

/* ---------- Application / qualifier ---------- */

.apply {
  background:
    radial-gradient(70% 60% at 20% 0%, rgba(17, 29, 94, 0.7), transparent 70%),
    linear-gradient(180deg, var(--ink-2), var(--ink));
  border-top: 1px solid var(--line);
}
.apply-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .apply-grid { grid-template-columns: 1fr; } }

.panel {
  background: linear-gradient(180deg, rgba(14, 20, 36, 0.92), rgba(8, 11, 24, 0.96));
  border: 1px solid var(--line);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  position: relative;
}
.panel::before { content: ""; position: absolute; inset: -1px -1px auto -1px; height: 2px; background: var(--metal); }

.steps { display: flex; gap: 8px; margin-bottom: 28px; }
.steps span { flex: 1; height: 3px; background: var(--line-soft); transition: background 0.4s var(--ease); }
.steps span.on { background: var(--gold); }
.step-count { font-size: 0.8125rem; color: var(--tx-3); margin-bottom: 10px; letter-spacing: 0.04em; }

.q { border: 0; margin: 0; padding: 0; min-width: 0; }
.q legend { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.05; margin-bottom: 20px; padding: 0; }
.q[hidden] { display: none; }
.choices { display: grid; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice label {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 14px 18px;
  border: 1px solid var(--line-soft);
  background: rgba(244, 241, 236, 0.02);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.choice label::after { content: ""; flex: none; width: 18px; height: 18px; border: 1px solid var(--tx-3); border-radius: 50%; transition: all 0.2s var(--ease); }
.choice input:hover + label { border-color: var(--line); }
.choice input:checked + label { border-color: var(--gold); background: rgba(236, 193, 130, 0.07); }
.choice input:checked + label::after { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 4px var(--ink-3); }
.choice input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 3px; }
.choices[aria-invalid="true"] label { border-color: #ff6b7d; }
.q legend:focus { outline: none; }

.field { display: grid; gap: 8px; }
.field + .field { margin-top: 16px; }
.field label { font-size: 0.875rem; font-weight: 600; color: var(--tx-1); letter-spacing: 0.02em; }
.field input {
  width: 100%; min-height: 54px; padding: 12px 16px;
  font: 400 1rem/1.4 var(--text);
  color: var(--tx-1);
  background: var(--ink);
  border: 1px solid rgba(244, 241, 236, 0.22);
  border-radius: 0;
  transition: border-color 0.2s var(--ease);
}
.field input::placeholder { color: #8d8a96; }
.field input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(236, 193, 130, 0.18); }
.field input[aria-invalid="true"] { border-color: #ff6b7d; }
.field .err { font-size: 0.8125rem; color: #ff8f9c; min-height: 1.2em; }
.field .err:empty { min-height: 0; margin-top: -8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two .field + .field { margin-top: 0; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }

.form-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.link-btn { background: none; border: 0; padding: 10px 0; color: var(--tx-2); font: 600 0.9rem var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.link-btn:hover { color: var(--tx-1); }
.form-nav .btn { margin-left: auto; }
@media (max-width: 520px) { .form-nav .btn { flex: 1; } }

/* touch: a tapped answer advances on its own, so choice steps swap the Continue button for a hint */
@media (pointer: coarse) {
  .qualify[data-kind="choice"] [data-next] { display: none; }
  .qualify[data-kind="choice"] .form-nav { min-height: 44px; }
  .qualify[data-kind="choice"] .form-nav::after { content: "Tap an answer to continue"; margin-left: auto; font-size: 0.8125rem; color: var(--tx-3); }
}
.choice input:active + label { background: rgba(236, 193, 130, 0.12); }

.result h3 { margin-bottom: 12px; }
.result .body { margin-bottom: 24px; }
.calendar { margin-top: 8px; background: #fff; min-height: 640px; }
.calendar iframe { display: block; width: 100%; height: 680px; border: 0; }
/* the meetings widget needs ~340px; let it bleed through the panel padding on phones */
@media (max-width: 520px) { .result .calendar { margin-inline: calc(-1 * clamp(24px, 4vw, 48px)); } }
.form-msg { margin-top: 16px; font-size: 0.875rem; color: #ff8f9c; }

/* ---------- Sticky mobile CTA ---------- */

.sticky-cta {
  position: fixed;
  inset: auto 0 0 0;
  z-index: var(--z-sticky);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(2, 4, 15, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease);
}
.sticky-cta.show { transform: none; }
.sticky-cta .btn { width: 100%; --h: 52px; }
@media (min-width: 901px) { .sticky-cta { display: none; } }

/* ---------- Footer ---------- */

.site-footer { padding-block: 64px calc(64px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); background: var(--ink); }
.site-footer .wrap { display: grid; gap: 28px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.875rem; color: var(--tx-2); }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--tx-1); text-decoration: underline; }
.site-footer .credit { margin-left: 6px; white-space: nowrap; }
.site-footer .credit a { color: var(--tx-2); }
.site-footer .credit a:hover { color: var(--tx-1); }
@media (max-width: 900px) { .site-footer { padding-bottom: 120px; } }

/* ---------- Utilities ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ph { line-height: 1; }

.ph { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.125em; }

[hidden]:not([hidden="until-found"]) { display: none !important; }
