/* =========================================================================
   CostaDev — styles
   Palette: Salt, Pacific, Lagoon, Shallows, Sand, Sol
   Type:    Panchang (wide display, the horizon) + Switzer (text)
   ========================================================================= */

:root {
  --salt: #F3F5F1;
  --foam: #FBFCFA;
  --pacific: #0C3437;
  --pacific-2: #134649;
  --lagoon: #2E8F87;
  --shallows: #A9DCD3;
  --sand: #E6D9BF;
  --sol: #F5A524;
  --sol-deep: #E39214;
  --ink-blue: #2A3F8F;

  --ink: var(--pacific);
  --ink-soft: rgba(12, 52, 55, 0.72);
  --ink-faint: rgba(12, 52, 55, 0.48);
  --line: rgba(12, 52, 55, 0.14);
  --line-strong: rgba(12, 52, 55, 0.26);

  /* Surfaces and states that change with the theme */
  --bg: var(--salt);
  --surface: var(--foam);
  --inverse: var(--pacific);       /* filled controls: selected, hover */
  --inverse-ink: var(--foam);
  --wash: rgba(12, 52, 55, 0.06);  /* subtle hover background */
  --row-wash: rgba(169, 220, 211, 0.5);
  --live: #1D6B65;
  --live-bg: rgba(46, 143, 135, 0.13);
  --beta: #855407;
  --beta-bg: rgba(245, 165, 36, 0.18);
  --soon-bg: rgba(12, 52, 55, 0.07);
  --error: #B4380A;
  --error-text: #A8360A;
  --hero-a: #D6EFEA;
  --hero-b: #BFE3DC;
  --hero-c: #CFE8E2;
  --dock-bg: rgba(12, 52, 55, 0.9);
  --dock-edge: rgba(243, 245, 241, 0.08);

  color-scheme: light;

  --display: "Panchang", "Arial Black", system-ui, sans-serif;
  --text: "Switzer", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hand: "Reenie Beanie", "Bradley Hand", cursive;

  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 56px);
  --card-w: clamp(250px, 24vw, 360px);  /* badge incl. its text ring */
  --card-h: var(--card-w);
  --hero-h: max(100vh, 620px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@supports (height: 100svh) {
  :root { --hero-h: max(100svh, 620px); }
}

/* Dark theme: the Pacific at night. Set by the toggle in the dock
   (data-theme on <html>), defaulting to the visitor's system setting. */
:root[data-theme="dark"] {
  --ink: #E8EFEC;
  --ink-soft: rgba(232, 239, 236, 0.72);
  --ink-faint: rgba(232, 239, 236, 0.48);
  --line: rgba(232, 239, 236, 0.13);
  --line-strong: rgba(232, 239, 236, 0.26);

  --bg: #071D1F;
  --surface: #0D2A2D;
  --inverse: var(--shallows);
  --inverse-ink: var(--pacific);
  --wash: rgba(232, 239, 236, 0.07);
  --row-wash: rgba(169, 220, 211, 0.1);
  --live: #7FD3C6;
  --live-bg: rgba(46, 143, 135, 0.24);
  --beta: #F7BE5E;
  --beta-bg: rgba(245, 165, 36, 0.16);
  --soon-bg: rgba(232, 239, 236, 0.08);
  --error: #F0784A;
  --error-text: #F28A60;
  --hero-a: #0F3A3C;
  --hero-b: #0A2C2F;
  --hero-c: #082224;
  --dock-bg: rgba(16, 64, 67, 0.88);
  --dock-edge: rgba(243, 245, 241, 0.14);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; }

::selection { background: var(--shallows); color: var(--pacific); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 99px;
  background: var(--pacific); color: var(--salt);
  text-decoration: none; transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: none; }

.h-display {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 3.9vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 17ch;
  text-wrap: balance;
}

.lede {
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 48ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 500 16px/1 var(--text);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.4s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--sol { background: var(--sol); color: var(--pacific); }
.btn--sol:hover { background: var(--sol-deep); }
.btn--deep { background: var(--inverse); color: var(--inverse-ink); }
.btn--deep:hover { background: color-mix(in srgb, var(--inverse) 88%, var(--ink-soft)); }
.btn--ghost { background: transparent; color: inherit; border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--wash); }
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* =========================================================================
   Journey: hero + studio, with the badge pinned on top
   ========================================================================= */
.journey { position: relative; }

.stage {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.stage__sticky {
  position: sticky;
  top: 0;
  height: var(--hero-h);
  display: grid;
  place-items: center;
  perspective: 1600px;
}

/* The badge (medal): spinning text ring around a coin that flips */
.medal {
  width: var(--card-w);
  height: var(--card-h);
  transform-style: preserve-3d;
  will-change: transform;
}

.medal__lift,
.medal__tilt {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.medal__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  will-change: transform;
}
.medal__ring text {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  fill: var(--ink);
}

/* The coin turns over on scroll; the ring stays readable */
.medal__coin {
  position: absolute;
  inset: 11.5%;
  transform-style: preserve-3d;
}

.medal__flip {
  all: unset;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  transform-style: preserve-3d;
  transition: transform 1.1s var(--ease-out);
}
.medal__flip:focus-visible { outline: 2px solid var(--sol); outline-offset: 8px; }
.medal.is-flipped .medal__flip { transform: rotateY(180deg); }

.medal__face {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 50%;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  box-shadow:
    0 46px 70px -34px rgba(6, 36, 38, 0.6),
    0 14px 26px -16px rgba(6, 36, 38, 0.4);
}
.medal__face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.medal__front { background: #E3F1EC; }
.medal__front::after {
  box-shadow:
    inset 0 0 0 5px rgba(251, 252, 250, 0.95),
    inset 0 -16px 30px rgba(8, 38, 42, 0.16);
}
.medal__scene { display: block; width: 100%; height: 100%; }

.medal__back {
  transform: rotateY(180deg);
  background: radial-gradient(circle at 50% 28%, #1E5C5E 0%, var(--pacific) 70%);
  color: var(--salt);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 17%;
  text-align: center;
}
.medal__back::after { box-shadow: inset 0 0 0 5px rgba(169, 220, 211, 0.55); }
.medal__note {
  display: block;
  font: 400 clamp(19px, 1.65vw, 25px)/1.02 var(--hand);
  transform: rotate(-3deg);
}
.medal__sign {
  display: block;
  font: 400 clamp(26px, 2.3vw, 34px)/1 var(--hand);
  color: var(--sol);
  transform: rotate(-3deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: var(--hero-h);
  overflow: hidden;
  /* the hero is a surface to play with: clicks make ripples, not selections */
  -webkit-user-select: none;
  user-select: none;
  background:
    linear-gradient(180deg, transparent 62%, var(--bg) 100%),
    radial-gradient(120% 80% at 50% 30%, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 100%);
}

.hero__water {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__grid {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--card-w) minmax(0, 1fr);
  /* equal gap on both sides of the badge, scaled with it */
  column-gap: calc(var(--card-w) * 0.08);
  align-items: center;
}

/* Three rows keep both words on the card's centre line */
.hero__side {
  align-self: stretch;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  row-gap: 14px;
}
.hero__side--left { justify-items: end; text-align: right; }
.hero__side--right { justify-items: start; }
.hero__side .hero__note { align-self: end; }
.hero__side .hero__clock { align-self: start; }

.hero__word {
  font-family: var(--display);
  font-weight: 800;
  /* sized so COSTA (the widest word, ~5.2em) always fits its column */
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--ink);
  will-change: transform;
}

.mask {
  display: block;
  overflow: hidden;
  padding: 0.05em 0.02em;
}
.mask > span { display: block; will-change: transform; }

/* "DEV " followed by a terminal cursor waiting for input.
   The negative margin cancels the D's built-in left side bearing so the gap
   to the badge matches the gap on the COSTA side. */
.hero__word--prompt { margin-left: -0.035em; white-space: nowrap; }
.hero__caret {
  display: inline-block;
  width: 0.5em;
  height: 0.7em;
  margin-left: 0.14em;
  vertical-align: 0;
  background: currentColor;
  animation: caret-blink 1.06s steps(1) infinite;
}
@keyframes caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero__note,
.hero__clock {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
}
.hero__clock time { font-variant-numeric: tabular-nums; color: var(--ink); }

.hero__scroll {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  bottom: 34px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.hero__scroll-line {
  position: relative;
  width: 1px;
  height: 38px;
  background: var(--line-strong);
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  left: 0; top: -40%;
  width: 1px; height: 40%;
  background: var(--ink);
  animation: drip 2.2s var(--ease-out) infinite;
}
@keyframes drip { to { top: 100%; } }

/* ---------- Studio ---------- */
.studio {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(90px, 14vh, 160px) var(--gutter) 12vh;
}

.studio__col {
  width: 50%;
  padding-right: clamp(16px, 3vw, 48px);
}

.studio__intro {
  display: grid;
  gap: 20px;
  margin-bottom: 10vh;
}

.studio__stack { position: relative; }

.layer {
  position: sticky;
  top: calc(12vh + var(--i) * 24px);
  isolation: isolate;
  overflow: hidden;
  min-height: min(62vh, 520px);
  margin-bottom: 16vh;
  padding: clamp(28px, 3vw, 44px);
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform-origin: 50% 0;
  will-change: transform;
}
.layer:last-child { margin-bottom: 0; }

.layer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  opacity: 0.06;
  pointer-events: none;
}
/* Dimmed by the scroll animation as the next layer covers it */
.layer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #06282A;
  opacity: var(--shade, 0);
  pointer-events: none;
}

.layer--sand { background: var(--sand); color: var(--pacific); }
.layer--shallows {
  background:
    radial-gradient(90% 60% at 85% 0%, rgba(255, 255, 255, 0.45), transparent 70%),
    var(--shallows);
  color: var(--pacific);
}
.layer--lagoon {
  background:
    radial-gradient(90% 60% at 85% 0%, rgba(169, 220, 211, 0.35), transparent 70%),
    var(--lagoon);
  color: var(--foam);
}
.layer--deep {
  background:
    radial-gradient(90% 70% at 80% 0%, rgba(46, 143, 135, 0.4), transparent 70%),
    var(--pacific);
  color: var(--foam);
}

.layer__depth {
  position: absolute;
  top: clamp(28px, 3vw, 44px);
  right: clamp(28px, 3vw, 44px);
  font: 600 12px/1 var(--display);
  letter-spacing: 0.02em;
  opacity: 0.6;
  display: flex;
  align-items: center;
  gap: 8px;
}
.layer__depth::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.layer__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(23px, 2.2vw, 32px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 14ch;
  padding-right: 70px;
}

.layer p {
  font-size: clamp(16px, 1.25vw, 18px);
  max-width: 42ch;
  opacity: 0.85;
}

.layer__list {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  font-size: 15px;
  font-weight: 500;
}
.layer__list li {
  padding: 11px 0;
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent);
}

.layer .btn { align-self: flex-start; margin-top: 6px; }

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  z-index: 7;
  overflow: hidden;
  padding: 24px 0;
  background: var(--pacific);
  color: var(--salt);
}
.marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee__item {
  display: flex;
  align-items: center;
  gap: 0.75em;
  padding-right: 0.75em;
  font: 600 clamp(20px, 2.6vw, 36px)/1 var(--display);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.marquee__sun {
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--sol);
  box-shadow: 0 0 0 0.18em rgba(245, 165, 36, 0.22);
  flex: none;
}

/* ---------- Statement ---------- */
.statement {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(110px, 20vh, 220px) var(--gutter);
}
.statement__text {
  font-weight: 500;
  font-size: clamp(28px, 3.7vw, 56px);
  line-height: 1.14;
  letter-spacing: -0.028em;
  max-width: 30ch;
}
.statement__text .w { opacity: 0.16; }

/* ---------- Section heads ---------- */
.section-head {
  max-width: var(--wrap);
  margin: 0 auto clamp(40px, 6vh, 64px);
  padding: 0 var(--gutter);
  display: grid;
  gap: 18px;
}
.section-head--split {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 32px;
}
.section-head--split > div { display: grid; gap: 18px; }

/* ---------- Apps ---------- */
.apps { padding: clamp(40px, 6vh, 80px) 0 clamp(80px, 12vh, 140px); }

.apps__grid {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.app {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.app--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 12px;
}

.app__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  overflow: hidden;
  background: var(--c, var(--lagoon));
  isolation: isolate;
}
.app--featured .app__cover {
  flex: 1.4;
  aspect-ratio: auto;
  min-height: clamp(320px, 34vw, 460px);
}

.app__cover img,
.app__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}
.app:hover .app__cover img,
.app:hover .app__art { transform: scale(1.04); }

.app__art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.app__art-name {
  position: absolute;
  left: clamp(20px, 3vw, 36px);
  bottom: clamp(18px, 2.6vw, 30px);
  font: 800 clamp(34px, 5vw, 76px)/0.9 var(--display);
  letter-spacing: -0.035em;
  color: var(--art-ink, var(--foam));
}
.app--featured .app__art-name { font-size: clamp(44px, 7vw, 108px); }
.app__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 16px 14px;
}
.app--featured .app__body {
  padding: clamp(20px, 2.6vw, 36px) clamp(16px, 2vw, 28px);
}

.app__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(21px, 1.9vw, 27px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.app__tagline {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  max-width: 34ch;
}
.app__desc {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 48ch;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 6px 11px 6px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  background: var(--live-bg);
  color: var(--live);
}
.badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.badge--live::before { box-shadow: 0 0 0 0 rgba(46, 143, 135, 0.5); animation: ping 2.4s infinite; }
.badge--beta { background: var(--beta-bg); color: var(--beta); }
.badge--soon { background: var(--soon-bg); color: var(--ink-soft); }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(46, 143, 135, 0.45); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(46, 143, 135, 0); }
}

.app__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}
.chip {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1;
  color: var(--ink-soft);
}
.chip--price {
  border-color: transparent;
  background: var(--sand);
  color: var(--pacific);
  font-weight: 600;
}

.app__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-note {
  grid-column: 1 / -1;
  padding: 40px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  color: var(--ink-soft);
}

/* ---------- Open source ---------- */
.oss { padding: clamp(60px, 10vh, 120px) 0; }

.oss__list {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  list-style: none;
}

.oss__row { border-top: 1px solid var(--line); }
.oss__row:last-child { border-bottom: 1px solid var(--line); }

.oss__item {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr) minmax(130px, 0.7fr) 80px 46px;
  gap: 24px;
  align-items: center;
  padding: 30px 14px;
}
.oss__item::before {
  content: "";
  position: absolute;
  inset: 6px 0;
  z-index: -1;
  border-radius: 18px;
  background: var(--row-wash);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.6s var(--ease-out);
}
.oss__item:hover::before,
.oss__item:focus-within::before { transform: scaleY(1); }

.oss__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.oss__icon {
  width: 64px; height: 64px;
  flex: none;
  filter: drop-shadow(0 6px 14px rgba(12, 52, 55, 0.18));
  transition: transform 0.6s var(--ease-out);
}
.oss__item:hover .oss__icon { transform: rotate(-6deg) scale(1.05); }

.oss__name {
  min-width: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  color: inherit;
  text-decoration: none;
}
/* The name is the row's main link: stretch it over the whole row */
a.oss__name::after {
  content: "";
  position: absolute;
  inset: 6px 0;
  border-radius: 18px;
}
a.oss__name:focus-visible { outline: none; }
a.oss__name:focus-visible::after { outline: 2px solid var(--sol); outline-offset: 2px; }

.oss__body { display: grid; gap: 18px; justify-items: start; min-width: 0; }
.oss__desc { font-size: 16px; color: var(--ink-soft); max-width: 54ch; }
.oss__get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.oss__download {
  position: relative;  /* above the stretched name link */
  z-index: 1;
  min-height: 42px;
  padding: 0 18px;
  font-size: 15px;
}
.oss__download svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.oss__platform { font-size: 14px; color: var(--ink-faint); }
.oss__lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}
.oss__lang i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--lang, var(--lagoon));
  flex: none;
}
.oss__license { color: var(--ink-faint); }
.oss__stars {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.oss__stars svg { width: 14px; height: 14px; fill: var(--sol); }
.oss__arrow {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  transition: background-color 0.4s, color 0.4s, transform 0.6s var(--ease-out);
}
.oss__arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.oss__item:has(a.oss__name:hover, a.oss__name:focus-visible) .oss__arrow {
  background: var(--inverse);
  color: var(--inverse-ink);
  transform: rotate(45deg);
}

/* ---------- About ---------- */
.about {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(80px, 14vh, 160px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.about__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 32px;
  overflow: hidden;
  /* sea, then sun, then glow, then sky: the sun sits half below the horizon */
  background:
    linear-gradient(180deg, transparent 61%, #3A8F87 61.1%, var(--lagoon) 66%, var(--pacific) 100%),
    radial-gradient(circle at 50% 61%, var(--sol) 0 15%, transparent 15.3%),
    radial-gradient(circle at 50% 61%, rgba(245, 165, 36, 0.5) 0 16%, transparent 40%),
    linear-gradient(180deg, #DDEFEA 0%, #F2D9A6 50%, #F7C77E 61%);
}
.about__image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.about__photo.has-photo .about__mark { display: none; }
.about__mark {
  position: absolute;
  left: 9%;
  bottom: 8%;
  width: 62%;
  height: auto;
}

.about__text { display: grid; gap: 24px; }
.about__copy { display: grid; gap: 16px; }
.about__copy p {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
}
.about__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.socials {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.socials a {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  transition: background-color 0.3s, color 0.3s;
}
.socials a:hover { background: var(--inverse); color: var(--inverse-ink); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- FAQ ---------- */
.faq {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(60px, 10vh, 120px) var(--gutter);
  display: grid;
  gap: clamp(28px, 4vh, 48px);
}
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }

.faq__q {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 4px;
  cursor: pointer;
  font: 500 clamp(18px, 1.6vw, 22px)/1.3 var(--text);
}
.faq__q:focus-visible { outline: 2px solid var(--sol); outline-offset: 2px; border-radius: 8px; }

.faq__icon {
  position: relative;
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: background-color 0.4s, border-color 0.4s;
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 13px; height: 1.6px;
  margin: -0.8px 0 0 -6.5px;
  background: currentColor;
  transition: transform 0.5s var(--ease-out);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item.is-open .faq__icon { background: var(--inverse); border-color: var(--inverse); color: var(--inverse-ink); }
.faq__item.is-open .faq__icon::after { transform: rotate(0deg); }

.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s var(--ease-out);
}
.faq__a > div { overflow: hidden; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a p {
  padding: 0 64px 28px 4px;
  color: var(--ink-soft);
  max-width: 64ch;
}

/* ---------- Contact ---------- */
.contact {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(60px, 10vh, 120px) var(--gutter) clamp(170px, 24vh, 240px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.contact__intro { display: grid; gap: 20px; }
.contact__direct { color: var(--ink-soft); }
.contact__direct a { color: var(--ink); font-weight: 500; text-underline-offset: 3px; }

.contact__form {
  display: grid;
  gap: 24px;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.field {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.field > span,
.field legend {
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.field legend { margin-bottom: 10px; }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 8px 0 10px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field textarea:focus {
  border-color: var(--lagoon);
  box-shadow: 0 1px 0 var(--lagoon);
}
.field.is-invalid input,
.field.is-invalid textarea { border-color: var(--error); box-shadow: 0 1px 0 var(--error); }

.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topic { position: relative; }
.topic input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.topic span {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.topic input:checked + span { background: var(--inverse); border-color: var(--inverse); color: var(--inverse-ink); }
.topic input:focus-visible + span { outline: 2px solid var(--sol); outline-offset: 2px; }

.contact__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.form-status { font-size: 15px; color: var(--ink-soft); }
.form-status.is-error { color: var(--error-text); }
.form-status.is-success { color: var(--live); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  background: var(--pacific);
  color: var(--salt);
  padding-bottom: 110px;
}

.footer__waves {
  position: absolute;
  left: 0;
  bottom: calc(100% - 1px);
  width: 100%;
  height: clamp(60px, 8vw, 120px);
  overflow: hidden;
}
.wave { animation: drift linear infinite; }
.wave--1 { fill: var(--shallows); opacity: 0.55; animation-duration: 26s; }
.wave--2 { fill: var(--lagoon); opacity: 0.75; animation-duration: 18s; animation-direction: reverse; }
.wave--3 { fill: var(--pacific); animation-duration: 32s; }
@keyframes drift { to { transform: translateX(-1440px); } }

.footer__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 36px var(--gutter) 0;
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer__tag { font-size: 17px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer__links a,
.footer__top {
  color: var(--salt);
  opacity: 0.75;
  text-decoration: none;
  transition: opacity 0.3s;
}
.footer__links a:hover,
.footer__top:hover { opacity: 1; }

.footer__mark {
  margin: clamp(40px, 8vh, 80px) 0 clamp(28px, 5vh, 56px);
}
.footer__mark img {
  width: clamp(220px, 34vw, 480px);
  height: auto;
}
.footer__row--small { font-size: 14px; color: rgba(243, 245, 241, 0.65); }

/* ---------- Floating nav ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 50;
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  background: var(--dock-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 20px 44px -18px rgba(6, 36, 38, 0.65), inset 0 0 0 1px var(--dock-edge);
}
.dock a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 17px;
  border-radius: 999px;
  font: 500 15px/1 var(--text);
  color: rgba(243, 245, 241, 0.74);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s, background-color 0.3s;
}
.dock a:hover,
.dock a.is-active { color: var(--salt); }
.dock__home { flex: none; width: 44px; padding: 0 !important; }
.dock__home img { width: 34px; height: 34px; transition: transform 0.5s var(--ease-out); }
.dock__home:hover img { transform: rotate(-12deg) scale(1.06); }
.dock__indicator {
  position: absolute;
  top: 6px;
  left: 0;
  width: 0;
  height: 44px;
  border-radius: 999px;
  background: rgba(243, 245, 241, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s var(--ease-out), width 0.6s var(--ease-out), opacity 0.3s;
}
.dock .dock__cta {
  margin-left: 6px;
  background: var(--sol);
  color: var(--pacific);
  font-weight: 600;
}
.dock .dock__cta:hover { background: var(--sol-deep); color: var(--pacific); }

/* Light / dark switch: a sun that sets into a crescent moon */
.dock__theme {
  all: unset;
  position: relative;
  z-index: 1;
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: 4px;
  border-radius: 50%;
  color: rgba(243, 245, 241, 0.74);
  cursor: pointer;
  transition: color 0.3s, background-color 0.3s;
}
.dock__theme:hover { color: var(--salt); background: rgba(243, 245, 241, 0.1); }
.dock__theme:focus-visible { outline: 2px solid var(--sol); outline-offset: 2px; }
.dock__theme svg { width: 20px; height: 20px; overflow: visible; }
.theme-icon__rays {
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  transform-origin: 12px 12px;
  transition: transform 0.6s var(--ease-out), opacity 0.4s;
}
.theme-icon__body { fill: currentColor; }
.theme-icon__bite {
  fill: #000;
  transform: translate(9px, -9px);
  transition: transform 0.6s var(--ease-out);
}
.theme-icon__core { transform-origin: 12px 12px; transition: transform 0.6s var(--ease-out); }
:root[data-theme="dark"] .theme-icon__rays { transform: rotate(-60deg) scale(0.5); opacity: 0; }
:root[data-theme="dark"] .theme-icon__bite { transform: translate(4.5px, -4px); }
:root[data-theme="dark"] .theme-icon__core { transform: scale(1.35); }

/* Cross-fade between themes where View Transitions are supported */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.45s; }

/* ---------- Intro states (removed by JS) ---------- */
html.intro-pending [data-intro="rise"] { transform: translateY(115%); }
html.intro-pending [data-intro="fade"] { opacity: 0; }
html.intro-pending .medal__lift { opacity: 0; }
html.intro-pending .hero__water { opacity: 0; }
html.intro-pending .dock { transform: translateY(170%); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  :root { --card-w: min(70vw, 300px); }

  .stage { bottom: auto; height: var(--hero-h); }
  .stage__sticky { position: relative; }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) var(--card-h) minmax(0, 1fr);
    row-gap: 18px;
    text-align: center;
  }
  .hero__side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: center;
    text-align: center;
    gap: 8px;
  }
  .hero__side .hero__note,
  .hero__side .hero__clock { align-self: center; }
  .hero__side--left { align-self: end; }
  .hero__side--right { align-self: start; }
  .hero__word { font-size: clamp(40px, 13vw, 76px); }
  .hero__word--prompt { margin-left: 0; }
  .hero__scroll { display: none; }

  .studio__col { width: 100%; padding-right: 0; }
  .layer { top: calc(10vh + var(--i) * 16px); min-height: auto; margin-bottom: 10vh; }
  .layer__title { padding-right: 48px; }
  .layer__depth::before { display: none; }

  .apps__grid { grid-template-columns: minmax(0, 1fr); }
  .app--featured { flex-direction: column; }
  .app--featured .app__cover { flex: none; min-height: 0; aspect-ratio: 16 / 11; }

  .section-head--split { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .section-head--split .btn { justify-self: start; }

  .oss__item {
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 14px 16px;
    padding: 24px 6px;
  }
  .oss__title { grid-column: 1; flex-direction: row; align-items: center; }
  .oss__icon { width: 52px; height: 52px; }
  .oss__body { grid-column: 1 / -1; grid-row: 2; }
  .oss__lang, .oss__stars { grid-column: 1; }
  .oss__arrow { grid-column: 2; grid-row: 1; }

  .about,
  .contact { grid-template-columns: minmax(0, 1fr); }
  .about__photo { max-width: 440px; }
}

@media (max-width: 640px) {
  .dock__link--wide { display: none !important; }
  .dock a { padding: 0 13px; font-size: 14px; }
  .dock__theme { margin-left: 0; }
  .faq__a p { padding-right: 4px; }
  .footer__links { gap: 8px 18px; }
}

@media (max-width: 400px) {
  .dock a { padding: 0 11px; }
  .dock__theme { width: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: smooth; }
  .wave,
  .hero__caret,
  .hero__scroll-line::after,
  .badge--live::before { animation: none; }
  .medal__flip,
  .faq__a,
  .theme-icon__rays,
  .theme-icon__bite,
  .theme-icon__core { transition: none; }
}

/* =========================================================================
   Easter egg (js/rift.js): hold the mouse down on the hero water and keep
   dragging. The surface cracks, then splits open into a cyber version of
   the site. Nothing is saved, so a reload brings the beach back.
   ========================================================================= */
.hero__rift {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

html.is-rifting,
html.is-rifting * { -webkit-user-select: none; user-select: none; }
.hero.is-cracking { cursor: crosshair; }

@media (prefers-reduced-motion: no-preference) {
  .hero.is-unstable .hero__word { animation: rift-glitch 0.3s steps(2) infinite; }
  .hero.is-breaking .hero__word { animation: rift-glitch 0.14s steps(2) infinite; }
  .hero.is-breaking { animation: rift-quake 0.1s steps(2) infinite; }
}
@keyframes rift-glitch {
  0%   { text-shadow: -3px 0 #2B7BFF, 3px 0 #2BFF88; translate: 1px 0; }
  50%  { text-shadow: 3px 1px #2B7BFF, -3px -1px #2BFF88; translate: -2px 0; }
  100% { text-shadow: -2px 0 #2B7BFF, 2px 0 #2BFF88; translate: 0 1px; }
}
@keyframes rift-quake {
  0%   { translate: -3px 2px; }
  50%  { translate: 3px -2px; }
  100% { translate: -1px -1px; }
}

/* The new look is revealed through the crack (animated from js/rift.js) */
html.rift-opening::view-transition-old(root),
html.rift-opening::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

.rift-hud {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 60;
  max-width: calc(100% - 32px);
  translate: -50% 0;
  padding: 10px 16px;
  font: 500 13px/1.35 var(--text);
  color: var(--ink);
  background: rgba(2, 8, 6, 0.86);
  box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.5), 0 0 28px rgba(0, 240, 255, 0.25);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: opacity 0.8s;
  animation: hud-in 0.5s steps(5) both 0.9s;
}
.rift-hud b { color: #2BFF88; font-weight: 700; }
.rift-hud.is-gone { opacity: 0; }
@keyframes hud-in { from { opacity: 0; translate: -50% -8px; } }

/* ---------- Cyber mode ---------- */
:root[data-cyber] {
  --cy-cyan: #00F0FF;
  --cy-blue: #2B7BFF;
  --cy-green: #2BFF88;
  --cy-aqua: #00FFC6;
  --cy-void: #030806;
  /* materials of the circuit board behind the hero (js/circuit.js) */
  --cy-mask: #061A1C;   /* solder mask */
  --cy-tin: #9FB8B5;    /* plated metal */
  --cy-silk: #D5E6E2;   /* silkscreen */
  --cy-metal: conic-gradient(from 200deg, #5E7876, #D3E2DF 10%, #6E8885 24%, #3B504E 38%, #A9BFBC 53%, #4F6967 68%, #C9DAD7 84%, #5E7876);
  --chamfer: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);

  --salt: #EAF8FF;
  --foam: #F4FBFF;
  --pacific: var(--cy-void);
  --pacific-2: #0A1A14;
  --lagoon: var(--cy-cyan);
  --shallows: var(--cy-green);
  --sand: #10261C;
  --sol: var(--cy-green);
  --sol-deep: #6BFFAC;

  --ink: #E6F6FF;
  --ink-soft: rgba(214, 236, 255, 0.7);
  --ink-faint: rgba(214, 236, 255, 0.45);
  --line: rgba(0, 240, 255, 0.16);
  --line-strong: rgba(0, 240, 255, 0.38);

  --bg: var(--cy-void);
  --surface: #08130F;
  --inverse: var(--cy-cyan);
  --inverse-ink: var(--cy-void);
  --wash: rgba(0, 240, 255, 0.08);
  --row-wash: rgba(43, 255, 136, 0.08);
  --live: #39FF9C;
  --live-bg: rgba(57, 255, 156, 0.12);
  --beta: #5CC8FF;
  --beta-bg: rgba(92, 200, 255, 0.12);
  --soon-bg: rgba(0, 240, 255, 0.08);
  --error: #FF4D6D;
  --error-text: #FF6B85;
  --hero-a: #0A2418;
  --hero-b: #061710;
  --hero-c: var(--cy-void);
  --dock-bg: rgba(4, 12, 9, 0.86);
  --dock-edge: rgba(0, 240, 255, 0.35);

  --display: "Tektur", "Arial Black", system-ui, sans-serif;
  --text: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --hand: var(--text);

  color-scheme: dark;
}

:root[data-cyber] body { font-size: 15px; }
:root[data-cyber] ::selection { background: var(--cy-green); color: var(--cy-void); }

:root[data-cyber] .h-display {
  letter-spacing: -0.01em;
  text-shadow: 0 0 22px rgba(0, 240, 255, 0.25);
}

/* Buttons keep the cut corners of the HUD. On hover the label glitches and
   decodes from noise (js/rift.js), a small echo of the glitch the water
   shows as it cracks, and outlined buttons light up their rim. */
@property --rim {
  syntax: "<color>";
  inherits: false;
  initial-value: transparent;
}
:root[data-cyber] .btn,
:root[data-cyber] .dock .dock__cta {
  --ga: var(--cy-blue);  /* glitch fringes */
  --gb: #F4FBFF;
  position: relative;
  isolation: isolate;
  border: 0;
  border-radius: 0;
  clip-path: var(--chamfer);
  font: 700 13px/1 var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* filled */
:root[data-cyber] .btn--sol,
:root[data-cyber] .dock .dock__cta { background: var(--cy-green); color: var(--cy-void); }
:root[data-cyber] .btn--sol:hover,
:root[data-cyber] .dock .dock__cta:hover { background: #6BFFAC; color: var(--cy-void); }
:root[data-cyber] .btn--sol:focus-visible,
:root[data-cyber] .dock .dock__cta:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--cy-void), inset 0 0 0 4px #F4FBFF; }

/* outlined: a 1px rim (the button's own background) around a dark face */
:root[data-cyber] .btn--deep,
:root[data-cyber] .btn--ghost {
  --rim: rgba(0, 240, 255, 0.45);
  --face: #05140F;
  --gb: var(--cy-green);
  color: var(--cy-cyan);
  background: var(--rim);
  transition: color 0.3s, --rim 0.3s;
}
:root[data-cyber] .btn--deep::before,
:root[data-cyber] .btn--ghost::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  clip-path: polygon(11.5px 0, 100% 0, 100% calc(100% - 11.5px), calc(100% - 11.5px) 100%, 0 100%, 0 11.5px);
  background: var(--face);
  transition: background-color 0.3s;
}
:root[data-cyber] .btn--ghost { --rim: rgba(0, 240, 255, 0.24); --face: var(--bg); color: rgba(0, 240, 255, 0.85); }
:root[data-cyber] .app .btn--ghost { --face: var(--surface); }
:root[data-cyber] .btn--deep:is(:hover, :focus-visible),
:root[data-cyber] .btn--ghost:is(:hover, :focus-visible) { --rim: rgba(0, 240, 255, 0.95); color: #CFFBFF; }
:root[data-cyber] .btn--deep:hover::before,
:root[data-cyber] .btn--ghost:hover::before { background: #072A22; }
:root[data-cyber] .btn--deep:focus-visible,
:root[data-cyber] .btn--ghost:focus-visible { outline: none; --rim: #F4FBFF; }

/* the glitch burst while the label decodes */
:root[data-cyber] .is-decoding { animation: btn-glitch 0.36s steps(1) both; }
@keyframes btn-glitch {
  0%   { text-shadow: -2px 0 var(--ga), 2px 0 var(--gb); translate: 1px 0; filter: brightness(1.4); }
  20%  { text-shadow: 2px 0 var(--ga), -2px 0 var(--gb); translate: -2px 0; filter: none; }
  40%  { text-shadow: -1px 0 var(--ga), 1px 0 var(--gb); translate: 0 1px; filter: brightness(1.2); }
  60%  { text-shadow: 1px 0 var(--ga), -1px 0 var(--gb); translate: 1px 0; filter: none; }
  80%, 100% { text-shadow: none; translate: 0; filter: none; }
}
:root[data-cyber] .btn:active,
:root[data-cyber] .dock .dock__cta:active { filter: brightness(1.25); }
/* the statement's words decode the same way as they light up on scroll */
:root[data-cyber] .statement__text .w { --ga: var(--cy-blue); --gb: var(--cy-green); display: inline-block; }

:root[data-cyber] .chip,
:root[data-cyber] .badge,
:root[data-cyber] .topic span { border-radius: 3px; }
:root[data-cyber] .chip--price { background: rgba(43, 255, 136, 0.12); color: var(--cy-green); }

/* Hero */
:root[data-cyber] .hero__word {
  color: #F4FBFF;
  letter-spacing: -0.01em;
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.45);
}
/* the intro is long over, so let the glow spill past the reveal mask */
:root[data-cyber] .hero__word .mask { overflow: visible; }
:root[data-cyber] .hero__caret { background: var(--cy-cyan); box-shadow: 0 0 16px var(--cy-cyan); }
:root[data-cyber] .hero__note::before { content: "// "; color: var(--cy-green); }
:root[data-cyber] .hero__clock time { color: var(--cy-cyan); }

/* Badge: a machined coin with a turned metal bezel, set into the board */
:root[data-cyber] .medal__ring { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8)); }
:root[data-cyber] .medal__ring text { fill: var(--cy-silk); fill-opacity: 0.8; font-weight: 500; letter-spacing: 0.12em; }
/* the badge scene is inline SVG, so its colours can be restyled directly */
:root[data-cyber] #mx-sky stop:nth-child(1) { stop-color: #021A14; }
:root[data-cyber] #mx-sky stop:nth-child(2) { stop-color: #063A3A; }
:root[data-cyber] #mx-sky stop:nth-child(3) { stop-color: #0B4F7A; }
:root[data-cyber] #mx-glow stop { stop-color: #2BFF88; }
:root[data-cyber] #mx-sun stop:nth-child(1) { stop-color: #C8FFE4; }
:root[data-cyber] #mx-sun stop:nth-child(2) { stop-color: #2BFF88; }
:root[data-cyber] #mx-birds { stroke: #7DF9FF; }
:root[data-cyber] #mx-swell { fill: #0096C7; }
:root[data-cyber] #mx-foam { stroke: #7DF9FF; }
:root[data-cyber] #mx-glitter { fill: #C8FFE4; }
:root[data-cyber] #mx-cursor path { fill: #021A14; stroke: var(--cy-cyan); }
:root[data-cyber] #mx-front { fill: #03302E; }
:root[data-cyber] #mx-lines { stroke: var(--cy-cyan); }
:root[data-cyber] .medal__face {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 44px 70px -30px rgba(0, 0, 0, 0.9),
    0 14px 26px -14px rgba(0, 0, 0, 0.75);
}
/* both faces sit 5px inside the bezel, recessed below its inner edge */
:root[data-cyber] .medal__front { background: var(--cy-metal); }
:root[data-cyber] .medal__scene {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  border-radius: 50%;
}
:root[data-cyber] .medal__front::after,
:root[data-cyber] .medal__back::after {
  inset: 5px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55), inset 0 3px 8px rgba(0, 0, 0, 0.7);
}
:root[data-cyber] .medal__back {
  gap: 8px;
  padding: 15%;
  background:
    radial-gradient(circle at 50% 22%, rgba(213, 230, 226, 0.09), transparent 58%),
    repeating-radial-gradient(circle, rgba(213, 230, 226, 0.025) 0 1px, transparent 1px 3px),
    radial-gradient(farthest-side, var(--cy-mask) calc(100% - 5.5px), transparent calc(100% - 5px)),
    var(--cy-metal);
  color: var(--cy-silk);
}
:root[data-cyber] .medal__note {
  font-size: clamp(11px, 0.88vw, 14px);
  line-height: 1.4;
  color: rgba(213, 230, 226, 0.78);
  transform: none;
}
:root[data-cyber] .medal__sign {
  font: 600 clamp(17px, 1.4vw, 21px)/1 var(--display);
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #F2F8F6 20%, #8FA7A4 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: none;
}

/* Studio layers are the board's stackup: matte solder mask with plated
   mounting holes, lit from above. Each layer keeps one status LED in its
   own colour, from layer 0 down to layer 3. */
:root[data-cyber] .layer {
  --hole: #010304 0 2.5px, var(--cy-tin) 3px 4.5px, rgba(0, 0, 0, 0.35) 5px 6px, transparent 6.5px;
  border-radius: 10px;
  color: var(--cy-silk);
  background:
    radial-gradient(circle at 18px 18px, var(--hole)),
    radial-gradient(circle at calc(100% - 18px) 18px, var(--hole)),
    radial-gradient(circle at 18px calc(100% - 18px), var(--hole)),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), var(--hole)),
    linear-gradient(180deg, rgba(213, 230, 226, 0.05), transparent 45%),
    var(--cy-mask);
  box-shadow:
    inset 0 1px 0 rgba(213, 230, 226, 0.12),
    inset 0 0 0 1px rgba(159, 184, 181, 0.14),
    0 0 0 1px rgba(0, 0, 0, 0.7),
    0 30px 60px -24px rgba(0, 0, 0, 0.95),
    0 10px 20px -10px rgba(0, 0, 0, 0.7);
}
:root[data-cyber] .layer--sand { --accent: var(--cy-blue); }
:root[data-cyber] .layer--shallows { --accent: var(--cy-cyan); }
:root[data-cyber] .layer--lagoon { --accent: var(--cy-aqua); }
:root[data-cyber] .layer--deep { --accent: var(--cy-green); }
:root[data-cyber] .layer::after { opacity: 0.22; }
:root[data-cyber] .layer::before { background: var(--cy-void); }
:root[data-cyber] .layer__depth {
  font: 500 12px/1 var(--text);
  letter-spacing: 0.04em;
  color: rgba(213, 230, 226, 0.6);
  opacity: 1;
  gap: 10px;
}
:root[data-cyber] .layer__depth::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent), 0 0 10px var(--accent);
}
:root[data-cyber] .layer__title { font-weight: 600; letter-spacing: 0; }
:root[data-cyber] .layer p { font-size: 15px; line-height: 1.65; color: rgba(213, 230, 226, 0.68); opacity: 1; }
:root[data-cyber] .layer__list { font-size: 13px; font-weight: 400; color: rgba(213, 230, 226, 0.86); }
:root[data-cyber] .layer__list li { border-top-color: rgba(159, 184, 181, 0.14); }

/* Marquee */
:root[data-cyber] .marquee {
  background: linear-gradient(90deg, var(--cy-blue), var(--cy-cyan) 50%, var(--cy-green));
  color: var(--cy-void);
}
:root[data-cyber] .marquee__sun {
  border-radius: 0;
  background: var(--cy-void);
  box-shadow: none;
  transform: rotate(45deg) scale(0.8);
}

/* Apps and open source */
:root[data-cyber] .app { border-radius: 8px; transition: box-shadow 0.4s; }
:root[data-cyber] .app:hover { box-shadow: 0 0 40px -14px var(--cy-cyan); border-color: var(--line-strong); }
:root[data-cyber] .app__cover { border-radius: 4px; }
:root[data-cyber] .app__art { filter: grayscale(1) sepia(1) hue-rotate(125deg) saturate(2.6) brightness(0.85); }
:root[data-cyber] .oss__link::before,
:root[data-cyber] .oss__arrow { border-radius: 4px; }

/* About: the sunset becomes a synthwave horizon */
:root[data-cyber] .about__photo {
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.4), 0 0 70px -24px var(--cy-cyan);
  background:
    radial-gradient(60% 30% at 50% 61%, rgba(43, 255, 136, 0.45), transparent 70%),
    linear-gradient(180deg, var(--cy-void) 0%, #04182A 40%, #0A4A5C 61%, #0A4A5C 100%);
}
:root[data-cyber] .about__photo::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 61%;
  width: 54%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: linear-gradient(180deg, #C8FFE4 8%, var(--cy-green) 42%, var(--cy-cyan) 70%);
}
:root[data-cyber] .about__photo::after {
  content: "";
  position: absolute;
  top: 61%;
  left: -60%;
  right: -60%;
  height: 90%;
  background:
    linear-gradient(var(--cy-cyan) 2px, transparent 2px) 0 0 / 100% 34px,
    linear-gradient(90deg, var(--cy-cyan) 2px, transparent 2px) 50% 0 / 48px 100%,
    linear-gradient(180deg, #06243A, #030E18 60%);
  transform: perspective(260px) rotateX(58deg);
  transform-origin: 50% 0;
  box-shadow: 0 -2px 24px var(--cy-cyan);
}
@media (prefers-reduced-motion: no-preference) {
  :root[data-cyber] .about__photo::after { animation: grid-run 1.1s linear infinite; }
}
@keyframes grid-run { to { background-position: 0 34px, 50% 0, 0 0; } }
:root[data-cyber] .about__photo.has-photo::before,
:root[data-cyber] .about__photo.has-photo::after { content: none; }
:root[data-cyber] .about__mark { z-index: 1; transform: translateZ(0); } /* keeps it above the tilted floor */
/* the wordmark becomes one blue-green tone */
:root[data-cyber] .about__mark,
:root[data-cyber] .footer__mark img { filter: grayscale(1) sepia(1) hue-rotate(125deg) saturate(2.4) brightness(1.05); }

/* Footer and menu */
:root[data-cyber] .wave--1 { fill: var(--cy-blue); opacity: 0.5; }
:root[data-cyber] .wave--2 { fill: var(--cy-cyan); opacity: 0.55; }
:root[data-cyber] .footer { box-shadow: 0 -1px 0 rgba(0, 240, 255, 0.3); }
:root[data-cyber] .dock { border-radius: 8px; }
:root[data-cyber] .dock a { border-radius: 4px; font-size: 13px; }
:root[data-cyber] .dock__indicator { border-radius: 4px; background: rgba(0, 240, 255, 0.14); }
:root[data-cyber] .dock__home img { filter: grayscale(1) sepia(1) hue-rotate(125deg) saturate(2.6); }
:root[data-cyber] .dock__theme { border-radius: 4px; }
