/* YomiAI LP — Linear-inspired minimal */
:root {
  --accent: #4A90D9;
  --accent-soft: color-mix(in oklch, var(--accent) 12%, transparent);
  --accent-strong: color-mix(in oklch, var(--accent) 85%, #000);

  --bg: oklch(0.993 0.002 240);
  --bg-2: oklch(0.975 0.004 240);
  --bg-3: oklch(0.955 0.006 240);
  --fg: oklch(0.18 0.008 250);
  --fg-muted: oklch(0.48 0.01 250);
  --fg-subtle: oklch(0.62 0.008 250);
  --line: oklch(0.90 0.006 250);
  --line-strong: oklch(0.82 0.008 250);
  --card: #ffffff;
  --shadow-sm: 0 1px 0 rgba(16,24,40,0.04), 0 1px 2px rgba(16,24,40,0.04);
  --shadow-md: 0 4px 12px -4px rgba(16,24,40,0.08), 0 8px 24px -8px rgba(16,24,40,0.06);
  --shadow-lg: 0 24px 48px -12px rgba(16,24,40,0.18), 0 48px 100px -24px rgba(16,24,40,0.10);
}

[data-theme="dark"] {
  --bg: oklch(0.155 0.008 250);
  --bg-2: oklch(0.195 0.010 250);
  --bg-3: oklch(0.225 0.012 250);
  --fg: oklch(0.97 0.004 250);
  --fg-muted: oklch(0.72 0.012 250);
  --fg-subtle: oklch(0.55 0.010 250);
  --line: oklch(0.28 0.012 250);
  --line-strong: oklch(0.36 0.014 250);
  --card: oklch(0.21 0.010 250);
  --shadow-sm: 0 1px 0 rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px -4px rgba(0,0,0,0.4), 0 8px 24px -8px rgba(0,0,0,0.3);
  --shadow-lg: 0 24px 48px -12px rgba(0,0,0,0.6), 0 48px 100px -24px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--fg);
  font-family: 'Inter', 'Noto Sans JP', -apple-system, system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  transition: background 0.3s ease, color 0.3s ease;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.jp { font-family: 'Noto Sans JP', system-ui, sans-serif; }

/* Container */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
}

/* Prevent horizontal overflow anywhere */
html, body { overflow-x: hidden; max-width: 100%; }
img, svg { max-width: 100%; }

/* Header / nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklch, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 12px;
}
@media (max-width: 860px) {
  .nav-links { display: none; }
}
@media (max-width: 720px) {
  .nav-inner { height: 56px; gap: 8px; }
  .nav-actions .btn-primary { padding: 8px 12px; font-size: 13px; }
}
@media (max-width: 380px) {
  .nav-actions .icon-btn { display: none; }
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}
.logo-mark {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: url('assets/AppIcon.png') center/cover;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 0 0 0.5px rgba(0,0,0,0.06);
  overflow: hidden;
  text-indent: -9999px; /* hide the legacy "Y" */
}
.nav-links {
  display: flex; gap: 28px; align-items: center;
}
@media (max-width: 860px) {
  .nav-links { display: none !important; }
}
.nav-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--fg); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--fg); background: var(--bg-2); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 1px 0 0 rgba(255,255,255,0.2) inset, 0 0 0 1px color-mix(in oklch, var(--accent) 60%, black);
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-0.5px); }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--line-strong); }
.btn-lg {
  padding: 11px 20px;
  font-size: 14.5px;
  border-radius: 10px;
}

/* Badges */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--fg-muted);
  background: var(--bg-2);
  letter-spacing: 0.02em;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 20%, transparent);
}

/* Section label */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}

/* Headings */
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; font-weight: 600; }
.display {
  font-size: clamp(36px, 5.2vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  overflow-wrap: break-word;
  word-break: keep-all;
}
.h2 {
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
  overflow-wrap: break-word;
  word-break: keep-all;
}
.h3 {
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.lede {
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--fg-muted);
  line-height: 1.55;
  max-width: 56ch;
}

.text-en { color: var(--fg-subtle); font-size: 13px; letter-spacing: 0.01em; margin-top: 4px; }

/* Sections */
section { padding: 100px 0; position: relative; }
.section-head { margin-bottom: 56px; max-width: 720px; }
@media (max-width: 720px) {
  section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
}

/* Grid utilities */
.grid { display: grid; gap: 24px; }

/* Hero */
.hero {
  padding-top: 72px;
  padding-bottom: 100px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 720px) {
  .hero { padding-top: 40px; padding-bottom: 56px; }
  .hero-meta { flex-wrap: wrap; gap: 12px 18px; font-size: 11.5px; }
  .hero-cta { margin-top: 24px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
}
.hero-cta {
  display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap;
}
.hero-meta {
  display: flex; gap: 22px; margin-top: 28px;
  font-size: 12.5px; color: var(--fg-subtle);
  font-family: 'JetBrains Mono', monospace;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .chk {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: inline-grid; place-items: center;
  color: var(--accent);
}

.hero-bg {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 720px; height: 720px;
  background: radial-gradient(circle at center, color-mix(in oklch, var(--accent) 14%, transparent) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* Phone stage */
.phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 680px;
  overflow: hidden;
}
.hero-phone-scale { transform: scale(0.78); transform-origin: center; }
@media (max-width: 720px) {
  .phone-stage { min-height: 540px; }
  .hero-phone-scale { transform: scale(0.62); }
}
@media (max-width: 420px) {
  .phone-stage { min-height: 460px; }
  .hero-phone-scale { transform: scale(0.54); }
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: start;
}
.gallery-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.gallery-phone {
  transform: scale(0.66);
  transform-origin: top center;
  height: 580px;
}
@media (max-width: 960px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: 1fr; gap: 16px; }
  .gallery-phone { transform: scale(0.58); height: 520px; }
}
.phone-stage .grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}

/* Feature cards */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; } }

.feature-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.3s ease;
}
@media (max-width: 640px) {
  .feature-card { padding: 22px; border-radius: 14px; }
  .feature-card .demo { min-height: 0; padding: 14px; }
}
.feature-card:hover { border-color: var(--line-strong); }
.feature-card.wide { grid-column: span 2; }
@media (max-width: 860px) { .feature-card.wide { grid-column: auto; } }

/* Category Lock demo: full-width phone on mobile */
@media (max-width: 640px) {
  .cat-lock-phone {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 260px;
    margin: 0 auto;
  }
}

.feature-card .demo {
  margin: 6px -12px -12px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 20px;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 auto;
}

.feature-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 960px) { .pricing-grid { grid-template-columns: 1fr; max-width: 460px; } }
.price-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  background: var(--card);
  display: flex; flex-direction: column; gap: 20px;
  position: relative;
}
@media (max-width: 640px) {
  .price-card { padding: 24px; }
  .price-card .price { font-size: 34px; }
}
.price-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, color-mix(in oklch, var(--accent) 6%, var(--card)) 0%, var(--card) 40%);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--accent);
}
.price-card .plan-name {
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.price-card .price {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  display: flex; align-items: baseline; gap: 6px;
}
.price-card .price small { font-size: 14px; color: var(--fg-muted); font-weight: 400; }
.price-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.price-card li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; color: var(--fg-muted);
}
.price-card li svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }

.ribbon {
  position: absolute; top: -11px; right: 24px;
  background: var(--accent); color: white;
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  padding: 4px 10px; border-radius: 999px;
}

/* FAQ */
.faq {
  max-width: 760px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  cursor: pointer;
}
.faq-q {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  font-weight: 500; font-size: 16px;
  letter-spacing: -0.01em;
}
.faq-q .plus {
  width: 20px; height: 20px; display: grid; place-items: center;
  color: var(--fg-muted); flex-shrink: 0;
  transition: transform 0.25s ease;
}
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  color: var(--fg-muted);
  font-size: 14.5px;
  line-height: 1.7;
  transition: max-height 0.35s ease, margin-top 0.35s ease;
}
.faq-item.open .faq-a { max-height: 400px; margin-top: 12px; }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  color: var(--fg-muted);
  font-size: 13px;
}
@media (max-width: 640px) {
  footer { padding: 40px 0 28px; }
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 {
  font-size: 11px; color: var(--fg-subtle);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 500;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--fg-muted); text-decoration: none; font-size: 13px; }
.footer-grid a:hover { color: var(--fg); }

.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  text-decoration: none;
  transition: all 0.15s ease;
}
.store-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.store-btn .s-small { font-size: 10px; color: var(--fg-subtle); letter-spacing: 0.02em; }
.store-btn .s-big { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  width: 260px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  display: none;
}
@media (max-width: 480px) {
  .tweaks-panel { width: calc(100vw - 24px); right: 12px; bottom: 12px; }
}
.tweaks-panel.active { display: block; }
.tweaks-panel h4 {
  font-size: 11px; font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-subtle); margin-bottom: 12px; font-weight: 500;
}
.tweaks-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.tweaks-row > span { font-size: 12.5px; color: var(--fg-muted); }
.swatches { display: flex; gap: 8px; }
.swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.swatch:hover { transform: scale(1.1); }
.swatch.active { border-color: var(--fg); transform: scale(1.1); }

.toggle {
  width: 38px; height: 22px; border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}
.toggle.on { background: var(--accent); }
.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.toggle.on::after { transform: translateX(16px); }

/* Language segmented control (Tweaks panel) */
.lang-seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  background: var(--bg);
  gap: 2px;
}
.lang-seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fg-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-seg-btn:hover { color: var(--fg); }
.lang-seg-btn.active {
  background: var(--fg);
  color: var(--bg);
}

/* Gallery */
.gallery-strip {
  display: flex;
  gap: 24px;
  padding: 20px 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery-strip::-webkit-scrollbar { display: none; }
.gallery-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

/* Keycap */
kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg-muted);
}

/* Metrics strip */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
.metric {
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}
.metric:last-child { border-right: none; }
@media (max-width: 720px) {
  .metric:nth-child(2) { border-right: none; }
  .metric { padding: 20px 16px; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
.metric-num {
  font-size: 34px; font-weight: 600; letter-spacing: -0.03em;
  color: var(--fg);
}
@media (max-width: 640px) { .metric-num { font-size: 26px; } }
.metric-lbl {
  font-size: 12px; color: var(--fg-subtle);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em; text-transform: uppercase;
  margin-top: 4px;
}
