/* Seedling. Night, then day: one light in the dark; touch it and the page becomes ceramic.
   Colours from brand-and-culture/brand/tokens.css. Every size is drawn from the viewport's
   width and height together, so the first screen stays a single screen on every device. */

@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #F7F6F2;
  --ink: #232826;
  --ink-mark: #262B29;
  --ink-soft: #5D6460;
  --night: #0D0E0E;
  --moon: rgba(247, 246, 242, 0.86);
  --moon-soft: rgba(247, 246, 242, 0.5);
  --leaf: #A8D48A;

  --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --glide: cubic-bezier(0.65, 0, 0.35, 1);

  /* the stage: mark, line and answer scale with the smaller of width and height */
  --mw: clamp(190px, min(64vw, 40svh), 440px);
  --fs-line: clamp(21px, min(6.6vw, 4.6svh), 40px);
  --psn: clamp(11px, calc(0.5vw + 8px), 15px);   /* the light at night */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  background: var(--night); transition: background-color 2.4s ease 0.9s;
}
body.day { background: var(--paper); }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- The screen ---------- */

.screen {
  position: relative; overflow: hidden;
  height: 100vh; height: 100svh; min-height: 420px;
  background: var(--night); cursor: pointer; touch-action: manipulation;
}
.day .screen { cursor: default; }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* night: a faint warmth on the horizon and a fine grain, so the dark has depth */
.horizon { background: radial-gradient(ellipse 120% 45% at 50% 108%, rgba(120, 92, 80, 0.22) 0%, rgba(13, 14, 14, 0) 70%); }
.night-grain { opacity: 0.07; mix-blend-mode: screen; transition: opacity 1.5s ease; }
.day .night-grain { opacity: 0; }

/* dawn rises in rose and gold */
.dawn {
  background: radial-gradient(ellipse 140% 80% at 50% 100%, #F6D9C8 0%, #F2DDD6 35%, rgba(242, 221, 214, 0) 75%);
  opacity: 0; transform: translateY(40%);
  transition: opacity 1.6s ease, transform 2.2s var(--ease);
}
.day .dawn { opacity: 1; transform: none; }

/* touching the light makes the day: a warm bloom spreads from the point itself */
.bloom {
  position: absolute; left: var(--nx, 50%); top: var(--ny, 50%);
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255, 248, 236, 0.95) 0%, rgba(246, 217, 200, 0.55) 45%, rgba(246, 217, 200, 0) 72%);
}
.day .bloom { animation: bloom 2.3s cubic-bezier(0.2, 0.6, 0.25, 1) forwards; }
@keyframes bloom { 0% { transform: scale(0.4); opacity: 0; } 12% { opacity: 1; } 100% { transform: scale(60); opacity: 0; } }

/* then the ceramic: warm bone, gently domed, a fine grain and a sparse speckle */
.ceramic {
  background:
    radial-gradient(ellipse 80% 58% at 50% 38%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 120% 95% at 50% 42%, rgba(70, 62, 50, 0) 58%, rgba(70, 62, 50, 0.1) 100%),
    linear-gradient(180deg, #F4F1EB 0%, #EDE9E1 55%, #E4DFD6 100%);
  opacity: 0; transition: opacity 2.4s ease 0.9s;
}
.day .ceramic { opacity: 1; }
.glaze-grain { opacity: 0.05; mix-blend-mode: multiply; }
.speckle { opacity: 0.32; }

/* ---------- The stage: mark, line, answer, well ---------- */

.stage {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: max(56px, 9svh) 20px max(72px, 12svh);
}
.mark-wrap {
  position: relative; width: var(--mw); aspect-ratio: 431.2 / 141.4;
  opacity: 0; filter: blur(6px); transition: opacity 1.6s ease 1.7s, filter 1.6s ease 1.7s;
}
.day .mark-wrap { opacity: 1; filter: none; }
.mark { display: block; width: 100%; height: 100%; overflow: visible; }
/* the engraving's light edge: a white copy of the mark, 1 px lower, behind the cut */
.mark-edge { position: absolute; left: 0; top: 1px; }
.mark-edge + .mark { position: relative; }

.copy { position: relative; width: 100%; margin-top: calc(var(--mw) * 0.13 + 6px); display: flex; flex-direction: column; align-items: center; text-align: center; }
.line {
  position: absolute; top: 0; left: 0; right: 0;
  margin: 0; font-weight: 340; font-size: var(--fs-line); line-height: 1.22; letter-spacing: -0.013em;
  color: var(--moon); opacity: 0;
  transition: opacity 1.6s ease 1.7s;
}
.lit .line { opacity: 1; }
.day .line { opacity: 0; filter: blur(4px); transition: opacity 1.1s ease 0.15s, filter 1.1s ease 0.15s; }
.ai { font-size: 0.88em; letter-spacing: 0.03em; font-weight: 380; }
.br { display: block; height: 0; overflow: hidden; }      /* two lines on narrow screens */
.hang { margin-right: -0.22em; }                           /* the full stop, hung optically */
.line { white-space: nowrap; }                    /* the hung stop must not push a word onto a new line */


/* by day, under the mark: what Seedling makes, said quietly */
.tagline {
  margin: calc(var(--mw) * -0.1) 0 0;               /* held close to the mark: the name and what it makes, one block */
  font-weight: 400; font-size: clamp(14px, min(3.9vw, 2.1svh), 18px); line-height: 1.45; letter-spacing: 0.01em;
  color: rgba(35, 40, 38, 0.62); white-space: nowrap;
  opacity: 0; transform: translateY(6px); filter: blur(4px);
  transition: opacity 1.4s ease 2.7s, transform 1.6s var(--ease) 2.7s, filter 1.4s ease 2.7s;
}
.day .tagline { opacity: 1; transform: none; filter: none; }

.well {
  position: relative; width: min(360px, 84vw); margin-top: clamp(64px, 12.8svh, 128px);
  display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 10px;
  background: rgba(35, 40, 38, 0.05);
  box-shadow: inset 0 1px 3px rgba(35, 40, 38, 0.18), 0 1px 0 rgba(255, 255, 255, 0.75);
  opacity: 0; transform: translateY(14px); filter: blur(4px); pointer-events: none;
  transition: opacity 1.8s ease 3.6s, transform 2.2s var(--ease) 3.6s, filter 1.8s ease 3.6s, box-shadow 0.3s ease;
}
.day .well { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.well:focus-within { box-shadow: inset 0 1px 3px rgba(35, 40, 38, 0.18), 0 0 0 1.5px rgba(35, 40, 38, 0.3); }
.joined .well { display: none; }
/* a whisper under the field; hung outside the flow so the spacing above stays as it is */
.hint {
  position: absolute; top: calc(100% + 12px); left: 0; right: 0; text-align: center;
  font-size: 12px; line-height: 16px; letter-spacing: 0.04em; color: rgba(35, 40, 38, 0.4);
  pointer-events: none;
}
.well input[type="email"] {
  flex: 1; min-width: 0; height: 34px; border: 0; padding: 0 6px 0 16px; background: transparent; outline: none;
  font: 400 16px/1 var(--sans); color: var(--ink);
}
.well input::placeholder { color: var(--ink-soft); opacity: 0.75; }
.key {
  flex: none; height: 34px; padding: 0 14px 0 16px; border: 0; border-radius: 7px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; font: 400 13px/1 var(--sans); color: var(--paper);
  background: linear-gradient(180deg, #3A403D 0%, #232826 55%, #1D211F 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(0, 0, 0, 0.3), 0 4px 8px -4px rgba(35, 40, 38, 0.5);
  transition: transform 0.12s ease;
}
.key:active { transform: translateY(1px) scale(0.98); }
.key:disabled { opacity: 0.6; cursor: default; }
.key:focus-visible, .well input:focus-visible { outline: none; }
.key:focus-visible { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.thanks { margin: clamp(64px, 12.8svh, 128px) 0 0; font-size: 15px; line-height: 22px; color: var(--ink-soft); }
.note { margin: 10px 0 0; min-height: 1em; font-size: 13px; line-height: 18px; color: var(--ink-soft); }
.note:empty { display: none; }

/* ---------- The light ---------- */

.light {
  position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none;
  transform: translate(var(--nx, 50vw), var(--ny, 50vh));
  transition: transform 1.9s var(--glide) 0.7s;
}
.day .light { transform: translate(var(--dx), var(--dy)); }
.settled .light, .settled .point { transition: none !important; }
.lean { position: absolute; transform: translate(var(--ox, 0px), var(--oy, 0px)); transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1); }

.point {
  --ps: calc(var(--psn) + var(--near, 0) * 5px);
  position: absolute; width: var(--ps); height: var(--ps); margin: calc(var(--ps) / -2) 0 0 calc(var(--ps) / -2);
  border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 40% 35%, #F7FCF1 0%, #CDEBB4 45%, #A8D48A 100%);
  box-shadow:
    0 0 14px 3px rgba(168, 212, 138, calc(0.55 + var(--near, 0) * 0.35)),
    0 0 56px 16px rgba(168, 212, 138, calc(0.16 + var(--near, 0) * 0.18));
  animation: breathe 4s ease-in-out infinite;
  transition: opacity 1.4s ease 0.2s, width 0.4s ease, height 0.4s ease, margin 0.4s ease, background 1.2s ease 2.2s, box-shadow 0.5s ease;
}
.lit .point { opacity: 1; }
.holding .point {
  --ps: calc(var(--psn) * 1.6);
  box-shadow: 0 0 22px 7px rgba(190, 232, 160, 0.8), 0 0 80px 24px rgba(168, 212, 138, 0.32);
}
/* by day it is the dot of the i: matte Ink, the size of the dot, with one small settle as it lands */
.day .point {
  --ps: calc(var(--r, 4.9px) * 2);
  background: rgba(35, 40, 38, 0.48); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95);
  animation: land 0.7s ease 2.6s 1 both;
  transition: opacity 0.2s, width 1s ease 1.6s, height 1s ease 1.6s, margin 1s ease 1.6s, background 1.2s ease 2.2s, box-shadow 1.4s ease 1.4s;
}
/* the snap: under a finger the light gives a little before it swells; as the day breaks one quick ring
   leaves it, the way a switch answers */
.holding .lean { animation: give 0.46s ease-out 1 both; }
@keyframes give { 0% { scale: 1; } 22% { scale: 0.8; } 60% { scale: 1.06; } 100% { scale: 1; } }
.snap {
  position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%; opacity: 0;
  border: 1.5px solid rgba(220, 244, 200, 0.9); box-shadow: 0 0 10px rgba(190, 232, 160, 0.45);
}
.day .snap { animation: snap 0.8s cubic-bezier(0.15, 0.7, 0.3, 1) 1 both; }
@keyframes snap { 0% { transform: scale(0.6); opacity: 0.95; } 100% { transform: scale(7); opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(0.88); } 50% { transform: scale(1); } }
@keyframes land { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.4); } }

/* a soft aura, and slow rings of light, like a drop in still water: touch here */
.aura {
  position: absolute; left: -42px; top: -42px; width: 84px; height: 84px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(168, 212, 138, 0.26) 0%, rgba(168, 212, 138, 0) 70%);
}
.wave {
  position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; opacity: 0;
  border: 1px solid rgba(190, 230, 160, 0.5); box-shadow: 0 0 8px rgba(168, 212, 138, 0.22);
}
.lit .aura { animation: aura 4s ease-in-out infinite; }
.lit .wave { animation: wave 4.6s cubic-bezier(0.2, 0.55, 0.3, 1) 0.6s infinite; }
.lit .wave-2 { animation-delay: 2.9s; }
.day .aura, .day .wave { animation: none; opacity: 0; transition: opacity 0.6s ease; }
@keyframes aura { 0%, 100% { opacity: 0.45; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes wave { 0% { transform: scale(1); opacity: 0; } 10% { opacity: 0.5; } 100% { transform: scale(13); opacity: 0; } }

/* for keyboards and screen readers: an invisible control on the light */
.wake {
  position: absolute; left: var(--nx, 50%); top: var(--ny, 50%);
  width: 72px; height: 72px; margin: -36px 0 0 -36px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer;
}
.wake:focus-visible { outline: 1.5px solid rgba(247, 246, 242, 0.7); outline-offset: 2px; }
.day .wake { display: none; }

.almost {
  position: absolute; left: 0; right: 0; bottom: max(22px, 4svh, env(safe-area-inset-bottom)); margin: 0;
  text-align: center; font: 500 12px/16px var(--sans); letter-spacing: 0.26em;
  color: var(--ink-soft); opacity: 0; transition: opacity 1.4s ease 4.3s;
}
.day .almost { opacity: 1; }

/* ---------- The footer: dark before dawn, paper by day ---------- */

.footer {
  padding: 56px max(24px, 5vw) max(40px, env(safe-area-inset-bottom));
  color: var(--moon); border-top: 1px solid rgba(247, 246, 242, 0.08);
  transition: color 2s ease 0.8s, border-color 2s ease 0.8s;
}
.day .footer { color: var(--ink); border-top-color: rgba(35, 40, 38, 0.08); }
.footer-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 40px; }
.col p, .col a { margin: 0; font-size: 15px; line-height: 22px; }
.col a { text-decoration: none; }
.col .label { margin-bottom: 8px; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--moon-soft); transition: color 2s ease 0.8s; }
.day .col .label { color: var(--ink-soft); }
.underline { text-decoration: underline !important; text-decoration-color: rgba(128, 132, 130, 0.5) !important; text-underline-offset: 3px; }
.footer-base {
  max-width: 1120px; margin: 48px auto 0; padding-top: 18px; display: flex; justify-content: space-between; gap: 16px;
  border-top: 1px solid rgba(247, 246, 242, 0.1); font-size: 13px; line-height: 16px; color: var(--moon-soft);
  transition: color 2s ease 0.8s, border-color 2s ease 0.8s;
}
.day .footer-base { color: var(--ink-soft); border-top-color: rgba(35, 40, 38, 0.1); }
.wordmark-text { font-weight: 500; letter-spacing: 0.02em; }

/* ---------- The vision page ---------- */

.beliefs { height: auto; min-height: 100vh; min-height: 100svh; cursor: default; background: #F4F1EB; }
.beliefs .ceramic { opacity: 1; transition: none; }
.home { position: absolute; z-index: 1; top: max(28px, 5svh); left: 50%; transform: translateX(-50%); display: block; padding: 8px; }
.mark-stack { position: relative; display: block; width: clamp(84px, 9vw, 112px); aspect-ratio: 431.2 / 141.4; }
.mark.small { width: 100%; height: 100%; }
.vision {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: max(110px, 14svh) max(24px, 6vw) max(80px, 11svh);
}
.vision h1 { margin: 0; max-width: 16em; font-weight: 300; font-size: clamp(25px, min(5.6vw, 4.6svh), 44px); line-height: 1.16; letter-spacing: -0.015em; text-wrap: balance; }
.vision p { margin: clamp(14px, 2.6svh, 26px) 0 0; max-width: 31em; font-weight: 300; font-size: clamp(16px, min(4.3vw, 2.5svh), 22px); line-height: 1.45; text-wrap: balance; }
.vision .soft { color: var(--ink-soft); }
.vision .eyebrow { margin: 0 0 clamp(20px, 4svh, 48px); font-weight: 500; font-size: 12px; line-height: 16px; letter-spacing: 0.26em; color: var(--ink-soft); }
.vision .sign { margin-top: clamp(24px, 4.4svh, 46px); font-weight: 400; font-size: 15px; line-height: 24px; color: var(--ink-soft); }
.settle { opacity: 0; animation: settle 1.1s var(--ease) forwards; }
.s1 { animation-delay: 0.3s; } .s2 { animation-delay: 0.9s; } .s3 { animation-delay: 1.5s; } .s4 { animation-delay: 2.1s; } .s5 { animation-delay: 2.9s; }
@keyframes settle { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.beliefs-page .almost { opacity: 1; color: var(--ink-soft); transition: none; }

/* ---------- Sizes ---------- */

@media (min-width: 640px) {
  .br { display: inline; height: auto; }   /* one line from tablet width up */
}
@media (max-width: 520px) {
  .well { width: min(264px, 70vw); }
  .key { width: 34px; padding: 0; justify-content: center; border-radius: 7px; }
  .key-label { display: none; }
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-base { margin-top: 32px; }
}
/* short, wide screens (a phone held sideways): tighten the stage so it still fits */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --mw: clamp(150px, 32svh, 260px); --fs-line: clamp(18px, 5svh, 26px); }
  .stage { padding: 28px 20px 48px; }
  .copy { margin-top: calc(var(--mw) * 0.09 + 4px); }
  .well, .thanks { margin-top: clamp(24px, 9svh, 40px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.4s !important; transition-delay: 0s !important; }
  .point { animation: none !important; }
}
