:root {
  --bg: #131010;
  --surface: #1c1715;
  --surface2: #231d19;
  --border: #2e2724;
  --text: #f6f1ea;
  --text2: #e2d9cf;
  --text-muted: #948a80;
  --primary: #ff5a26;
  --primary-dark: #cc4820;
  --on-primary: #131010;
  --danger: #e5645b;
  --success: #7bc47f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

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

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text2);
  font-size: 0.92rem;
  text-decoration: none;
}

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

.nav-links .theme-trigger {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 8px 32px color-mix(in srgb, var(--primary) 28%, transparent);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
}

/* Hero */
.hero {
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background: radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 60%),
    radial-gradient(ellipse at 80% 10%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 50%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-badge span {
  color: var(--primary);
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1.05;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-family: var(--mono);
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text2);
  max-width: 520px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.stat {
  min-width: 120px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone-mock {
  width: min(320px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.phone-screen {
  background: var(--bg);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.phone-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.phone-header h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.phone-header p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.phone-body {
  padding: 20px;
  display: grid;
  gap: 12px;
}

.recipe-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.recipe-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 30%, transparent), var(--surface));
  flex-shrink: 0;
}

.recipe-card h4 {
  margin: 0;
  font-size: 0.9rem;
}

.recipe-card p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terry-float {
  position: absolute;
  right: -20px;
  bottom: -10px;
  width: 140px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Sections */
section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.05rem;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: background 0.25s ease, border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-family: var(--mono);
  letter-spacing: 0.06em;
}

.feature-card p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.feature-points li {
  font-size: 0.82rem;
  color: var(--text2);
  padding-left: 14px;
  position: relative;
}

.feature-points li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* Deep-dive feature sections */
.section-alt {
  background: linear-gradient(180deg, var(--bg), var(--surface) 40%, var(--bg));
}

.deep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.deep-grid.reverse .deep-content {
  order: 2;
}

.deep-grid.reverse .deep-panel {
  order: 1;
}

.deep-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 8px 0 14px;
  letter-spacing: -0.02em;
}

.deep-content > p {
  color: var(--text-muted);
  margin: 0 0 24px;
  font-size: 1.02rem;
  line-height: 1.65;
}

.deep-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.deep-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.deep-list strong {
  display: block;
  font-size: 0.88rem;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  color: var(--text);
}

.deep-list span {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.deep-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.deep-panel h3 {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.capability-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.capability {
  font-size: 0.78rem;
  font-family: var(--mono);
  letter-spacing: 0.03em;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
}

.workflow-steps {
  display: grid;
  gap: 0;
  counter-reset: step;
}

.workflow-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  counter-increment: step;
}

.workflow-step:last-child {
  border-bottom: none;
}

.workflow-step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--primary);
  background: rgba(255, 90, 38, 0.12);
  border: 1px solid rgba(255, 90, 38, 0.25);
  border-radius: 10px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.workflow-step h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.workflow-step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

.notif-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.notif-card .time {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.notif-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.notif-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Theme picker */
.theme-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-trigger:hover {
  border-color: var(--primary);
  color: var(--text);
}

.theme-trigger-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--border);
}

.theme-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.theme-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.theme-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 24px;
}

.theme-panel.open {
  transform: translateX(0);
}

.theme-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.theme-panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  font-family: var(--mono);
}

.theme-panel-close {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2rem;
}

.theme-section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.theme-mode-group {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.theme-mode-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.theme-mode-btn.active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.theme-palette-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.palette-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.palette-card:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
}

.palette-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.palette-preview {
  display: block;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--preview-bg) 55%, var(--preview-surface) 55%);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.palette-preview::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--preview-primary);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--preview-primary) 40%, transparent);
}

.palette-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.theme-oled-section[hidden] {
  display: none !important;
}

.theme-oled-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.oled-accent {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--accent);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.oled-accent:hover {
  transform: scale(1.08);
}

.oled-accent.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

.theme-embed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin-top: 24px;
}

.theme-embed-hint {
  margin: 16px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

body.theme-panel-open {
  overflow: hidden;
}

/* Terry section */
.terry-section {
  background: linear-gradient(180deg, var(--bg), var(--surface) 50%, var(--bg));
}

.terry-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}

.terry-avatar-wrap {
  display: flex;
  justify-content: center;
}

.terry-avatar-wrap img {
  width: min(260px, 80%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.terry-chat {
  display: grid;
  gap: 14px;
}

.chat-bubble {
  max-width: 90%;
  padding: 16px 18px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.chat-bubble.user {
  background: var(--surface2);
  border: 1px solid var(--border);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-bubble.terry {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-bottom-left-radius: 4px;
}

.terry-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.terry-pill {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--text2);
  cursor: help;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.terry-pill:hover,
.terry-pill:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  color: var(--text);
  outline: none;
}

.terry-pill[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  width: max-content;
  max-width: min(280px, 70vw);
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--text2);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 20;
}

.terry-pill[data-tooltip]::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%) translateY(6px);
  border: 6px solid transparent;
  border-top-color: var(--border);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 21;
}

.terry-pill:hover::after,
.terry-pill:hover::before,
.terry-pill:focus-visible::after,
.terry-pill:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (hover: none) {
  .terry-pill[data-tooltip]:active::after,
  .terry-pill[data-tooltip]:active::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}

/* Modes */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.mode-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.mode-card.recommended::after {
  content: "RECOMMENDED";
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  padding: 4px 10px;
  border-radius: 999px;
}

.mode-card h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

.mode-card p {
  color: var(--text-muted);
  margin: 0 0 20px;
}

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

.mode-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text2);
}

.mode-list li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

/* Stack */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stack-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
}

.stack-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.stack-item span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Download */
.download-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.download-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, transparent), var(--surface2));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
}

.download-box h2 {
  margin: 0 0 12px;
  font-size: 2rem;
}

.download-box p {
  margin: 0;
  color: var(--text-muted);
  max-width: 520px;
}

.download-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 220px;
}

.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text2);
  overflow-x: auto;
  margin-top: 24px;
}

/* Footer */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

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

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Privacy page */
.page-header {
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 2.4rem;
}

.page-header p {
  margin: 0;
  color: var(--text-muted);
}

.legal-content {
  padding: 48px 0 80px;
  max-width: 720px;
}

.legal-content h2 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
  color: var(--text);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  color: var(--text2);
  font-size: 0.98rem;
}

.legal-content ul {
  padding-left: 20px;
}

.legal-content li {
  margin-bottom: 8px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.version-badge {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  color: var(--primary);
}

/* Screenshots */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  align-items: start;
  max-width: 920px;
  margin: 0 auto;
}

.screenshot-card {
  margin: 0;
}

.screenshot-card figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.phone-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.phone-frame img,
.phone-frame picture {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  border-radius: 20px;
  border: 1px solid var(--border);
  /* Never upscale beyond native pixels */
  image-rendering: auto;
}

.screenshot-card button.phone-frame {
  width: 100%;
  cursor: zoom-in;
  border: none;
  font: inherit;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.screenshot-card button.phone-frame:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
  transform: translateY(-2px);
}

.screenshot-card button.phone-frame:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.screenshot-note {
  text-align: center;
  margin-top: 28px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.screenshot-note code {
  color: var(--text2);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: min(1272px, 100%);
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

/* Legacy mockup styles kept for hero phone widget */
.app-screen {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 9 / 16;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  font-size: 0.72rem;
}

.app-screen-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  letter-spacing: 0.06em;
  color: var(--text);
}

.app-search {
  margin: 10px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.app-tabs {
  display: flex;
  gap: 8px;
  padding: 0 12px 10px;
  overflow: hidden;
}

.app-tabs span {
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.app-tabs span.active {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  color: var(--primary);
}

.app-recipe-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 12px 8px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.app-recipe-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 35%, transparent), var(--surface2));
  flex-shrink: 0;
}

.app-recipe-img.alt {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 20%, transparent), var(--surface2));
}

.app-recipe-img.alt2 {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 28%, transparent), var(--bg));
}

.app-recipe-row strong {
  display: block;
  color: var(--text);
  font-size: 0.75rem;
}

.app-recipe-row small {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.app-nav {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 1rem;
}

.app-nav span.active {
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--primary) 50%, transparent));
}

.app-chat {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-chat-user {
  align-self: flex-end;
  max-width: 80%;
  padding: 8px 10px;
  border-radius: 12px 12px 4px 12px;
  background: var(--primary);
  color: var(--on-primary);
}

.app-chat-terry {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  max-width: 90%;
  padding: 8px 10px;
  border-radius: 12px 12px 12px 4px;
  background: var(--surface);
  border-left: 3px solid var(--primary);
  color: var(--text2);
  line-height: 1.4;
}

.app-chat-terry img {
  border-radius: 6px;
  flex-shrink: 0;
}

.app-chat-action {
  align-self: flex-start;
  margin-left: 36px;
  padding: 6px 10px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.app-chat-input {
  margin: 0 12px 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
}

.app-week {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  gap: 4px;
}

.app-week span {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  padding: 4px 6px;
  border-radius: 6px;
}

.app-week span.active {
  background: var(--primary);
  color: var(--on-primary);
}

.app-meal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 12px 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.app-meal span {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}

.app-meal strong {
  color: var(--text);
  font-size: 0.72rem;
}

.app-meal em {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-style: normal;
}

.app-meal.filled {
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

.app-fill-btn {
  margin: auto 12px 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  cursor: default;
}

.app-cook-step {
  flex: 1;
  padding: 20px 16px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  text-align: center;
}

.app-timer {
  display: flex;
  justify-content: space-between;
  margin: 0 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--mono);
}

.app-timer .running {
  color: var(--primary);
  font-size: 0.65rem;
}

.app-cook-actions {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.app-cook-actions .primary {
  color: var(--primary);
}

.app-panic {
  margin: 0 12px 12px;
  padding: 10px;
  text-align: center;
  border-radius: 10px;
  border: 1px dashed var(--border);
  color: var(--text2);
  font-size: 0.72rem;
}

/* Quick start */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.step-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.step-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.step-card p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.step-card .code-block {
  margin-top: 0;
  font-size: 0.75rem;
}

.step-card .btn {
  width: 100%;
}

/* Architecture */
.arch-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.arch-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  min-width: 140px;
  max-width: 180px;
}

.arch-node.highlight {
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

.arch-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.arch-node strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.arch-node span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.arch-arrow {
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 700;
}

.arch-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Security */
.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.security-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.security-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.security-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.security-card code {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--text2);
}

/* Changelog */
.changelog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.changelog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.changelog-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.changelog-status {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  color: var(--primary);
}

.changelog-status.released {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  border-color: color-mix(in srgb, var(--success) 30%, transparent);
  color: var(--success);
}

.changelog-date {
  margin: 0 0 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.changelog-card ul {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--text2);
  font-size: 0.9rem;
}

.changelog-card li {
  margin-bottom: 6px;
}

.changelog-card a {
  font-size: 0.88rem;
  font-weight: 600;
}

/* FAQ */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.faq-item summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--primary);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.faq-item code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--text2);
}

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

  .terry-float {
    animation: none;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .terry-grid,
  .modes-grid,
  .download-box,
  .deep-grid {
    grid-template-columns: 1fr;
  }

  .deep-grid.reverse .deep-content,
  .deep-grid.reverse .deep-panel {
    order: unset;
  }

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

  .notif-grid {
    grid-template-columns: 1fr;
  }

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

  .steps-grid,
  .security-grid,
  .changelog-grid {
    grid-template-columns: 1fr;
  }

  .arch-arrow {
    transform: rotate(90deg);
  }

  .hero-visual {
    order: -1;
  }

  .terry-float {
    right: 10px;
    width: 110px;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 32px);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .theme-trigger-label {
    display: none;
  }

  .features-grid,
  .terry-features,
  .stack-grid,
  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 64px;
  }

  .download-box {
    padding: 28px;
  }
}