/* ==========================================================
   nawa Students page — page-only styles.
   Builds on base.css, background.css, sections.css, businesses.css (white hero
   mode, FAQ, CTA) and subpages.css (shared subpage layouts).
   Ported from the approved motion study (portfolio folder + light):
     - the white hero with the textured background kept alive on white
     - the hero layout: headline left, portfolio folder right (phones: below)
     - the 3D portfolio folder that opens as you start scrolling
     - the Goal display word and its scroll highlight (js/goal-highlight.js)
     - the light canvas (js/portfolio-light.js), desktop only
   ========================================================== */

/* ---------- Background on the white hero ----------
   The field draws light lines on a transparent canvas, so on white it is inverted
   (lines turn dark, lime pulses turn indigo) at half strength, then eases back as
   the page turns navy. Overrides businesses.css, which hides the field on white. */
html.js.biz-page:not(.biz-dark) .background-field { opacity: 0.85; filter: invert(1); } /* dark hex lines on the lavender, visible top to bottom */
html.biz-theme-ready .background-field { transition: opacity 600ms var(--ease), filter 600ms var(--ease); }

/* ---------- 1. Hero: headline left, folder right ---------- */
/* Let the hero glow sit under the light canvas (the hero would otherwise isolate it above) */
.st-hero { isolation: auto; }
.st-hero__grid {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
/* Desktop: the same height as the Businesses hero (businesses.css .biz-hero), with the
   headline centred and the Goal statement kept below the fold. This also keeps the page
   opening white: it turns navy once the next section rises above 60% of the screen
   (js/businesses.js). The scroll cue sits at the bottom centre. */
@media (min-width: 960px) {
  .sub-hero.st-hero { min-height: clamp(520px, 78svh, 760px); }
}
@media (max-width: 959px) {
  .st-hero { padding-bottom: calc(var(--space-5) + 72px); } /* room for the scroll cue under the folder */
}
.st-scroll {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: var(--space-5);
  justify-content: center;
}
@media (min-width: 960px) {
  .st-hero__grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.5fr);
    gap: var(--split-gap);
  }
  /* Exactly two lines: each line stays whole, and the headline scales with the
     headline column so "into your next opportunity." always fits (64px at most) */
  .st-hero .hero__line { white-space: nowrap; }
  .st-hero .hero__title { font-size: min(var(--text-hero), 4rem, calc((min(100vw, 1304px) - 128px) * 0.049)); }
}
@media (min-width: 1100px) {
  .st-hero .hero__title { font-size: min(var(--text-hero), 4rem, calc((min(100vw, 1304px) - 128px) * 0.0545)); }
}

/* The light hero: a lavender gradient (light at the top, deepening towards the page's
   indigo), not a flat white, so it is easy on the eyes and leads into the navy page */
html.js.biz-page:not(.biz-dark),
html.js.biz-page:not(.biz-dark) body { background-color: #bcb3e6; }   /* the gradient's last colour, so there is no seam under the hero */
html.js.biz-page:not(.biz-dark) .site-header {
  --bg: #e9e6f7;
  --panel-2: #e9e6f7;
  background-color: rgba(233, 230, 247, 0.9);
}
/* The gradient sits on a layer under the fixed hex field (body::before comes before it
   in the page), so the texture shows through it all the way to the top */
html.js.biz-page body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100svh;
  z-index: 0;
  background: linear-gradient(180deg, #ebe8f8 0%, #d9d4f1 40%, #bcb3e6 100%);
  pointer-events: none;
  transition: opacity 600ms var(--ease);
}
html.js.biz-page.biz-dark body::before { opacity: 0; }
.st-hero .st-folder-wrap { z-index: 1; }

/* ---------- The portfolio folder ----------
   A real-looking folder at a three-quarter angle: deep indigo card stock, soft light
   and shadow, "Portfolio" pressed into the front. --open (0 → 1, set by
   js/portfolio-light.js as you start scrolling) swings the front flap down, lifts
   the papers out and brightens the glow inside. Decorative (aria-hidden). */
.st-folder-wrap {
  position: relative;
  justify-self: center;
  display: grid;
  place-items: center;
  width: min(100%, 320px);
  height: 230px;
}
@media (min-width: 960px) {
  .st-folder-wrap { height: 300px; }
}
.st-folder {
  --open: 0;
  position: relative;
  width: 264px;
  height: 176px;               /* 480 × 320, like Institutions' folder */
  perspective: 1000px;
}
@media (prefers-reduced-motion: no-preference) {
  .st-folder { animation: st-float 7s ease-in-out infinite; }
}
@keyframes st-float { 50% { transform: translateY(-7px); } }
.st-folder::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -26px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(10, 6, 40, 0.3), rgba(10, 6, 40, 0));
  transition: opacity 600ms var(--ease);
}
html.biz-dark .st-folder::after { opacity: 0.5; }
.st-f3d {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.st-f3d > * { position: absolute; transition: transform 260ms var(--ease), opacity 260ms var(--ease); }
/* The folder itself: navy, with a light outline, drawn the same way as Institutions' */
.st-f-back, .st-f-front { pointer-events: none; }
.st-f-back svg, .st-f-front svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.st-f-back path, .st-f-front path { fill: #0c0540; stroke: rgba(244, 243, 250, 0.55); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.st-f-back .st-f-sheet { fill: none; stroke: rgba(244, 243, 250, 0.25); }
.st-f-back { inset: 0; transform: translateZ(-12px); }
/* Papers: plain sheets with light print, lifting out as it opens */
.st-f-paper {
  left: 26px;
  right: 30px;
  top: 34px;
  height: 58%;
  border-radius: 3px;
  background: linear-gradient(180deg, #fbfbfd, #ebeaf2);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 18px -8px rgba(8, 5, 35, 0.45);
  opacity: min(1, calc(var(--open) * 5)); /* tucked away while the folder is closed */
}
.st-f-paper--1 { transform: translateZ(-9px) translateY(calc(var(--open) * -34px)) rotate(calc(-3deg - var(--open) * 3deg)); }
.st-f-paper--2 { left: 36px; right: 22px; top: 40px; transform: translateZ(-5px) translateY(calc(var(--open) * -54px)) rotate(calc(2.5deg + var(--open) * 3deg)); }
.st-f-paper i { position: absolute; display: block; border-radius: 2px; background: #d9d7e6; height: 4px; }
.st-f-paper .a { left: 12px; top: 12px; width: 54px; height: 36px; border-radius: 2px; background: linear-gradient(135deg, #b9b3e6, #8b82cf); }
.st-f-paper .b { left: 76px; top: 14px; width: 80px; }
.st-f-paper .c { left: 76px; top: 24px; width: 64px; }
.st-f-paper .d { left: 76px; top: 34px; width: 72px; }
.st-f-paper .e { left: 12px; top: 58px; width: 150px; }
.st-f-paper .f { left: 12px; top: 68px; width: 130px; }
/* The light inside, brightening as it opens */
.st-f-light {
  left: 8%;
  right: 8%;
  top: -18%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(226, 246, 140, 0.7), rgba(209, 238, 43, 0));
  opacity: calc(var(--open) * 0.85);
  transform: translateZ(-3px);
}
/* Front flap: hinged at the bottom, swings toward you */
.st-f-front {
  inset: 0;                    /* same box and path as Institutions' front panel */
  transform-origin: 50% 95%;   /* hinged at the bottom edge (y 304 of 320) */
  transform: translateZ(3px) rotateX(calc(var(--open) * -56deg));
}
/* "Portfolio.", in the page's heading type, like "Program types." */
.st-f-label {
  position: absolute;
  inset: 35% 0 5%;             /* centred on the front panel (y 112–304 of 320) */
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text, #f4f3fa);
}
.st-f-front .st-f-label { color: #f4f3fa; }

/* ---------- 2. Goal: one statement, scrubbed a few words at a time ----------
   Full width (no max-width). Muted by default; js/goal-highlight.js lights
   "Goal:" first, then the words, tied to the scroll position. The light runs
   around it (down the left margin, underneath), so there is no section hairline. */
.st-goal {
  position: relative;
  z-index: 1;
  padding-block: 26svh 24svh;
}
/* While the page is still white (the section just coming up): hero ink, no lime text on white */
html.js.biz-page:not(.biz-dark) .st-goal__text,
html.js.biz-page:not(.biz-dark) .st-goal__label { color: rgba(43, 29, 143, 0.22); }
html.js.biz-page:not(.biz-dark) .st-goal__label.is-lit,
html.js.biz-page:not(.biz-dark) .st-w.is-lit { color: var(--hero-ink); }

/* ---------- 3. Your path ----------
   The heading stays left-aligned; the light gathers into a dot on the right,
   level with it, and the path line (js/path-line.js) starts there. */
.st-path {
  position: relative;
  z-index: 1;
  padding-block: var(--space-8) var(--space-14);
}
.st-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.st-head .sub-head { margin-bottom: 0; max-width: 40rem; }
.st-head .section-title { margin: 0; }
.st-head .section-sub { margin-top: var(--head-stack); }
/* The orb the light gathers into: switched off until the beams arrive, then it flickers on */
.st-gather {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  margin-right: 12%;
  border-radius: 50%;
  background: #1b1555;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 0 0 7px rgba(255, 255, 255, 0.05);
  transition: background-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.st-gather.is-lit {
  background: #f2ffc4;
  box-shadow: 0 0 0 1px #d1ee2b, 0 0 0 7px rgba(209, 238, 43, 0.18), 0 0 40px 8px rgba(209, 238, 43, 0.4);
}
@media (prefers-reduced-motion: no-preference) {
  .st-gather.is-lit { animation: st-flicker 700ms steps(1, end) both; }
}

/* The line layer: a dashed track, the lime line drawn over it, a dot per card, pulses */
.st-line { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; overflow: visible; }
.st-track { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 1.5; stroke-dasharray: 3 7; }
.st-draw { fill: none; stroke: #d1ee2b; stroke-width: 1.6; stroke-linecap: round; stroke-opacity: 0.85; }
/* Stops: an orb that charges up (ring), then flickers on like a lamp */
.st-orb-track { fill: none; stroke: rgba(255, 255, 255, 0.12); stroke-width: 1.5; }
.st-orb-ring { fill: none; stroke: #d1ee2b; stroke-width: 2; stroke-linecap: round; }
.st-orb { fill: #1b1555; stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; }
.st-orb-halo { fill: rgba(209, 238, 43, 0); }
.st-orb.is-on { fill: #f2ffc4; stroke: #d1ee2b; }
.st-orb-halo.is-on { fill: rgba(209, 238, 43, 0.16); }
.st-orb-ring.is-on { stroke: rgba(209, 238, 43, 0.55); }
@media (prefers-reduced-motion: no-preference) {
  .st-orb.is-on, .st-orb-halo.is-on { animation: st-flicker 700ms steps(1, end) both; }
}
/* a few quick electric blinks, then steady */
@keyframes st-flicker {
  0% { opacity: 0.15; } 12% { opacity: 1; } 22% { opacity: 0.25; } 34% { opacity: 1; }
  46% { opacity: 0.45; } 58%, 100% { opacity: 1; }
}
.st-pulse { fill: #f4ffc6; }
.st-pulse-halo { fill: #d1ee2b; }

/* The steps: alternating sides, overlapping in height so the section stays compact */
.st-steps {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  margin-top: var(--space-10);
  list-style: none;
  padding: 0;
}
.st-card {
  width: 42%;
  padding: var(--space-3);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: rgba(21, 16, 73, 0.72);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease), border-color 600ms var(--ease), box-shadow 600ms var(--ease);
}
/* Waiting for the line (JS only: without JS the cards simply show) */
.js .st-card:not(.is-on) { opacity: 0.38; transform: translateY(10px); }
.st-card:nth-child(odd) { align-self: flex-start; }
.st-card:nth-child(even) { align-self: flex-end; }
.st-card + .st-card { margin-top: -70px; }
.st-card.is-on {
  border-color: rgba(209, 238, 43, 0.35);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(209, 238, 43, 0.08);
}
/* The step number sits on the title's line, at the title's size (like Mentors' "01 Find your fit.") */
.st-num { margin-right: 0.35em; font-variant-numeric: tabular-nums; color: var(--text-3); transition: color 500ms var(--ease); }
.st-card.is-on .st-num { color: var(--lime); }
.st-card h3 { margin-top: var(--space-1); font-size: var(--text-h3); font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
.st-card p { margin-top: var(--space-1); color: var(--text-2); font-size: 1rem; line-height: 1.55; text-wrap: pretty; }
.st-card .st-note { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--line-2); font-size: 0.875rem; color: #cfcce2; }
.st-note strong { color: #fff; font-weight: 600; }

/* ---------- Product stills: one per step, from the site's own product mock-ups ---------- */
.st-mini.st-mini--shot { height: auto; aspect-ratio: 16 / 10; padding: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.st-mini--shot img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Mini product previews (white, like the product tiles) ---------- */
.st-mini {
  position: relative;
  height: 128px;
  margin-bottom: var(--space-3);
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  color: #070030;
}
.st-mini i { display: block; height: 7px; border-radius: 4px; background: #e7e5f1; }
.st-mini .w35 { width: 35%; }
.st-mini .w40 { width: 40%; }
.st-mini .w45 { width: 45%; }
.st-mini .w50 { width: 50%; }
.st-mini .w55 { width: 55%; }
.st-mini .w60 { width: 60%; }
.st-mini .w70 { width: 70%; }
.st-row { display: flex; align-items: center; gap: 10px; }
.st-mini .st-row + .st-row { margin-top: 10px; }
.st-av { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #2b1d8f; }
.st-lines { display: grid; gap: 6px; flex: 1; }
.st-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
  background: #f1f0f7;
  color: #3b3762;
  transition: background-color 500ms var(--ease), color 500ms var(--ease), opacity 500ms var(--ease), transform 500ms var(--ease);
}
.st-chip--lime { background: #d1ee2b; color: #070030; }
.st-item {
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid #ecebf3;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 500ms var(--ease) 250ms, transform 500ms var(--ease) 250ms;
}
.st-thumb { width: 34px; height: 26px; flex: none; border-radius: 5px; background: linear-gradient(135deg, #b9b3e6, #6f62d6); }
.st-tags { display: flex; gap: 6px; margin-top: 12px; }
.st-apply { margin-top: 14px; }
.st-check {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid #cfcbe8;
  transition: background-color 400ms var(--ease), border-color 400ms var(--ease);
}
.st-bubble {
  width: 78%;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 10px 10px 10px 3px;
  background: #f1f0f7;
  font-size: 0.6875rem;
  color: #3b3762;
  transition: opacity 500ms var(--ease) 400ms, transform 500ms var(--ease) 400ms;
}
.st-swap { position: relative; display: inline-grid; }
.st-swap > * { grid-area: 1 / 1; transition: opacity 400ms var(--ease) 300ms; }
/* States that change when the card lights up (no JS: the "after" state shows) */
.js .st-card:not(.is-on) .st-item--new { opacity: 0; transform: translateY(8px); }
.js .st-card:not(.is-on) .st-state--on,
.st-card.is-on .st-state--off,
html:not(.js) .st-state--off { opacity: 0; }
.st-card.is-on .st-check.st-done,
html:not(.js) .st-check.st-done { background: #d1ee2b; border-color: #d1ee2b; }

/* ---------- The button at the end of the line ---------- */
.st-path-cta { position: relative; z-index: 1; display: flex; justify-content: center; margin-top: var(--space-10); }
.st-path-cta .btn { transition: opacity 600ms var(--ease), box-shadow 600ms var(--ease), background-color var(--dur-fast) var(--ease); }
.js .st-path-cta:not(.is-on) .btn { opacity: 0.45; }
.st-path-cta.is-on .btn { box-shadow: 0 0 0 6px rgba(209, 238, 43, 0.12), 0 0 40px rgba(209, 238, 43, 0.3); }
/* when the line arrives, the button switches on like a neon sign: a couple of quick flickers, then steady */
@media (prefers-reduced-motion: no-preference) {
  .js .st-path-cta.is-on .btn { animation: st-neon 900ms steps(1, end) both; }
}
@media (prefers-reduced-motion: no-preference) {
  #get-started.is-powered .biz-cta__btn { animation: st-neon 900ms steps(1, end) both; }
}
#get-started.is-powered .biz-cta__btn { box-shadow: 0 0 0 6px rgba(209, 238, 43, 0.12), 0 0 40px rgba(209, 238, 43, 0.3); }
@keyframes st-neon {
  0% { opacity: 0.45; box-shadow: none; } 10% { opacity: 1; } 18% { opacity: 0.5; box-shadow: none; }
  30% { opacity: 1; box-shadow: 0 0 0 6px rgba(209, 238, 43, 0.12), 0 0 40px rgba(209, 238, 43, 0.3); }
  40% { opacity: 0.6; box-shadow: none; }
  52%, 100% { opacity: 1; box-shadow: 0 0 0 6px rgba(209, 238, 43, 0.12), 0 0 40px rgba(209, 238, 43, 0.3); }
}

/* Phones and tablets: one column, every card lit, no line or gather dot */
@media (max-width: 959px) {
  .st-line,
  .st-gather { display: none; }
  .st-card { width: 100%; }
  .st-card + .st-card { margin-top: var(--space-3); }
  .js .st-card:not(.is-on) { opacity: 1; transform: none; }
  .js .st-path-cta:not(.is-on) .btn { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .st-card { transition: none; }
}

/* ---------- The light ----------
   One screen-sized canvas, drawn on the graphics card (js/portfolio-light.js).
   It sits inside <main> before every section, so all page content paints on top
   of it, and above the page background. Desktop only (960px+). */
.st-light {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  display: none;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}
@media (min-width: 960px) {
  .st-light { display: block; }
}
