/* Thruno — one page. Near-black ground, cream type, one lime accent. */

@font-face {
  font-family: "Inter Thruno";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ground: #0b0b0a;
  --raise: #151513;
  --ink: #f2ebdc;
  --ink-2: rgba(242, 235, 220, 0.6);
  --line: rgba(242, 235, 220, 0.22);
  --lime: #cdf26a;
  --lime-press: #b9e04e;
  --danger: #ff9b8a;

  --gutter: clamp(16px, 4vw, 48px);
  --font: "Inter Thruno", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --press: cubic-bezier(0.3, 0, 0.2, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ground);
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, p { margin: 0; }
a { color: inherit; }

::selection { background: var(--lime); color: var(--ground); }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ground);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip:focus { transform: none; }

/* ---------- Bar ---------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
  padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  animation: fade 0.8s var(--ease) both;
}

.bar__mark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
  transition: opacity 0.2s var(--press);
}
.bar__mark:active { opacity: 0.6; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--ink-2);
}

.status__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}
.status__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 2.4s var(--ease) infinite;
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  min-height: calc(100svh - 72px);
  padding: clamp(24px, 6svh, 72px) var(--gutter) clamp(28px, 6svh, 64px);
}

.motto {
  --p: 0;
  transform: scale(calc(1 - var(--p) * 0.12)) translateY(calc(var(--p) * -4%));
  transform-origin: left bottom;
  opacity: calc(1 - var(--p) * 0.7);
  font-size: min(19vw, 21svh);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.motto__line {
  display: block;
  overflow: hidden;
  /* keeps the clip clear of the caps while the words rise into it */
  padding-block: 0.04em;
  margin-block: -0.04em;
}

.motto__word {
  display: inline-block;
  animation: rise 1s var(--ease) both;
  transition: transform 0.5s var(--ease);
}
.motto__line:nth-child(2) .motto__word { animation-delay: 0.09s; }
.motto__line:nth-child(3) .motto__word { animation-delay: 0.18s; }

@media (hover: hover) and (pointer: fine) {
  .motto__line:hover .motto__word { transform: translateX(0.06em); }
}

/* the build is still going */
.caret {
  display: inline-block;
  width: 0.09em;
  height: 0.74em;
  margin-left: 0.08em;
  background: var(--lime);
  vertical-align: baseline;
  animation: blink 1.1s steps(1) 1.2s infinite;
}

.hero__foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  animation: fade 0.9s var(--ease) 0.45s both;
}

.hero__text {
  max-width: 34ch;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
}
.hero__text strong { display: block; font-weight: 700; }

@media (min-width: 760px) {
  .hero__foot {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

/* wide screens: the line and the button close the space beside the motto */
@media (min-width: 1100px) {
  .hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    align-items: end;
    column-gap: clamp(48px, 5vw, 96px);
  }
  .hero__foot {
    flex-direction: column;
    align-items: flex-start;
    justify-self: end;
    padding-bottom: 0.4em;
  }
}

/* tap the last word and it changes */
.verb {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  line-height: inherit;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.verb__text { display: inline-block; }
.verb:focus-visible { outline-offset: 0.05em; }

/* ---------- Status ---------- */

/* long-press the name for lime mode */
.bar__mark {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.6s var(--press), opacity 0.2s var(--press);
}
.bar__mark.is-charging { transform: scale(0.86); }

html.is-lime {
  --ground: #cdf26a;
  --raise: #c3e95e;
  --ink: #0b0b0a;
  --ink-2: rgba(11, 11, 10, 0.62);
  --line: rgba(11, 11, 10, 0.25);
  --lime: #0b0b0a;
  --lime-press: #2a2a27;
  --danger: #8a1c0c;
}
html.is-lime .button,
html.is-lime .arrow { color: #cdf26a; }
html.is-lime .line:focus-within { border-color: rgba(11, 11, 10, 0.45); }
html.is-lime .spinner { border-color: rgba(205, 242, 106, 0.3); border-top-color: #cdf26a; }
body, .contact { transition: background-color 0.5s var(--ease), color 0.5s var(--ease); }

/* the status dot follows you down the page */
.beacon {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}
.beacon[hidden] { display: none; }
.beacon__dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lime);
  transition: transform 0.2s var(--press);
}
.beacon__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 2.4s var(--ease) infinite;
}
.beacon:active .beacon__dot { transform: scale(0.8); }

/* footer letters fall into place */
.foot__line .w { display: inline-block; white-space: nowrap; }
/* less TALK. / more BUILD. — two rows on a phone, one line on wide screens */
.foot__row { display: block; white-space: nowrap; }
@media (min-width: 760px) {
  .foot__row { display: inline; }
}
/* both endings share one grid cell: the cell is as wide as the widest */
.foot__end { display: inline-grid; text-align: left; }
.foot__alt { grid-area: 1 / 1; }
.foot__alt[hidden] { display: inline; visibility: hidden; }
.foot__small-word {
  margin-right: 0.3em;
  font-size: 0.34em;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
}
.foot__line .ch { display: inline-block; }
.reveal-ready .foot__line .ch {
  opacity: 0;
  transform: translateY(-1.6em) rotate(-12deg);
  transition: transform 0.9s cubic-bezier(0.34, 1.45, 0.64, 1), opacity 0.35s var(--ease);
  transition-delay: calc(var(--n) * 55ms);
}
.reveal-ready .foot__line.is-in .ch { opacity: 1; transform: none; }
/* leaving resets quietly, so the next visit sees the fall again */
.reveal-ready .foot__line:not(.is-in) .ch { transition-duration: 0s; transition-delay: 0s; }

/* letters of the motto lift under a finger */
.motto { touch-action: pan-y; }
.motto .lt {
  display: inline-block;
  transition: transform 0.35s var(--ease), color 0.35s var(--ease);
}
.motto .lt.is-hot { color: var(--lime); }
/* after the entrance the lines stop clipping, so lifted letters show whole;
   only the verb clips itself while it swaps */
.motto.is-settled .motto__line { overflow: visible; }
.verb.is-swapping { clip-path: inset(0 -0.5em); }

/* lime mode spills out from the name (the circle is drawn in main.js) */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* tap the footer for the other ending */
.foot__swap {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  width: 100%;
  text-align: center;
  text-transform: inherit;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.share {
  margin: 0 0 0 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 0.2s var(--press);
}
.share[hidden] { display: none; }
.share:active { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .share:hover { color: var(--ink); }
}

/* ---------- Button ---------- */

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ground);
  font: inherit;
  font-size: 17px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 0.16s var(--press), background-color 0.2s var(--press);
}
.button:active { transform: scale(0.96); background: var(--lime-press); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--lime-press); }
}

/* ---------- Contact: one line at a time ---------- */

.contact {
  padding: clamp(96px, 16vw, 200px) var(--gutter) clamp(96px, 14vw, 180px);
  background: var(--raise);
}

.contact__title {
  color: var(--ink-2);
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.form {
  margin-top: clamp(20px, 3vw, 40px);
}

.step + .step { margin-top: clamp(32px, 5vw, 56px); }

.line {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  border-bottom: 2px solid var(--line);
  transition: border-color 0.35s var(--ease);
}
.line:focus-within { border-color: rgba(242, 235, 220, 0.4); }
.is-invalid .line { border-color: var(--danger); }

/* fills as you write; full means ready to send */
.line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px; /* taste-skill-ignore: form field progress */
  background: var(--lime);
  transform: scaleX(var(--fill, 0));
  transform-origin: left;
  transition: transform 0.35s var(--ease);
  pointer-events: none;
}
.is-invalid .line::after { opacity: 0; }

.line textarea,
.line input {
  flex: 1;
  min-width: 0;
  display: block;
  margin: 0;
  padding: 0.12em 0 0.2em;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--lime);
  font: inherit;
  font-size: clamp(30px, 6.4vw, 96px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  outline: none;
  resize: none;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

/* the prompt sits in the field until the first letter */
.line__label {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0.12em 0 0.2em;
  color: var(--ink-2);
  font-size: clamp(30px, 6.4vw, 96px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  pointer-events: none;
  transition: opacity 0.2s var(--press);
}
.line textarea:not(:placeholder-shown) + .line__label,
.line input:not(:placeholder-shown) + .line__label { opacity: 0; }
.line textarea:focus + .line__label .caret,
.line input:focus + .line__label .caret { visibility: hidden; }
.line__label .caret { height: 0.7em; }

.arrow {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(52px, 5vw, 72px);
  height: clamp(52px, 5vw, 72px);
  margin-bottom: 0.6em;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ground);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.16s var(--press), background-color 0.2s var(--press), opacity 0.3s var(--ease);
}
.arrow svg { width: 44%; height: 44%; transition: transform 0.3s var(--ease); }
.arrow:active { transform: scale(0.92); background: var(--lime-press); }
@media (hover: hover) and (pointer: fine) {
  .arrow:hover svg { transform: translateX(3px); }
}
/* resting until there is something to send */
.js-steps .step:not(.is-ready) .arrow { opacity: 0.35; }
.js-steps .step.is-ready .arrow { animation: pop 0.45s var(--ease); }

.line__error {
  min-height: 1.5em;
  padding-top: 10px;
  color: var(--danger);
  font-size: 16px;
  line-height: 1.4;
}

/* the message, once written, steps back and waits above the next question */
.quote {
  display: block;
  max-width: 46ch;
  margin: 0 0 clamp(20px, 3vw, 32px);
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 19px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  animation: rise-soft 0.6s var(--ease) both;
}
.quote[hidden] { display: none; }
.quote__text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.quote__text::before { content: "\201C"; }
.quote__text::after { content: "\201D"; }
.quote__edit {
  display: inline-block;
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* with script: one question at a time (without it, both lines show and the arrow sends) */
.form #next { display: none; }
.js-steps .form #next { display: grid; }
.js-steps .form[data-step="1"] .step--email,
.js-steps .form[data-step="2"] .step--message { display: none; }
.js-steps .form[data-step="1"] .step--message,
.js-steps .form[data-step="2"] .step--email { animation: rise-soft 0.6s var(--ease) both; }
.js-steps .form[data-step="2"] .step--email { margin-top: 0; }

.hp,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px; /* taste-skill-ignore: visually hidden honeypot */
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.spinner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(11, 11, 10, 0.25);
  border-top-color: var(--ground);
  border-radius: 50%;
  opacity: 0;
}
.is-sending .arrow svg { opacity: 0; }
.is-sending .spinner { opacity: 1; animation: spin 0.8s linear infinite; }
.is-sending .arrow { pointer-events: none; }

.form__status { min-height: 1.4em; margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.form__status.is-error { color: var(--danger); }
.form__status.is-vibe { color: var(--lime); font-weight: 600; }

.sent { margin-top: clamp(24px, 4vw, 48px); outline: none; animation: rise-soft 0.7s var(--ease) both; }
.sent__title {
  font-size: clamp(56px, 11vw, 168px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
}
.sent__text { margin-top: 20px; max-width: 40ch; font-size: 19px; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.foot {
  text-align: center;
  padding: clamp(80px, 12vw, 160px) var(--gutter) max(28px, env(safe-area-inset-bottom));
}

.foot__line {
  font-size: min(9.6vw, 16svh);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.foot__small {
  margin-top: 32px;
  color: var(--ink-2);
  font-size: 15px;
}

@media (max-width: 759px) {
  .foot__line { font-size: 18vw; }
}

/* ---------- Scroll entrances (added by main.js, so content shows without it) ---------- */

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */

@keyframes rise { from { transform: translateY(105%); } }
@keyframes rise-soft { from { opacity: 0; transform: translateY(16px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse {
  from { opacity: 0.6; transform: scale(1); }
  70%, to { opacity: 0; transform: scale(2.8); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 40% { transform: scale(1.12); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .caret { animation: none !important; }
  .status__dot::after { display: none; }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; }
  .reveal-ready .foot__line .ch { opacity: 1; transform: none; }
  .beacon__dot::after { display: none; }
}
