/* Fonts are served from this site (no requests to other servers). Geist / Geist Mono: SIL OFL 1.1,
   assets/fonts/Geist-OFL.txt. Japanese text uses the fonts on each device. */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Keito-na Apps — shared styles (2026-10 redesign)
   Accents: aurora background, glass cards with a cursor spotlight,
   scroll reveal and a gentle tilt on hero visuals. Motion is removed
   under prefers-reduced-motion. */

:root {
  color-scheme: light dark;
  --font-sans: "Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --bg: #f4f5fa;
  --bg-elev: #ffffff;
  --surface: rgba(255, 255, 255, 0.68);
  --surface-2: rgba(255, 255, 255, 0.9);
  --border: rgba(16, 20, 48, 0.09);
  --border-strong: rgba(16, 20, 48, 0.17);
  --text: #0b0e1a;
  --muted: #464c64;
  --faint: #5b617b;
  --accent: #0a7a70;
  --accent-2: #5a3dd4;
  --accent-soft: rgba(10, 122, 112, 0.1);
  --grad: linear-gradient(115deg, #12c7b6 0%, #3b82f6 40%, #8b5cf6 72%, #ec4899 100%);
  --grad-text: linear-gradient(100deg, #078a7e 0%, #2563eb 48%, #7c3aed 90%);
  --spot: rgba(59, 130, 246, 0.1);
  --spot-edge: rgba(18, 199, 182, 0.75);
  --grid-line: rgba(16, 20, 48, 0.05);
  --aurora-1: rgba(18, 199, 182, 0.32);
  --aurora-2: rgba(99, 102, 241, 0.26);
  --aurora-3: rgba(236, 72, 153, 0.14);
  --shadow-sm: 0 1px 2px rgba(16, 20, 48, 0.05), 0 6px 20px -8px rgba(16, 20, 48, 0.12);
  --shadow-lg: 0 40px 90px -30px rgba(16, 20, 48, 0.35);
  --header-bg: rgba(244, 245, 250, 0.72);

  --term-bg: #0a0d16;
  --term-text: #dfe6fb;
  --term-dim: #8f98b8;
  --term-accent: #5eead4;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --header-h: 64px;
  --wrap: 1160px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06070d;
    --bg-elev: #0d0f19;
    --surface: rgba(255, 255, 255, 0.045);
    --surface-2: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.17);
    --text: #eef0f8;
    --muted: #a9aec4;
    --faint: #959bb3;
    --accent: #5eead4;
    --accent-2: #b4a3ff;
    --accent-soft: rgba(94, 234, 212, 0.1);
    --grad-text: linear-gradient(100deg, #5eead4 0%, #7cb2ff 48%, #c8b8ff 90%);
    --spot: rgba(94, 234, 212, 0.08);
    --spot-edge: rgba(94, 234, 212, 0.65);
    --grid-line: rgba(255, 255, 255, 0.04);
    --aurora-1: rgba(18, 199, 182, 0.24);
    --aurora-2: rgba(99, 102, 241, 0.24);
    --aurora-3: rgba(236, 72, 153, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 40px 100px -30px rgba(0, 0, 0, 0.8);
    --header-bg: rgba(6, 7, 13, 0.66);
  }
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
li,
dt,
dd,
a,
summary {
  line-break: strict;
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-feature-settings: "palt";
  text-wrap: balance;
}

p {
  margin: 0;
}

p + p {
  margin-top: 0.9em;
}

img {
  max-width: 100%;
  height: auto;
}

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

code,
pre {
  font-family: var(--font-mono);
}

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

::selection {
  background: rgba(59, 130, 246, 0.28);
}

.nowrap {
  white-space: nowrap;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}

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

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
}

/* ---------- Aurora background ---------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora span {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  will-change: transform;
  animation: aurora-drift 32s ease-in-out infinite alternate;
}

.aurora span:nth-child(1) {
  top: -38vmax;
  left: -22vmax;
  background: radial-gradient(closest-side, var(--aurora-1), transparent 72%);
}

.aurora span:nth-child(2) {
  top: -34vmax;
  right: -30vmax;
  background: radial-gradient(closest-side, var(--aurora-2), transparent 72%);
  animation-duration: 38s;
  animation-delay: -12s;
}

.aurora span:nth-child(3) {
  top: 18vh;
  left: 18vw;
  width: 54vmax;
  height: 54vmax;
  background: radial-gradient(closest-side, var(--aurora-3), transparent 72%);
  animation-duration: 46s;
  animation-delay: -20s;
}

.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 72%);
}

@keyframes aurora-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(7vw, 5vh, 0) scale(1.08); }
  100% { transform: translate3d(-5vw, 9vh, 0) scale(0.94); }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--grad);
  box-shadow: 0 6px 18px -6px rgba(59, 130, 246, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.92);
  clip-path: polygon(0 0, 30% 0, 30% 38%, 68% 0, 100% 0, 52% 48%, 100% 100%, 66% 100%, 30% 60%, 30% 100%, 0 100%);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.nav-links .nav-cta {
  margin-left: 6px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 600;
}

/* ---------- Type helpers ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.display {
  font-size: clamp(2.3rem, 6.2vw, 4.9rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.025em;
}

.display .line {
  display: block;
}

.lead {
  max-width: 40em;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.14rem);
  line-height: 1.95;
}

.lead + .lead {
  margin-top: 12px;
}

.note {
  margin-top: 16px;
  color: var(--faint);
  font-size: 0.88rem;
  line-height: 1.8;
}

.inline-link,
.doc a,
.policy-card a,
.support-card a,
.faq a,
.note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.inline-link:hover,
.doc a:hover,
.policy-card a:hover,
.support-card a:hover,
.faq a:hover,
.note a:hover {
  text-decoration-color: currentColor;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none !important;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}

.button:hover {
  transform: translateY(-2px);
  border-color: var(--text);
}

.button--primary {
  border-color: transparent;
  background: var(--text);
  color: var(--bg) !important;
  box-shadow: 0 10px 30px -12px rgba(59, 130, 246, 0.65);
}

.button--primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  z-index: -1;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(127, 160, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--ease);
}

.button--primary:hover {
  border-color: transparent;
  box-shadow: 0 0 0 4px var(--accent-soft), 0 18px 40px -14px rgba(99, 102, 241, 0.75);
}

.button--primary:hover::after {
  left: 120%;
}

.button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.button small {
  font-weight: 500;
  opacity: 0.72;
}

/* ---------- Badges & chips ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.badge--live {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: var(--accent-soft);
}

.badge--live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}

.announce {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-bottom: 26px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
  transition: border-color 0.2s, transform 0.25s var(--ease);
}

.announce:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.announce b {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.announce .arrow {
  color: var(--text);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tag-row li,
.tag-row span {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.6;
}

/* ---------- Cards (glass + cursor spotlight) ---------- */

.card,
.feature-card,
.policy-card,
.support-card {
  position: relative;
  isolation: isolate;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card::before,
.feature-card::before,
.support-card::before,
.card::after,
.feature-card::after,
.support-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.card::before,
.feature-card::before,
.support-card::before {
  z-index: -1;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), var(--spot), transparent 55%);
}

.card::after,
.feature-card::after,
.support-card::after {
  padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--spot-edge), rgba(139, 92, 246, 0.35) 45%, transparent 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.card:hover::before,
.feature-card:hover::before,
.support-card:hover::before,
.card:hover::after,
.feature-card:hover::after,
.support-card:hover::after {
  opacity: 1;
}

.card h3,
.feature-card h3,
.support-card h3,
.policy-card h3 {
  font-size: 1.12rem;
  line-height: 1.5;
}

.card p,
.feature-card p,
.support-card p,
.policy-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.85;
}

.card-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--accent);
  font-weight: 600;
}

.card-link::after,
.arrow::after {
  content: "→";
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.25s var(--ease);
}

.card:hover .card-link::after,
a:hover .arrow::after,
.card-link:hover::after {
  transform: translateX(4px);
}

/* whole card clickable through its main link */
.card--link {
  transition: transform 0.3s var(--ease), border-color 0.3s;
}

.card--link:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.stretched::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--radius);
}

.feature-card > span:first-child,
.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  margin-bottom: 20px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box,
    var(--grad) border-box;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
}

.feature-card .feature-subtitle {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: clamp(72px, 10vw, 128px) 0;
}

.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(var(--wrap), calc(100% - 40px));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.section--tight {
  padding-top: 0;
}

.section--tight::before {
  display: none;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  align-items: end;
  gap: 20px 56px;
  margin-bottom: 44px;
}

.section-head h2,
.section-title {
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.section-head > p {
  color: var(--muted);
  line-height: 1.9;
}

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

.link-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- Home hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
  min-height: calc(100svh - var(--header-h));
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 88px);
}

.hero-visual {
  position: relative;
  padding: 28px 0 96px;
  perspective: 1200px;
}

.window {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: var(--term-bg);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  color: var(--term-text);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  color: var(--term-dim);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.window-bar i {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ff5f57;
}

.window-bar i:nth-child(2) { background: #febc2e; }
.window-bar i:nth-child(3) { background: #28c840; }

.window-bar span {
  min-width: 0;
  margin-inline: auto;
  padding-right: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window pre {
  margin: 0;
  padding: clamp(20px, 3vw, 30px);
  font-size: clamp(0.8rem, 1.4vw, 0.92rem);
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.t-prompt { color: var(--term-accent); }
.t-dim { color: var(--term-dim); }
.t-ok { color: #86efac; }
.t-path { color: #93c5fd; }

.caret {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--term-accent);
  animation: caret 1.1s steps(1) infinite;
}

@keyframes caret {
  50% { opacity: 0; }
}

.float-card {
  position: absolute;
  z-index: 2;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--surface-2);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.6;
}

.float-card--chat {
  left: -28px;
  bottom: 0;
  width: min(310px, 80%);
}

.float-card--icon {
  top: 0;
  right: -14px;
  padding: 8px;
  border-radius: 24px;
}

.float-card--icon img {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--faint);
  font-size: 0.74rem;
  font-weight: 600;
}

.chat-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.chat-bubble {
  width: fit-content;
  max-width: 92%;
  padding: 8px 12px;
  border-radius: 14px 14px 14px 4px;
  background: var(--accent-soft);
}

.chat-bubble--me {
  margin: 0 0 8px auto;
  border-radius: 14px 14px 4px 14px;
  background: var(--text);
  color: var(--bg);
}

.typing {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  animation: typing 1.2s infinite;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  30% { opacity: 1; transform: translateY(-2px); }
}

[data-tilt] {
  transition: transform 0.6s var(--ease);
  will-change: transform;
}

/* ---------- App grid (home) ---------- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.app-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
}

.app-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 32px 48px;
  padding: clamp(28px, 4vw, 44px);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    var(--surface);
}

.app-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-card__head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 16px;
  box-shadow: 0 12px 28px -12px rgba(16, 20, 48, 0.55), 0 0 0 1px var(--border);
}

.app-card--featured .app-icon {
  width: 80px;
  height: 80px;
  border-radius: 19px;
}

.app-card h3 {
  font-size: 1.4rem;
  letter-spacing: -0.015em;
}

.app-card--featured h3 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.app-card__head .badge {
  margin-top: 6px;
}

.app-card .app-card__summary {
  margin-top: 18px;
}

.app-card__links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
}

.app-card__links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  transition: border-color 0.2s;
}

.app-card__links a:hover {
  border-color: var(--text);
}

.app-card__links a.is-primary {
  border-color: transparent;
  background: var(--text);
  color: var(--bg);
}

.app-card__aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.app-card__aside .tag-row {
  margin-top: 0;
}

.mini-term {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--term-bg);
  color: var(--term-text);
  font-size: 0.8rem;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- Band (Mac promo) ---------- */

.band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(18, 199, 182, 0.16), transparent 60%),
    radial-gradient(90% 120% at 100% 100%, rgba(139, 92, 246, 0.18), transparent 60%),
    var(--surface);
}

.band h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  letter-spacing: -0.02em;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--muted);
  line-height: 1.75;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: calc(0.2em + 4px);
  width: 6px;
  height: 10px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-list strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- App pages ---------- */

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
  padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 7vw, 88px);
}

.page-hero h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.7rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.025em;
}

.hero-app {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
  font-size: 1.15rem;
  font-weight: 700;
}

.hero-app img {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  box-shadow: 0 10px 24px -10px rgba(16, 20, 48, 0.6), 0 0 0 1px var(--border);
}

.meta-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0 24px;
  max-width: 34em;
  margin: 34px 0 0;
  font-size: 0.92rem;
}

.meta-list dt,
.meta-list dd {
  margin: 0;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}

.meta-list dt {
  color: var(--faint);
  font-weight: 500;
}

.meta-list dd {
  color: var(--text);
  font-weight: 500;
}

.phone-mockup {
  width: min(360px, 100%);
  justify-self: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 40px;
  background: linear-gradient(160deg, #1a1e2c, #0a0c14);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border), 0 0 80px -20px rgba(99, 102, 241, 0.45);
  color: var(--term-text);
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
}

.phone-status strong,
.phone-status span {
  display: block;
  line-height: 1.4;
}

.phone-status span {
  color: var(--term-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.status-light {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.85);
}

.phone-terminal {
  min-height: 400px;
  margin-top: 10px;
  padding: 20px 18px;
  border-radius: 24px;
  background: #06080e;
}

.phone-terminal pre {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.95;
  white-space: pre-wrap;
}

.phone-command {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.phone-command span {
  color: var(--term-accent);
  font-weight: 700;
}

.phone-command code {
  min-width: 0;
  overflow: hidden;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-command b {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 0.72rem;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.split-panel h2 {
  font-size: clamp(1.75rem, 3.8vw, 2.6rem);
  letter-spacing: -0.02em;
}

.flow-card {
  padding: clamp(24px, 3.5vw, 36px);
}

.flow {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.flow li {
  position: relative;
  counter-increment: flow;
  padding: 4px 0 22px 52px;
  color: var(--muted);
  line-height: 1.7;
}

.flow li:last-child {
  padding-bottom: 0;
}

.flow li::before {
  content: counter(flow, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.flow li::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 38px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(var(--border-strong), transparent);
}

.flow li:last-child::after {
  display: none;
}

.flow strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.muted {
  color: var(--faint);
  font-weight: 600;
}

/* ---------- Document pages (privacy / support) ---------- */

.doc-hero {
  padding: clamp(44px, 7vw, 88px) 0 clamp(28px, 4vw, 44px);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  color: var(--faint);
  font-size: 0.84rem;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  opacity: 0.5;
}

.crumbs a:hover {
  color: var(--text);
}

.doc-hero__row {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 28px);
}

.doc-hero__icon {
  width: clamp(64px, 10vw, 96px);
  height: auto;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 24%;
  box-shadow: 0 16px 36px -14px rgba(16, 20, 48, 0.6), 0 0 0 1px var(--border);
}

.doc-hero h1 {
  font-size: clamp(1.7rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.doc-hero h1 .h1-app {
  display: block;
  margin-bottom: 6px;
  color: var(--faint);
  font-size: 0.48em;
  font-weight: 600;
  letter-spacing: 0;
}

.doc-hero .lead {
  margin-top: 22px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 4vw, 56px);
}

.doc {
  min-width: 0;
  max-width: 820px;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  font-size: 0.86rem;
}

.toc:empty {
  display: none;
}

.toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  cursor: pointer;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  list-style: none;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--border);
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 1px solid transparent;
  color: var(--muted);
  line-height: 1.55;
  transition: color 0.2s, border-color 0.2s;
}

.toc a:hover,
.toc a.is-active {
  color: var(--text);
  border-left-color: var(--accent);
}

.doc > .policy-card,
.doc > .support-card {
  padding: clamp(22px, 3.4vw, 34px);
}

.doc > .policy-card + .policy-card,
.doc > .support-card + .support-card,
.section .wrap > .policy-card + .policy-card,
.section .wrap > .support-card + .support-card {
  margin-top: 14px;
}

.policy-card h2,
.support-card h2 {
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  line-height: 1.5;
}

.policy-card h2 + p,
.support-card h2 + p {
  margin-top: 14px;
}

.doc .policy-card p,
.doc .support-card p,
.section > .wrap > .support-card p {
  font-size: 1rem;
  line-height: 1.95;
}

.policy-card ul,
.support-card ul {
  margin: 16px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
}

.policy-card li,
.support-card li {
  padding-left: 4px;
  line-height: 1.9;
}

.policy-card li + li,
.support-card li + li {
  margin-top: 10px;
}

.policy-card li::marker {
  color: var(--accent);
}

.policy-card code,
.support-card code,
.feature-card code,
.note code,
.faq code,
.steps code {
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

/* ---------- FAQ ---------- */

.faq {
  border-bottom: 1px solid var(--border);
}

.faq-list {
  border-top: 1px solid var(--border);
}

.faq summary {
  position: relative;
  display: block;
  padding: 22px 48px 22px 0;
  cursor: pointer;
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.6;
  list-style: none;
  transition: color 0.2s;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: var(--muted);
  transition: transform 0.3s var(--ease);
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq[open] summary::after {
  transform: rotate(0deg);
}

.faq summary:hover {
  color: var(--accent);
}

.faq > p {
  padding-bottom: 4px;
  color: var(--muted);
  line-height: 1.95;
}

.faq > p:last-child {
  padding-bottom: 24px;
}

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

.site-footer {
  margin-top: clamp(40px, 6vw, 80px);
  padding: 56px 0 40px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, var(--surface));
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-brand p {
  max-width: 22em;
  margin-top: 14px;
  color: var(--faint);
  line-height: 1.8;
}

.footer-title {
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 600;
}

.footer-col ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  display: inline-block;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.84rem;
}

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

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 1040px) {
  .hero,
  .page-hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .hero-visual {
    width: 100%;
    max-width: 620px;
    margin-inline: auto;
  }

  .app-card--featured,
  .band,
  .split-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .link-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
    padding: 4px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .toc ol {
    margin-bottom: 14px;
  }
}

@media (max-width: 760px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 32px;
  }

  .feature-grid,
  .link-grid,
  .link-grid--4,
  .app-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .float-card--chat {
    left: 8px;
  }

  .float-card--icon {
    right: 8px;
  }

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

@media (max-width: 620px) {
  :root {
    --header-h: 58px;
  }

  .wrap,
  .section + .section::before {
    width: calc(100% - 32px);
  }

  .nav {
    gap: 8px;
  }

  .nav-links {
    gap: 2px;
    font-size: 0.84rem;
  }

  .nav-links a {
    padding: 0 9px;
  }

  .nav-links .optional {
    display: none;
  }

  .brand {
    gap: 8px;
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .actions .button {
    flex: 1 1 100%;
  }

  .card,
  .feature-card,
  .support-card,
  .app-card {
    padding: 22px;
  }

  .meta-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .meta-list dt {
    padding-bottom: 2px;
  }

  .meta-list dd {
    padding-top: 0;
    border-top: 0;
  }

  .phone-terminal {
    min-height: 330px;
  }

  .float-card--chat {
    width: 84%;
  }

  .float-card--icon img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
}

@media (max-width: 400px) {
  .brand-name {
    font-size: 0.86rem;
  }

  .brand-mark {
    width: 22px;
    height: 22px;
    border-radius: 7px;
  }

  .brand-mark::after {
    inset: 6px;
  }

  .nav-links a {
    padding: 0 7px;
    font-size: 0.8rem;
  }

  .nav-links .nav-cta {
    margin-left: 2px;
  }
}

@media (hover: none) {
  .card::before,
  .card::after,
  .feature-card::before,
  .feature-card::after,
  .support-card::before,
  .support-card::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  [data-tilt] {
    transform: none !important;
  }
}

@media (forced-colors: active) {
  .grad-text {
    background: none;
    color: CanvasText;
  }

  .aurora {
    display: none;
  }
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps > li {
  position: relative;
  counter-increment: step;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.steps > li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 16px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;
}

.steps h3 {
  font-size: 1.08rem;
  line-height: 1.5;
}

.steps p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.85;
}

.check-list strong {
  display: block;
}

@media (max-width: 1040px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Narrow document column (support FAQ) ---------- */

.doc-narrow {
  max-width: 860px;
}

.doc-narrow > h2 {
  margin-bottom: 28px;
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.doc-narrow > .faq:first-of-type {
  border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
  .announce-sub {
    display: none;
  }
}
