@import url("assets/tokens.css");

:root {
  --page-max: 1240px;
  --copy-max: 720px;
  --page-gutter: clamp(20px, 4vw, 56px);
  --bg: #f8f5f1;
  --surface: #ffffff;
  --surface-soft: #f1ece5;
  --text: #3a3f48;
  --text-strong: #22262c;
  --text-secondary: #5e6571;
  --text-weak: #797f89;
  --accent: #e8862c;
  --accent-bright: #f09840;
  --accent-soft: #f7ddc5;
  /* Tabby Ink 深一阶：品牌 #AD5B10 只在纯白上够 AA，页面底色是 Fur White 与浅橘徽章 */
  --accent-dark: #934909;
  --link: #255c8c;
  --blue: #337aaf;
  --border: #d9d0c4;
  --border-soft: #eae3d8;
  --dark: #252a32;
  --dark-deep: #1c1c1e;
  --dark-text: #f8f5f1;
  --shadow: 0 28px 80px rgba(61, 48, 32, 0.13);
  --shadow-small: 0 12px 36px rgba(61, 48, 32, 0.1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  /* Motion — strong curves per Emil Kowalski's animation standards.
     Built-in ease/ease-out are too weak; these are the shared tokens
     every transition on the site pulls from. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --header-bg: rgba(248, 245, 241, 0.88);
  --font-body: "IBM Plex Sans", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Avenir Next", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --bg: #1c1c1e;
  --surface: #2c2c2e;
  --surface-soft: #252527;
  --text: #e8e6e1;
  --text-strong: #ffffff;
  --text-secondary: #b3b0aa;
  --text-weak: #8f929a;
  --accent: #f09840;
  --accent-bright: #f4a756;
  --accent-soft: #4b3728;
  --accent-dark: #f09840;
  --link: #82bce4;
  --blue: #5ba3d9;
  --border: #505055;
  --border-soft: #3a3a3d;
  --dark: #111113;
  --dark-deep: #0b0b0c;
  --dark-text: #f8f5f1;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --shadow-small: 0 12px 36px rgba(0, 0, 0, 0.28);
  --header-bg: rgba(28, 28, 30, 0.88);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to right, color-mix(in srgb, var(--text) 4%, transparent) 1px, transparent 1px);
  background-size: 80px 100%;
  content: "";
  pointer-events: none;
}

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

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

::selection {
  background: var(--accent);
  color: #1c1c1e;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text-strong);
  font-family: var(--font-display);
  text-wrap: balance;
}

h1,
h2 {
  /* CJK glyphs fill the em box, so display type needs near-zero tracking. */
  letter-spacing: -0.012em;
}

p {
  text-wrap: pretty;
}

.sr-only {
  position: absolute;
  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: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--dark-deep);
  color: #ffffff;
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.section-shell,
.header-inner,
.footer-inner {
  width: min(var(--page-max), calc(100% - (var(--page-gutter) * 2)));
  margin-inline: auto;
}

.eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 22px;
  color: var(--text-weak);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.4;
}

.eyebrow span {
  color: var(--accent-dark);
  white-space: nowrap;
}

.eyebrow::before {
  width: 32px;
  height: 2px;
  flex: none;
  background: var(--accent);
  content: "";
}

.section-heading {
  margin-bottom: clamp(44px, 7vw, 84px);
}

.section-heading h2 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(38px, 5.6vw, 72px);
  font-weight: 800;
  line-height: 1.16;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  align-items: end;
  gap: clamp(40px, 8vw, 120px);
}

.split-heading > p {
  max-width: 520px;
  margin: 0 0 4px;
  color: var(--text-secondary);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  background: var(--header-bg);
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
}

.header-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  min-height: 52px;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-symbol {
  width: 38px;
  height: 38px;
  flex: none;
}

.brand-symbol img {
  width: 100%;
  height: 100%;
}

.brand-symbol-dark {
  display: none;
}

[data-theme="dark"] .brand-symbol-light {
  display: none;
}

[data-theme="dark"] .brand-symbol-dark {
  display: block;
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name strong {
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.brand-name span {
  margin-top: 4px;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.site-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a,
.nav-contact,
.theme-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out);
}

.site-nav a:active,
.nav-contact:active,
.theme-toggle:active {
  transform: scale(0.94);
}

.site-nav a,
.nav-contact {
  padding: 0 16px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--surface-soft);
  color: var(--text-strong);
  text-decoration: none;
}

.site-nav a[aria-current="page"]::before {
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.nav-contact {
  background: var(--dark);
  color: #ffffff;
}

.nav-contact:hover {
  background: var(--accent);
  color: #1c1c1e;
  text-decoration: none;
}

.theme-toggle {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 20px;
}

.theme-toggle:hover {
  background: var(--surface-soft);
  color: var(--text-strong);
}

/* Buttons and links */

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 38px;
}

.button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.button:hover {
  text-decoration: none;
}

/* Press feedback — confirms the tap landed. scale() carries the label + arrow. */
.button:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    transform: translateY(-2px);
  }
}

.button-primary {
  background: var(--accent);
  color: #1c1c1e;
}

.button-primary:hover {
  background: var(--accent-bright);
  color: #101011;
}

.button-dark {
  background: var(--dark-deep);
  color: #ffffff;
}

.button-dark:hover {
  background: #000000;
  color: #ffffff;
}

/* Quiet button — same shape as the primary, half its voice, so the
   App Store CTA is the only thing in the hero pulling the eye. */
.button-quiet {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-strong);
}

.button-quiet:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent-dark);
}

/* App Store button — the Apple mark's stem sits above the cap height,
   so it needs an optical nudge rather than a box alignment. */
.button-appstore {
  gap: 11px;
  padding: 0 28px;
}

.button-appstore svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: -2px;
}

.text-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

.text-link:hover {
  color: var(--accent-dark);
}

/* Home hero */

.home-hero {
  min-height: calc(100svh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  align-items: center;
  gap: clamp(56px, 8vw, 120px);
  padding-block: clamp(64px, 10vw, 140px);
}

.home-hero-copy h1 {
  margin-bottom: 32px;
  font-size: clamp(52px, 6.6vw, 92px);
  font-weight: 850;
  line-height: 1.14;
}

.accent-word {
  position: relative;
  z-index: 0;
  display: inline-block;
}

.accent-word::after {
  position: absolute;
  right: -0.02em;
  bottom: 0.06em;
  left: -0.01em;
  z-index: -1;
  height: 0.13em;
  background: var(--accent);
  content: "";
}

.hero-slogan {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: clamp(18px, 2.4vw, 26px);
  font-style: italic;
  letter-spacing: 0.02em;
}

.hero-lede {
  max-width: 710px;
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: clamp(18px, 2.15vw, 23px);
  line-height: 1.75;
}

/* Studio plate — hero brand card */

.studio-plate {
  --plate-bg: var(--dark);
  display: flex;
  flex-direction: column;
  padding: clamp(30px, 3.4vw, 46px);
  border-radius: var(--radius-xl);
  background: var(--plate-bg);
  box-shadow: var(--shadow);
  color: #ffffff;
}

[data-theme="dark"] .studio-plate {
  /* Cards sit above the page in dark mode — Card Dark #2C2C2E, not deeper. */
  --plate-bg: var(--surface);
  border: 1px solid var(--border-soft);
}

.plate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: clamp(34px, 4vw, 52px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.plate-head span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #ffffff;
}

.plate-head span:first-child::before {
  width: 9px;
  height: 9px;
  flex: none;
  background: var(--accent);
  content: "";
}

.plate-statement {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(34px, 3.6vw, 50px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.06;
}

.plate-statement-zh {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.cube-field {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  margin: clamp(30px, 3.6vw, 44px) 0 clamp(34px, 4.4vw, 54px);
}

.cube-field span {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.1);
}

.cube-field .cube-outline {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  background: transparent;
}

.cube-field .cube-beat {
  animation: cube-beat 8s steps(1, end) infinite;
}

.cube-field .cube-beat:nth-child(10) {
  animation-delay: 2s;
}

.cube-field .cube-beat:nth-child(15) {
  animation-delay: 4s;
}

.cube-field .cube-beat:nth-child(21) {
  animation-delay: 6s;
}

@keyframes cube-beat {
  0%,
  18% {
    background: var(--accent);
  }

  19%,
  100% {
    background: rgba(255, 255, 255, 0.1);
  }
}

.plate-spec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding: 0;
  margin: auto 0 0;
  background: rgba(255, 255, 255, 0.16);
}

.plate-spec > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 0 4px;
  background: var(--plate-bg);
}

.plate-spec > div:nth-child(odd) {
  padding-right: 18px;
}

.plate-spec > div:nth-child(even) {
  padding-left: 18px;
}

.plate-spec dt {
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.plate-spec dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 600;
}

.manifesto-band {
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: var(--surface);
}

.marquee-line {
  width: max-content;
  min-width: 100%;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 72px);
  padding-inline: var(--page-gutter);
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(15px, 2vw, 22px);
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.marquee-line i {
  width: 9px;
  height: 9px;
  flex: none;
  background: var(--accent);
}

/* Marquee — constant motion, so linear easing. The track is duplicated in
   JS to exactly 2× width; translateX(-50%) loops it seamlessly. Duration is
   set in JS from the track width to keep a steady speed on any screen. */
.marquee-line.is-marquee {
  min-width: 0;
  width: max-content;
  justify-content: flex-start;
  will-change: transform;
  animation: marquee-scroll 40s linear infinite;
}

@media (hover: hover) and (pointer: fine) {
  .marquee-line.is-marquee:hover {
    animation-play-state: paused;
  }
}

@keyframes marquee-scroll {
  to {
    /* JS sets --marquee-shift to one true repeat period (unit width + the gap
       between units), so the loop lands on identical content with no hitch. */
    transform: translateX(var(--marquee-shift, -50%));
  }
}

/* Scroll reveal — marketing surfaces only, fires once. Enabled by JS adding
   `.js-anim` to <html>; without JS or under reduced motion the class is never
   added, so every block renders in its final, visible state.
   Uses the `translate` property (not `transform`) so hover lifts, which use
   `transform`, compose cleanly instead of fighting over the same value. */
.js-anim .reveal {
  opacity: 0;
  translate: 0 16px;
  transition:
    opacity 620ms var(--ease-out),
    translate 620ms var(--ease-out);
  transition-delay: calc(var(--reveal-index, 0) * 70ms);
}

.js-anim .reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

/* Product showcase */

.product-section,
.principles-section,
.feature-section,
.problem-section {
  padding-block: clamp(100px, 14vw, 190px);
}

.product-showcase {
  min-height: 650px;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: var(--radius-xl);
  background: var(--dark);
  box-shadow: var(--shadow);
  color: #ffffff;
  text-decoration: none;
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}

[data-theme="dark"] .product-showcase {
  /* Same rule as the studio plate: cards sit above the page, never below it. */
  background: var(--surface);
}

.product-showcase:hover {
  text-decoration: none;
}

.product-showcase:active {
  transform: scale(0.995);
}

@media (hover: hover) and (pointer: fine) {
  .product-showcase:hover {
    transform: translateY(-3px);
    box-shadow: 0 36px 96px rgba(61, 48, 32, 0.2);
  }
}

.product-copy {
  padding: clamp(34px, 4.6vw, 62px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.product-identity img {
  width: 86px;
  height: 86px;
  flex: none;
  border-radius: 20px;
}

.product-kicker {
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.56);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.product-identity h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.24;
}

.product-description {
  max-width: 590px;
  margin: 34px 0 26px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1.75;
}

.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 42px;
  list-style: none;
}

.feature-chips li {
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.product-link {
  align-self: flex-start;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.product-visual {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  background: var(--accent);
}

.product-visual::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(28, 28, 30, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(28, 28, 30, 0.1) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
}

.product-screenshot {
  position: relative;
  z-index: 1;
  width: min(62%, 270px);
  margin: 0;
  overflow: hidden;
  border: 8px solid #121315;
  border-radius: 42px;
  background: #f8f5f1;
  box-shadow: 0 28px 72px rgba(28, 28, 30, 0.34);
  transition: transform 400ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .product-showcase:hover .product-screenshot {
    transform: scale(1.03);
  }
}

.product-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Principles */

.principles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
}

.principle-card {
  position: relative;
  min-height: 330px;
  padding: 32px 26px 36px;
  border-right: 1px solid var(--border);
  transition: background-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}

.principle-card:last-child {
  border-right: 0;
}

@media (hover: hover) and (pointer: fine) {
  .principle-card:hover {
    background: var(--surface);
    transform: translateY(-2px);
  }
}

.principle-card::before {
  position: absolute;
  top: -1px;
  left: 26px;
  width: 38px;
  height: 3px;
  background: var(--accent);
  content: "";
}

.principle-index {
  display: block;
  margin-bottom: 76px;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.principle-en {
  margin-bottom: 9px;
  color: var(--text-weak);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.principle-card h3 {
  margin-bottom: 16px;
  font-size: 23px;
  line-height: 1.45;
}

.principle-card > p:last-child {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.studio-note {
  display: grid;
  grid-template-columns: 180px minmax(300px, 0.9fr) minmax(300px, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 82px);
  padding-block: clamp(70px, 10vw, 120px);
  border-block: 1px solid var(--border);
}

.studio-note-mark {
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.studio-note-mark img {
  width: 92px;
  height: 92px;
}

.studio-note h2 {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.2;
}

.studio-note > p {
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(17px, 2vw, 21px);
}

.contact-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: end;
  gap: clamp(36px, 8vw, 110px);
  padding-block: clamp(100px, 15vw, 180px);
}

.contact-section h2,
.product-contact h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 4.3vw, 56px);
  line-height: 1.18;
}

.contact-mail {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 12px;
  border-bottom: 3px solid var(--accent);
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(18px, 2.7vw, 34px);
  font-weight: 750;
  text-decoration: none;
}

.contact-mail:hover {
  color: var(--accent-dark);
  text-decoration: none;
}

/* NextClass hero */

.nextclass-hero {
  min-height: calc(100svh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(480px, 1.05fr);
  align-items: center;
  gap: clamp(50px, 7vw, 105px);
  padding-block: clamp(70px, 10vw, 130px);
}

.app-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 34px;
}

.app-lockup img {
  width: 76px;
  height: 76px;
  flex: none;
  border-radius: 18px;
  box-shadow: var(--shadow-small);
}

.app-lockup > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.app-lockup strong {
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1.1;
}

.app-lockup span {
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 650;
}

.nextclass-hero h1 {
  margin-bottom: 30px;
  font-size: clamp(42px, 4.8vw, 66px);
  font-weight: 850;
  line-height: 1.16;
}

.nextclass-hero h1 span {
  color: var(--accent-dark);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.trust-row span {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
}

/* Store availability sits under the CTA: the app ships on one storefront,
   and a visitor outside it should learn that before tapping through.
   Flex items rather than one sentence, so a wrap falls between the facts
   instead of inside the storefront caveat. */
.hero-availability {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  margin: 18px 0 0;
  color: var(--text-weak);
  font-size: 13px;
}

/* Separator trails its item, so a wrapped line never opens on a bare dot. */
.hero-availability > :not(:last-child)::after {
  margin-left: 9px;
  color: var(--border);
  content: "·";
}

.hero-availability b {
  color: var(--text-secondary);
  font-weight: 700;
}

.device-scene {
  position: relative;
  min-height: 760px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--accent);
  box-shadow: var(--shadow);
}

.device-scene::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(28, 28, 30, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(28, 28, 30, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  content: "";
}

.app-screenshot-single {
  position: relative;
  z-index: 2;
  width: min(100%, 660px);
  height: 740px;
  display: grid;
  place-items: center;
}

.app-screenshot {
  width: 330px;
  margin: 0;
  overflow: hidden;
  border: 10px solid #121315;
  border-radius: 50px;
  background: #f8f5f1;
  box-shadow: 0 38px 90px rgba(28, 28, 30, 0.42);
}

.app-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Product problem and workflow */

.problem-section .split-heading h2 span {
  color: var(--accent-dark);
}

.rule-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.rule-cards article {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  padding: clamp(25px, 3vw, 38px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.rule-cards article > span {
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.rule-cards h3 {
  margin: 22px 0 32px;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.45;
}

/* Small editorial diagrams: illustrative, not interactive app controls. */
.rule-visual {
  --diagram-blue-soft: color-mix(in srgb, var(--blue) 10%, var(--surface));
  --diagram-orange-soft: color-mix(in srgb, var(--accent) 11%, var(--surface));
  min-width: 0;
  min-height: 272px;
  display: flex;
  flex-direction: column;
  margin: auto -12px 0;
  padding: 18px 16px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background-color: var(--surface-soft);
  background-image: radial-gradient(var(--border) 0.65px, transparent 0.65px);
  background-size: 8px 8px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
  user-select: none;
}

.rule-visual svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.rule-diagram-heading,
.rule-diagram-heading > span,
.rule-diagram-note {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rule-diagram-heading {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
  font-weight: 600;
}

.rule-diagram-detail {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-weak);
}

.rule-diagram-note {
  justify-content: center;
  margin-top: auto;
  padding-top: 14px;
  font-size: 10px;
}

.schedule-comparison {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.schedule-sheet,
.calendar-sheet {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 3px 0 -1px var(--surface), 0 3px 0 var(--border-soft), 0 8px 16px -8px rgba(61, 48, 32, 0.18);
}

.schedule-sheet {
  padding: 12px 10px 7px;
}

.schedule-sheet-new {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
  background: linear-gradient(var(--diagram-orange-soft), var(--surface));
}

.schedule-sheet-title {
  display: block;
  margin-bottom: 10px;
  font-size: 10px;
  font-weight: 600;
}

.schedule-sheet-new .schedule-sheet-title {
  color: var(--accent-dark);
}

.schedule-time {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.schedule-time > span {
  font-size: 8px;
  color: var(--text-weak);
}

.schedule-time b {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.schedule-time i {
  width: 4px;
  height: 4px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--border);
}

.schedule-sheet-new .schedule-time i {
  background: var(--accent);
}

.schedule-switch {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 3px solid var(--surface-soft);
  border-radius: 50%;
  background: var(--accent);
  color: var(--dark-deep);
  transform: translate(-50%, -50%);
}

.schedule-boundary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.schedule-boundary > span {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.schedule-boundary > span:last-child {
  background: var(--accent);
}

.schedule-boundary b {
  font-size: 9px;
  font-weight: 500;
}

.schedule-boundary strong {
  margin-left: 4px;
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}

.scope-matrix {
  padding: 0 0 4px;
}

.scope-week-labels,
.scope-row {
  display: grid;
  grid-template-columns: minmax(65px, 1.55fr) repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 7px;
}

.scope-week-labels {
  margin-bottom: 8px;
  text-align: center;
  font-size: 9px;
}

.scope-row + .scope-row {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px dashed var(--border);
}

.scope-row-label {
  font-size: 10px;
  font-weight: 600;
}

.scope-row-label small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 400;
  color: var(--blue);
}

.scope-row-recurring .scope-row-label small {
  color: var(--accent-dark);
}

.scope-week {
  position: relative;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 2px 3px rgba(61, 48, 32, 0.03);
}

.scope-week i {
  width: 65%;
  height: 3px;
  border-radius: 2px;
  background: var(--border-soft);
}

.scope-week i:last-child {
  width: 85%;
}

.scope-week b {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 13px;
  border-radius: 3px;
  background: var(--surface-soft);
}

.scope-week b svg {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}

.scope-week.is-changed {
  border-color: color-mix(in srgb, var(--blue) 40%, var(--border-soft));
  background: var(--diagram-blue-soft);
}

.scope-week.is-changed b {
  background: var(--blue);
  color: var(--surface);
}

.scope-row-recurring .scope-week.is-changed {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border-soft));
  background: var(--diagram-orange-soft);
}

.scope-row-recurring .scope-week.is-changed b {
  background: var(--accent);
  color: var(--dark-deep);
}

.scope-row-recurring .scope-week:not(:last-child)::after {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: -9px;
  width: 9px;
  border-top: 1px solid var(--accent);
  content: "";
}

.calendar-sheet {
  padding: 12px 10px 10px;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  text-align: center;
}

.calendar-weekdays {
  margin-bottom: 9px;
  font-size: 8px;
  color: var(--text-weak);
}

.calendar-day {
  min-height: 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 5px;
}

.calendar-day b {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}

.calendar-day i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
}

.calendar-day.is-muted {
  color: var(--text-weak);
}

.calendar-day.is-muted i {
  visibility: hidden;
}

.calendar-day.is-off {
  background: var(--diagram-blue-soft);
  color: var(--blue);
}

.calendar-day.is-off i {
  width: 9px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.calendar-day.is-pending {
  gap: 1px;
  border: 1px dashed var(--accent);
  background: var(--diagram-orange-soft);
  color: var(--accent-dark);
}

.calendar-day.is-pending i {
  width: auto;
  height: auto;
  background: none;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.calendar-legend,
.calendar-legend > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.calendar-legend {
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border-soft);
  font-size: 9px;
}

.calendar-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.legend-off {
  background: var(--diagram-blue-soft);
  border: 1px solid var(--blue);
}

.legend-pending {
  background: var(--diagram-orange-soft);
  border: 1px dashed var(--accent-dark);
}

.calendar-note {
  color: var(--accent-dark);
}

@media (min-width: 681px) and (max-width: 900px) {
  .rule-cards article:last-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 22px 32px;
    min-height: 0;
  }

  .rule-cards article:last-child h3 {
    margin: 0;
  }

  .rule-cards article:last-child .rule-visual {
    grid-column: 2;
    grid-row: 1 / 3;
    margin: 0;
  }
}

.workflow-section {
  padding-block: clamp(100px, 14vw, 180px);
  background: var(--dark);
  color: rgba(255, 255, 255, 0.72);
}

.workflow-section .eyebrow {
  color: rgba(255, 255, 255, 0.42);
}

.workflow-section .eyebrow span {
  color: var(--accent-bright);
}

.workflow-section h2 {
  color: #ffffff;
}

.workflow-section .split-heading > p {
  color: rgba(255, 255, 255, 0.62);
}

.workflow-list {
  padding: 0;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  list-style: none;
}

.workflow-list li {
  display: grid;
  grid-template-columns: 80px minmax(250px, 0.8fr) minmax(280px, 1.2fr);
  align-items: center;
  gap: 38px;
  min-height: 190px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.workflow-index {
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.workflow-list li > div p {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.workflow-list h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(22px, 2.6vw, 31px);
  line-height: 1.4;
}

.workflow-list li > p {
  max-width: 540px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 16px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.feature-grid article {
  min-height: 270px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .feature-grid article:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
  }
}

.feature-grid article > span {
  display: inline-flex;
  margin-bottom: 66px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.feature-grid h3 {
  margin-bottom: 12px;
  font-size: 24px;
  line-height: 1.4;
}

.feature-grid p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.privacy-callout {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: clamp(30px, 6vw, 76px);
  margin-bottom: clamp(100px, 14vw, 180px);
  padding: clamp(32px, 5vw, 62px);
  border-radius: var(--radius-xl);
  background: var(--accent);
  color: #292b30;
  box-shadow: var(--shadow);
}

.privacy-callout .eyebrow,
.privacy-callout .eyebrow span {
  color: #552b08;
}

.privacy-callout .eyebrow::before {
  background: #292b30;
}

.privacy-callout h2 {
  margin-bottom: 15px;
  color: #1c1c1e;
  font-size: clamp(31px, 4.1vw, 52px);
  line-height: 1.2;
}

.privacy-callout p:last-child {
  max-width: 700px;
  margin: 0;
  color: #3c332c;
}

.privacy-symbol {
  display: grid;
  grid-template-columns: repeat(2, 42px);
  gap: 8px;
}

.privacy-symbol span {
  aspect-ratio: 1;
  background: rgba(28, 28, 30, 0.18);
}

.privacy-symbol span:nth-child(3) {
  background: #1c1c1e;
}

.product-contact {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 56px;
  padding-bottom: clamp(100px, 14vw, 180px);
}

.app-lockup-small {
  align-self: start;
  margin: 0;
}

.app-lockup-small img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

.app-lockup-small strong {
  font-size: 19px;
}

.product-contact > div:nth-child(2) {
  margin-bottom: 32px;
}

.product-contact .contact-mail {
  grid-column: 2;
}

/* Download band */

.download-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(38px, 6vw, 84px);
  margin-bottom: clamp(100px, 14vw, 180px);
  padding: clamp(34px, 5vw, 62px);
  border-radius: var(--radius-xl);
  background: var(--dark-deep);
  box-shadow: var(--shadow);
}

/* On the dark theme the plate and the page sit a few points apart, so the
   band needs an edge to still read as a plate. */
[data-theme="dark"] .download-band {
  border: 1px solid var(--border-soft);
}

.download-band .eyebrow {
  color: rgba(255, 255, 255, 0.44);
}

.download-band .eyebrow span {
  color: var(--accent-bright);
}

.download-band h2 {
  margin-bottom: 16px;
  color: #ffffff;
  font-size: clamp(30px, 3.9vw, 48px);
  line-height: 1.2;
}

.download-band h2 span {
  color: var(--accent-bright);
}

.download-lede {
  max-width: 54ch;
  margin: 0 0 34px;
  color: rgba(255, 255, 255, 0.68);
}

/* Cross-link to the other edition. The App Store account's storefront is not
   something the page can read, so anyone this page guessed wrong for needs a
   visible way out rather than Apple's "not available in your region" wall. */
.download-alt {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.download-alt a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.download-alt a:hover {
  color: #ffffff;
}

.download-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 44px;
  margin: 34px 0 0;
}

.download-facts > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.download-facts dt {
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.download-facts dd {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

/* The QR plate stays white in both themes — scanners need the contrast,
   and the 22px inset is the code's four-module quiet zone, not decoration. */
.download-scan {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.download-qr {
  padding: 22px;
  border-radius: var(--radius-md);
  background: #ffffff;
}

.download-qr img {
  display: block;
  width: 144px;
  height: 144px;
}

.download-scan p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

/* Legal pages */

.legal-hero {
  padding-block: clamp(74px, 11vw, 132px) clamp(52px, 7vw, 86px);
  border-bottom: 1px solid var(--border);
}

.legal-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(46px, 7vw, 88px);
  font-weight: 850;
  line-height: 1.14;
}

.legal-intro {
  max-width: 760px;
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(18px, 2.2vw, 23px);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 30px;
  color: var(--text-weak);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 760px);
  justify-content: space-between;
  gap: clamp(60px, 10vw, 150px);
  padding-block: clamp(70px, 10vw, 130px);
}

.legal-aside {
  align-self: start;
  position: sticky;
  top: 118px;
}

.legal-aside > p {
  margin-bottom: 18px;
  color: var(--text-weak);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.legal-aside nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.legal-aside a {
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
}

.legal-aside a:hover {
  color: var(--accent-dark);
}

.legal-content {
  min-width: 0;
}

.legal-content > p:first-child {
  margin-bottom: 52px;
  font-size: 18px;
}

.legal-section {
  padding: 38px 0 48px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 110px;
}

.legal-section h2 {
  margin-bottom: 23px;
  font-size: clamp(24px, 2.7vw, 31px);
  line-height: 1.4;
}

.legal-section p,
.legal-section li {
  color: var(--text-secondary);
  font-size: 16px;
}

.legal-section strong {
  color: var(--text-strong);
}

.legal-section ul {
  padding-left: 1.2em;
  margin-bottom: 16px;
}

.legal-section li + li {
  margin-top: 8px;
}

.legal-note {
  padding: 17px 19px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-soft);
}

/* Not found */

.not-found {
  padding-block: clamp(96px, 15vw, 200px);
}

.not-found h1 {
  margin-bottom: 26px;
  font-size: clamp(44px, 5.6vw, 78px);
  font-weight: 850;
  line-height: 1.14;
}

.not-found-lede {
  max-width: 46ch;
  margin-bottom: 40px;
  color: var(--text-secondary);
  font-size: clamp(17px, 1.9vw, 20px);
  line-height: 1.72;
}

.not-found-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 28px;
}

/* Footer */

.site-footer {
  background: var(--dark-deep);
  color: rgba(255, 255, 255, 0.62);
}

.footer-inner {
  padding-block: 58px 42px;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px 48px;
  padding-bottom: 42px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.footer-brand img {
  width: 42px;
  height: 42px;
}

.footer-brand > div {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.footer-brand strong {
  color: #ffffff;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.footer-brand span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.48);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.footer-tagline {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 650;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 6px 22px;
  max-width: 420px;
}

.site-footer nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}

.site-footer nav a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.36);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.footer-meta a {
  color: rgba(255, 255, 255, 0.52);
  text-decoration: none;
  transition: color 160ms ease;
}

.footer-meta a:hover {
  color: rgba(255, 255, 255, 0.82);
}

.beian-gongan {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.beian-gongan img {
  display: block;
  width: 12px;
  height: 13px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: color 160ms ease, transform 140ms var(--ease-out);
}

.footer-social a:hover {
  color: var(--accent-bright);
}

.footer-social a:active {
  transform: scale(0.94);
}

.footer-social svg {
  width: 22px;
  height: 22px;
}

/* Responsive */

@media (max-width: 1120px) {
  .home-hero,
  .nextclass-hero {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding-top: 100px;
  }

  .home-hero-copy {
    max-width: 870px;
  }

  .studio-plate {
    max-width: 640px;
  }

  .nextclass-hero-copy {
    max-width: 850px;
  }

  .device-scene {
    min-height: 800px;
  }

  .product-showcase {
    grid-template-columns: 1fr;
  }

  .product-visual {
    min-height: 620px;
  }

  .principles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .principle-card:nth-child(2) {
    border-right: 0;
  }

  .principle-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .privacy-callout {
    grid-template-columns: 100px 1fr;
  }

  .privacy-callout .button {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 900px) {
  .download-band {
    grid-template-columns: 1fr;
  }

  .download-scan {
    align-items: flex-start;
  }

  .split-heading,
  .contact-section {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .split-heading {
    gap: 30px;
  }

  .rule-cards,
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rule-cards article:last-child {
    grid-column: 1 / -1;
  }

  .studio-note {
    grid-template-columns: 150px 1fr;
  }

  .studio-note > p {
    grid-column: 2;
  }

  .workflow-list li {
    grid-template-columns: 55px 1fr;
    gap: 24px;
    padding-block: 34px;
  }

  .workflow-list li > p {
    grid-column: 2;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .legal-aside {
    position: static;
  }

  .legal-aside nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .legal-aside a:nth-child(odd) {
    border-right: 1px solid var(--border-soft);
    padding-right: 14px;
  }

  .legal-aside a:nth-child(even) {
    padding-left: 14px;
  }
}

@media (max-width: 680px) {
  :root {
    --page-gutter: 20px;
  }

  body::before {
    background-size: 52px 100%;
  }

  .header-inner {
    min-height: 68px;
  }

  .brand-symbol {
    width: 34px;
    height: 34px;
  }

  .home-hero,
  .nextclass-hero {
    min-height: auto;
    padding-block: 66px 90px;
  }

  /* 8 CJK glyphs are the longest line in both heroes — keep them on one line. */
  .home-hero-copy h1 {
    font-size: clamp(30px, 10.8vw, 46px);
  }

  .nextclass-hero h1 {
    font-size: clamp(30px, 10.8vw, 44px);
  }

  .hero-lede {
    font-size: 18px;
  }

  .studio-plate {
    border-radius: var(--radius-lg);
  }

  .plate-spec {
    grid-template-columns: 1fr;
  }

  .plate-spec > div:nth-child(odd),
  .plate-spec > div:nth-child(even) {
    padding-inline: 0;
  }

  .marquee-line {
    justify-content: flex-start;
  }

  .section-heading h2 {
    font-size: clamp(30px, 8vw, 44px);
  }

  .product-section,
  .principles-section,
  .feature-section,
  .problem-section {
    padding-block: 100px;
  }

  .product-showcase {
    min-height: auto;
    border-radius: var(--radius-lg);
  }

  .product-copy {
    padding: 38px 26px 48px;
  }

  .product-identity img {
    width: 72px;
    height: 72px;
    border-radius: 17px;
  }

  .product-visual {
    min-height: 535px;
    padding: 30px 22px;
  }

  .product-screenshot {
    width: min(66%, 220px);
    border-width: 7px;
    border-radius: 36px;
  }

  .principles-grid,
  .rule-cards,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .principle-card {
    min-height: auto;
    padding-block: 30px 36px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .principle-card:last-child {
    border-bottom: 0;
  }

  .principle-index {
    margin-bottom: 46px;
  }

  .studio-note {
    grid-template-columns: 1fr;
  }

  .studio-note > p {
    grid-column: 1;
  }

  .studio-note-mark {
    width: 110px;
    height: 110px;
  }

  .studio-note-mark img {
    width: 66px;
    height: 66px;
  }

  .contact-mail {
    overflow-wrap: anywhere;
  }

  .device-scene {
    min-height: 690px;
    border-radius: var(--radius-lg);
  }

  .app-screenshot-single {
    height: 660px;
  }

  .app-screenshot {
    width: 292px;
    border-width: 8px;
    border-radius: 44px;
  }

  .rule-cards article,
  .rule-cards article:last-child {
    grid-column: auto;
  }

  .feature-grid article {
    min-height: 235px;
  }

  .privacy-callout {
    grid-template-columns: 1fr;
    border-radius: var(--radius-lg);
  }

  .download-band {
    border-radius: var(--radius-lg);
  }

  /* A phone visitor taps the button; a QR pointed at its own screen is noise. */
  .download-scan {
    display: none;
  }

  .download-facts {
    gap: 18px 30px;
  }

  .privacy-callout .button {
    grid-column: 1;
  }

  .privacy-symbol {
    grid-template-columns: repeat(4, 32px);
  }

  .product-contact {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .product-contact .contact-mail {
    grid-column: 1;
  }

  .legal-hero h1 {
    font-size: clamp(38px, 11vw, 52px);
  }

  .legal-aside nav {
    grid-template-columns: 1fr;
  }

  .legal-aside a:nth-child(odd),
  .legal-aside a:nth-child(even) {
    border-right: 0;
    padding-inline: 0;
  }

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

  .site-footer nav {
    justify-content: flex-start;
    max-width: none;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }
}

@media (max-width: 600px) {
  .header-inner {
    min-height: 0;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding-block: 9px;
  }

  .brand {
    grid-area: 1 / 1;
    min-height: 40px;
  }

  .header-actions {
    grid-area: 1 / 2;
  }

  .site-nav {
    grid-area: 2 / 1 / 3 / 3;
    justify-self: stretch;
    justify-content: center;
    padding-top: 5px;
    border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  }

  .site-nav a {
    min-height: 40px;
    padding: 0 14px;
  }

  .theme-toggle {
    min-width: 40px;
    min-height: 40px;
  }
}

@media (max-width: 390px) {
  .brand-name span {
    display: none;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .app-screenshot {
    width: 270px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  /* Keep the cube grid's single orange beat as a static accent. */
  .cube-field .cube-beat:nth-child(10) {
    background: var(--accent) !important;
  }
}


/* Language-appropriate typography so Japanese, Korean and Traditional
   Chinese glyphs render with their own fonts rather than the SC stack. */
html[lang="ja"] {
  --font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

html[lang="ko"] {
  --font-body: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

html[lang="zh-Hant"] {
  --font-body: "IBM Plex Sans", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "PingFang TC", "Noto Sans TC", sans-serif;
}

/* ═══════════════════════════════════════════════════════
   Language switcher — Catcubed Brand Identity System
   ═══════════════════════════════════════════════════════ */

.lang-switcher {
  position: relative;
  z-index: 1000;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition:
    background 0.2s cubic-bezier(0.2, 0, 0, 1),
    border-color 0.2s cubic-bezier(0.2, 0, 0, 1),
    color 0.2s cubic-bezier(0.2, 0, 0, 1),
    box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
  white-space: nowrap;
  user-select: none;
}

.lang-toggle:hover {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text-strong);
}

.lang-switcher.open .lang-toggle {
  background: var(--surface-soft);
  border-color: var(--accent);
  color: var(--text-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.lang-icon-globe {
  flex-shrink: 0;
  color: var(--text-weak);
  transition: color 0.2s ease;
}

.lang-toggle:hover .lang-icon-globe,
.lang-switcher.open .lang-icon-globe {
  color: var(--accent);
}

.lang-current {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-icon-caret {
  flex-shrink: 0;
  color: var(--text-weak);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), color 0.2s ease;
}

.lang-switcher.open .lang-icon-caret {
  transform: rotate(180deg);
  color: var(--accent);
}

/* Dropdown Menu — Card White / Blur with Catcubed Radius */

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 156px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  backdrop-filter: blur(24px) saturate(1.8);
  box-shadow: var(--shadow-small);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition:
    opacity 0.2s cubic-bezier(0.2, 0, 0, 1),
    visibility 0.2s cubic-bezier(0.2, 0, 0, 1),
    transform 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.lang-switcher.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.lang-menu li:hover {
  background: var(--surface-soft);
  color: var(--text-strong);
}

/* Active State — 呼應品牌識別中的「立方單元 (Cubic Dot)」 */

.lang-cube-dot {
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: transparent;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.lang-menu li.active {
  color: var(--accent-dark);
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

[data-theme="dark"] .lang-menu li.active {
  color: var(--accent);
}

.lang-menu li.active .lang-cube-dot {
  background: var(--accent);
}

/* Mobile Adaptation */
@media (max-width: 600px) {
  .lang-menu {
    right: -4px;
    min-width: 144px;
  }

  .lang-toggle {
    min-height: 40px;
    padding: 0 10px;
    gap: 4px;
    font-size: 12px;
  }

  .lang-current {
    font-size: 12px;
  }
}
