/* Tapawingo Labs — tapawingolabs.com
   The mark's own horizon line, scaled to the page. */

:root {
  --night:      #0B1524;
  --dusk:       #1B2A4A;
  --teal:       #4FD1C5;
  --teal-deep:  #0E8585;
  --amber:      #C47D2E;
  --amber-text: #E4A55C;
  --paper:      #E8EEF2;

  --display: "Outfit", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --col: 46rem;
  --gutter: clamp(1.5rem, 6vw, 4rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.col {
  width: 100%;
  max-width: var(--col);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── The horizon ──────────────────────────────────────────────
   The wordmark sits on a full-bleed hairline. Descenders in
   "apawingo" break through it — the type crosses the skyline. */

.scene {
  position: relative;
  padding-top: clamp(5.5rem, 17vh, 11rem);
  padding-inline: var(--gutter);
  isolation: isolate;
}

/* Dawn light, centred exactly on the horizon so it falls off in every
   direction — no clipped edge running across the page. */
.glow {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: -1;
  width: min(170vw, 1900px);
  height: min(96vh, 820px);
  transform: translate(-50%, 50%);
  background:
    radial-gradient(ellipse 30% 40% at 50% 50%, rgba(196, 125, 46, .20), transparent 70%),
    radial-gradient(ellipse 68% 54% at 50% 50%, rgba(14, 133, 133, .15), transparent 72%);
  pointer-events: none;
}

.wordmark {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .06em;
  position: relative;
  /* Floor is 1.85rem, not 2.6rem: below ~495px the lockup is wider than
     the gutters allow, and body{overflow-x:hidden} would clip "Labs". */
  font-size: clamp(1.85rem, 8.4vw, 5.1rem);
  line-height: 1;
  --horizon-drop: .158em;
}

/* TapLogo sets 38u type against a mark whose horizon sits at y=58,
   6u below the text baseline. Both ratios are reproduced here:
   height 58/38 = 1.526em, dropped 6/38 = .158em below the baseline. */
.mark {
  align-self: baseline;
  position: relative;
  top: var(--horizon-drop);
  width: auto;
  height: 1.526em;
  flex: none;
  overflow: visible;
}

.wm-name {
  font-weight: 300;
  letter-spacing: .012em;
  color: rgba(232, 238, 242, .92);
}

.wm-labs {
  font-family: var(--mono);
  font-weight: 500;
  font-size: .27em;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-left: .5em;
  white-space: nowrap;
}

/* Zero-height baseline-aligned anchor: its top edge IS the text
   baseline, so offsetting from it puts the rule on the mark's horizon.
   The descenders in "apawingo" fall past it and break the skyline. */
.baseline-anchor {
  align-self: baseline;
  width: 0;
  height: 0;
  position: relative;
}

.baseline-anchor::before {
  content: "";
  position: absolute;
  top: var(--horizon-drop);
  left: 50%;
  width: 100vw;
  height: 1px;
  transform: translateX(-50%) scaleX(var(--rule, 1));
  background: linear-gradient(
    to right,
    transparent,
    rgba(79, 209, 197, .10) 12%,
    rgba(79, 209, 197, .42) 50%,
    rgba(79, 209, 197, .10) 88%,
    transparent
  );
}

/* ── Below the horizon ──────────────────────────────────────── */

.ground { padding-top: clamp(4.5rem, 13vh, 8rem); }

.eyebrow {
  margin: 0 0 1.35rem;
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--amber-text);
}

.eyebrow-teal { color: var(--teal); }

.mission {
  margin: 0;
  font-weight: 200;
  font-size: clamp(1.95rem, 5vw, 3.3rem);
  line-height: 1.14;
  letter-spacing: -.018em;
  max-width: 18ch;
  text-wrap: balance;
}

.lede {
  margin: clamp(2rem, 5vh, 3rem) 0 0;
  font-size: clamp(1.05rem, 1.55vw, 1.22rem);
  line-height: 1.68;
  color: rgba(232, 238, 242, .74);
  max-width: 40rem;
  text-wrap: pretty;
}

.note {
  position: relative;
  margin: clamp(2.25rem, 5vh, 3rem) 0 0;
  padding-top: clamp(2.25rem, 5vh, 3rem);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.65;
  color: rgba(232, 238, 242, .62);
  max-width: 36rem;
  text-wrap: pretty;
}

.note::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3.25rem;
  height: 1px;
  background: rgba(79, 209, 197, .38);
}

.dom {
  color: var(--teal);
  white-space: nowrap;
}

/* ── Founders ───────────────────────────────────────────────── */

footer {
  margin-top: clamp(5.5rem, 15vh, 9rem);
  padding-block: clamp(2.75rem, 7vh, 4rem) clamp(3.5rem, 9vh, 5.5rem);
  border-top: 1px solid rgba(27, 42, 74, .9);
}

.founders {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem clamp(3rem, 9vw, 6rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.founders li {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.f-name {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 400;
  letter-spacing: -.005em;
}

.f-role {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(79, 209, 197, .82);
}

/* ── Load sequence: the sun comes up, once ──────────────────── */

@media (prefers-reduced-motion: no-preference) {

  .glow {
    opacity: 0;
    animation: fade 1400ms ease-out 120ms forwards;
  }

  .baseline-anchor::before {
    --rule: 0;
    animation: wipe 900ms cubic-bezier(.22, .8, .3, 1) 260ms forwards;
  }

  .mark, .wm-name, .wm-labs {
    opacity: 0;
    animation: rise 760ms cubic-bezier(.22, .8, .3, 1) forwards;
  }

  .mark    { animation-delay: 620ms; }
  .wm-name { animation-delay: 700ms; }
  .wm-labs { animation-delay: 820ms; }

  .arc {
    stroke-dasharray: var(--len);
    stroke-dashoffset: var(--len);
    animation: draw 1500ms cubic-bezier(.3, .7, .3, 1) 980ms forwards;
  }

  .arc-outer { --len: 64; }
  .arc-inner { --len: 51; animation-delay: 1130ms; }

  .r {
    opacity: 0;
    animation: rise 800ms cubic-bezier(.22, .8, .3, 1) forwards;
  }

  .r-1 { animation-delay: 1180ms; }
  .r-2 { animation-delay: 1260ms; }
  .r-3 { animation-delay: 1400ms; }
  .r-4 { animation-delay: 1520ms; }
  .r-5 { animation-delay: 1640ms; }
}

@keyframes fade { to { opacity: 1; } }
@keyframes wipe { to { --rule: 1; transform: translateX(-50%) scaleX(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Quality floor ──────────────────────────────────────────── */

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

@media (max-width: 30rem) {
  .wordmark { gap: .1em; }
  .wm-labs { margin-left: .35em; letter-spacing: .24em; }
  .mission { max-width: none; }
}
