/* ---------- Custom fonts ---------- */
@font-face {
  font-family: "After";
  src: url("assets/fonts/After-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neutiva";
  src: url("assets/fonts/Neutiva-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neutiva";
  src: url("assets/fonts/Neutiva-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Neutiva";
  src: url("assets/fonts/Neutiva-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neutiva";
  src: url("assets/fonts/Neutiva-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Solo Sans";
  src: url("assets/fonts/solosans-light-webfont.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Solo Sans";
  src: url("assets/fonts/solosans-regular-webfont.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Solo Sans";
  src: url("assets/fonts/solosans-bold-webfont.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Surgena";
  src: url("assets/fonts/Surgena-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Surgena";
  src: url("assets/fonts/Surgena-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Surgena";
  src: url("assets/fonts/Surgena-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Surgena";
  src: url("assets/fonts/Surgena-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Surgena";
  src: url("assets/fonts/Surgena-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Surgena";
  src: url("assets/fonts/Surgena-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Heliora";
  src: url("assets/fonts/Heliora-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Heliora";
  src: url("assets/fonts/Heliora-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Heliora";
  src: url("assets/fonts/Heliora-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Heliora";
  src: url("assets/fonts/Heliora-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --page-bg: #f4f2ec;
  --mint: #c9e6c9;
  --mint-deep: #b1d8b3;
  --cream: #f6f3e8;
  --lilac: #e3e3ee;
  --ink: #14201a;
  --ink-soft: #3b4842;
  --ink-mute: #6c766f;
  --line: #1420201a;
  --footer-bg: #14201a;
  --footer-ink: #c9e6c9;

  --radius-block: 28px;
  --radius-card: 20px;

  --max-w: 1280px;
  --pad-x: clamp(16px, 3vw, 32px);
  --block-pad-y: clamp(40px, 7vw, 88px);
  --block-pad-x: clamp(28px, 5vw, 80px);

  /* === ACTIVE FONTS ===
     Body and display both use Heliora.
     Swap either independently by editing the string below. */
  --font-active: "Heliora";
  --font-display-active: "Heliora";

  --font-sans: var(--font-active), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: var(--font-display-active), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.005em;
}

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

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

h1, h2, h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

p {
  margin: 0;
}

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  background: var(--page-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(20, 32, 26, 0.08);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 14px;
  height: 14px;
  background: var(--mint-deep);
  border-radius: 4px;
  display: inline-block;
  transform: rotate(45deg);
}

.site-nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  font-size: 15px;
  color: var(--ink);
}

.site-nav a {
  position: relative;
  padding: 4px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

/* ---------- Page (block stack) ---------- */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 8px var(--pad-x) 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- Block (rounded color slab) ---------- */
.block {
  position: relative;
  border-radius: var(--radius-block);
  padding: var(--block-pad-y) var(--block-pad-x);
  overflow: hidden;
  border: 1px solid rgba(20, 32, 26, 0.10);
}

.block--mint  { background: linear-gradient(0deg, #e6f7ff 0%, #e9ffe9 100%); }
.block--cream { background: var(--cream); }
.block--lilac { background: var(--lilac); }

/* ---------- Dot tag (Iso style) ---------- */
.dot-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}

.dot-tag__dot {
  width: 9px;
  height: 9px;
  border-radius: 1.5px;
  background: var(--ink);
  display: inline-block;
}

.dot-tag--top-right,
.dot-tag--top-left {
  position: absolute;
  top: 28px;
}

.dot-tag--top-right { right: 32px; }
.dot-tag--top-left  { left: 32px; }

/* Headlines that wrap nicely */
.balance {
  text-wrap: balance;
}

/* ---------- Display type ---------- */
.display {
  font-family: var(--font-display);
  font-size: clamp(56px, 10.5vw, 168px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.005em;
  margin: 0;
}

.display--md {
  font-size: clamp(44px, 7.5vw, 116px);
  letter-spacing: -0.04em;
  line-height: 0.96;
}

.display--sm {
  font-size: clamp(36px, 5.5vw, 80px);
  letter-spacing: -0.035em;
}

.quote blockquote,
.footer-mail {
  font-family: var(--font-display);
  font-weight: 400;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 6vw, 72px);
  min-height: clamp(420px, 70vh, 720px);
  padding-top: clamp(60px, 10vw, 120px);
}

.hero .display {
  align-self: end;
}

.hero-aside {
  align-self: end;
  justify-self: end;
  max-width: 36ch;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 16px;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }
  .hero .display { grid-column: 1; }
  .hero-aside    { grid-column: 2; }
}

/* ---------- CTA (label + arrow circle) ---------- */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  align-self: flex-start;
  padding: 0;
  color: var(--ink);
  font-weight: 500;
}

.cta__label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cta__icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.cta__icon svg {
  width: 18px;
  height: 18px;
  display: block;
  transition: transform 0.25s ease;
}

.cta:hover .cta__icon {
  background: var(--ink);
  color: var(--mint);
}

.cta:hover .cta__icon svg {
  transform: translateX(2px);
}

/* ---------- Split block ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 5vw, 64px);
  padding-top: clamp(72px, 9vw, 120px);
  padding-bottom: clamp(72px, 9vw, 120px);
}

.split-left .lede {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--ink);
  max-width: 22ch;
}

.split-right p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
}

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

/* ---------- Statement ---------- */
.statement {
  padding-top: clamp(72px, 9vw, 132px);
  padding-bottom: clamp(72px, 9vw, 132px);
}

/* ---------- Three-up (merged-border editorial grid) ---------- */
.block--bare {
  position: relative;
  padding: clamp(40px, 7vw, 80px) 0 clamp(8px, 1vw, 12px);
}

.three-up__head {
  padding: 0 clamp(8px, 2vw, 24px) clamp(28px, 4vw, 48px);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.card-grid > * {
  border-top: 1px solid var(--ink);
  margin-top: -1px;
}

.card {
  background: transparent;
  padding: clamp(28px, 3.5vw, 44px) clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: 320px;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  background: rgba(20, 32, 26, 0.03);
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow: 0 16px 32px rgba(20, 32, 26, 0.08);
}

.card:nth-child(even):hover {
  transform: translateY(-6px) rotate(0.4deg);
}

.card__top {
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex: 1;
}

.card__title {
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.08;
  font-weight: 500;
  margin: 0;
  max-width: 22ch;
}

.card__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft, rgba(20, 32, 26, 0.7));
  max-width: 32ch;
}

@media (min-width: 760px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    border-left: 1px solid var(--ink);
    border-right: 1px solid var(--ink);
  }
  .card-grid > * {
    border-top: none;
    border-left: 1px solid var(--ink);
    margin-top: 0;
    margin-left: -1px;
  }
}

/* ---------- Now block ---------- */
.now {
  padding-top: clamp(72px, 9vw, 120px);
}

.now-list {
  margin-top: clamp(36px, 6vw, 64px);
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(20, 32, 26, 0.12);
}

.now-list li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(20, 32, 26, 0.12);
}

.now-label {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

.now-body {
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.02em;
  font-weight: 500;
}

@media (min-width: 760px) {
  .now-list li {
    grid-template-columns: 200px 1fr;
    gap: 24px;
    align-items: baseline;
  }
}

/* ---------- Quote ---------- */
.quote {
  padding-top: clamp(72px, 9vw, 120px);
  padding-bottom: clamp(72px, 9vw, 120px);
}

.quote blockquote {
  margin: 0;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 500;
  max-width: 22ch;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  margin-top: 14px;
  border-top-left-radius: var(--radius-block);
  border-top-right-radius: var(--radius-block);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 100px) clamp(28px, 5vw, 80px) 36px;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 8vw, 96px);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-tag {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--footer-ink);
  border: 1px solid rgba(201, 230, 201, 0.35);
  padding: 6px 12px;
  border-radius: 999px;
  align-self: flex-start;
}

.footer-mail {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 112px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.95;
  align-self: flex-start;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.footer-mail:hover {
  border-bottom-color: var(--footer-ink);
}

.footer-signature {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid rgba(201, 230, 201, 0.18);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(201, 230, 201, 0.55);
}

.footer-signature__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--footer-ink);
  display: inline-block;
  animation: signature-pulse 2.4s ease-in-out infinite;
}

@keyframes signature-pulse {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-signature__dot { animation: none; opacity: 0.8; }
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(201, 230, 201, 0.18);
  font-size: 14px;
  color: rgba(201, 230, 201, 0.7);
}

.footer-logo {
  font-weight: 600;
  color: var(--footer-ink);
  font-size: 16px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.footer-nav a:hover {
  color: var(--footer-ink);
}

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

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 640px) {
  .site-nav { gap: 14px; font-size: 14px; }
  .tag { top: 16px; font-size: 11px; }
  .tag--top-right { right: 16px; }
  .tag--top-left  { left: 16px; }
}

/* ---------- Spark page ---------- */
.button-reset {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.site-nav [aria-current="page"]::after {
  transform: scaleX(1);
}

.spark-page {
  counter-reset: spark;
}

.spark-hero {
  min-height: clamp(420px, 66vh, 680px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 6vw, 72px);
  padding-top: clamp(68px, 10vw, 128px);
}

.spark-hero .display {
  align-self: end;
}

@media (min-width: 900px) {
  .spark-hero {
    grid-template-columns: 1.35fr 1fr;
    align-items: end;
  }
}

.featured-spark {
  padding-top: clamp(76px, 9vw, 132px);
  padding-bottom: clamp(56px, 7vw, 96px);
}

.featured-spark blockquote {
  margin: 0;
  max-width: 17ch;
  font-family: var(--font-display);
  font-size: clamp(38px, 7vw, 104px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.spark-meta {
  margin-top: clamp(24px, 4vw, 44px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--ink-soft);
}

.spark-meta span:last-child {
  border: 1px solid rgba(20, 32, 26, 0.18);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.save-spark {
  margin-top: 26px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  padding: 12px 18px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.save-spark:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-1px);
}

.spark-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spark-head p {
  color: var(--ink-soft);
  max-width: 42ch;
}

.spark-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.spark-card {
  padding: clamp(24px, 3vw, 36px);
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--ink);
  margin-top: -1px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.spark-card:hover {
  background: rgba(20, 32, 26, 0.035);
}

.spark-card p {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.spark-card div,
.favorite-item div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-mute);
  font-size: 13px;
}

.spark-card div span:last-child {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (min-width: 760px) {
  .spark-grid {
    grid-template-columns: repeat(2, 1fr);
    border-left: 1px solid var(--ink);
    border-right: 1px solid var(--ink);
  }

  .spark-card {
    border-left: 1px solid var(--ink);
    margin-left: -1px;
  }
}

@media (min-width: 1100px) {
  .spark-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.favorites-panel {
  padding-top: clamp(72px, 9vw, 120px);
}

.favorites-list {
  margin-top: clamp(32px, 5vw, 56px);
  display: grid;
  gap: 14px;
}

.favorites-list > p {
  color: var(--ink-soft);
  font-size: clamp(20px, 2.2vw, 28px);
}

.favorite-item {
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(20, 32, 26, 0.12);
  border-radius: 18px;
  padding: 22px;
}

.favorite-item p {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.favorite-item button {
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Lab components ---------- */
::selection {
  background: var(--mint-deep);
  color: var(--ink);
}

/* Version pill (header) */
.version-pill {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(20, 32, 26, 0.25);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--ink-soft);
  transition: transform 0.25s ease, background 0.25s ease;
}

.logo:hover .version-pill {
  transform: rotate(-6deg) translateY(-1px);
  background: var(--mint);
}

/* Dot tags get a tiny spin on hover */
.dot-tag__dot {
  transition: transform 0.35s ease;
}

.dot-tag:hover .dot-tag__dot {
  transform: rotate(135deg);
}

/* Stickers */
.sticker-shelf {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

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

.sticker {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--cream);
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 2px 0 rgba(20, 32, 26, 0.16);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  will-change: transform;
}

.sticker:active {
  cursor: grabbing;
}

.sticker--mint  { background: var(--mint-deep); }
.sticker--lilac { background: var(--lilac); }
.sticker--cream { background: var(--cream); }

@media (min-width: 900px) {
  .sticker-shelf {
    position: absolute;
    top: clamp(70px, 9vw, 116px);
    left: var(--block-pad-x);
    z-index: 5;
  }
}

/* Scribbles (margin notes) */
.scribble {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-mute);
  transform: rotate(-2deg);
  max-width: 30ch;
}

.scribble--shelf {
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  margin-left: 4px;
}

.scribble-arrow {
  width: 34px;
  height: 22px;
  color: var(--ink-mute);
}

.hero-greeting {
  margin-bottom: -6px;
}

.split-left .scribble {
  margin-top: 18px;
}

.now .scribble {
  margin-top: 12px;
}

/* Motto lines */
.motto-line {
  display: inline-block;
  transition: transform 0.25s ease;
}

.motto-line:hover {
  transform: rotate(-1deg) translateY(-2px);
}

.motto-ship {
  border: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

.motto-ship:hover {
  transform: rotate(1deg) translateY(-3px);
}

.scribble--motto {
  margin-top: clamp(18px, 3vw, 30px);
}

/* About font easter egg */
.egg-fonts {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  padding: 0 2px;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.egg-fonts:hover {
  background: var(--mint);
}

/* Experiment 03 card */
.card--experiment {
  background: var(--lilac);
  outline: 1.5px dashed rgba(20, 32, 26, 0.35);
  outline-offset: -12px;
}

.card--experiment:hover {
  background: var(--lilac);
}

.progress {
  height: 6px;
  max-width: 220px;
  border-radius: 999px;
  background: rgba(20, 32, 26, 0.12);
  overflow: hidden;
  margin-top: 4px;
}

.progress__bar {
  height: 100%;
  width: 62%;
  border-radius: inherit;
  background: var(--ink);
  transform-origin: left center;
}

.exp-status {
  align-self: flex-start;
  border: 1px dashed var(--ink-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  padding: 11px 18px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.exp-status:hover {
  transform: rotate(-2deg);
  background: rgba(255, 255, 255, 0.5);
}

/* Quote CTA */
.quote__cta {
  margin-top: clamp(28px, 4vw, 44px);
}

/* Footer version + changelog popover */
.footer-signature {
  position: relative;
}

.footer-version {
  border: 1px solid rgba(201, 230, 201, 0.35);
  background: transparent;
  color: inherit;
  font: inherit;
  border-radius: 999px;
  padding: 2px 9px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-version:hover,
.footer-version[aria-expanded="true"] {
  color: var(--footer-ink);
  border-color: var(--footer-ink);
}

.changelog-pop {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
  background: #0e1813;
  border: 1px solid rgba(201, 230, 201, 0.25);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: rgba(201, 230, 201, 0.85);
}

.changelog-pop[hidden] {
  display: none;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: var(--mint);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 80;
  max-width: min(86vw, 480px);
  text-align: center;
}

.toast.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Cursor follower (desktop pointers only) */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  z-index: 90;
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-dot { display: none; }
}

/* Confetti */
.confetti-piece {
  position: fixed;
  top: 0;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 70;
}

/* Split-text spans (built by script.js) */
.word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.06em 0.04em 0.14em 0;
  margin: -0.06em -0.04em -0.14em 0;
}

.word {
  display: inline-block;
  will-change: transform;
}

/* Small screens: header wraps to two rows so the nav never overflows */
@media (max-width: 640px) {
  .site-header {
    flex-wrap: wrap;
    row-gap: 10px;
  }
  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
}

/* ---------- Pixel garden (claude.html) ---------- */
.garden-wrap {
  margin-top: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(20, 32, 26, 0.18);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.45);
}

#garden {
  display: block;
  cursor: crosshair;
}

.garden-controls {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.garden-controls .save-spark {
  margin-top: 0;
}

/* ---------- Wide "loading" card (experiment 04) ---------- */
.card--wide {
  min-height: auto;
}

@media (min-width: 760px) {
  .card--wide {
    grid-column: 1 / -1;
    border-top: 1px solid var(--ink);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
  }
  .card--wide .card__top {
    flex-direction: row;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    flex: 1;
  }
}

/* ---------- Field guide (index) ---------- */
.guide-list .now-label a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  color: var(--ink);
  font-weight: 500;
}

.guide-list .now-label a:hover {
  background: var(--mint);
  border-radius: 4px;
}

/* ---------- Lab pet (pet.html) ---------- */
.pet-stage {
  margin-top: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(20, 32, 26, 0.18);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.45);
}

#petCanvas {
  display: block;
  cursor: pointer;
}

.pet-status {
  margin-top: 14px;
  min-height: 20px;
}

.pet-name-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pet-name-input {
  border: 1px solid rgba(20, 32, 26, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  padding: 11px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  width: 150px;
}

.pet-name-input:focus {
  outline: 2px solid var(--mint-deep);
  outline-offset: 1px;
  border-color: transparent;
}

/* ---------- Instrument panel (panel.html) ---------- */
.panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 900px) {
  .panel-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.instrument {
  position: relative;
  border-radius: var(--radius-block);
  border: 1px solid rgba(20, 32, 26, 0.10);
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 300px;
}

.instrument--cream { background: var(--cream); }
.instrument--mint  { background: linear-gradient(0deg, #e6f7ff 0%, #e9ffe9 100%); }
.instrument--lilac { background: var(--lilac); }
.instrument--ink   { background: var(--ink); color: var(--mint); }
.instrument--ink .dot-tag { color: var(--mint); }
.instrument--ink .dot-tag__dot { background: var(--mint); }
.instrument--ink .scribble { color: rgba(201, 230, 201, 0.6); }

.instrument__title {
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.02em;
  font-weight: 500;
}

.instrument__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
}

/* The forbidden button */
.danger-button {
  align-self: center;
  width: 128px;
  height: 128px;
  border-radius: 999px;
  border: 0;
  background: #e07a5f;
  box-shadow: 0 7px 0 #b85c46;
  color: #fff8f4;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.danger-button:active {
  transform: translateY(6px);
  box-shadow: 0 1px 0 #b85c46;
}

.danger-count {
  text-align: center;
}

/* Oscilloscope */
.scope {
  display: block;
  width: 100%;
  height: 170px;
  border-radius: var(--radius-card);
  background: #0e1813;
  border: 1px solid rgba(201, 230, 201, 0.2);
}

.scope-controls {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.scope-controls label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scope-controls input[type="range"] {
  accent-color: var(--mint-deep);
  width: 140px;
}

/* Switch wall */
.switch-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 15px;
  font-weight: 500;
}

.switch .switch-note {
  font-size: 12px;
  color: var(--ink-mute);
  font-weight: 400;
  margin-left: 8px;
}

.switch input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: rgba(20, 32, 26, 0.18);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
  margin: 0;
}

.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 32, 26, 0.3);
  transition: transform 0.2s ease;
}

.switch input:checked {
  background: var(--mint-deep);
}

.switch input:checked::after {
  transform: translateX(22px);
}

/* Vibe meter */
.gauge {
  position: relative;
  width: 190px;
  height: 95px;
  align-self: center;
}

.gauge::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 16px solid var(--mint-deep);
  border-bottom: none;
  border-radius: 999px 999px 0 0;
}

.gauge-needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 3px;
  height: 78px;
  border-radius: 2px;
  background: var(--ink);
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(78deg);
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gauge-label {
  text-align: center;
}

/* Panel page-wide effects */
html.fx-flip .page {
  transform: rotate(180deg);
}

html.fx-invert {
  filter: invert(1) hue-rotate(180deg);
}

html.fx-wiggle h1,
html.fx-wiggle h2,
html.fx-wiggle h3,
html.fx-wiggle .instrument__title {
  animation: lab-wiggle 0.5s ease-in-out infinite alternate;
}

@keyframes lab-wiggle {
  from { transform: rotate(-1deg); }
  to   { transform: rotate(1.4deg); }
}

html.fx-serious * {
  border-radius: 0 !important;
}

html.fx-serious .page,
html.fx-serious .site-header,
html.fx-serious .site-footer {
  filter: grayscale(1);
}

/* ---------- Noise room (noise.html) ---------- */
.block--ink-room {
  background: var(--ink);
  color: var(--mint);
  border-color: rgba(201, 230, 201, 0.2);
}

.block--ink-room .dot-tag { color: var(--mint); }
.block--ink-room .dot-tag__dot { background: var(--mint); }
.block--ink-room .scribble { color: rgba(201, 230, 201, 0.55); }

.block--ink-room .save-spark {
  border-color: rgba(201, 230, 201, 0.5);
  color: var(--mint);
}

.block--ink-room .save-spark:hover {
  background: var(--mint);
  color: var(--ink);
}

.seq-grid {
  margin-top: clamp(24px, 4vw, 40px);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  max-width: 720px;
}

.seq-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid rgba(201, 230, 201, 0.25);
  background: rgba(201, 230, 201, 0.07);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.seq-cell:hover {
  border-color: rgba(201, 230, 201, 0.6);
}

.seq-cell.is-on {
  background: var(--mint-deep);
  border-color: var(--mint-deep);
  box-shadow: 0 0 14px rgba(177, 216, 179, 0.45);
}

.seq-cell.is-now {
  transform: scale(0.92);
  border-color: var(--mint);
}

.seq-cell.is-on.is-now {
  background: var(--mint);
}

.seq-controls {
  margin-top: 24px;
}

.seq-tempo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(201, 230, 201, 0.7);
}

.seq-tempo input {
  accent-color: var(--mint-deep);
  width: 140px;
}

/* ---------- Gene lab (pet.html) ---------- */
.gene-lab {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gene-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.swatch {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(20, 32, 26, 0.3);
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.swatch:hover {
  transform: scale(1.12);
}

.swatch.is-active {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.gene-pill {
  margin-top: 0;
}

.gene-pill.is-active {
  background: var(--ink);
  color: var(--cream);
}

/* ---------- Quantum wing (quantum.html) ---------- */
.block--ink-room .hero-aside {
  color: rgba(201, 230, 201, 0.75);
}

.cta--ink {
  color: var(--mint);
}

.cta--ink .cta__icon {
  border-color: var(--mint);
}

.cta--ink:hover .cta__icon {
  background: var(--mint);
  color: var(--ink);
}

.q-stage {
  margin-top: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(201, 230, 201, 0.2);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #0e1813;
}

#slitCanvas {
  display: block;
}

.switch--ink {
  color: var(--mint);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.switch--ink input {
  background: rgba(201, 230, 201, 0.2);
}

.switch--ink input:checked {
  background: #e07a5f;
}

.block--ink-room .garden-controls {
  align-items: center;
}

.q-cat,
.q-cloud {
  display: block;
  width: 100%;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(20, 32, 26, 0.12);
}

.q-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 12px 0;
}

.q-link {
  flex: 1;
  max-width: 120px;
  height: 0;
  border-top: 1.5px dashed rgba(20, 32, 26, 0.4);
}

.q-orb {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: rgba(255, 255, 255, 0.55);
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.3s ease;
}

.q-orb:hover {
  transform: scale(1.06);
}

.q-orb.is-up {
  background: var(--mint-deep);
}

.q-orb.is-down {
  background: #e07a5f;
  color: #fff8f4;
}

.q-slider {
  color: var(--ink-soft);
}

.q-slider input {
  accent-color: var(--ink);
  width: 100%;
  max-width: 280px;
}

/* ---------- Universe splitter (quantum.html) ---------- */
.splitter-form {
  margin-top: clamp(20px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 520px;
}

.splitter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(201, 230, 201, 0.7);
}

.splitter-input {
  border: 1px solid rgba(201, 230, 201, 0.35);
  border-radius: 999px;
  background: rgba(201, 230, 201, 0.07);
  padding: 13px 18px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--mint);
}

.splitter-input::placeholder {
  color: rgba(201, 230, 201, 0.35);
}

.splitter-input:focus {
  outline: 2px solid var(--mint-deep);
  outline-offset: 1px;
  border-color: transparent;
}

.splitter-go {
  align-self: flex-start;
}

.universe-pair {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 760px;
}

@media (min-width: 760px) {
  .universe-pair {
    grid-template-columns: 1fr 1fr;
  }
}

.universe-card {
  border: 1px solid var(--mint-deep);
  border-radius: var(--radius-card);
  background: rgba(177, 216, 179, 0.1);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.universe-card--elsewhere {
  border-color: rgba(201, 230, 201, 0.25);
  background: transparent;
  opacity: 0.7;
}

.universe-tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(201, 230, 201, 0.6);
}

.universe-text {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.02em;
  color: var(--mint);
}

#splitStatus,
#splitStats {
  margin-top: 14px;
}

/* ---------- Entropy tap (qrng.html) ---------- */
.tap-stage {
  margin-top: clamp(24px, 4vw, 40px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

@media (min-width: 900px) {
  .tap-stage {
    grid-template-columns: 230px 1fr;
  }
}

.tap-video {
  width: 100%;
  max-width: 230px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card);
  border: 1px solid rgba(201, 230, 201, 0.25);
  background: #0e1813;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.tap-video.is-live {
  opacity: 1;
}

.tap-readout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bit-lane {
  display: block;
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(201, 230, 201, 0.2);
  background: #0e1813;
}

.pool-meter {
  height: 8px;
  max-width: 420px;
  border-radius: 999px;
  background: rgba(201, 230, 201, 0.15);
  overflow: hidden;
}

.pool-meter__bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--mint-deep);
  transition: width 0.3s ease;
}

.result-line {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: -0.02em;
  color: var(--mint);
  min-height: 1.3em;
}

.block--ink-room .inline-link {
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 3px;
}
