/* RealStack landing: editorial "academy" aesthetic.
   Scoped to index.html only; admin uses admin.css. */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Aquila360 brand palette */
  --paper: #f4f7fb;
  --paper-2: #eaf0f7;
  --ink: #0a1326;
  --ink-soft: #4a5a73;
  --line: #dce4ee;
  --forest: #0a1326;   /* deep navy card */
  --forest-2: #1e7fd4; /* azure */
  --clay: #1e7fd4;     /* azure accent */
  --gold: #19d3b5;     /* teal highlight */
  --ok: #0fb8a0;
  --err: #e24b4a;
}

* { box-sizing: border-box; }
body { user-select: none; }
input, textarea { user-select: text; } /* keep form fields selectable */

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 400 17px/1.65 'IBM Plex Sans', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(30,127,212,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(25,211,181,.09), transparent 55%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* faint paper grain */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(234,241,251,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1.5rem; }
.brand { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--clay); box-shadow: 0 0 0 4px rgba(30,127,212,.18); }
.topbar .status { display: flex; align-items: center; gap: 1.25rem; font-size: .82rem; color: var(--ink-soft); }
.live { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--forest-2); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--forest-2); box-shadow: 0 0 0 0 rgba(15,184,160,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(15,184,160,.5); } 70% { box-shadow: 0 0 0 7px rgba(15,184,160,0); } 100% { box-shadow: 0 0 0 0 rgba(15,184,160,0); } }
.btn-ghost { font: inherit; font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--ink); border: 1px solid var(--ink); border-radius: 999px; padding: .45rem 1rem; transition: background .15s, color .15s; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---- hero ---- */
.hero { padding: 5rem 0 3.5rem; }
.kicker { font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--clay); font-weight: 700; margin: 0 0 1.25rem; }
.hero h1 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 5.2rem); line-height: .98;
  letter-spacing: -.025em; margin: 0; max-width: 14ch;
}
.hero h1 em { font-style: italic; color: var(--clay); font-weight: 400; }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 52ch; margin: 1.5rem 0 2.25rem; }

.meta { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 999px; padding: .5rem 1rem; font-size: .85rem; font-weight: 600;
}
.chip b { color: var(--forest-2); }

/* reveal on load */
.reveal { opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.22,1,.36,1) forwards; }
.reveal.d1 { animation-delay: .08s; }
.reveal.d2 { animation-delay: .18s; }
.reveal.d3 { animation-delay: .30s; }
.reveal.d4 { animation-delay: .42s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } }

/* ---- section heading ---- */
.sec { padding: 3.5rem 0; border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.sec-head .no { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; color: var(--clay); }
.sec-head h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -.02em; margin: 0; }

/* ---- curriculum: the build journey roadmap ---- */
.sec-head { flex-direction: column; align-items: flex-start; gap: .6rem; }
.sec-sub { margin: 0; color: var(--ink-soft); font-size: 1.02rem; max-width: 56ch; }

/* the spine runs down the centre; stops hang off alternating sides */
.roadmap {
  list-style: none; margin: 1rem 0 0; padding: 0; position: relative;
}
.roadmap::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(var(--line), var(--forest-2) 12%, var(--gold) 88%, var(--line));
  border-radius: 2px;
}

.stop {
  position: relative; width: 50%; padding: .9rem 2.75rem; box-sizing: border-box;
  /* fade/slide each stop in, staggered down the path */
  opacity: 0; animation: rise .7s cubic-bezier(.22,1,.36,1) forwards;
}
.stop:nth-child(odd)  { margin-left: 0;   text-align: right; }
.stop:nth-child(even) { margin-left: 50%; text-align: left;  }
.stop:nth-child(1) { animation-delay: .05s; } .stop:nth-child(2) { animation-delay: .10s; }
.stop:nth-child(3) { animation-delay: .15s; } .stop:nth-child(4) { animation-delay: .20s; }
.stop:nth-child(5) { animation-delay: .25s; } .stop:nth-child(6) { animation-delay: .30s; }
.stop:nth-child(7) { animation-delay: .35s; } .stop:nth-child(8) { animation-delay: .40s; }
.stop:nth-child(9) { animation-delay: .45s; } .stop:nth-child(10){ animation-delay: .50s; }
.stop:nth-child(11){ animation-delay: .55s; } .stop:nth-child(12){ animation-delay: .60s; }
.stop:nth-child(13){ animation-delay: .65s; }

/* the node that sits on the spine */
.node {
  position: absolute; top: 1.5rem; width: 2.4rem; height: 2.4rem; z-index: 2;
  display: grid; place-items: center; border-radius: 50%;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem;
  background: var(--paper); color: var(--forest-2);
  border: 2px solid var(--forest-2);
  box-shadow: 0 0 0 6px var(--paper);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.stop:nth-child(odd)  .node { right: -1.2rem; }
.stop:nth-child(even) .node { left: -1.2rem; }
.stop:hover .node { transform: scale(1.12); background: var(--forest-2); color: #fff; }

.stop-card {
  display: inline-block; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 1.1rem 1.3rem; max-width: 30rem;
  box-shadow: 0 14px 30px -22px rgba(10,19,38,.5);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stop:hover .stop-card { transform: translateY(-3px); border-color: var(--forest-2); box-shadow: 0 22px 40px -24px rgba(30,127,212,.5); }

.phase {
  display: inline-block; font-family: 'IBM Plex Mono', monospace;
  font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--forest-2); background: rgba(30,127,212,.10);
  padding: .25rem .6rem; border-radius: 999px; margin-bottom: .6rem;
}
.stop-card b { display: block; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.2rem; letter-spacing: -.01em; }
.stop-card span { display: block; color: var(--ink-soft); font-size: .95rem; margin-top: .3rem; }
.stop-card .out { display: block; font-family: 'IBM Plex Mono', monospace; font-style: normal; font-size: .82rem; color: var(--gold); margin-top: .7rem; font-weight: 500; }

/* start & finish caps */
.stop.start .node, .stop.finish .node { background: var(--forest); border-color: var(--forest); color: var(--gold); font-size: 1.1rem; }
.stop.start .stop-card, .stop.finish .stop-card {
  background: var(--forest); border-color: var(--forest); color: var(--paper);
}
.stop.start .stop-card b, .stop.finish .stop-card b { color: #fff; }
.stop.start .stop-card span, .stop.finish .stop-card span { color: rgba(234,241,251,.85); }
.stop.start .phase, .stop.finish .phase { color: var(--gold); background: rgba(25,211,181,.14); }

@media (prefers-reduced-motion: reduce) { .stop { animation: none; opacity: 1; } }

/* mobile: collapse to a single left-aligned timeline */
@media (max-width: 720px) {
  .roadmap::before { left: 1.1rem; }
  .stop, .stop:nth-child(odd), .stop:nth-child(even) {
    width: 100%; margin-left: 0; text-align: left; padding: .7rem 0 .7rem 3rem;
  }
  .stop .node, .stop:nth-child(odd) .node, .stop:nth-child(even) .node { left: -.1rem; right: auto; }
  .stop-card { max-width: 100%; }
}

/* ---- instructor ---- */
.instructor { display: grid; grid-template-columns: auto 1fr; gap: 1.75rem; align-items: start; }
.instructor .avatar {
  width: 96px; height: 96px; border-radius: 16px;
  display: grid; place-items: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 2rem; color: #fff;
  background: linear-gradient(140deg, var(--forest-2), var(--gold));
  box-shadow: 0 16px 32px -16px rgba(30,127,212,.6);
}
.instructor .bio h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.4rem; margin: 0 0 .15rem; letter-spacing: -.01em; }
.instructor .bio .role { font-family: 'IBM Plex Mono', monospace; font-size: .85rem; color: var(--ink-soft); margin: 0 0 .9rem; }
.instructor .bio p { margin: 0; color: var(--ink-soft); max-width: 60ch; }
.instructor a { color: var(--forest-2); text-decoration: none; font-weight: 600; }
.instructor a:hover { text-decoration: underline; }

/* ---- enroll ---- */
.enroll { display: grid; grid-template-columns: 1fr 1.15fr; gap: 2.5rem; align-items: start; }
.enroll-card {
  position: sticky; top: 5.5rem;
  color: var(--paper); border-radius: 22px; padding: 2.25rem;
  /* layered mesh: teal + azure glows over deep navy — kills the flat look */
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(25,211,181,.16), transparent 45%),
    radial-gradient(120% 120% at 100% 0%, rgba(30,127,212,.22), transparent 50%),
    radial-gradient(140% 120% at 100% 100%, rgba(25,211,181,.10), transparent 55%),
    linear-gradient(165deg, #0e1a33 0%, #0a1326 60%, #070e1d 100%);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 40px 80px -40px rgba(7,14,29,.85),
              inset 0 1px 0 rgba(255,255,255,.10),
              inset 0 0 0 1px rgba(30,127,212,.08);
  overflow: hidden;
}
/* hairline top sheen ribbon */
.enroll-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--forest-2), transparent);
  opacity: .8;
}
.price-block { position: relative; }
.price-top { display: flex; align-items: center; gap: .55rem; margin-bottom: 1rem; flex-wrap: wrap; }
.off-badge {
  display: inline-block; color: #fff;
  background: linear-gradient(135deg, var(--forest-2), #155fa6);
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  padding: .35rem .7rem; border-radius: 999px;
  box-shadow: 0 8px 20px -6px rgba(30,127,212,.7), inset 0 1px 0 rgba(255,255,255,.3);
}
.save-chip {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  color: var(--gold); padding: .35rem .7rem; border-radius: 999px;
  background: rgba(25,211,181,.10); border: 1px solid rgba(25,211,181,.35);
}
.enroll-card .price {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(3rem, 6vw, 3.8rem); line-height: 1; letter-spacing: -.03em;
  background: linear-gradient(120deg, #8ff0dd 0%, var(--gold) 45%, #14b8e0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(25,211,181,.25));
}
.enroll-card .was { font-size: .95rem; color: rgba(234,241,251,.7); margin-top: .55rem; }
.enroll-card .was s { color: rgba(234,241,251,.55); text-decoration-thickness: 2px; }
.enroll-card .price-block small { font-family: 'IBM Plex Sans', sans-serif; font-size: .82rem; font-weight: 500; color: rgba(234,241,251,.6); display: block; margin-top: .7rem; letter-spacing: .02em; line-height: 1.45; }
.includes { list-style: none; padding: 0; margin: 1.75rem 0; display: grid; gap: .6rem; }
.includes li {
  display: flex; align-items: center; gap: .75rem; font-size: .95rem;
  color: rgba(234,241,251,.94); padding: .7rem .8rem; border-radius: 12px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.includes li:hover { transform: translateX(4px); background: rgba(25,211,181,.08); border-color: rgba(25,211,181,.28); }
.includes .tk {
  flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem;
  border-radius: 8px; font-size: .8rem; color: var(--gold);
  background: rgba(25,211,181,.12); box-shadow: 0 0 14px -2px rgba(25,211,181,.5);
}
.cohort {
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .85rem; color: rgba(234,241,251,.72); margin: 0; line-height: 1.5;
  padding: 1rem 1.1rem; border-radius: 14px;
  background: rgba(30,127,212,.08); border: 1px solid rgba(30,127,212,.22);
}
.cohort b { color: var(--gold); }
.cohort .pulse {
  flex: none; width: .55rem; height: .55rem; margin-top: .35rem; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 0 rgba(25,211,181,.6);
  animation: seat-pulse 2s infinite;
}
@keyframes seat-pulse {
  0% { box-shadow: 0 0 0 0 rgba(25,211,181,.55); }
  70% { box-shadow: 0 0 0 8px rgba(25,211,181,0); }
  100% { box-shadow: 0 0 0 0 rgba(25,211,181,0); }
}
@media (prefers-reduced-motion: reduce) { .cohort .pulse { animation: none; } }

/* ---- form ---- */
form { display: grid; gap: 1.1rem; }
.form-intro { margin: 0 0 .5rem; }
.form-intro h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.5rem; margin: 0 0 .35rem; letter-spacing: -.01em; }
.form-intro p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.field { display: grid; gap: .4rem; }
.field > .lbl { font-size: .8rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); }
.field .req { color: var(--clay); }
input, textarea {
  font: inherit; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: .8rem .9rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #9aa7b8; }
input:focus, textarea:focus {
  outline: none; border-color: var(--forest-2); background: #fff;
  box-shadow: 0 0 0 3px rgba(30,127,212,.16);
}
/* red error state: live after interaction, or on submit attempt (.try) */
input:user-invalid, textarea:user-invalid,
.try input:invalid, .try textarea:invalid { border-color: var(--err); }
.field:has(:user-invalid) .lbl,
.try .field:has(:invalid) .lbl { color: var(--err); }
textarea { resize: vertical; min-height: 100px; }
.consent { display: flex; flex-direction: row; align-items: center; gap: .75rem; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
/* native input hidden but kept for `required`/a11y; .consent-box is the visual */
.consent input { position: absolute; opacity: 0; width: 0; height: 0; }
.consent-box {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--forest-2) 45%, transparent);
  background: var(--paper, #fff);
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.consent-box svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.consent-box svg path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .25s ease; }
.consent input:checked + .consent-box { background: var(--forest-2); border-color: var(--forest-2); }
.consent input:checked + .consent-box svg path { stroke-dashoffset: 0; }
.consent input:focus-visible + .consent-box { box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest-2) 30%, transparent); }
.consent:hover .consent-box { transform: scale(1.05); }
button[type=submit] {
  font: inherit; font-weight: 700; font-size: 1rem;
  background: var(--clay); color: #fff; border: 0; border-radius: 10px;
  padding: .95rem 1.5rem; cursor: pointer; letter-spacing: .01em;
  transition: transform .12s ease, background .15s, box-shadow .15s;
  box-shadow: 0 12px 24px -12px rgba(30,127,212,.55);
}
button[type=submit]:hover:not(:disabled) { background: #155fa8; transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(30,127,212,.6); }
button[type=submit]:active:not(:disabled) { transform: translateY(0); }
button:disabled { opacity: .55; cursor: default; }
.msg { font-size: .95rem; margin: .25rem 0 0; min-height: 1.2em; }
.msg.ok { color: var(--ok); font-weight: 600; }
.msg.err { color: var(--err); font-weight: 600; }
.hp { position: absolute; left: -9999px; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--ink-soft); font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
footer .brand { font-size: 1rem; }
footer a:not(.brand) { color: var(--forest-2); text-decoration: none; font-weight: 600; }
footer a:not(.brand):hover { text-decoration: underline; }

@media (max-width: 820px) {
  .enroll { grid-template-columns: 1fr; }
  .instructor { grid-template-columns: 1fr; gap: 1.25rem; }
  .enroll-card { position: static; order: 2; }
  .topbar .status .meta-sep { display: none; }
  .hero { padding: 3rem 0 2.5rem; }
}
@media (max-width: 520px) {
  .topbar .status span:first-child { display: none; }
  .modules li { grid-template-columns: 2.5rem 1fr; gap: .85rem; }
}
