/* =========================================================
   AI in AEC — AI Mastery Program Waitlist
   Design system derived from the brand identity guidelines
   ========================================================= */

:root {
  /* Brand colors */
  --charcoal:    #231F20;
  --gold:        #DDC045;
  --gold-deep:   #B4981F;
  --white:       #FFFFFF;

  /* Dark theme surfaces */
  --bg:          #211D1E;   /* page background */
  --bg-alt:      #1b1819;   /* alternating sections */
  --surface:     #2b2728;   /* cards */
  --surface-2:   #1a1718;   /* raised / inputs */
  --border:      #3a3536;   /* hairlines, card borders */
  --border-2:    #463f41;   /* stronger dividers / input borders */

  --text:        #ECEAE6;   /* body text on dark */
  --text-dim:    #A9A5A0;   /* secondary text */

  /* Type */
  --font-head: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Poppins", "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --maxw: 1120px;
  --radius: 16px;
  --radius-sm: 10px;

  /* Spacing scale (intentional, not ad-hoc) */
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  /* Depth system — layered dark shadows (base → elevated → floating) */
  --shadow-elevated:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 2px 6px -2px rgba(0, 0, 0, 0.5),
    0 12px 28px -14px rgba(0, 0, 0, 0.6);
  --shadow-floating:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(221, 192, 69, 0.07),
    0 10px 24px -10px rgba(0, 0, 0, 0.6),
    0 30px 64px -26px rgba(15, 12, 6, 0.75);
  --shadow-gold:
    0 2px 6px -2px rgba(180, 152, 31, 0.45),
    0 10px 22px -8px rgba(221, 192, 69, 0.5);
  --gold-glow: 0 0 0 1px rgba(221, 192, 69, 0.25), 0 18px 50px -18px rgba(221, 192, 69, 0.4);

  /* Motion — spring + eased-out curves */
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 560px at 12% -8%, rgba(221, 192, 69, 0.10), transparent 58%),
    radial-gradient(900px 520px at 108% 2%, rgba(180, 152, 31, 0.09), transparent 55%),
    radial-gradient(760px 760px at 50% 118%, rgba(221, 192, 69, 0.06), transparent 60%);
  background-attachment: fixed;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--white);
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.container.narrow { max-width: 760px; }

.section { padding: clamp(48px, 6vw, 84px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--gold); color: var(--charcoal);
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head);
  font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--charcoal);
  background: var(--btn-bg);
  border: none; border-radius: 999px;
  padding: 16px 28px;
  cursor: pointer;
  transition: transform 0.28s var(--ease-spring), box-shadow 0.28s var(--ease-out), background 0.2s ease;
  box-shadow: var(--shadow-gold);
}
.btn:hover { transform: translateY(-2px); background: #e7cd5c; box-shadow: 0 4px 10px -3px rgba(180, 152, 31, 0.5), 0 16px 32px -10px rgba(221, 192, 69, 0.6); }
.btn:active { transform: translateY(0) scale(0.98); box-shadow: var(--shadow-gold); }
.btn:focus-visible { outline: 3px solid var(--charcoal); outline-offset: 3px; }
.btn-sm { padding: 11px 20px; font-size: 0.72rem; }
.btn-block { width: 100%; padding: 18px; font-size: 0.9rem; }
.btn-dark { background: var(--charcoal); color: var(--gold); box-shadow: 0 10px 30px -12px rgba(0,0,0,0.7); }
.btn-dark:hover { background: #191617; color: var(--gold); }

.btn-spinner { display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(35,31,32,0.3); border-top-color: var(--charcoal); animation: spin 0.7s linear infinite; }
.is-loading .btn-label { opacity: 0.6; }
.is-loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(35, 31, 32, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(221, 192, 69, 0.18);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; border-radius: 8px; }
.brand-logo { flex: none; height: 38px; width: auto; transition: transform 0.4s var(--ease-spring); }
.brand:hover .brand-logo { transform: scale(1.03); }
.brand:active .brand-logo { transform: scale(1.0); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 76px) 0 clamp(48px, 6vw, 80px); }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg::after { /* vignette so text stays readable */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 20% 20%, rgba(255,255,255,0) 0%, var(--bg) 74%);
}
.net { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.7; }
.bolt-ghost {
  position: absolute; right: -6%; top: 50%; transform: translateY(-50%);
  width: min(52vw, 620px); height: auto; opacity: 0.09;
}

.hero-inner { position: relative; z-index: 1; max-width: 620px; margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold);
  border: 1px solid rgba(221,192,69,0.30); background: rgba(221,192,69,0.08); border-radius: 999px;
  padding: 7px 15px; margin-bottom: 24px;
}
.spark { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }

h1#hero-title { font-size: clamp(2.1rem, 6vw, 3.9rem); font-weight: 700; letter-spacing: -0.025em; }
.lede { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--text-dim); margin: 20px auto 0; max-width: 52ch; }

.hero-foot { margin-top: 26px; font-size: 0.85rem; color: var(--text-dim); }

/* ---------- Waitlist form ---------- */
.form-card {
  margin: 28px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow-floating);
  max-width: 480px;
  text-align: left;
  scroll-margin-top: 90px;
}
.form-title { font-size: 1.35rem; }
.form-sub { color: var(--text-dim); margin-top: 6px; font-size: 0.95rem; }
.waitlist-form { margin-top: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.02em; margin-bottom: 7px; color: var(--text); }
.field input {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  padding: 14px 16px; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder { color: #A29C93; }
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(221,192,69,0.18); }
.field input:invalid:not(:placeholder-shown) { border-color: #c9603f; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { min-height: 0; font-size: 0.85rem; margin-top: 12px; }
.form-note.error { color: #f0a58a; }
.form-note.ok { color: var(--gold); }
.microcopy { font-size: 0.76rem; color: var(--text-dim); margin-top: 14px; text-align: center; }

/* Success state */
.form-success { text-align: center; padding: 12px 0 6px; }
.success-mark { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--gold); display: grid; place-items: center; box-shadow: var(--gold-glow); }
.success-mark svg { width: 26px; height: 26px; }
.form-success h3 { font-size: 1.3rem; }
.form-success p { color: var(--text-dim); margin-top: 8px; }

/* ---------- Sections ---------- */
.section-eyebrow { font-family: var(--font-head); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 12px; }
.section-title { font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 700; letter-spacing: -0.015em; }
.section-lede { color: var(--text-dim); margin-top: 14px; max-width: 58ch; font-size: 1.05rem; }

/* ---------- Grid + cards ---------- */
.grid { display: grid; gap: 20px; margin-top: 32px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px 26px;
  box-shadow: var(--shadow-elevated);
  transition: transform 0.32s var(--ease-out), border-color 0.32s ease, box-shadow 0.32s var(--ease-out);
  overflow: hidden;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 46px; background: var(--gold);
  transition: width 0.32s var(--ease-out); }
.card:hover { transform: translateY(-5px); border-color: rgba(221,192,69,0.6);
  box-shadow: var(--shadow-elevated), 0 24px 48px -26px rgba(180,152,31,0.35); }
.card:hover::before { width: 72px; }
.card-num { font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; color: var(--gold-deep); letter-spacing: 0.1em; }
.card h3 { font-size: 1.05rem; margin: 12px 0 10px; letter-spacing: 0.02em; }
.card p { color: var(--text-dim); font-size: 0.94rem; }

/* ---------- Chips (who it's for) ---------- */
.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.chips li {
  font-family: var(--font-head); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.01em;
  color: var(--text);
  border: 1px solid var(--border-2); border-radius: 999px; padding: 11px 20px;
  background: var(--surface);
}
.chips li::before { content: "\26A1"; color: var(--gold); margin-right: 9px; }

/* ---------- Perks ---------- */
.perks { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.perk { padding: 8px 4px; }
.perk-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(221,192,69,0.12); border: 1px solid rgba(221,192,69,0.3); margin-bottom: 16px; }
.perk-icon::before { content: "\26A1"; font-size: 1.1rem; }
.perk h3 { font-size: 1.02rem; margin-bottom: 8px; letter-spacing: 0.02em; }
.perk p { color: var(--text-dim); font-size: 0.94rem; }

/* ---------- Final CTA ---------- */
.cta { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: var(--charcoal); }
.cta-inner { text-align: center; padding: clamp(56px, 8vw, 96px) 24px; }
.cta h2 { color: var(--charcoal); font-size: clamp(1.7rem, 4vw, 2.7rem); letter-spacing: -0.015em; }
.cta p { color: rgba(35,31,32,0.85); margin: 16px auto 30px; max-width: 46ch; font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); border-top: 1px solid rgba(221, 192, 69, 0.18); padding: 48px 0 28px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand .brand-logo { height: 44px; width: auto; }
.footer-social { display: flex; gap: 22px; }
.footer-social a { font-size: 0.85rem; color: rgba(255, 255, 255, 0.82); transition: color 0.15s ease; }
.footer-social a:hover { color: var(--gold); }

.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-legal p { font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); }
.footer-legal nav { display: flex; gap: 18px; }
.footer-legal a { font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); transition: color 0.15s ease; }
.footer-legal a:hover { color: var(--gold); }

/* ---------- Focus visibility for links ---------- */
a:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px;
}

/* ---------- Reveal motion (JS + reduced-motion gated) ----------
   .reveal-ready is set on <html> in the head ONLY when motion is allowed,
   so no-JS and reduced-motion users always see fully-rendered content. */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 70ms);
}
.reveal-ready .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .container { padding-inline: 18px; }
  .header-inner { gap: 12px; padding-block: 12px; }
  .brand-logo { height: 30px; }
  .btn-sm { padding: 10px 15px; font-size: 0.66rem; letter-spacing: 0.04em; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-social { flex-wrap: wrap; gap: 16px 20px; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}

/* Extra-small phones: keep the sticky header from crowding */
@media (max-width: 380px) {
  .brand-logo { height: 26px; }
  .btn-sm { padding: 9px 13px; font-size: 0.62rem; }
}

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