/* Shaka Ventures — shaka.vc */

@font-face {
  font-family: "General Sans";
  src: url("fonts/general-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("fonts/general-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("fonts/general-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --accent: #0047ff;
  --accent-ink: #ffffff;

  --font: "General Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step-small: clamp(0.875rem, 0.84rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3rem, 0.6rem + 9.4vw, 11.5rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --bar: clamp(4.25rem, 3.6rem + 2vw, 5.5rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, p { margin: 0; }
svg { display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- type ---------- */
.display {
  font-size: var(--step-display);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.035em;
}
.head {
  font-size: var(--step-head);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lead {
  font-size: var(--step-lead);
  line-height: 1.4;
  max-width: 34ch;
  text-wrap: pretty;
}

/* ---------- controls ---------- */
.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: var(--step-small);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.button:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent); color: var(--accent-ink); }
}

/* ---------- bar ---------- */
.bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  height: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--margin);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step-body);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand__mark {
  height: 0.95em;
  width: auto;
  aspect-ratio: 27.5 / 14;
  fill: var(--accent);
  overflow: visible;
}
.brand__mark path {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  transition: transform 420ms var(--ease-out);
}
.brand__mark path:nth-child(2) { transition-delay: 50ms; }
.brand__mark path:nth-child(3) { transition-delay: 100ms; }
@media (hover: hover) and (pointer: fine) {
  .brand:hover .brand__mark path { transform: scaleY(1.3); }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; /* taste-skill-ignore: fallback for browsers without svh */
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  padding: calc(var(--bar) + 10svh) var(--margin) var(--margin);
  overflow: hidden;
}
/* Clip only the sides, so the waves can hang 2px into the blue below and leave no seam. */
@supports (overflow: clip) {
  .hero { overflow: visible; overflow-x: clip; }
}
.hero__text {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero .lead { margin-top: clamp(1.5rem, 1rem + 1.4vw, 2.5rem); }

.lines .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.lines [data-line] { display: block; }

/* The set: six quarter-circle waves, each twice the one before, sitting on the
   hero's foot, the largest cropped by the screen's right edge, rising out of the
   blue below. --R is the largest wave; the whole set is about 1.97 R wide. */
.waves {
  --R: min(70svh, 44vw);
  --gap: 4px;
  position: absolute;
  z-index: 1;
  right: calc(var(--R) * -0.08);
  bottom: -2px;
  display: flex;
  align-items: flex-end;
  gap: var(--gap);
  pointer-events: none;
}
.wave { display: block; width: calc(var(--R) * var(--s)); aspect-ratio: 1; }
.wave:nth-child(1) { --s: 0.03125; }
.wave:nth-child(2) { --s: 0.0625; }
.wave:nth-child(3) { --s: 0.125; }
.wave:nth-child(4) { --s: 0.25; }
.wave:nth-child(5) { --s: 0.5; }
.wave:nth-child(6) { --s: 1; }
.wave svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--accent);
  transform-origin: 100% 100%;
}
.wave path { pointer-events: visiblePainted; cursor: pointer; }

/* ---------- close: the sea the waves rise from ---------- */
.close {
  position: relative;
  background: var(--accent);
  color: var(--accent-ink);
  padding: clamp(5rem, 10vw, 9rem) var(--margin) var(--margin);
}
.close ::selection { background: var(--accent-ink); color: var(--accent); }
.close :focus-visible { outline-color: var(--accent-ink); }
.close__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.close__mail {
  font-size: var(--step-head);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.16em;
  text-decoration-color: rgb(255 255 255 / 0.45);
  transition: text-decoration-color var(--t-hover) ease;
}
@media (hover: hover) and (pointer: fine) {
  .close__mail:hover { text-decoration-color: currentColor; }
}

/* The name as a swell: five blocks, the letters knocked out, riding a slow wave. */
.mark {
  --gap: 4px;
  --size: calc((100vw - 2 * var(--margin) - 4 * var(--gap)) / 5);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--gap);
  height: min(calc(var(--size) * 1.5), 62svh);
  margin-top: clamp(4rem, 8vw, 7.5rem);
  overflow: hidden;
}
.mark__col {
  display: block;
  transform: translateY(var(--rest));
}
.mark__col:nth-child(1) { --rest: 22%; }
.mark__col:nth-child(2) { --rest: 11%; }
.mark__col:nth-child(3) { --rest: 4%; }
.mark__col:nth-child(4) { --rest: 9%; }
.mark__col:nth-child(5) { --rest: 17%; }
.mark__block {
  display: flex;
  justify-content: center;
  height: 100%;
  padding-top: calc(var(--size) * 0.06);
  background: var(--accent-ink);
  color: var(--accent);
  font-size: calc(var(--size) * 1.02);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: 0;
}

.close__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: var(--margin);
  font-size: var(--step-small);
}
.close .button { background: var(--accent-ink); color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .close .button:hover { background: var(--ink); color: var(--accent-ink); }
}

/* ---------- phone and narrow tablet: text, then the set ---------- */
@media (max-width: 56em) {
  /* "starts small." is 5.64em wide: the headline is set to fill the measure exactly. */
  :root { --step-display: calc((100vw - 2 * var(--margin)) / 5.7); }
  .hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding-top: calc(var(--bar) + clamp(1.5rem, 6svh, 4rem));
    padding-bottom: 0;
  }
  .waves {
    --gap: 3px;
    --R: calc((100vw - var(--margin) - 5 * var(--gap)) / 1.88875);
    position: relative;
    align-self: flex-end;
    margin: clamp(3.5rem, 12vw, 6rem) calc(-1 * var(--margin) - var(--R) * 0.08) -2px 0;
  }
  .close__top { flex-direction: column; align-items: flex-start; }
  .mark { --gap: 3px; margin-top: clamp(3.5rem, 12vw, 6rem); }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .js .lines [data-line] {
    transform: translateY(105%);
    animation: rise-line 900ms var(--ease-expo) forwards;
    animation-delay: calc(120ms + var(--i) * 90ms);
  }
  .js .hero [data-load] {
    opacity: 0;
    transform: translateY(16px);
    animation: rise 600ms var(--ease-out) 420ms forwards;
  }
  /* The set builds the way the headline says: smallest first. */
  .js .wave {
    transform: scaleY(0);
    transform-origin: 100% 100%;
    animation: rise 1000ms var(--ease-expo) forwards;
    animation-delay: calc(200ms + var(--i) * 80ms);
  }

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

  .js .mark__block {
    transform: translateY(101%);
    transition: transform 1100ms var(--ease-expo);
    transition-delay: calc(var(--i) * 70ms);
  }
  .js .mark.is-in .mark__block { transform: none; }
  .js .mark.is-in .mark__col {
    animation: swell 7s ease-in-out infinite;
    animation-delay: calc(var(--i) * -1.1s);
  }
  .js .mark.is-paused .mark__col { animation-play-state: paused; }
}

@keyframes rise-line { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes swell {
  0%, 100% { transform: translateY(var(--rest)); }
  50% { transform: translateY(calc(var(--rest) * 0.25)); }
}
