/* The Fiki homepage. One thread runs down the page; each world it passes through changes what it is.
   Colours come from each section's own five variables, so a world can be restyled in one place. */

.home { background: #07080D; color: #F1F3F8; }
.home-main { --w-bg: #07080D; --w-ink: #F1F3F8; --w-ink2: #AAB2C2; --w-line: #232838; --w-accent: #E9A46B; --w-accent2: #7C9CFF; }
.home .top { background: color-mix(in srgb, #07080D 84%, transparent); border-bottom-color: #232838; }
.home-main :focus-visible { outline-color: var(--w-accent); }
.home-main > section, .world { position: relative; background: var(--w-bg); color: var(--w-ink); }
.home-main .eyebrow { color: var(--w-accent); }
.home-main .btn-ghost { border-color: var(--w-line); color: var(--w-ink); }
.home-main h2 { font-size: clamp(2.25rem, 6vw, 4.5rem); font-weight: 380; letter-spacing: -0.03em; line-height: 1; max-width: 16ch; }
.h-sub { max-width: 36rem; color: var(--w-ink2); font-size: clamp(1.0625rem, 1.5vw, 1.25rem); margin: 1.25rem 0 0; }

/* The thread itself: a line down the left edge of every section, in that section's colour. It draws
   as the section comes into view. With reduced motion, or no script, it is simply there. */
.home-main > section::before, .world::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: max(0.5rem, calc((100vw - var(--wrap)) / 2 - 1.25rem));
  width: 2px; background: var(--w-accent); transform-origin: top; opacity: 0.9;
}
@media (prefers-reduced-motion: no-preference) {
  .js .home-main > section::before, .js .world::before { transform: scaleY(0); transition: transform 1100ms cubic-bezier(0.2, 0.8, 0.2, 1); }
  .js .home-main > section.is-seen::before, .js .world.is-seen::before { transform: scaleY(1); }
}
.home .wrap { padding-left: max(var(--gutter), 1.75rem); }

/* ---- opening ---- */
.h-open { min-height: calc(100svh - var(--top-h, 3.75rem)); display: grid; grid-template-rows: 1fr auto; overflow: hidden; }
.h-open::before { top: 58% !important; }
.h-open-inner { align-self: center; padding-block: clamp(2rem, 6vh, 4rem) 1rem; }
.h-promise { font-family: var(--serif); font-weight: 340; font-size: clamp(3.25rem, 12.5vw, 11rem); line-height: 0.9; letter-spacing: -0.045em; max-width: 9ch; margin: 0; text-wrap: balance; }
.h-dot { color: var(--w-accent); }
.h-lede { max-width: 33rem; margin: 1.75rem 0 0; color: var(--w-ink2); font-size: clamp(1.0625rem, 1.7vw, 1.3125rem); }
.h-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; }
.h-string { position: relative; padding-bottom: 1.25rem; }
.h-string svg { display: block; width: 100%; height: clamp(5rem, 14vh, 9rem); overflow: visible; touch-action: pan-y; cursor: grab; }
.h-string path { fill: none; stroke: var(--w-accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.h-string-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin: -0.5rem auto 0; }
.h-pluck { font: 600 0.9375rem var(--sans); color: var(--w-accent); background: none; border: 0; border-bottom: 2px solid currentColor; padding: 0.75rem 0 0.2rem; min-height: 2.75rem; cursor: pointer; }
.h-pluck:hover { color: #fff; }
.h-say { font-family: var(--serif); font-style: italic; font-size: 1.125rem; color: var(--w-ink2); }
@media (prefers-reduced-motion: no-preference) {
  .js .h-promise { animation: h-rise 1000ms var(--ease) both; }
  .js .h-lede { animation: h-rise 900ms var(--ease) 180ms both; }
  .js .h-actions { animation: h-rise 900ms var(--ease) 300ms both; }
  .js .h-string { animation: h-rise 900ms var(--ease) 480ms both; }
  @keyframes h-rise { from { opacity: 0; transform: translateY(18px); } }
}

/* ---- five worlds ---- */
.h-worlds-head { padding-block: clamp(4rem, 10vw, 7rem) clamp(2rem, 5vw, 3.5rem); }
.world { overflow: hidden; }
.world-weave { --w-bg: #060914; --w-ink: #EEF2FA; --w-ink2: #A9B4C8; --w-line: #25304A; --w-accent: #E9A46B; --w-accent2: #5B84FF; }
.world-bass { --w-bg: #1D0A3A; --w-ink: #F6EEFF; --w-ink2: #C3B0E6; --w-line: #3C2468; --w-accent: #FFB23E; --w-accent2: #B57BFF; }
.world-record { --w-bg: #04112B; --w-ink: #F3F0E4; --w-ink2: #9FB1D0; --w-line: #17305C; --w-accent: #F2C14E; --w-accent2: #7FA8FF; }
.world-table { --w-bg: #0C2A1C; --w-ink: #F7EFDC; --w-ink2: #B3C7B4; --w-line: #1F4A33; --w-accent: #F0A44B; --w-accent2: #9ED6A8; }
.world-hoax { --w-bg: #EDE3C8; --w-ink: #15130F; --w-ink2: #4B463A; --w-line: #C9BC97; --w-accent: #15130F; --w-accent2: #15130F; --w-on-accent: #EDE3C8; }
.world-grid { display: grid; gap: 1.5rem; align-items: center; padding-block: clamp(3rem, 8vw, 5.5rem); }
@media (min-width: 56rem) { .world-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; min-height: 62svh; } .world:nth-of-type(even) .world-art { order: -1; } }
.world-n { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--w-ink2); margin: 0 0 1rem; }
.world-n span { color: var(--w-accent); font-family: var(--mono); margin-right: 0.6rem; }
.world h3 { font-family: var(--sans); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--w-accent); margin: 0 0 0.75rem; }
.world-hook { font-family: var(--serif); font-weight: 380; font-size: clamp(2rem, 5.2vw, 4rem); line-height: 1.02; letter-spacing: -0.025em; margin: 0; max-width: 17ch; text-wrap: balance; }
.world-hoax .world-hook { font-weight: 600; letter-spacing: -0.035em; }
.world-hook mark { background: #E6F03C; color: inherit; padding: 0 0.12em; }
.world-meta { color: var(--w-ink2); margin: 1.25rem 0 1.5rem; max-width: 30rem; }
.world-soon { display: inline-flex; align-items: center; gap: 0.6rem; margin: 1.5rem 0 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--w-ink2); border: 1.5px dashed var(--w-line); border-radius: 999px; padding: 0.55rem 1rem; }
.world-soon::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; border: 2px dashed currentColor; }
.world-art { width: 100%; height: auto; max-height: 40svh; overflow: visible; }
.world-art .art-line { fill: none; stroke: var(--w-accent); stroke-width: 3; stroke-linecap: round; }
.world-art .art-still, .world-art .art-rings ellipse, .world-art .art-spin circle { fill: none; stroke: var(--w-ink2); stroke-width: 2; opacity: 0.7; }
.world-art .art-fill, .art-roots .art-fill { fill: var(--w-accent); }
.world-bass .art-still { stroke: var(--w-accent2); }
.world-record .art-spin circle { stroke: var(--w-accent2); }
.world-hoax .art-line { stroke: #15130F; stroke-width: 5; }
@media (prefers-reduced-motion: no-preference) {
  .js .world .art-line { stroke-dasharray: 900; stroke-dashoffset: 900; transition: stroke-dashoffset 1600ms cubic-bezier(0.2, 0.8, 0.2, 1) 200ms; }
  .js .world.is-seen .art-line { stroke-dashoffset: 0; }
  .world.is-seen .art-wobble { animation: wobble 900ms ease-in-out 1800ms infinite alternate; transform-origin: center; transform-box: fill-box; }
  @keyframes wobble { to { transform: scaleY(-1); } }
  .art-spin { animation: spin 14s linear infinite; transform-origin: 110px 100px; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .world.is-seen .art-steam { animation: steam 2600ms ease-in-out 1800ms infinite alternate; }
  @keyframes steam { to { transform: translateY(-8px); opacity: 0.45; } }
}

/* ---- Roots ---- */
.h-roots { --w-bg: #F3EBDD; --w-ink: #1B1612; --w-ink2: #5A5046; --w-line: #D8CBB4; --w-accent: #A4532A; --w-accent2: #2F6156; padding-block: clamp(4rem, 10vw, 7rem); }
.h-roots-grid { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) { .h-roots-grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; } }
.h-status { display: inline-block; margin: 1.5rem 0 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--w-ink2); border: 1.5px dashed var(--w-line); border-radius: 999px; padding: 0.55rem 1rem; }
.h-ask { border-top: 2px solid var(--w-ink); padding-top: 1.5rem; }
.art-roots { width: 100%; max-width: 22rem; height: auto; margin-bottom: 1.25rem; overflow: visible; }
.art-roots .art-line { fill: none; stroke: var(--w-accent); stroke-width: 2.5; stroke-linecap: round; }
.h-ask-label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--w-ink2); margin: 0 0 0.6rem; }
.h-ask-q { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.75rem, 3.6vw, 2.75rem); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 1.25rem; min-height: 3.3em; }
.h-roots .btn-ghost { border-color: var(--w-ink); }
@media (prefers-reduced-motion: no-preference) { .h-ask-q.is-new { animation: h-rise 420ms var(--ease) both; } }

/* ---- together ---- */
.h-company { --w-bg: #0B0B10; --w-accent: #E9A46B; padding-block: clamp(4rem, 10vw, 7rem); }
.h-open-qs { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--w-line); max-width: 58rem; }
.h-open-qs li { display: grid; gap: 0.4rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--w-line); }
@media (min-width: 48rem) { .h-open-qs li { grid-template-columns: 13rem 1fr; align-items: baseline; } }
.h-open-qs p { font-family: var(--serif); font-size: clamp(1.375rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: -0.01em; margin: 0; }
.h-company .rel { color: var(--w-accent); }
.h-company .rel-indirect { color: var(--w-accent2); }
.h-note { margin: 1.5rem 0 0; max-width: 40rem; color: var(--w-ink2); font-size: 0.9375rem; }
.h-note a, .h-more a { color: var(--w-ink); }

/* ---- invitation ---- */
.h-invite { --w-bg: #07080D; padding-block: clamp(4rem, 10vw, 7rem); border-top: 1px solid var(--w-line); }
.h-invite h2 { margin-bottom: 1rem; }
.h-invite .invite-lede { color: var(--w-ink2); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); margin: 0 0 1.75rem; }
.h-first { display: inline-flex; align-items: center; gap: 0.6rem; }
.h-first::before { content: ""; width: 1.75rem; height: 1.5px; background: currentColor; }
.h-invite .closed-note { border-color: var(--w-line); border-left-color: var(--w-accent); padding: 0.9rem 1.1rem; max-width: 34rem; color: var(--w-ink); }
.h-more { margin: 2rem 0 0; color: var(--w-ink2); }
.h-more a { display: inline-block; padding-block: 0.6rem; }
.home .foot { border-top-color: #232838; }
