/* =========================================================
   laneflow.org/apply
   Source of truth: DESIGN_BRIEF.md + COPY.md
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Palette (each color keeps its job, see DESIGN_BRIEF.md section 3) */
  --bg: #F9DDE6;
  --blue: #2B3FD1;        /* links + my name only */
  --burgundy: #7A1F3D;    /* window bars, accent word, cursor, selection */
  --yellow: #F6C945;      /* folders front, lead card bars, popup #3 */
  --yellow-dark: #E0AE2A; /* folders back + tab */
  --cream: #F4F1EA;       /* inside every window */
  --ink: #1E1B2E;         /* all text, all outlines */
  --grey: #C0C0C0;        /* CTA button only */
  --night: #221A58;       /* bottom of the background */
  --white: #FFFFFF;       /* sparkles, bands, bevel highlights, title bar text */

  /* Bevel shadow: ink at low opacity, so no extra grey enters the palette */
  --bevel-dark: rgba(30, 27, 46, 0.38);

  /* Fonts (only these 4) */
  --f-head: "Jersey 10", "VT323", monospace;
  --f-mono: "VT323", monospace;
  --f-body: "Instrument Serif", Georgia, serif;
  --f-btn: "Pixelify Sans", "VT323", monospace;

  /* Layout */
  --taskbar-h: 44px;
  --gutter: 16px;
  --maxw: 1180px;
  --outline: 2px;
  --shadow-hard: 4px 4px 0 var(--ink);

  /* Pixel cursors (drawn original), with normal cursors as fallback */
  --cur-arrow: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='32' viewBox='0 0 11 16' shape-rendering='crispEdges'><rect x='0' y='0' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='1' width='2' height='1' fill='%231E1B2E'/><rect x='0' y='2' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='2' width='1' height='1' fill='%23FFFFFF'/><rect x='2' y='2' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='3' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='3' width='2' height='1' fill='%23FFFFFF'/><rect x='3' y='3' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='4' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='4' width='3' height='1' fill='%23FFFFFF'/><rect x='4' y='4' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='5' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='5' width='4' height='1' fill='%23FFFFFF'/><rect x='5' y='5' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='6' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='6' width='5' height='1' fill='%23FFFFFF'/><rect x='6' y='6' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='7' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='7' width='6' height='1' fill='%23FFFFFF'/><rect x='7' y='7' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='8' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='8' width='7' height='1' fill='%23FFFFFF'/><rect x='8' y='8' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='9' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='9' width='8' height='1' fill='%23FFFFFF'/><rect x='9' y='9' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='10' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='10' width='5' height='1' fill='%23FFFFFF'/><rect x='6' y='10' width='5' height='1' fill='%231E1B2E'/><rect x='0' y='11' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='11' width='2' height='1' fill='%23FFFFFF'/><rect x='3' y='11' width='1' height='1' fill='%231E1B2E'/><rect x='4' y='11' width='2' height='1' fill='%23FFFFFF'/><rect x='6' y='11' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='12' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='12' width='1' height='1' fill='%23FFFFFF'/><rect x='2' y='12' width='1' height='1' fill='%231E1B2E'/><rect x='4' y='12' width='1' height='1' fill='%231E1B2E'/><rect x='5' y='12' width='2' height='1' fill='%23FFFFFF'/><rect x='7' y='12' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='13' width='2' height='1' fill='%231E1B2E'/><rect x='4' y='13' width='1' height='1' fill='%231E1B2E'/><rect x='5' y='13' width='2' height='1' fill='%23FFFFFF'/><rect x='7' y='13' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='14' width='1' height='1' fill='%231E1B2E'/><rect x='5' y='14' width='1' height='1' fill='%231E1B2E'/><rect x='6' y='14' width='2' height='1' fill='%23FFFFFF'/><rect x='8' y='14' width='1' height='1' fill='%231E1B2E'/><rect x='5' y='15' width='3' height='1' fill='%231E1B2E'/></svg>") 1 1, auto;
  --cur-hand: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='26' height='28' viewBox='0 0 13 14' shape-rendering='crispEdges'><rect x='4' y='0' width='2' height='1' fill='%231E1B2E'/><rect x='3' y='1' width='1' height='1' fill='%231E1B2E'/><rect x='4' y='1' width='2' height='1' fill='%23FFFFFF'/><rect x='6' y='1' width='1' height='1' fill='%231E1B2E'/><rect x='3' y='2' width='1' height='1' fill='%231E1B2E'/><rect x='4' y='2' width='2' height='1' fill='%23FFFFFF'/><rect x='6' y='2' width='1' height='1' fill='%231E1B2E'/><rect x='3' y='3' width='1' height='1' fill='%231E1B2E'/><rect x='4' y='3' width='2' height='1' fill='%23FFFFFF'/><rect x='6' y='3' width='1' height='1' fill='%231E1B2E'/><rect x='3' y='4' width='1' height='1' fill='%231E1B2E'/><rect x='4' y='4' width='2' height='1' fill='%23FFFFFF'/><rect x='6' y='4' width='3' height='1' fill='%231E1B2E'/><rect x='3' y='5' width='1' height='1' fill='%231E1B2E'/><rect x='4' y='5' width='2' height='1' fill='%23FFFFFF'/><rect x='6' y='5' width='1' height='1' fill='%231E1B2E'/><rect x='7' y='5' width='2' height='1' fill='%23FFFFFF'/><rect x='9' y='5' width='3' height='1' fill='%231E1B2E'/><rect x='1' y='6' width='3' height='1' fill='%231E1B2E'/><rect x='4' y='6' width='2' height='1' fill='%23FFFFFF'/><rect x='6' y='6' width='1' height='1' fill='%231E1B2E'/><rect x='7' y='6' width='2' height='1' fill='%23FFFFFF'/><rect x='9' y='6' width='1' height='1' fill='%231E1B2E'/><rect x='10' y='6' width='2' height='1' fill='%23FFFFFF'/><rect x='12' y='6' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='7' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='7' width='2' height='1' fill='%23FFFFFF'/><rect x='3' y='7' width='1' height='1' fill='%231E1B2E'/><rect x='4' y='7' width='8' height='1' fill='%23FFFFFF'/><rect x='12' y='7' width='1' height='1' fill='%231E1B2E'/><rect x='0' y='8' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='8' width='11' height='1' fill='%23FFFFFF'/><rect x='12' y='8' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='9' width='1' height='1' fill='%231E1B2E'/><rect x='2' y='9' width='10' height='1' fill='%23FFFFFF'/><rect x='12' y='9' width='1' height='1' fill='%231E1B2E'/><rect x='1' y='10' width='1' height='1' fill='%231E1B2E'/><rect x='2' y='10' width='9' height='1' fill='%23FFFFFF'/><rect x='11' y='10' width='1' height='1' fill='%23F4F1EA'/><rect x='12' y='10' width='1' height='1' fill='%231E1B2E'/><rect x='2' y='11' width='1' height='1' fill='%231E1B2E'/><rect x='3' y='11' width='7' height='1' fill='%23FFFFFF'/><rect x='10' y='11' width='1' height='1' fill='%23F4F1EA'/><rect x='11' y='11' width='1' height='1' fill='%231E1B2E'/><rect x='3' y='12' width='1' height='1' fill='%231E1B2E'/><rect x='4' y='12' width='6' height='1' fill='%23FFFFFF'/><rect x='10' y='12' width='1' height='1' fill='%23F4F1EA'/><rect x='11' y='12' width='1' height='1' fill='%231E1B2E'/><rect x='3' y='13' width='8' height='1' fill='%231E1B2E'/></svg>") 9 1, pointer;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--taskbar-h) + 16px);
  -webkit-text-size-adjust: 100%;
  background: var(--night); /* overscroll at the bottom stays night */
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 20px;
  line-height: 1.35;
  padding-top: var(--taskbar-h);

  /* Day to night: one gradient over the WHOLE page height (body grows with content) */
  background-color: var(--bg);
  background-image:
    /* soft horizontal pixel bands: 22% / 10% white, 40px tall, repeating */
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.22) 0 40px,
      transparent 40px 80px,
      rgba(255, 255, 255, 0.10) 80px 120px,
      transparent 120px 160px
    ),
    linear-gradient(
      to bottom,
      #FCEFF3 0%,
      #F9DDE6 20%,
      #F2CFE4 36%,
      #D9C2EE 48%,
      #9C87DC 60%,
      #5A47B4 72%,
      #372A8C 84%,
      #221A58 100%
    );
  background-repeat: repeat, no-repeat;
  background-size: 100% 160px, 100% 100%;
}

::selection { background: var(--burgundy); color: var(--white); }

html, body { cursor: var(--cur-arrow); }
a[href], button, [role="button"], [role="tab"] { cursor: var(--cur-hand); }

img { max-width: 100%; display: block; }

a { color: var(--blue); }

main, .footer { position: relative; z-index: 1; }

/* Section shells (filled in later steps) */
.section {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px var(--gutter);
}


/* ---------- Sparkles ---------- */
.sparkles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.sparkle {
  position: absolute;
  display: block;
  image-rendering: pixelated;
  animation: twinkle 2.4s steps(4, end) infinite;
}

/* "+" sparkle, 5x5 pixel cross */
.sparkle--plus {
  width: 10px;
  height: 10px;
  background:
    linear-gradient(var(--white), var(--white)) center / 2px 10px no-repeat,
    linear-gradient(var(--white), var(--white)) center / 10px 2px no-repeat;
}

/* bigger 4-point sparkle with a bright center */
.sparkle--star {
  width: 18px;
  height: 18px;
  background:
    linear-gradient(var(--white), var(--white)) center / 6px 6px no-repeat,
    linear-gradient(var(--white), var(--white)) center / 2px 18px no-repeat,
    linear-gradient(var(--white), var(--white)) center / 18px 2px no-repeat;
}

/* "·" sparkle, single fat pixel */
.sparkle--dot {
  width: 3px;
  height: 3px;
  background: var(--white);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50%      { opacity: 1;    transform: scale(1); }
}

/* ---------- Bevel helpers (Win95 style) ---------- */
.bevel {
  background: var(--cream);
  border: 0;
  box-shadow:
    inset -2px -2px 0 var(--ink),
    inset 2px 2px 0 var(--white),
    inset -4px -4px 0 var(--bevel-dark);
}

.bevel:active,
.bevel.is-pressed {
  box-shadow:
    inset 2px 2px 0 var(--ink),
    inset -2px -2px 0 var(--white),
    inset 4px 4px 0 var(--bevel-dark);
}

.bevel-in {
  box-shadow:
    inset 2px 2px 0 var(--bevel-dark),
    inset -2px -2px 0 var(--white);
}

/* ---------- Taskbar ---------- */
.taskbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--taskbar-h);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  background: var(--cream);
  border-bottom: var(--outline) solid var(--ink);
  box-shadow: inset 0 2px 0 var(--white);
  font-family: var(--f-mono);
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
}

.taskbar__start {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 8px;
  font: inherit;
  font-size: 22px;
  color: var(--ink);
  cursor: var(--cur-arrow);
  outline: var(--outline) solid var(--ink);
  outline-offset: -2px;
}

.taskbar__logo { flex: none; }

.taskbar__tabs {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 4px;
  padding-left: 6px;
  border-left: 2px solid var(--bevel-dark);
  box-shadow: inset 2px 0 0 var(--white);
}

.taskbar__tab {
  flex: 0 1 150px;
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar__tab:focus-visible,
.taskbar__sound:focus-visible {
  outline: 2px dotted var(--ink);
  outline-offset: -6px;
}

.taskbar__tray {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px 0 6px;
}

.taskbar__sound {
  display: grid;
  place-items: center;
  width: 28px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: var(--cur-hand);
}

.taskbar__sound .sound-off { display: none; }
.taskbar__sound[aria-pressed="true"] .sound-on { display: none; }
.taskbar__sound[aria-pressed="true"] .sound-off { display: inline; }

.taskbar__clock {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.taskbar__clock .clock-date { margin-right: 10px; }

/* ---------- Retro window component ---------- */
/*
  Usage:
  <div class="win [win--ink | win--yellow]">
    <div class="win__bar">
      <span class="win__title">file_name.exe</span>
      <span class="win__controls" aria-hidden="true">
        <span class="win__btn win__btn--min"></span>
        <span class="win__btn win__btn--max"></span>
        <span class="win__btn win__btn--close"></span>
      </span>
    </div>
    <div class="win__body">...</div>
  </div>
*/
.win {
  --win-bar: var(--burgundy);
  --win-bar-text: var(--white);

  position: relative;
  background: var(--cream);
  border: var(--outline) solid var(--ink);
  box-shadow: var(--shadow-hard);
  color: var(--ink);
  min-width: 0;
}

.win--ink    { --win-bar: var(--ink); }
.win--yellow { --win-bar: var(--yellow); --win-bar-text: var(--ink); }

.win__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 3px 4px 3px 8px;
  background: var(--win-bar);
  color: var(--win-bar-text);
  border-bottom: var(--outline) solid var(--ink);
  font-family: var(--f-mono);
  font-size: 21px;
  line-height: 1;
  user-select: none;
}

.win__title {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win__controls {
  flex: none;
  display: flex;
  gap: 2px;
}

/* the 3 classic bevel buttons, glyphs drawn as pixel SVGs */
.win__btn {
  width: 20px;
  height: 18px;
  background-color: var(--cream);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 8px;
  image-rendering: pixelated;
  box-shadow:
    inset -1px -1px 0 var(--ink),
    inset 1px 1px 0 var(--white),
    inset -2px -2px 0 var(--bevel-dark);
}

.win__btn--min {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' shape-rendering='crispEdges'%3E%3Crect x='1' y='6' width='6' height='2' fill='%231E1B2E'/%3E%3C/svg%3E");
}

.win__btn--max {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' shape-rendering='crispEdges'%3E%3Cpath d='M1 0h8v2H1zM1 2h1v6H1zM8 2h1v6H8zM1 7h8v1H1z' fill='%231E1B2E'/%3E%3C/svg%3E");
}

.win__btn--close {
  margin-left: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' shape-rendering='crispEdges'%3E%3Cpath d='M1 0h2v1h1v1h2V1h1V0h2v1H8v1H7v1H6v2h1v1h1v1h1v1H7V7H6V6H4v1H3v1H1V7h1V6h1V5h1V3H3V2H2V1H1z' fill='%231E1B2E'/%3E%3C/svg%3E");
}

.win__body {
  padding: 16px;
}

.win__body > :first-child { margin-top: 0; }
.win__body > :last-child  { margin-bottom: 0; }

/* ---------- CTA button (Win95 bevel, used everywhere) ---------- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 10px 30px 12px;
  background: var(--grey);
  color: var(--ink);
  font-family: var(--f-btn);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border: 3px solid var(--ink);
  box-shadow:
    inset 3px 3px 0 var(--white),
    inset -4px -4px 0 var(--ink);
  cursor: var(--cur-hand);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-cta:active,
.btn-cta.is-pressed {
  box-shadow:
    inset 4px 4px 0 var(--ink),
    inset -3px -3px 0 var(--white);
  padding: 12px 28px 10px 32px;
}

.btn-cta:focus-visible {
  outline: 2px dotted var(--ink);
  outline-offset: 4px;
}

/* ---------- Hero ---------- */
.hero {
  --fw: min(460px, 38vw); /* folder width drives every folder measurement */

  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - var(--taskbar-h));
  min-height: calc(100svh - var(--taskbar-h));
  padding: 20px var(--gutter) 28px;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, auto);
  justify-content: center;
  align-items: center;
  gap: 32px clamp(32px, 6vw, 96px);
}

.hero__title {
  margin: 0 0 28px;
  font-family: var(--f-head);
  font-weight: 400;
  font-size: clamp(64px, 7.4vw, 100px);
  line-height: 0.82;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.hero__line { display: block; white-space: nowrap; }

.hero__accent { color: var(--burgundy); }

.hero__caret {
  color: var(--burgundy);
  animation: caret-blink 1.05s steps(1, end) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

.sticker-star {
  display: inline-block;
  width: 0.36em;
  height: auto;
  margin-left: 0.08em;
  vertical-align: top;
  transform: rotate(12deg);
}

.hero__sub {
  max-width: 20em;
  margin: 0 0 32px;
  font-family: var(--f-body);
  font-size: 24px;
  line-height: 1.3;
}

/* ---------- Folder ---------- */
.hero__art {
  display: flex;
  justify-content: center;
  align-items: center;
}

.folder {
  position: relative;
  width: var(--fw);
  height: calc(var(--fw) * 0.84 + 40px);
  cursor: var(--cur-hand);
  -webkit-tap-highlight-color: transparent;
}

.folder:focus-visible {
  outline: 2px dotted var(--ink);
  outline-offset: 8px;
}

.folder__back,
.folder__front {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: calc(var(--fw) * 0.6);
  overflow: visible;
}

.folder__back  { z-index: 1; }
.folder__front { z-index: 5; pointer-events: none; }

.folder__label {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: calc(var(--fw) * 0.07);
  text-align: center;
  font-family: var(--f-mono);
  font-size: clamp(20px, calc(var(--fw) * 0.058), 28px);
  line-height: 1;
  color: var(--ink);
  pointer-events: none;
}

/* Lead cards: small retro windows with a yellow bar */
.lead-card {
  --card-w: calc(var(--fw) * 0.66);
  /* closed pose */
  --x: 0px; --y: 0px; --r: 0deg;
  /* nudge set by apply.js so fanned cards stay on screen */
  --nx: 0px; --ny: 0px;

  position: absolute;
  left: calc(50% - var(--card-w) / 2);
  bottom: calc(var(--fw) * 0.25);
  width: var(--card-w);
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(calc(var(--x) + var(--nx)), calc(var(--y) + var(--ny))) rotate(var(--r));
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.lead-card .win__bar {
  min-height: 24px;
  padding: 2px 3px 2px 6px;
  font-size: 18px;
}

.lead-card .win__btn { width: 16px; height: 14px; background-size: 8px 7px; }

.lead-card__body {
  padding: 5px;
  background: var(--cream);
}

.lead-card__body img {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--ink);
}

/* closed: stacked and tilted, peeking out of the folder */
.lead-card--left  { --x: calc(var(--fw) * -0.11); --y: calc(var(--fw) * 0.07);  --r: -5deg; z-index: 2; }
.lead-card--right { --x: calc(var(--fw) * 0.11);  --y: calc(var(--fw) * 0.05);  --r: 4deg;  z-index: 3; }
.lead-card--front { --x: 0px;                     --y: calc(var(--fw) * -0.02); --r: -1deg; z-index: 4; }

/* open: fan out left, top, right, above the front of the folder */
.folder.is-open .lead-card { z-index: 7; }
.folder.is-open .lead-card--front { z-index: 8; }

.folder.is-open .lead-card--left  { --x: calc(var(--fw) * -0.38); --y: calc(var(--fw) * -0.02); --r: -8deg; transition-delay: 0s; }
.folder.is-open .lead-card--front { --x: 0px;                     --y: calc(var(--fw) * -0.22); --r: 1deg;  transition-delay: 0.12s; }
.folder.is-open .lead-card--right { --x: calc(var(--fw) * 0.42);  --y: calc(var(--fw) * 0.02);  --r: 7deg;  transition-delay: 0.24s; }

/* while closing, cards stay above the front until they are back inside */
.folder.is-closing .lead-card { z-index: 7; }
.folder.is-closing .lead-card--front { z-index: 8; }

/* used by apply.js to measure the open pose without animation */
.folder.is-measuring .lead-card { transition: none !important; }

/* pixel hand sticker: shows the folder is clickable */
.sticker-hand {
  position: absolute;
  z-index: 9;
  right: calc(var(--fw) * -0.06);
  bottom: calc(var(--fw) * 0.12);
  width: calc(var(--fw) * 0.1);
  min-width: 30px;
  height: auto;
  pointer-events: none;
  animation: hand-bob 1.2s ease-in-out infinite;
}

@keyframes hand-bob {
  0%, 100% { transform: translate(0, 0) rotate(-14deg); }
  50%      { transform: translate(-4px, -8px) rotate(-14deg); }
}

.folder.is-open .sticker-hand { opacity: 0; transition: opacity 0.2s; }

@media (max-width: 860px) {
  .hero {
    --fw: min(340px, calc(100vw - 96px));
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 24px;
    gap: 36px;
  }
  .hero__art { padding-bottom: 8px; }
  .hero__sub { max-width: 22em; }

  /* tighter fan on small screens; apply.js nudges anything still off screen */
  .lead-card { --card-w: calc(var(--fw) * 0.72); }
  .folder.is-open .lead-card--left  { --x: calc(var(--fw) * -0.24); --y: calc(var(--fw) * 0.02); --r: -2deg; }
  .folder.is-open .lead-card--front { --x: 0px;                     --y: calc(var(--fw) * -0.13); --r: 1deg; }
  .folder.is-open .lead-card--right { --x: calc(var(--fw) * 0.24);  --y: calc(var(--fw) * 0.06); --r: 2deg; }
  .lead-card--left  { --r: -2deg; }
  .lead-card--right { --r: 2deg; }
}

@media (max-width: 600px) {
  .hero__title { font-size: 64px; margin-bottom: 18px; }
  .hero__sub { font-size: 22px; margin-bottom: 20px; }
  .btn-cta { font-size: 22px; min-height: 56px; padding: 10px 24px 12px; }
  .btn-cta:active, .btn-cta.is-pressed { padding: 12px 22px 10px 26px; }
}

/* ---------- 5.2 Form ---------- */
.form-section { padding-top: 48px; }

.form-section__lead {
  max-width: 760px;
  margin: 0 auto 18px;
  font-family: var(--f-body);
  font-size: 26px;
  line-height: 1.25;
  text-align: center;
}

.form-section__wrap {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.form-win__body { padding: 12px; }

/* Application form (native Netlify Form) */
.apply-form {
  display: grid;
  gap: 18px;
  font-family: var(--f-body);
  font-size: 22px;
  line-height: 1.25;
  color: var(--ink);
}

.apply-form__field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.apply-form__label {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  font-family: var(--f-mono);
  font-size: 22px;
  line-height: 1;
}

.apply-form input[type="text"],
.apply-form input[type="email"],
.apply-form select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: inset 2px 2px 0 var(--bevel-dark);
}

.apply-form input[type="text"]:focus-visible,
.apply-form input[type="email"]:focus-visible,
.apply-form select:focus-visible {
  outline: 2px dotted var(--ink);
  outline-offset: 2px;
}

.apply-form input[type="checkbox"] {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--burgundy);
  cursor: var(--cur-hand);
}

.apply-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: var(--cur-hand);
}

.apply-form__consent input { margin-top: 2px; }

/* two steps, one form: JS adds .is-steps, and .is-step-2 swaps which one shows */
.apply-form__step { display: grid; gap: 18px; }
.apply-form.is-steps .apply-form__step[data-step="2"] { display: none; }
.apply-form.is-steps.is-step-2 .apply-form__step[data-step="1"] { display: none; }
.apply-form.is-steps.is-step-2 .apply-form__step[data-step="2"] { display: grid; }

.apply-form__count {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 20px;
  line-height: 1;
}
.apply-form:not(.is-steps) .apply-form__count { display: none; }

.apply-form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: var(--cur-hand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h10v2H8v2H6v2H4V4H2V2H0z' fill='%231E1B2E'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 9px;
}

.apply-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.apply-form__submit:disabled { opacity: 0.6; }

@media (max-width: 600px) {
  .apply-form__actions .btn-cta { flex: 1 1 100%; }
}

.sticker-cat {
  position: absolute;
  right: -184px;
  bottom: -6px;
  width: 172px;
  height: auto;
  pointer-events: none;
}

/* ---------- 5.3 What happens next ---------- */
.next-section { padding-top: 24px; }

.next-win {
  max-width: 900px;
  margin: 0 auto;
}

.next-win__body { padding: 32px 24px 28px; }

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
}

.step {
  flex: 0 1 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
  border: 2px solid transparent;
}

.step__svg { width: 68px; height: auto; }
.step__svg--cal { width: 72px; }

.step__hourglass {
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 26px;
  height: auto;
  transform: rotate(-10deg);
}

.step__file {
  padding: 1px 6px 2px;
  font-family: var(--f-mono);
  font-size: 23px;
  line-height: 1;
  border: 1px dotted transparent;
}

.step__caption {
  margin-top: 8px;
  max-width: 14em;
  font-family: var(--f-body);
  font-size: 22px;
  line-height: 1.2;
}

/* selection highlight, like a clicked desktop icon */
.step.is-selected .step__icon {
  background: var(--yellow);
  border-color: var(--ink);
}

.step.is-selected .step__file {
  background: var(--burgundy);
  color: var(--white);
  border-color: var(--white);
}

.steps__arrow {
  flex: 0 1 120px;
  min-width: 48px;
  display: flex;
  align-items: center;
  height: 96px;
}

.steps__dots {
  flex: 1 1 auto;
  height: 0;
  border-top: 4px dotted var(--ink);
}

.steps__head {
  flex: none;
  width: 11px;
  height: auto;
  margin-left: 2px;
}

@media (max-width: 1199px) {
  .sticker-cat { right: -16px; bottom: auto; top: -96px; width: 112px; }
}

@media (max-width: 860px) {
  .sticker-cat { display: none; }
}

@media (max-width: 700px) {
  .form-section__lead { font-size: 22px; }
  .next-win__body { padding: 24px 16px; }

  .steps { flex-direction: column; align-items: center; gap: 4px; }
  .step { flex: none; }
  .steps__arrow {
    flex: none;
    flex-direction: column;
    width: auto;
    min-width: 0;
    height: 64px;
  }
  .steps__dots { width: 0; height: auto; border-top: 0; border-left: 4px dotted var(--ink); }
  .steps__head { transform: rotate(90deg); margin: 0; }
}

/* ---------- Section titles (Jersey 10) ---------- */
.section-title {
  margin: 0 0 40px;
  font-family: var(--f-head);
  font-weight: 400;
  font-size: clamp(52px, 7vw, 88px);
  line-height: 0.9;
  text-align: center;
  color: var(--ink);
}

.section-title__accent { color: var(--burgundy); }

/* ---------- 5.4 Objections (error popups) ---------- */
.popups {
  --pw: min(380px, calc((100vw - 32px + 28px) / 3));

  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8px 0 72px;
}

.popup {
  --tilt: 0deg;
  --ty: 0px;

  flex: none;
  width: var(--pw);
  transform: translateY(var(--ty)) rotate(var(--tilt));
  transition: transform 0.18s ease-in, opacity 0.18s ease-in;
}

.popup + .popup { margin-left: -14px; }
.popup + .popup--3 { margin-left: -4px; } /* popup 2 tilts toward it */

.popup--1 { --tilt: -3deg; --ty: 0px;  z-index: 1; }
.popup--2 { --tilt: 2deg;  --ty: 52px; z-index: 2; }
.popup--3 { --tilt: -1deg; --ty: 12px; z-index: 3; }

/* bring the one you are reading to the front */
.popup:hover,
.popup:focus-within { z-index: 4; }

.popup.is-closing {
  opacity: 0;
  transform: translateY(var(--ty)) rotate(var(--tilt)) scale(0.85);
}

.popup.is-closed { visibility: hidden; }

.popup__body {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 18px 8px 16px;
}

/* popups that sit under the next one keep their text clear of the overlap */
.popup--1 .popup__body,
.popup--2 .popup__body { padding-right: 30px; }

.popup__icon { width: 36px; height: auto; margin-top: 2px; }

.popup__text p { margin: 0; }

.popup__file {
  font-family: var(--f-mono);
  font-size: 21px;
  line-height: 1.05;
  margin-bottom: 10px !important;
}

.popup__q {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 23px;
  line-height: 1.15;
  margin-bottom: 8px !important;
}

.popup__a {
  font-family: var(--f-body);
  font-size: 19px;
  line-height: 1.3;
}

.popup__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px 16px;
}

.popup__btn {
  min-width: 96px;
  height: 36px;
  padding: 0 16px 2px;
  font-family: var(--f-btn);
  font-size: 18px;
  color: var(--ink);
  cursor: var(--cur-hand);
}

.popup__btn[aria-disabled="true"] {
  cursor: var(--cur-arrow);
  color: rgba(30, 27, 46, 0.4);
  text-shadow: 1px 1px 0 var(--white);
}

/* the greyed out Cancel never looks pressed */
.popup__btn[aria-disabled="true"]:active {
  box-shadow:
    inset -2px -2px 0 var(--ink),
    inset 2px 2px 0 var(--white),
    inset -4px -4px 0 var(--bevel-dark);
}

.popup__btn:focus-visible {
  outline: 2px dotted var(--ink);
  outline-offset: -7px;
}

.popups__restore {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  padding: 6px 14px 8px;
  border: var(--outline) solid var(--ink);
  background: var(--cream); /* keeps the blue link readable on the lavender background */
  box-shadow: var(--shadow-hard);
  font-family: var(--f-body);
  font-size: 24px;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: var(--cur-hand);
}

.popups__restore[hidden] { display: none; }

.popups__restore:focus-visible { outline: 2px dotted var(--blue); outline-offset: 2px; }

.sticker-bin {
  position: absolute;
  z-index: 5;
  right: max(0px, calc(50% - var(--pw) * 1.5 - 6px));
  bottom: 0;
  width: 64px;
  height: auto;
  transform: rotate(6deg);
  pointer-events: none;
}

/* below 1000px: stacked, small tilt, no overlap */
@media (max-width: 999px) {
  .popups {
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding-bottom: 24px;
  }
  .popup { width: 100%; max-width: 540px; --ty: 0px; }
  .popup + .popup,
  .popup + .popup--3 { margin-left: 0; }
  .popup--1 { --tilt: -1.5deg; }
  .popup--2 { --tilt: 1.5deg; }
  .popup--3 { --tilt: -1deg; }
  .popup--1 .popup__body,
  .popup--2 .popup__body { padding-right: 18px; }
  .popup.is-closed { display: none; }
  .popups__restore { position: static; transform: none; }
  .sticker-bin { right: 8px; bottom: -40px; width: 52px; }
}

@media (max-width: 700px) {
  .sticker-bin { display: none; }
  .popup__body { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 14px 14px 6px 12px; }
  .popup__icon { width: 28px; }
  .popup__file { font-size: 19px; }
  .popup__q { font-size: 21px; }
  .popup__a { font-size: 18px; }
}

/* ---------- Night text (from Proof down: text outside windows flips to light) ---------- */
.section-title--night { color: var(--cream); }
.section-title--night .section-title__accent { color: var(--yellow); }

/* ---------- 5.5 Proof (case studies) ---------- */
.case-folders-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.case-folders {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 6vw, 64px);
}

.case-folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 0;
  background: none;
  cursor: var(--cur-hand);
  -webkit-tap-highlight-color: transparent;
}

.case-folder__icon { width: 96px; height: auto; }

.case-folder__label {
  padding: 1px 6px 2px;
  font-family: var(--f-mono);
  font-size: 24px;
  line-height: 1;
  color: var(--cream);
  border: 1px dotted transparent;
}

/* selection highlight on the open folder */
.case-folder[aria-selected="true"] .case-folder__label {
  background: var(--burgundy);
  color: var(--white);
  border-color: var(--white);
}

.case-folder:focus-visible { outline: 2px dotted var(--cream); outline-offset: 2px; }

.sticker-star-proof {
  position: absolute;
  right: -40px;
  top: -24px;
  width: 44px;
  height: auto;
  transform: rotate(14deg);
  pointer-events: none;
}

.case-wins {
  max-width: 960px;
  margin: 28px auto 0;
}

.case-win { transform-origin: 50% 0; }

.case-win.is-zooming { animation: win-zoom 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }

@keyframes win-zoom {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

.case-win__body { padding: 20px 22px 22px; }

.case-win__title {
  margin: 0 0 6px;
  font-family: var(--f-head);
  font-weight: 400;
  font-size: 44px;
  line-height: 0.9;
}

.case-win__line {
  max-width: 62ch;
  margin: 0;
  font-family: var(--f-body);
  font-size: 20px;
  line-height: 1.3;
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

/* equal-size white photo frames, any screenshot shape fits without cropping */
.shot {
  margin: 0;
  padding: 6px;
  background: var(--white);
  border: var(--outline) solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.shot:nth-child(4n + 1) { transform: rotate(-2deg); }
.shot:nth-child(4n + 2) { transform: rotate(1.5deg); }
.shot:nth-child(4n + 3) { transform: rotate(-1deg); }
.shot:nth-child(4n + 4) { transform: rotate(2deg); }

.shot img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: var(--cream);
}

.case-win__status {
  margin: 0;
  padding: 6px 12px 7px;
  border-top: var(--outline) solid var(--ink);
  background: var(--cream);
  box-shadow: inset 2px 2px 0 var(--bevel-dark), inset -2px -2px 0 var(--white);
  font-family: var(--f-mono);
  font-size: 22px;
  line-height: 1.1;
}

@media (max-width: 700px) {
  .case-folder__icon { width: 72px; }
  .case-folder__label { font-size: 20px; }
  .sticker-star-proof { display: none; }
  .case-win__body { padding: 16px 14px 18px; }
  .case-win__title { font-size: 36px; }
  .case-win__line { font-size: 19px; }
  .shots { gap: 14px; }
}

/* ---------- 5.6 About me ---------- */
.about-section { padding-top: 96px; padding-bottom: 96px; }

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  color: var(--cream);
}

.about__title {
  margin: 0 0 18px;
  font-weight: 400;
  line-height: 0.8;
}

.about__title-about {
  display: block;
  font-family: var(--f-head);
  font-size: clamp(64px, 8vw, 96px);
  color: var(--cream);
}

.about__title-me {
  display: block;
  font-family: var(--f-body);
  font-style: italic;
  font-size: clamp(96px, 12vw, 148px);
  color: #F29BBF;
}

.about__name {
  margin: 0 0 12px;
  font-family: var(--f-body);
  font-size: 40px;
  line-height: 1.05;
  color: var(--yellow);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.about__bio {
  max-width: 34em;
  margin: 0 0 28px;
  font-family: var(--f-body);
  font-size: 21px;
  line-height: 1.35;
}

.about__sub {
  margin: 0 0 12px;
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0.02em;
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.tool img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: var(--outline) solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--white);
  object-fit: cover;
}

.results {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--f-body);
  font-size: 22px;
  line-height: 1.25;
}

.results li { margin-bottom: 4px; }

.results__num {
  font-family: var(--f-head);
  font-size: 34px;
  line-height: 1;
  color: var(--yellow);
  margin-right: 4px;
}

/* windows column: photo window + socials window over its bottom-right corner */
.about__windows {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
  padding: 0 40px 64px 0;
}

.meet-win { width: 100%; }

.meet-win__photo {
  padding: 10px;
  background: var(--cream);
}

.meet-win__photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: 50% 20%;
  border: var(--outline) solid var(--ink);
}

/* spot reserved for the pixel avatar (assets/avatar.svg): top of the window, right side */
.meet-win__avatar {
  position: absolute;
  z-index: 2;
  right: 46px;
  bottom: 100%;
  width: 72px;
  height: 72px;
  margin-bottom: -6px;
  pointer-events: none;
}

.socials-win {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  min-width: 250px;
}

.socials-win__body {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  font-family: var(--f-body);
  font-size: 21px;
}

.socials-win__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  text-underline-offset: 3px;
}

.socials-win__link img { width: 22px; height: 22px; border-radius: 6px; }

.socials-win__platform { color: var(--ink); }

/* ---------- 5.7 Footer ---------- */
.footer {
  margin-top: 24px;
  color: var(--cream);
}

.skyline {
  display: block;
  width: 100%;
  height: 180px;
}

.footer__bar {
  background: #1A1446;
  padding: 14px var(--gutter) 18px;
  text-align: center;
}

.footer__line {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 20px;
  line-height: 1.2;
}

.footer__line a { color: var(--cream); text-underline-offset: 3px; }
.footer__line a:hover { color: var(--yellow); }

@media (max-width: 860px) {
  /* stacked order: title, then the photo + socials windows, then name, bio, tools, results */
  .about { grid-template-columns: 1fr; gap: 0; }
  .about__text { display: contents; }
  .about__title { order: 1; margin-bottom: 28px; }
  .about__windows { order: 2; width: 100%; max-width: 420px; margin: 0 auto 44px; padding: 0 28px 52px 0; }
  .about__text > :not(.about__title) { order: 3; }
}

@media (max-width: 600px) {
  .about-section { padding-top: 64px; padding-bottom: 64px; }
  .about__name { font-size: 34px; }
  .about__bio { font-size: 20px; }
  .meet-win__avatar { right: 40px; width: 60px; height: 60px; }
  .socials-win { min-width: 0; }
  .socials-win__body { font-size: 19px; padding: 12px; }
  .skyline { height: 120px; }
  .footer__line { font-size: 18px; }
}

/* ---------- Frog sticker (objections) ---------- */
.faq-section { position: relative; }

.sticker-frog {
  position: absolute;
  left: max(16px, calc(50% - 300px));
  top: 40px;
  width: 64px;
  height: auto;
  transform: rotate(-8deg);
  pointer-events: none;
}

@media (max-width: 999px) {
  .sticker-frog { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  :root { --taskbar-h: 40px; }

  .taskbar { gap: 4px; padding: 4px; font-size: 18px; }
  .taskbar__start { height: 30px; padding: 0 6px; font-size: 19px; gap: 4px; }
  .taskbar__tabs { padding-left: 4px; gap: 3px; }
  .taskbar__tab { flex: 1 1 0; height: 30px; padding: 0 6px; justify-content: center; }
  .taskbar__tray { height: 30px; gap: 4px; padding: 0 6px 0 2px; }
  .taskbar__clock .clock-date { display: none; }

  .win__bar { font-size: 19px; }
}

@media (max-width: 360px) {
  .taskbar__logo { display: none; }
}

/* ---------- Reduced motion: everything stops ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .sparkle { opacity: 0.7; transform: none; }
}
