/* Homepage v2: the few rules the restructure needs, layered on home.css + refine.css */

/* hero: the replay control is retired; the intro still plays once per session */
.hero__replay[hidden] { display: none !important; }

/* hero__line is now the page's H1: keep its existing look */
h1.hero__line { font-weight: 400; }

/* projects: the counter is retired (the index already shows where you are) */
.spine__count[hidden] { display: none !important; }

/* header: on desktop the mark stands alone while the hero shows the full logo;
   the name slides in once the page scrolls past the hero (.is-scrolled is set by the bundle) */
@media (min-width: 900px) {
  .hdr .hdr__brand span { display: inline-block; max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; margin-left: -10px; transition: max-width .5s var(--ease), opacity .35s, margin-left .5s var(--ease); }
  .hdr.is-scrolled .hdr__brand span { max-width: 160px; opacity: 1; margin-left: 0; }
}



/* project cards: the field is a quiet label ("In psychology"), the title is what leads */
.proj__field { font: 400 clamp(15px, 1.15vw, 18px)/1.2 var(--display); letter-spacing: -.005em; color: var(--muted); }
.proj__title { font-size: clamp(22px, 2vw, 30px); line-height: 1.12; letter-spacing: -.02em; }
@media (max-width: 760px) {
  .proj__field { font-size: 14px; }
  .proj__title { font-size: 21px; }
}

/* ---- Lab button fix: the follow section rises over the Lab by --ov, and its empty top padding
   was catching clicks meant for "Follow this exploration". Only real content takes clicks now. */
.follow, .follow__stage, .follow__inner { pointer-events: none; }
.follow__inner > * { pointer-events: auto; }

/* ---- Follow a project (v2): dark intro + form, in one panel ---- */
.follow__inner { max-width: 1160px; }
.sub { width: 100%; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); border-radius: 28px; overflow: hidden; background: rgba(255,255,255,.82); border: 1px solid #fff; outline: 1px solid rgba(120,150,205,.28); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 30px 80px -40px rgba(18,21,28,.35); text-align: left; }
.sub__intro { display: flex; flex-direction: column; gap: 18px; padding: clamp(28px, 3.6vw, 52px); color: #EEF2FA; background: radial-gradient(120% 120% at 100% 0%, rgba(22,101,246,.38), rgba(22,101,246,0) 55%), linear-gradient(160deg, #111827, #0A0E18); }
.sub__kicker { margin: 0; display: flex; align-items: center; gap: 9px; font: 500 11px/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: rgba(238,242,250,.72); }
.sub__kicker svg, .sub__perks svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sub__title { margin: 0; font: 400 clamp(34px, 3.6vw, 52px)/1.02 var(--display); letter-spacing: -.035em; color: #fff; }
.sub__title .dot { color: #5B8CFF; }
.sub__lede { margin: 0; font: 400 16.5px/1.55 var(--read); color: rgba(238,242,250,.82); max-width: 30em; }
.sub__perks { list-style: none; margin: auto 0 0; padding: 22px 0 0; border-top: 1px solid rgba(238,242,250,.14); display: grid; gap: 12px; }
.sub__perks li { display: flex; align-items: center; gap: 12px; font: 400 14.5px/1.4 var(--display); color: rgba(238,242,250,.9); }
.sub__perks svg { color: #7FA6FF; }

.sub__form { display: flex; flex-direction: column; gap: 22px; padding: clamp(28px, 3.6vw, 52px); }
.sub__pick { position: relative; margin: 0; padding: 0; border: 0; min-width: 0; }
.sub__label { display: block; margin: 0 0 10px; padding: 0; font: 500 14px/1.2 var(--display); color: var(--ink); }
.sub__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt { position: relative; display: grid; gap: 6px; padding: 16px 16px 15px; border-radius: 16px; background: #fff; border: 1px solid var(--line); cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; }
.opt:hover { border-color: rgba(22,101,246,.45); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt__name { font: 500 16px/1.2 var(--display); letter-spacing: -.01em; color: var(--ink); padding-right: 22px; }
.opt__meta { display: flex; align-items: center; gap: 7px; font: 400 12.5px/1.2 var(--read); color: var(--muted); }
.opt__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); flex: none; }
.opt__dot--lab { background: transparent; box-shadow: inset 0 0 0 1.5px var(--blue); }
.opt__dot--all { background: linear-gradient(90deg, var(--blue) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--blue); }
.opt::after { content: ""; position: absolute; top: 15px; right: 15px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; transition: .2s; }
.opt:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 10px 24px -16px rgba(22,101,246,.6); background: #F7FAFF; }
.opt:has(input:checked)::after { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 3px #fff; }
.opt:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.sub__pick.is-invalid .opt { border-color: rgba(180,35,24,.55); }
.sub__select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; bottom: 0; left: 0; }

.sub__input { box-sizing: border-box; width: 100%; height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font: 400 16px var(--display); color: var(--ink); }
.sub__input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.sub__input[aria-invalid="true"] { border-color: #B42318; }
.sub__btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 26px; border: 0; border-radius: 14px; background: var(--blue); color: #fff; font: 500 16px var(--display); cursor: pointer; transition: background .2s; }
.sub__btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.sub__btn:hover { background: #0C4FD0; }
.sub__btn:disabled { opacity: .6; cursor: default; }
.sub__btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.sub__note { margin: -8px 0 0; font: 400 13px/1.4 var(--read); color: var(--muted); }
.sub__note a { color: inherit; }
.sub .form__picked, .sub .form__msg { margin: 0; }
.sub .form__picked:empty, .sub .form__msg:empty { display: none; }

@media (max-width: 860px) {
  .sub { grid-template-columns: 1fr; }
  .sub__perks { margin-top: 4px; }
}
@media (max-width: 420px) {
  .sub__opts { grid-template-columns: 1fr; }
  .opt { padding: 14px 14px 13px; }
}

/* decorative canvases and rising section edges never take clicks; only their real content does */
#followCanvas, #footCanvas { pointer-events: none; }
.foot, .foot__inner { pointer-events: none; }
.foot__inner > * { pointer-events: auto; }


/* ---- section rhythm (premium spacing) ----
   One generous gap between every pair of homepage sections, measured content to content:
   ≈ 290px on a 1440px screen, ≈ 170px on a phone. Follow → Commissions is a step smaller (≈170 / 110)
   because they close the page together. Each line adjusts only its own seam; the base values
   (--ov overlap, --pad) come from refine.css. */
.studio        { padding-top: calc(var(--ov) * .78 + var(--pad) - clamp(60px, calc(43vh - 214px), 190px));   /* hero → studio (the hero is a screen tall, so this follows screen height) */
                 padding-bottom: calc(var(--ov) * .22 + var(--pad) + clamp(106px, 17vw, 245px)); } /* studio → projects */
.lab--quiet .lab__stage { padding-top: calc(var(--ov) * .78 + var(--pad) + clamp(116px, 15.7vw, 226px)); } /* projects → lab */
.follow__inner { padding-top: calc(var(--ov) * .78 + var(--pad) - clamp(50px, 4.7vw, 68px)); }  /* lab → follow */
.invite        { margin-top: clamp(85px, 10vw, 143px); }                                           /* follow → commissions */
.foot__inner   { padding-top: calc(var(--ov) * .5 + var(--pad) + clamp(26px, 6.1vw, 88px)); }    /* commissions → footer */
@media (max-width: 760px) { .studio { padding-top: calc(var(--ov) * .78 + var(--pad) - 86px); } }


/* ---- hero: two calls to action ----
   main: white pill that turns ink on hover/press, scrolls to the apps · secondary: underlined text link to the
   commissions request form. Side by side; on narrow phones the link drops under the button. */
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px clamp(28px, 3vw, 40px); }
.hero .hero__cta { height: 52px; padding: 0 32px; gap: 22px; font: 400 15px/1 var(--display); letter-spacing: .08em; }
.hero .hero__cta:active { background: var(--ink); color: #fff; border-color: var(--ink); transform: scale(.98); }

.hero__link { display: inline-flex; align-items: center; gap: 14px; padding: 6px 0; color: var(--ink); text-decoration: none;
  font: 500 15px/1 var(--display); letter-spacing: -.005em; transition: color .3s; }
.hero__link-txt { padding-bottom: 5px; border-bottom: 1px solid rgba(18,21,28,.45); transition: border-color .3s; }
.hero__link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 5px; transition: transform .35s var(--ease); }
.hero__link:hover .hero__link-txt, .hero__link:focus-visible .hero__link-txt { border-color: var(--ink); }
.hero__link:hover svg { transform: translateX(3px); }
.hero__link:active { color: var(--blue); }
.hero__link:active .hero__link-txt { border-color: var(--blue); }
.hero__link:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 2px; }

@media (max-width: 520px) {
  .hero__ctas { flex-direction: column; gap: 12px; }
  .hero .hero__cta { height: 48px; padding: 0 26px; font-size: 14px; gap: 18px; }
  .hero__link { font-size: 14px; }
}


/* ---- intro glyphs (assets/js/intro-glyphs.js): the water-tap glyphs, scattered over the dark opening ---- */
.glyph--intro { color: #8FB0FF; text-shadow: 0 0 10px rgba(80,130,255,.45);
  /* light blue on the night sky, turning into the brand blue as the scene brightens (--day: 0 → 1, set by the scene) */
  color: color-mix(in srgb, #1665F6 calc(var(--day, 0) * 100%), #8FB0FF);
  text-shadow: 0 0 10px rgba(80,130,255,calc(.45 * (1 - var(--day, 0)))); }
.glyph--intro.is-on { opacity: .85; }
.glyph--intro.glyph--dim.is-on { opacity: .4; }

