/* Thoughter page — shared by /thoughter/ and /{zh,ja,ko}/thoughter/ */
:root {
  --paper: #F6F3EC;
  --paper-2: #EAE6DC;
  --surface: #FFFDF8;
  --ink: #1B222C;
  --ink-2: #434C59;
  --ink-3: #6E7785;
  --rule: #DCE0E5;
  --accent: #2B4C7E;
  --accent-hover: #213B63;
  --accent-soft: rgba(43, 76, 126, 0.11);
  --mark: #B4432F;
  --mark-soft: rgba(180, 67, 47, 0.08);
  --night: #14171C;
  --night-ink: #EAECEF;
  --night-ink-2: #B4BCC8;
  --night-rule: #2B313B;
  --shadow-shot: 0 1px 2px rgba(27, 34, 44, 0.06), 0 24px 48px -24px rgba(27, 34, 44, 0.28);
  --font-serif: 'Newsreader', 'Noto Serif SC', 'Noto Serif JP', 'Noto Serif KR', 'Songti SC', 'Hiragino Mincho ProN', 'AppleMyungjo', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans', 'Apple SD Gothic Neo', sans-serif;
  --radius: 14px;
}

[data-theme="dark"] {
  --paper: #14171C;
  --paper-2: #1C2027;
  --surface: #20252D;
  --ink: #EAECEF;
  --ink-2: #B4BCC8;
  --ink-3: #8892A0;
  --rule: #2B313B;
  --accent: #7BA3D8;
  --accent-hover: #96B8E5;
  --accent-soft: rgba(123, 163, 216, 0.16);
  --mark: #E58A77;
  --mark-soft: rgba(229, 138, 119, 0.12);
  --night: #0D0F13;
  --night-rule: #222730;
  --shadow-shot: 0 1px 2px rgba(0, 0, 0, 0.3), 0 24px 48px -24px rgba(0, 0, 0, 0.7);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--rule); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; white-space: nowrap; }
.brand span { color: var(--ink-3); font-weight: 400; }
.nav-links { display: flex; gap: 28px; list-style: none; font-size: .9rem; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  height: 36px; min-width: 36px; padding: 0 10px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--ink-2); font-size: .85rem;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.lang { position: relative; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 140px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
  padding: 6px; display: none; box-shadow: var(--shadow-shot);
}
.lang-menu.is-open { display: block; }
.lang-menu a { display: block; padding: 8px 12px; border-radius: 8px; font-size: .9rem; color: var(--ink-2); }
.lang-menu a:hover, .lang-menu a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
}
.btn-primary { background: var(--accent); color: #FFFDF8; }
[data-theme="dark"] .btn-primary { color: #101620; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-small { height: 36px; padding: 0 16px; font-size: .88rem; }
.btn-ghost { color: var(--ink); padding: 0 6px; }
.btn-ghost:hover { color: var(--accent); }
.btn svg { width: 17px; height: 17px; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.75rem); line-height: 1.12; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.2; }
h3 { font-size: 1.2rem; line-height: 1.4; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ink-2); line-height: 1.7; }
.muted { color: var(--ink-3); font-size: .9rem; }

/* ---------- Sections ---------- */
section { padding: clamp(72px, 9vw, 128px) 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.split.reverse > :first-child { order: 2; }
.copy { max-width: 30rem; }
.copy h2 { margin-bottom: 24px; }
.copy .lead + .lead { margin-top: 16px; }
.facts { list-style: none; margin-top: 32px; display: grid; gap: 12px; color: var(--ink-2); }
.facts li { display: flex; gap: 12px; align-items: baseline; }
.facts li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(16px, 2.8vw, 36px); padding-bottom: clamp(40px, 5vw, 72px); }
.hero .split { grid-template-columns: 1.15fr .85fr; align-items: start; }
.hero .split > :first-child { padding-top: clamp(6px, 1.5vw, 20px); }
.hero-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: .84rem; font-weight: 600; color: var(--accent);
  margin-bottom: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.hero-eyebrow::before {
  content: ""; width: 24px; height: 1.5px; background: var(--accent); flex: none;
}
.hero h1 {
  font-size: clamp(2.25rem, 4.6vw, 3.6rem);
  line-height: 1.22;
  margin-bottom: 18px;
  min-height: 2.44em;
}
.typewriter-hl {
  color: var(--accent);
  background: linear-gradient(180deg, transparent 68%, var(--accent-soft) 68%);
  padding: 0 2px;
  border-radius: 3px;
}
.typewriter-cursor {
  display: inline-block;
  width: 2.5px;
  height: .92em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: -0.08em;
  animation: cursorBlink 1s step-end infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.hero-lead-stack {
  display: grid;
  max-width: 32rem;
}
.hero-lead-item {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .32s ease, transform .32s ease;
}
.hero-lead-item.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.hero-minimal-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin-top: 18px; font-size: .9rem; color: var(--ink-3);
}
.hero-role-btn {
  padding: 2px 0;
  font-size: .9rem;
  font-weight: 400;
  color: var(--ink-3);
  border-bottom: 1.5px solid transparent;
  border-radius: 0;
  transition: color .2s ease, border-color .2s ease;
}
.hero-role-btn:hover { color: var(--ink); }
.hero-role-btn[aria-selected="true"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.hero .lead { max-width: 32rem; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 34px; }
.hero-note { margin-top: 24px; }

.shot {
  width: 100%; max-width: 400px; margin: 0 auto;
  border-radius: 28px; border: 1px solid var(--rule);
  box-shadow: var(--shadow-shot); background: #F3EEE4;
}
.shot-caption { margin-top: 16px; text-align: center; }
.shot-btn { display: block; width: 100%; max-width: 400px; margin: 0 auto; border-radius: 28px; cursor: zoom-in; }

/* ---------- Demo: recall ---------- */
.demo {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 22px;
  padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow-shot);
  font-family: var(--font-serif);
  min-height: 520px;
}
.demo-q {
  margin-left: auto; max-width: 85%; width: fit-content;
  background: var(--paper-2); border-radius: 18px 18px 4px 18px;
  padding: 12px 18px; font-size: 1.05rem; line-height: 1.6;
}
.demo-status {
  display: flex; align-items: center; gap: 10px;
  margin: 24px 0 12px; font-family: var(--font-sans); font-size: .88rem; color: var(--ink-3);
}
.demo-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.demo-status .done-mark { display: none; color: var(--accent); }
.demo.is-done .demo-status .dot { display: none; }
.demo.is-done .demo-status .done-mark { display: inline; }
.demo-status .done-text { display: none; }
.demo.is-done .demo-status .done-text { display: inline; }
.demo.is-done .demo-status .busy-text { display: none; }
@keyframes pulse { 50% { opacity: .3; } }

.demo-notes { list-style: none; display: grid; gap: 10px; }
.demo-note {
  border-left: 2px solid var(--accent); padding: 4px 0 4px 16px;
}
.demo-note time { display: block; font-family: var(--font-sans); font-size: .78rem; color: var(--ink-3); letter-spacing: .02em; }
.demo-note p { font-size: 1rem; line-height: 1.6; color: var(--ink-2); }
.demo-a { margin-top: 24px; font-size: 1.08rem; line-height: 1.75; }
.demo-a mark { background: var(--accent-soft); color: inherit; padding: 0 2px; border-radius: 3px; }

[data-step] { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
[data-step].is-on { opacity: 1; transform: none; }

.demo-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.link-btn { font-size: .88rem; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.link-btn:hover { color: var(--accent); text-decoration-color: currentColor; }

/* ---------- Demo: proposal ---------- */
.proposal {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 22px;
  box-shadow: var(--shadow-shot); overflow: hidden;
}
.proposal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--rule); }
.proposal-title { font-family: var(--font-serif); font-size: 1.02rem; }
.proposal-title b { font-family: var(--font-sans); font-weight: 600; font-size: .78rem; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 6px; margin-right: 8px; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 3px; }
.seg button { font-size: .8rem; padding: 4px 12px; border-radius: 999px; color: var(--ink-3); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.proposal-body { padding: 24px; font-family: var(--font-serif); font-size: 1.06rem; line-height: 1.9; min-height: 220px; }
.proposal-body del { color: var(--mark); background: var(--mark-soft); text-decoration-thickness: 1px; border-radius: 2px; }
.proposal-body ins { text-decoration: none; background: var(--accent-soft); color: var(--accent); border-radius: 2px; }
.proposal.is-after del { display: none; }
.proposal.is-after ins { background: none; color: inherit; }
.proposal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--rule); background: var(--paper); }
.proposal-actions .applied { margin-right: auto; font-size: .88rem; color: var(--accent); display: none; }
.proposal.is-applied .applied { display: inline; }
.proposal.is-applied .seg { visibility: hidden; }

/* ---------- Privacy (dark band) ---------- */
.night { background: var(--night); color: var(--night-ink); }
.night h2 { color: var(--night-ink); max-width: 16em; }
.night .lead { color: var(--night-ink-2); max-width: 36rem; margin-top: 24px; }
.night-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 64px; border-top: 1px solid var(--night-rule); }
.night-grid div { padding: 32px 32px 0 0; }
.night-grid div + div { padding-left: 32px; border-left: 1px solid var(--night-rule); }
.night-grid h3 { color: var(--night-ink); margin-bottom: 8px; }
.night-grid p { color: var(--night-ink-2); font-size: .98rem; }
.models { margin-top: 56px; color: var(--night-ink-2); font-size: .95rem; }
.models strong { color: var(--night-ink); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq h2 { margin-bottom: 40px; }
.faq-list { max-width: 760px; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 24px 40px 24px 0; position: relative;
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-sans); font-size: 1.4rem; color: var(--ink-3); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 40px 24px 0; color: var(--ink-2); }

/* ---------- CTA + footer ---------- */
.cta { text-align: center; padding-bottom: clamp(96px, 12vw, 144px); }
.cta h2 { margin-bottom: 16px; }
.cta .hero-cta { justify-content: center; }
.footer { border-top: 1px solid var(--rule); padding: 32px 0 40px; font-size: .88rem; color: var(--ink-3); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer a:hover { color: var(--ink); }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 520px); max-height: 92vh; margin: auto; }
.lightbox::backdrop { background: rgba(15, 14, 12, 0.78); }
.lightbox img { max-height: 88vh; width: auto; margin: 0 auto; border-radius: 20px; }
.lightbox-close { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.3rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .split, .hero .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .copy, .hero .lead { max-width: none; }
  .demo { min-height: 0; }
  .night-grid { grid-template-columns: 1fr; }
  .night-grid div, .night-grid div + div { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--night-rule); }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .lang-label { display: none; }
  .nav-actions .btn-small span { display: none; }
  .hero-cta .btn-primary { width: 100%; justify-content: center; }
  .shot, .shot-btn { max-width: 340px; border-radius: 24px; }
  .proposal-head { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-step] { opacity: 1; transform: none; transition: none; }
  .demo-status .dot, .typewriter-cursor { animation: none; }
  .hero-lead-item { transition: none; transform: none; }
}
