/* ============================================================
   TrainsPh — transit-map inspired dark theme
   Hand-written, no framework, no build step.
   ============================================================ */

:root {
  color-scheme: dark;

  /* Ground */
  --bg: #0b0d12;
  --surface: #12161e;
  --surface-2: #171c26;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);

  /* Ink */
  --text: #f2f3f5;
  --muted: #a0a6b4;
  /* Kept at >=4.5:1 on --bg, since every use is small text. */
  --dim: #8b92a1;

  /* Metro Manila rail lines */
  --lrt1: #fdb913;
  --lrt2: #7b2d8e;
  --mrt3: #2f7fd4;
  --pnr: #e8541f;

  /* TrainsPh brand */
  --brand: #25ade4;
  --accent: #13c7af;

  /* Metrics */
  --gutter: clamp(20px, 5vw, 64px);
  --shell: 1220px;
  --radius: 18px;
  --rail-w: 2px;
  --header-h: 76px;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", "Inter", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

/* Every image carries width/height attributes for CLS, so height must stay
   auto or the attribute is taken literally and the image stretches. */
img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

::selection {
  background: var(--brand);
  color: #04121a;
}

/* ---------- Layout primitives ---------- */

.shell {
  width: min(var(--shell), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: clamp(80px, 11vw, 160px) 0;
}

.section + .section {
  border-top: 1px solid var(--line-soft);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--brand);
  color: #04121a;
  font-weight: 600;
  border-radius: 10px;
  white-space: nowrap;
  transition: top 0.2s var(--ease);
}

.skip:focus {
  top: 16px;
}

/* ---------- Section headers (station stop) ---------- */

.sec-head {
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 3vw, 36px);
  margin-bottom: clamp(40px, 6vw, 72px);
}

.stop {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
}

.stop__dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: var(--rail-w) solid var(--stop, var(--brand));
  background: var(--bg);
  position: relative;
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.in-view .stop__dot {
  background: var(--stop, var(--brand));
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--stop, var(--brand)) 18%, transparent);
}

.stop__line {
  flex: 1;
  width: var(--rail-w);
  min-height: 46px;
  background: linear-gradient(var(--stop, var(--brand)), transparent);
  opacity: 0.45;
}

.sec-head__text {
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stop, var(--brand));
  margin-bottom: 16px;
}

.eyebrow__num {
  color: var(--dim);
}

.sec-title {
  font-size: clamp(2.1rem, 6.2vw, 4.1rem);
}

.sec-lede {
  margin-top: 22px;
  max-width: 54ch;
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  color: var(--muted);
  font-weight: 300;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
  background: rgba(11, 13, 18, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  /* Tagalog labels are longer; without this they wrap to two lines and break
     the header height and the rail alignment under it. */
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s,
    box-shadow 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--brand);
  color: #04121a;
  box-shadow: 0 10px 34px -12px color-mix(in srgb, var(--brand) 85%, transparent);
}

.btn--primary:hover {
  background: #45c0f0;
  box-shadow: 0 16px 42px -12px color-mix(in srgb, var(--brand) 95%, transparent);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(48px, 8vw, 96px);
  padding-top: 140px;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 58%;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
      180deg,
      rgba(11, 13, 18, 0.88) 0%,
      rgba(11, 13, 18, 0.45) 32%,
      rgba(11, 13, 18, 0.72) 68%,
      var(--bg) 100%
    ),
    radial-gradient(
      120% 80% at 18% 82%,
      rgba(37, 173, 228, 0.22) 0%,
      transparent 60%
    );
}

.hero .shell {
  position: relative;
  z-index: 2;
  width: min(var(--shell), 100% - 2 * var(--gutter));
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 13, 18, 0.6);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.hero__title {
  margin: 28px 0 0;
  font-size: clamp(3rem, 12.5vw, 9.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.hero__title span {
  display: block;
}

.hero__title .tint {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.55);
}

.hero__lede {
  margin-top: 28px;
  max-width: 46ch;
  font-size: clamp(1.02rem, 2.1vw, 1.3rem);
  font-weight: 300;
  color: #ccd2dd;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(40px, 7vw, 76px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

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

.line-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(11, 13, 18, 0.55);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d8dde5;
}

.line-chip::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dim);
}

.scroll-cue i {
  width: 34px;
  height: 1px;
  background: var(--dim);
  animation: cue 2s var(--ease) infinite;
  transform-origin: left;
}

@keyframes cue {
  0%,
  100% {
    transform: scaleX(0.35);
    opacity: 0.5;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.prose p + p {
  margin-top: 22px;
}

.prose {
  color: var(--muted);
  font-weight: 300;
  font-size: clamp(1rem, 1.8vw, 1.12rem);
}

.prose strong {
  color: var(--text);
  font-weight: 500;
}

.note {
  margin-top: 32px;
  padding: 20px 24px;
  border-left: 2px solid var(--lrt1);
  background: rgba(253, 185, 19, 0.05);
  border-radius: 0 12px 12px 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.pillars {
  display: grid;
  gap: 14px;
}

.pillar {
  display: flex;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.pillar:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateX(4px);
}

.pillar__mark {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--c, var(--brand));
}

.pillar h3 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pillar p {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.6;
}

/* ---------- Features ---------- */

.features {
  display: grid;
  gap: clamp(18px, 2.4vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.35s, box-shadow 0.45s;
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--c, var(--brand));
  transform: scaleX(0.16);
  transform-origin: left;
  transition: transform 0.55s var(--ease);
}

.feature:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 28px 60px -32px rgba(0, 0, 0, 0.9);
}

.feature:hover::before {
  transform: scaleX(1);
}

.feature__shot {
  position: relative;
  padding: 34px 34px 0;
  background: radial-gradient(
    90% 70% at 50% 0%,
    color-mix(in srgb, var(--c, var(--brand)) 18%, transparent),
    transparent 70%
  );
}

.feature__body {
  padding: 26px 30px 30px;
}

.feature h3 {
  font-size: 1.24rem;
  font-weight: 600;
}

.feature p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 300;
  line-height: 1.65;
}

.feature__tag {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c, var(--brand));
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  padding: clamp(26px, 3.6vw, 40px);
  background: var(--surface);
  transition: background 0.35s;
}

.stat:hover {
  background: var(--surface-2);
}

.stat__val {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  color: var(--c, var(--text));
  line-height: 1;
}

.stat__label {
  margin-top: 12px;
  font-size: 0.83rem;
  color: var(--muted);
  font-weight: 300;
}

.stats-foot {
  margin-top: 22px;
  font-size: 0.8rem;
  color: var(--dim);
}

/* ---------- Story ---------- */

.story {
  display: grid;
  gap: clamp(26px, 3.5vw, 44px);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  padding: clamp(28px, 3.6vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.card h3::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--c, var(--brand));
}

/* ---------- Roadmap ---------- */

.route {
  position: relative;
  display: grid;
  gap: 0;
}

.route__item {
  position: relative;
  display: flex;
  gap: clamp(18px, 3vw, 32px);
  padding: 26px 0;
}

.route__item + .route__item {
  border-top: 1px dashed var(--line-soft);
}

.route__dot {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 7px;
  border-radius: 50%;
  border: 2px solid var(--c, var(--brand));
  background: var(--bg);
  position: relative;
}

.route__item:not(:last-child) .route__dot::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  translate: -50% 0;
  width: 2px;
  height: calc(100% + 52px);
  background: linear-gradient(
    var(--c, var(--brand)),
    color-mix(in srgb, var(--c, var(--brand)) 10%, transparent)
  );
}

.route__text h3 {
  font-size: 1.14rem;
  font-weight: 600;
}

.route__text p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 300;
}

/* ---------- Founder ---------- */

.founder {
  display: grid;
  gap: clamp(30px, 5vw, 60px);
  grid-template-columns: 1fr;
}

@media (min-width: 880px) {
  .founder {
    grid-template-columns: 300px 1fr;
    align-items: start;
  }
}

.founder__portrait img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.founder__name {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
}

.founder__role {
  margin-top: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
}

.press {
  margin-top: 36px;
}

.press img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.press figcaption {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--dim);
}

/* ---------- Contact ---------- */

.contact {
  text-align: center;
  padding: clamp(48px, 7vw, 86px) clamp(22px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: clamp(20px, 3vw, 30px);
  background: radial-gradient(
      100% 120% at 50% 0%,
      rgba(37, 173, 228, 0.14),
      transparent 62%
    ),
    var(--surface);
}

.contact h2 {
  font-size: clamp(2rem, 5.6vw, 3.4rem);
  margin-bottom: 20px;
}

.contact p {
  max-width: 54ch;
  margin-inline: auto;
  color: var(--muted);
  font-weight: 300;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.socials {
  display: flex;
  gap: 10px;
}

.social {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.25s, border-color 0.25s, background 0.25s,
    transform 0.25s var(--ease);
}

.social:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.social svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: #090b0f;
  padding: 58px 0 44px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-footer__meta {
  font-size: 0.83rem;
  color: var(--dim);
  line-height: 1.9;
}

.site-footer__meta a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.25s;
}

.site-footer__meta a:hover {
  color: var(--brand);
}

.footer-lines {
  display: flex;
  height: 3px;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 34px;
}

.footer-lines span {
  flex: 1;
  background: var(--c);
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] {
  transition-delay: 0.08s;
}
.reveal[data-delay="2"] {
  transition-delay: 0.16s;
}
.reveal[data-delay="3"] {
  transition-delay: 0.24s;
}
.reveal[data-delay="4"] {
  transition-delay: 0.32s;
}
.reveal[data-delay="5"] {
  transition-delay: 0.4s;
}

/* ---------- 404 ---------- */

.oops {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px var(--gutter);
}

.oops__code {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 20vw, 11rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.35);
}

/* ---------- Responsive ---------- */

@media (max-width: 1150px) {
  .nav {
    display: none;
  }
  .stop__line {
    display: none;
  }
  .sec-head {
    gap: 16px;
  }
}

@media (max-width: 520px) {
  :root {
    --header-h: 92px;
  }
  .brand span {
    font-size: 1rem;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Device frame ----------
   The raw Android captures look like screen dumps on their own; the bezel
   reads them as "app running on a phone" instead. */

.device {
  position: relative;
  border-radius: clamp(18px, 2.2vw, 30px);
  padding: clamp(5px, 0.7vw, 9px);
  background: linear-gradient(165deg, #313845, #11151d 60%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.device img {
  width: 100%;
  display: block;
  border-radius: clamp(13px, 1.6vw, 22px);
  background: #0f1319;
}

/* Bezel bottom edge, so the frame doesn't look cut off under the crop. */
.device::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  translate: -50% 0;
  width: 58px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
}

.feature:hover .device,
.gallery__item:hover .device {
  transform: translateY(-6px);
  box-shadow: 0 40px 70px -34px rgba(0, 0, 0, 1),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Feature cards show the top of the phone only — the bezel runs off the card. */
.feature__shot .device {
  border-radius: 30px 30px 0 0;
  padding: 9px 9px 0;
  padding-bottom: 0;
  box-shadow: 0 -10px 40px -20px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.feature__shot .device img {
  border-radius: 22px 22px 0 0;
}

.gallery__item figcaption {
  font-size: 0.72rem;
}

.feature__shot .device::after {
  display: none;
}

/* ---------- Screenshot gallery ---------- */

.gallery {
  display: grid;
  gap: clamp(16px, 2vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.gallery__item {
  margin: 0;
}

.gallery__item figcaption {
  margin-top: 16px;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- Network ---------- */

.net {
  display: grid;
  gap: clamp(18px, 2.2vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.net-line {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.net-line--wide {
  grid-column: 1 / -1;
}

.net-line__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px clamp(20px, 2.4vw, 28px);
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--c, var(--brand)) 20%, transparent),
    transparent 70%
  );
}

.net-badge {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--c, var(--brand));
  color: #05121a;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.net-line__name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-right: auto;
}

.net-line__name small {
  display: block;
  margin-top: 3px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0;
}

.pill {
  flex: none;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pill--live {
  color: #48d6bf;
}
.pill--hold {
  color: #f0a63c;
}
.pill--build {
  color: #9aa3b4;
}

.net-line__body {
  padding: 22px clamp(20px, 2.4vw, 28px) 26px;
}

.stations {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.station {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.82rem;
  color: #d5dae3;
  line-height: 1.35;
}

.station::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--brand));
}

.station--term {
  border-color: color-mix(in srgb, var(--c, var(--brand)) 55%, transparent);
  background: color-mix(in srgb, var(--c, var(--brand)) 12%, transparent);
  color: #fff;
  font-weight: 500;
}

.station--soon {
  opacity: 0.55;
  border-style: dashed;
}

.net-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 300;
}

.net-meta b {
  color: var(--text);
  font-weight: 600;
}

.net-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
  font-size: 0.8rem;
  color: var(--muted);
}

.net-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.net-legend i {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: var(--c);
}

/* The captures differ in height (1024-1304px tall), which left the gallery
   rows ragged. A uniform box with object-fit: cover evens them up by cropping
   the bottom rather than distorting anything. */
.gallery .device img {
  aspect-ratio: 720 / 1180;
  object-fit: cover;
  object-position: 50% 0;
}

/* The only surviving founder photo is 300x300, so it must never render larger
   than that or it upscales. Below the two-column breakpoint the grid column
   goes full width, which was stretching it — cap it and keep it square. */
.founder__portrait {
  max-width: 300px;
}

.founder__portrait img {
  aspect-ratio: 1;
  object-fit: cover;
}

/* ---------- Site-wide photographic grade ----------
   The source photography is inconsistent: a warm Belgian street scene, a
   saturated TV-studio grab, a dusk rail shot. Grading them to one cool, slightly
   desaturated key makes the imagery read as a single set inside the dark palette
   instead of three borrowed pictures. App screenshots are deliberately excluded —
   those must stay colour-accurate. */

.hero__media img,
.founder__portrait img,
.press img {
  filter: saturate(0.76) contrast(1.06) brightness(0.94);
}

.founder__portrait,
.press {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

/* Cool tint from the top, ground shadow at the base, so each photo settles into
   the page rather than sitting on top of it. */
.founder__portrait::after,
.press::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 42%, rgba(11, 13, 18, 0.6) 100%),
    radial-gradient(
      130% 100% at 50% 0%,
      color-mix(in srgb, var(--brand) 16%, transparent),
      transparent 62%
    );
}

/* 300x300 is the largest surviving copy, so showing it smaller keeps it sharp
   on high-density screens. */
.founder__portrait {
  max-width: 260px;
}

/* ---------- Studio callout (TAIO Labs) ---------- */

.studio {
  display: block;
  margin-top: 36px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(
      120% 130% at 0% 0%,
      color-mix(in srgb, var(--brand) 14%, transparent),
      transparent 60%
    ),
    var(--surface);
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}

.studio:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  box-shadow: 0 26px 54px -32px rgba(0, 0, 0, 0.95);
}

.studio__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
}

.studio__name {
  display: block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.studio__tag {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--accent);
}

.studio__body {
  display: block;
  margin-top: 16px;
  max-width: 54ch;
  font-size: 0.93rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--muted);
}

.studio__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.studio__cta svg {
  fill: currentColor;
  transition: transform 0.3s var(--ease);
}

.studio:hover .studio__cta svg {
  transform: translateX(4px);
}

/* Nickname sits alongside the full name — smaller, in the brand accent, so the
   prose can switch to "Nico" straight after without explaining itself. */
.founder__alias {
  display: inline-block;
  font-size: 0.5em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--brand);
  vertical-align: middle;
  transform: translateY(-0.15em);
}

/* ---------- Origin photo ----------
   The founding image of the whole project, so it gets more room and weight than
   the other photography — full width of the shell, caption set as a pull quote. */

.origin {
  margin: 0 0 clamp(36px, 5vw, 60px);
  position: relative;
}

.origin img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  /* Same grade as the rest of the photography, but held a touch closer to the
     original since the washed-out look is the point of the caption. */
  filter: saturate(0.82) contrast(1.08) brightness(0.96);
}

.origin__cap {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  padding-left: clamp(16px, 2.4vw, 26px);
  border-left: 2px solid var(--pnr);
}

.origin__quote {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

.origin__note {
  max-width: 68ch;
  font-size: 0.93rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--muted);
}

@media (min-width: 900px) {
  .origin {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: clamp(28px, 3.4vw, 46px);
    align-items: center;
  }

  .origin__cap {
    margin-top: 0;
  }
}

/* ---------- Thanks ----------
   Names only. The 2018 site paired these three with stock photos and lorem
   ipsum bios, so there is nothing real to carry over except the credit itself. */

.thanks {
  display: grid;
  gap: clamp(14px, 1.8vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.thanks__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 26px clamp(22px, 2.6vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(
      90deg,
      color-mix(in srgb, var(--c, var(--brand)) 12%, transparent),
      transparent 65%
    ),
    var(--surface);
  transition: transform 0.35s var(--ease), border-color 0.3s;
}

.thanks__item:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--c, var(--brand)) 50%, transparent);
}

.thanks__dot {
  flex: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--c, var(--brand));
  background: var(--bg);
}

.in-view .thanks__dot,
.thanks__item.in-view .thanks__dot {
  background: var(--c, var(--brand));
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--c, var(--brand)) 18%, transparent);
}

.thanks__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- Proof images (HACKATREN) ----------
   Three sources with three different aspect ratios (portrait, square,
   landscape). A uniform box with object-fit: cover evens the row without
   distorting any of them; object-position is tuned per image inline. */

.proof {
  display: grid;
  gap: clamp(16px, 2.2vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: clamp(36px, 5vw, 60px);
}

.proof__item {
  margin: 0;
}

.proof__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  filter: saturate(0.82) contrast(1.05) brightness(0.95);
  transition: transform 0.4s var(--ease), border-color 0.3s, filter 0.4s;
}

.proof__item:hover img {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.26);
  filter: saturate(1) contrast(1.02) brightness(1);
}

.proof__item figcaption {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--dim);
  letter-spacing: 0.02em;
}

/* ---------- Press coverage ---------- */

.coverage {
  margin-top: clamp(34px, 4.5vw, 54px);
  padding-top: clamp(26px, 3vw, 36px);
  border-top: 1px solid var(--line-soft);
}

.coverage__lede {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.coverage__list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.coverage__item {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--c, var(--brand));
  border-radius: 0 12px 12px 0;
  background: var(--surface);
}

.coverage__outlet {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c, var(--brand));
  margin-bottom: 8px;
}

.coverage__what {
  display: block;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--muted);
}

.coverage__what a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.25s;
}

.coverage__what a:hover {
  color: var(--brand);
}

/* ---------- Language toggle ---------- */

.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font: inherit;
}

.lang:hover {
  border-color: rgba(255, 255, 255, 0.26);
}

.lang__opt {
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--dim);
  transition: color 0.25s, background 0.25s;
}

.lang__opt.is-on {
  color: #04121a;
  background: var(--text);
}

@media (max-width: 520px) {
  .lang__opt {
    padding: 5px 9px;
    font-size: 0.66rem;
  }
}

/* ---------- Mobile navigation ----------
   The desktop nav is hidden below 980px, so without this there is no section
   navigation at all on phones and small tablets. */

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.menu-btn span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mnav {
  position: fixed;
  inset: var(--header-h) 0 auto;
  z-index: 99;
  padding: 18px var(--gutter) 28px;
  background: rgba(11, 13, 18, 0.96);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.25s var(--ease);
}

.mnav.is-open {
  transform: none;
  opacity: 1;
}

.mnav__links {
  display: grid;
  gap: 2px;
  margin-bottom: 18px;
}

.mnav__links a {
  padding: 13px 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  border-left: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.mnav__links a:hover,
.mnav__links a:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: var(--brand);
}

.mnav .btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 1150px) {
  .menu-btn {
    display: flex;
  }
  /* The CTA lives inside the panel on small screens. */
  .site-header__inner > .btn {
    display: none;
  }
}

@media (min-width: 1151px) {
  .mnav {
    display: none !important;
  }
}



/* ---------- Relaunch signup ---------- */

.signup {
  max-width: 720px;
  margin: 34px auto 0;
  text-align: left;
}

.signup__row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 880px) {
  .signup__row {
    /* A floor on the email column, so it cannot be squeezed to the point where
       the label no longer fits beside it. */
    grid-template-columns: minmax(190px, 1fr) auto;
    align-items: end;
  }
}

.signup__field {
  display: grid;
  gap: 7px;
}

.signup__label {
  /* "EMAIL ADDRESS" wrapped to two lines in the mid-width band, which threw the
     two fields out of alignment with each other. */
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.signup input[type="email"],
.signup select {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: 400 0.95rem var(--font-body);
  transition: border-color 0.25s, background 0.25s;
}

.signup select {
  /* keep the native arrow legible on the dark ground */
  color-scheme: dark;
  /* Wide enough for the longest option in either language. */
  min-width: 11rem;
}

.signup input[type="email"]::placeholder {
  color: var(--dim);
}

.signup input[type="email"]:focus,
.signup select:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(255, 255, 255, 0.07);
}

.signup input[type="email"]:user-invalid {
  border-color: var(--pnr);
}

.signup .btn {
  justify-content: center;
}

.signup__consent {
  margin-top: 14px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--dim);
}

.signup__status {
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  min-height: 1.2em;
}

.signup__status.is-ok {
  color: var(--accent);
}

.signup__status.is-err {
  color: #ff8b6b;
}

/* Honeypot: off-screen rather than display:none, which bots skip. */
.signup__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup[hidden] {
  display: none;
}

/* ---------- Nav as a transit line ----------
   The links are stations on a rail, and a train rides between them as the
   active section changes. */

.nav {
  position: relative;
  padding-bottom: 17px;
  margin-top: 17px; /* keeps the links optically centred in the header */
}

.nav__rail {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 7px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.13);
}

/* Station dot under each link */
.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  translate: -50% 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
  transition: box-shadow 0.35s var(--ease), background 0.35s var(--ease);
  z-index: 1;
}

.nav a.is-active::after {
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--brand), 0 0 0 6px rgba(37, 173, 228, 0.18);
}

.nav__train {
  position: absolute;
  bottom: 1px;
  left: 0;
  width: 36px;
  height: 16px;
  opacity: 0;
  /* translate is set by JS; the transition is what makes it travel */
  transition: opacity 0.4s, scale 0.25s var(--ease);
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}

.nav__train.is-ready {
  opacity: 1;
}

/* Facing the direction of travel. */
.nav__train.is-reversed {
  scale: -1 1;
}

@media (prefers-reduced-motion: reduce) {
  .nav__train {
    transition: opacity 0.2s;
  }
}

/* ---------- Mobile menu as a line ---------- */

.mnav__links {
  position: relative;
  padding-left: 22px;
}

.mnav__links::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.13);
}

.mnav__links a {
  position: relative;
  border-left: 0;
}

.mnav__links a::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 50%;
  translate: 0 -50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.24);
  transition: box-shadow 0.3s, background 0.3s;
}

.mnav__links a.is-active::before {
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--brand), 0 0 0 5px rgba(37, 173, 228, 0.18);
}

.mnav__links a:hover,
.mnav__links a:focus-visible {
  border-left-color: transparent;
}

/* ---------- Mobile progress rail ----------
   The desktop nav is hidden on phones, so the train would have nowhere to run.
   This gives it a rail across the bottom of the header, always visible, with a
   station dot per section. */

.minirail {
  display: none;
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 9px;
  height: 14px;
}

.minirail__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.13);
}

.minirail__dot {
  position: absolute;
  top: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  translate: -50% 0;
  background: var(--bg);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.24);
  transition: background 0.3s, box-shadow 0.3s;
}

.minirail__dot.is-on {
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--brand);
}

.minirail__train {
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 12px;
  opacity: 0;
  transition: opacity 0.4s, scale 0.25s var(--ease);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
}

.minirail__train.is-ready {
  opacity: 1;
}

.minirail__train.is-reversed {
  scale: -1 1;
}

@media (max-width: 1150px) {
  :root {
    --header-h: 98px;
  }
  .minirail {
    display: block;
  }
  /* Keeps the logo row clear of the rail rather than squeezing it. */
  .site-header__inner {
    padding-bottom: 30px;
  }
}

/* Anchored sections must clear the fixed header when jumped to. */
section[id],
main[id] {
  scroll-margin-top: calc(var(--header-h) + 14px);
}

/* The rail dots are now links, so they need a finger-sized hit area even
   though the dot itself stays small. */
.minirail__dot {
  cursor: pointer;
}

.minirail__dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 34px;
  height: 22px;
}

.minirail__dot:hover,
.minirail__dot:focus-visible {
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--brand), 0 0 0 6px rgba(37, 173, 228, 0.2);
}

.minirail__dot:focus-visible {
  outline: none;
}

/* ---------- Reading measure ----------
   Body copy was running to 91-155 characters per line in the wider containers.
   Comfortable reading is 45-75, so cap the measure wherever prose can stretch. */

/* Applied to the paragraphs too, not just their container, or the child font
   size makes the container's ch-based cap meaningless. Inter's "0" glyph is
   wider than its average character, so 54ch measures out at ~70 real
   characters per line, which is the target. */
.prose,
.prose p,
.note,
.origin__note,
.studio__body,
.coverage__what {
  max-width: 54ch;
}

/* The under-construction card is full width, so its paragraphs were the worst
   offenders on the page at ~155 characters per line. */
.net-line--wide .prose,
.net-line--wide .prose p {
  max-width: 58ch;
}

/* ---------- Tap targets ----------
   The rail dots are 6px of paint; the touch area has to be finger-sized. */
.minirail__dot::after {
  width: 40px;
  height: 24px;
}

/* Inline links that act as real destinations rather than prose asides. */
.site-footer__meta a,
.coverage__what a,
.mailfallback a {
  display: inline-block;
  padding-block: 3px;
}

/* ---------- Mail fallback ----------
   A mailto: link does nothing at all on a machine with no mail client, and
   fails silently. The address is shown in full so there is always a path. */

.mailfallback {
  margin-top: 22px;
  font-size: 0.86rem;
  color: var(--muted);
}

.mailfallback a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.mailfallback a:hover {
  color: var(--brand);
}

.copy-btn {
  margin-left: 10px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: 600 0.72rem var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.copy-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.copy-btn.is-done {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

/* display:inline-flex on .btn overrides the UA [hidden] rule, so state it. */
.btn[hidden],
[hidden] {
  display: none !important;
}

/* ---------- Optional message ---------- */

.signup__field--msg {
  margin-top: 14px;
}

.signup textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: 400 0.95rem/1.6 var(--font-body);
  resize: vertical;
  min-height: 84px;
}

.signup textarea::placeholder {
  color: var(--dim);
}

.signup textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(255, 255, 255, 0.07);
}

.signup__submit {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
}

@media (min-width: 880px) {
  .signup__submit {
    width: auto;
  }
}
