/* CORTEX home, on top of site.css: a chrome ribbon stage, three showcases, case studies, plans. */
body[data-page="home"] { background: #061534; }
.home-h1 { font-size: clamp(40px, min(5vw, 9vh), 92px); line-height: 1.02; letter-spacing: -.055em; font-weight: 700; margin: 14px 0 20px; white-space: nowrap; }
.home-h2 { font-size: clamp(30px, 3.4vw, 54px); line-height: 1.06; letter-spacing: -.045em; margin: 10px 0 16px; white-space: nowrap; }
.home-h1, .home-h2 { background: none; color: #fff; }
.home-h1 em, .home-h2 em { font-style: normal; color: var(--blue-300); }
.home-lead { font-size: clamp(17px, 1.3vw, 20px); color: var(--text-soft); max-width: 62ch; line-height: 1.6; margin-bottom: 24px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Stage: the canvas sticks while the hero and intro scroll over it. */
.stage { position: relative; }
.stage-art { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ribbon { position: absolute; inset: 0; }
.ribbon-poster { position: absolute; left: 0; top: 0; width: 100%; height: 72svh; object-fit: cover; transition: opacity .8s; }
/* The gap where the ribbon spells CORTEX. It scrolls with the page like any section. */
/* Height = the word's rendered height (same maths as ribbon.js: min(1 vh / 4.82, 0.84 vw / 7.3) per unit, 1.15 units tall) plus a small margin. */
.word-gap { position: relative; height: calc(1.15 * min(20.75svh, 11.5vw) + 40px); }
.ribbon canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .8s; }
.ribbon.is-live canvas { opacity: 1; }
.stage-art:has(.ribbon.is-live) .ribbon-poster { opacity: 0; }
.home-hero, .home-intro { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: 32px 6vw; max-width: 1600px; margin: auto; }
.home-hero { min-height: 72svh; padding-bottom: 2vh; }
.home-intro { padding-top: 0; padding-bottom: clamp(36px, 6vh, 64px); }
.home-hero > *, .home-intro > * { text-shadow: 0 2px 30px rgba(2, 10, 30, .85); }
.home-intro { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px 56px; flex-wrap: wrap; }
.intro-copy > p { max-width: 640px; color: var(--text-soft); font-size: 17px; margin: 0; }
.home-intro .facts { margin: 0; padding: 20px 28px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.04); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.facts { list-style: none; padding: 0; margin: 18px 0 0; display: flex; gap: 34px; flex-wrap: wrap; }
.facts strong { display: block; font: 700 40px/1 Sora, 'Sora Fallback', sans-serif; color: var(--blue-300); letter-spacing: -.04em; }
.facts span { font-size: 14px; color: var(--text-soft); }

/* Sections */
.home-section { position: relative; z-index: 1; max-width: 1280px; margin: auto; padding: clamp(24px, 3.5vh, 40px) 6vw; }

/* Showcases: three glass cards side by side. Pointer light, glowing edge and 3D tilt (JS sets --mx/--my). */
@property --edge { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.shows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; perspective: 1200px; }
.show { position: relative; display: flex; flex-direction: column; border-radius: 26px; padding: 10px 10px 22px; isolation: isolate;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); border: 1px solid var(--line); transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.16,1,.3,1), border-color .3s, box-shadow .4s; }
.show::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1px; opacity: 0; transition: opacity .4s;
  background: conic-gradient(from var(--edge), transparent 0 70%, var(--blue-300) 80%, #fff 85%, var(--blue-500) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: edge 4s linear infinite; }
.show::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(92,176,255,.16), transparent 60%); }
.show:hover, .show:focus-within { border-color: transparent; box-shadow: 0 40px 90px -40px rgba(12,135,251,.75); }
.show:hover::before, .show:focus-within::before, .show:hover::after, .show:focus-within::after { opacity: 1; }
.show-copy { padding: 16px 14px 0; display: flex; flex-direction: column; flex: 1; }
.show-copy .cta-btn { margin-top: auto; align-self: flex-start; }
.show-no { font: 700 13px/1 Sora, 'Sora Fallback', sans-serif; letter-spacing: .14em; color: var(--blue-300); }
.show h3 { font-size: clamp(22px, 1.8vw, 28px); margin: 10px 0 8px; }
.show-copy p { color: var(--text-soft); font-size: 15px; line-height: 1.65; margin-bottom: 18px; }
.show-art { position: relative; height: 210px; border-radius: 18px; border: 1px solid var(--line); overflow: hidden; transform: translateZ(30px);
  background: radial-gradient(120% 90% at 80% 0%, rgba(12,135,251,.3), transparent 60%), linear-gradient(160deg, #0a2a63, #04122e); }
.art-team .orb { position: absolute; display: grid; place-content: center; text-align: center; border-radius: 50%; padding: 10px;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), rgba(92,176,255,.14) 35%, rgba(4,18,46,.9) 75%); border: 1px solid rgba(169,213,255,.35); box-shadow: 0 20px 60px -20px rgba(12,135,251,.7); }
.art-team b { font: 700 15px/1.1 Sora, 'Sora Fallback', sans-serif; }
.art-team i { font-style: normal; font-size: 11px; color: var(--text-soft); margin-top: 3px; }
.o1 { width: 128px; height: 128px; left: 8%; top: 12%; }
.o2 { width: 96px; height: 96px; right: 9%; top: 9%; }
.o3 { width: 104px; height: 104px; right: 30%; bottom: 6%; }
.art-agency { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; padding: 14px; align-content: center; }
.art-agency span { padding: 9px 11px; border-radius: 11px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font: 600 12px/1.25 Sora, 'Sora Fallback', sans-serif; }
.art-agency span:nth-child(3n+1) { border-color: var(--line-blue); }
.art-vault { display: grid; place-items: center; padding: 16px; }
.vault-card { width: 100%; padding: 16px; border-radius: 20px; background: rgba(2,15,38,.78); border: 1px solid var(--line-blue); box-shadow: 0 30px 80px -30px rgba(12,135,251,.6); }
.vault-top { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 12px; font-size: 13px; color: var(--text-soft); }
.vault-top span:first-child { color: var(--text); font-weight: 700; }
.vault-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); margin-bottom: 16px; }
.vault-bar i { display: block; width: 37%; height: 100%; border-radius: inherit; background: var(--blue-500); }
.vault-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vault-card li { padding: 7px 10px 7px 34px; font-size: 13px !important; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 15px; position: relative; color: var(--text-soft); }
.vault-card li::before { content: ""; position: absolute; left: 12px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; border: 1.5px solid var(--line-blue); }
.vault-card li.done { color: var(--text); }
.vault-card li.done::before { background: var(--blue-500); border-color: var(--blue-500); }
.vault-card li.now { border: 1px solid var(--line-blue); color: var(--text); }

/* Also inside: one row under the cards */
.also { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 22px; }
.also-label { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-300); }
.also .tags { margin: 0; flex: 1; }
.tags li { transition: border-color .3s, background-color .3s, transform .3s; }
.tags li:hover { border-color: var(--line-blue); background: rgba(12,135,251,.12); transform: translateY(-2px); }
.tags { list-style: none; margin: 4px 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { padding: 8px 14px; font-size: 14px !important; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-size: 15px; }

/* Plans */
.mini-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 4px 0 18px; }
.plans-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.plans-foot .meta-text { margin: 0; }
.home-plans { padding-bottom: clamp(48px, 7vh, 80px); }
.mini-plan::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(92,176,255,.16), transparent 60%); }
.mini-plan:hover::after { opacity: 1; }
.mini-plan, .mini-plan:visited { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 28px; border-radius: 24px; color: var(--text); background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: transform .3s, border-color .3s; }
.mini-plan:hover, .mini-plan:focus-visible { transform: translateY(-4px); border-color: var(--line-blue); text-decoration: none !important; }
.mini-plan.best { background: linear-gradient(180deg, rgba(12,135,251,.2), rgba(255,255,255,.04) 70%); border-color: var(--line-blue); box-shadow: 0 30px 80px -40px rgba(12,135,251,.8); }
.mp-badge { position: absolute; top: 22px; right: 24px; padding: 6px 12px; border-radius: 999px; background: var(--blue-300); color: #020f26; font-size: 13px; font-weight: 700; }
.mp-name { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-soft); }
.mp-price { font: 700 clamp(44px, 5vw, 64px)/1 Sora, 'Sora Fallback', sans-serif; letter-spacing: -.05em; }
.mp-price small { font: 500 16px Manrope, 'Manrope Fallback', sans-serif; letter-spacing: 0; color: var(--text-soft); }
.mp-note { color: var(--text-soft); font-size: 15px; }
.mp-go { margin-top: 8px; font-weight: 700; color: var(--blue-300); }


/* Case studies */
.case { width: min(920px, calc(100% - 32px)); max-height: calc(100svh - 48px); padding: 0; border: 1px solid var(--line-blue); border-radius: 28px; background: #061a40; color: var(--text); box-shadow: 0 40px 120px rgba(0,0,0,.6); }
.case::backdrop { background: rgba(2, 10, 30, .72); backdrop-filter: blur(6px); }
.case-in { position: relative; padding: clamp(28px, 4vw, 48px); }
.case-x { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; font-size: 26px; line-height: 1; color: var(--text); }
.case-title { font-size: clamp(30px, 3.6vw, 48px); margin: 12px 0 24px; }
.case-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.case-cols h4 { margin: 0 0 8px; font: 700 13px/1.2 Sora, 'Sora Fallback', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-300); }
.case-cols p { font-size: 15px; color: var(--text-soft); margin: 0; }
.case-list { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.case-list li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; }
.case-cta { margin-top: 28px; }

/* ---- Motion ---- */
/* Hero words rise out of masks on load (CSS only, so it runs before any script). */
.wd { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.wd > span { display: inline-block; animation: rise 1.1s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i) * 70ms + 80ms); }
@keyframes rise { from { transform: translateY(105%) rotate(4deg); filter: blur(6px); } to { transform: none; filter: none; } }
.home-hero .eyebrow, .home-lead, .home-hero .home-actions { animation: fadeup 1s cubic-bezier(.16,1,.3,1) both; }
.home-hero .eyebrow { animation-delay: 0s; } .home-lead { animation-delay: .45s; } .home-hero .home-actions { animation-delay: .6s; }
@keyframes fadeup { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
/* The second "step by step." gets a slow light sweep. */
.home-h1 em .wd > span { background: linear-gradient(100deg, var(--blue-300) 40%, #fff 50%, var(--blue-300) 60%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rise 1.1s cubic-bezier(.16,1,.3,1) both, shine 5s 1.6s ease-in-out infinite; animation-delay: calc(var(--i) * 70ms + 80ms), 1.6s; }
@keyframes shine { 0%, 60% { background-position: 100% 0; } 100% { background-position: -50% 0; } }
/* Split headings (JS): words rise in when the heading arrives. */
.split .sw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .sw > span { display: inline-block; transform: translateY(105%); filter: blur(5px); transition: transform 1s cubic-bezier(.16,1,.3,1), filter 1s; transition-delay: calc(var(--i) * 55ms); }
.split.is-in .sw > span { transform: none; filter: none; }
/* Glow that blooms behind the C as it forms (--p from JS). */
.c-glow { position: absolute; left: 50%; top: var(--wy, 50%); width: 80vw; height: 38svh; max-width: 1200px; transform: translate(-50%, -50%) scale(calc(.7 + var(--p, 0) * .4)); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(12,135,251,.34), rgba(12,135,251,.1) 55%, transparent); opacity: var(--p, 0); }
/* Orbs float; agency tiles and tags cascade in; the Vault bar fills and the steps tick. */
.orb { animation: float 7s ease-in-out infinite; } .o2 { animation-delay: -2.3s; } .o3 { animation-delay: -4.6s; }
@keyframes float { 50% { transform: translateY(-12px); } }
.show-art { transform-style: preserve-3d; will-change: transform; }
.will-reveal .art-agency span, .will-reveal .tags li { opacity: 0; transform: translateY(14px) scale(.96); transition: opacity .6s, transform .6s cubic-bezier(.16,1,.3,1); }
.is-in .art-agency span, .is-in .tags li { opacity: 1; transform: none; }
.art-agency span:nth-child(n), .tags li:nth-child(n) { transition-delay: calc(var(--n, 0) * 50ms); }
.will-reveal .vault-bar i { width: 0; } .is-in .vault-bar i { width: 37%; transition: width 1.6s .3s cubic-bezier(.16,1,.3,1); }
.will-reveal .vault-card li { opacity: .3; } .is-in .vault-card li { opacity: 1; transition: opacity .5s; transition-delay: calc(var(--n, 0) * 180ms + .4s); }
.vault-card li.now::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 1px solid var(--blue-300); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.04, 1.25); } }

/* Gentle reveals (added by JS, below the fold only) */
.will-reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); }
.will-reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 1100px) and (min-width: 901px) { .shows { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } .art-agency span { font-size: 11px; } }
@media (max-width: 900px) {
  .home-h1, .home-h2 { white-space: normal; text-wrap: balance; }
  .home-h1 { font-size: clamp(38px, 11vw, 56px); }
  .home-hero { justify-content: flex-start; padding-top: 7vh; padding-bottom: 10vh; }
  .shows { grid-template-columns: 1fr; }
  .also { gap: 12px; }
  .also-label { flex-basis: 100%; }
  .also .tags { flex: 1 1 100%; }
  .tags li { padding: 7px 12px; font-size: 13px !important; }
  .plans-foot .home-actions { width: 100%; }
  .home-hero { min-height: 64svh; }
  .ribbon-poster { height: 80svh !important; }
  .home-intro { flex-direction: column; align-items: flex-start; }
  .mini-plans { grid-template-columns: 1fr; }
  .case-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .show::before, .shows .show.is-in { animation: none; }
  .show, .show-art, .mini-plan, .ribbon-poster, .ribbon canvas { transition: none; }
  .wd > span, .home-hero .eyebrow, .home-lead, .home-hero .home-actions, .orb, .vault-card li.now::after { animation: none !important; }
  .home-h1 em .wd > span { animation: none !important; background: none; color: var(--blue-300); }
}

/* Cards arrive one after another. */
.shows .show.will-reveal, .shows .show.is-in { transition: transform .6s cubic-bezier(.16,1,.3,1), border-color .3s, box-shadow .4s; }
.shows .show.will-reveal { opacity: 0; transform: none; }
.shows .show.is-in { opacity: 1; animation: card-in 1s cubic-bezier(.16,1,.3,1) calc(var(--n, 0) * .14s) backwards; }
@keyframes card-in { from { opacity: 0; transform: translateY(48px) rotateX(10deg) scale(.96); } }
@keyframes edge { to { --edge: 360deg; } }

/* The old site's curriculum cards, with the home page's tighter spacing. */
.home-old.section { padding: clamp(32px, 5vh, 56px) 6vw; z-index: 1; }
.home-curriculum .section-title { margin: 10px 0 12px; }

/* Old-theme sections: the intro facts and the plans, centred like the rest. */
.home-intro-old .facts { justify-content: center; margin: 8px 0 0; padding: 20px 32px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.home-intro-old .facts li { text-align: center; }
.home-plans .mini-plans { width: 100%; max-width: 1000px; margin: 8px auto 18px; text-align: left; }
.home-plans .plans-foot { width: 100%; max-width: 1000px; }
@media (max-width: 640px) {
  .home-intro-old .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px; width: 100%; }
  .home-intro-old .facts strong { font-size: 30px; }
  .home-intro-old .facts span { font-size: 12px; }
  .mp-badge { position: static; align-self: flex-start; }
  .plans-foot { justify-content: center; text-align: center; }
}
/* A soft shade behind the hero words so the ribbon's highlight never sits under the text. */
.home-hero::before { content: ""; position: absolute; inset: 0 30% 0 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(6,21,52,.8), rgba(6,21,52,0)); }
@media (max-width: 900px) { .home-hero::before { inset: 0; background: linear-gradient(180deg, rgba(6,21,52,.55), rgba(6,21,52,0) 85%); } }
/* Without motion there is no word to draw, so the gap closes. */
@media (prefers-reduced-motion: reduce) { .word-gap { display: none; } }

/* The old site's stats row under the intro. */
.home-intro-old .home-stats { margin-top: 18px; }

/* Shorter hero: the word sits straight under the buttons, no empty screen. */
.home-hero { min-height: 0; padding-bottom: 3vh; }
@media (max-width: 900px) { .home-hero { min-height: 0; padding-bottom: 3vh; } }
/* the free Discord is a quiet second choice under the one main button */
.home-hero .home-alt { margin-top: 14px; animation: fadeup 1s cubic-bezier(.16,1,.3,1) .7s both; }
.home-hero .home-alt a { color: inherit; opacity: .85; text-decoration: underline; text-underline-offset: 3px; }
.home-hero .home-alt a:hover { opacity: 1; }
