:root {
  --bg: #f1f6ee;
  --bg-deep: #e4ebe0;
  --paper: #fafbf9;
  --ink: #1c2617;
  --muted: #45503f;
  --accent: #75259d;
  --accent-deep: #54206f;
  --accent-soft: #eee1f4;
  --lilac: #c188dd;
  --ice: #25617e;
  --ice-soft: #d4e9ed;
  --line: #c4cfbe;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --nav: 4.25rem;
  color-scheme: light;
}

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

html,
body {
  margin: 0;
  overflow-x: clip;
  max-width: 100%;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img,
svg,
video,
canvas { max-width: 100%; }

h1,
h2,
h3,
p { overflow-wrap: anywhere; }

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: clamp(2.4rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.15; }

h1 em,
h2 em { font-style: italic; }

p { margin: 0; }

a { color: var(--accent-deep); }
a:hover,
a:focus-visible { color: var(--accent); }

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

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

.skip {
  position: absolute;
  left: 16px;
  top: 0;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 14px;
  z-index: 30;
  border-radius: 8px;
  text-decoration: none;
}

.skip:focus,
.skip:focus-visible { transform: none; color: var(--bg); }

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.site-header,
main,
.site-footer { position: relative; z-index: 1; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 2;
}

.brand svg { width: 32px; height: 32px; flex: none; color: var(--ice); }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  position: relative;
  z-index: 2;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
}

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

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

@media (max-width: 899px) {
  html.js .burger { display: inline-flex; }
  html.js .nav-links {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: calc(var(--nav) + env(safe-area-inset-top) + 12px) 20px 24px;
    padding-left: calc(20px + env(safe-area-inset-left));
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    overflow: auto;
  }
  html.js .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  html.js .nav-links a {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 400;
    min-height: 52px;
    border-bottom: 1px solid var(--line);
  }
}

html.nav-lock,
html.nav-lock body { overflow: hidden; }

.hero {
  min-height: calc(100svh - var(--nav) - env(safe-area-inset-top));
  min-height: calc(100dvh - var(--nav) - env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0 2rem;
}

.hero .wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
  max-width: 68ch;
}

.kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
  margin: 0 0 0.75rem;
}

.lead { font-size: 1.05rem; max-width: 62ch; color: var(--ink); }
.copy p + p { margin-top: 1rem; }
.band-deep { background: var(--bg-deep); }
.band-paper { background: var(--paper); }
.spaced { margin-top: 1.25rem; }

.muted { color: var(--muted); }

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0.25rem;
}
.actions.spaced { margin-top: 1.25rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover,
.btn-primary:focus-visible,
.btn-primary:active { background: var(--accent-deep); color: #fff; }

.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover,
.btn-line:focus-visible,
.btn-line:active { background: var(--ink); color: var(--bg); }

.hero-visual {
  position: relative;
  border-radius: 28px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  overflow: hidden;
  min-height: 420px;
}

.hero-chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 18px;
  min-height: 420px;
  align-content: center;
}

.note {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  animation: slide-up 0.7s ease both;
}

.note:nth-child(2) { animation-delay: 0.12s; }
.note:nth-child(3) { animation-delay: 0.24s; }

.note-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.note-ico svg { width: 26px; height: 26px; }

.note-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.92rem;
}

.note-top span { color: var(--muted); font-weight: 600; font-size: 0.78rem; }
.note p { margin-top: 4px; color: var(--muted); font-size: 0.95rem; }

@keyframes slide-up {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes slide-side {
  from { opacity: 0; transform: translate3d(28px, 0, 0); }
  to { opacity: 1; transform: none; }
}

.section { padding: 3.25rem 0; }
.section.flush { padding-top: 0; }
.intro-gap { margin-bottom: 1.25rem; }
.section-head { margin-bottom: 1.5rem; max-width: 68ch; }
.section-head h2 { margin-bottom: 0.75rem; }

.platform-grid,
.bento,
.fact-grid,
.contact-grid { display: grid; gap: 14px; }

.platform,
.card,
.who-card,
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  min-width: 0;
}

.platform h3,
.card h3 { margin: 0.35rem 0 0.5rem; }

.device {
  width: min(100%, 280px);
  margin: 16px auto 0;
  aspect-ratio: 9 / 17;
  background: var(--ink);
  border-radius: 32px;
  padding: 10px;
  color: var(--ink);
  display: flex;
}

.device-screen {
  background: var(--paper);
  border-radius: 24px;
  width: 100%;
  padding: 28px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.device-ios .device-screen::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 78px;
  height: 14px;
  transform: translateX(-50%);
  background: var(--ink);
  border-radius: 999px;
}

.device-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.spark { width: 100%; height: auto; }
.bubble {
  background: var(--ice-soft);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.92rem;
}
.toggle-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
.toggle {
  width: 42px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent);
  position: relative;
  flex: none;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
}
.homebar {
  width: 96px;
  height: 4px;
  border-radius: 999px;
  background: var(--ink);
  margin: 4px auto 0;
}
.device-android .homebar { width: 100%; height: 3px; opacity: 0.35; }

.approach-grid { display: grid; gap: 1.5rem; }
.chart { width: 100%; height: auto; display: block; }

.band {
  background: var(--ink);
  color: var(--paper);
}
.band .kicker { color: var(--lilac); }
.band .muted { color: #c4cfbe; }
.band a { color: var(--paper); }

.route {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.route li {
  border: 1px solid rgba(241, 246, 238, 0.22);
  border-radius: 20px;
  padding: 16px;
  min-height: 210px;
  background: rgba(241, 246, 238, 0.04);
}
.route .num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--lilac);
  color: var(--lilac);
  font-family: var(--serif);
  margin-bottom: 0.8rem;
}
.route h3 { color: var(--paper); margin-bottom: 0.45rem; }

.faqs { border-top: 1px solid var(--line); }
.faqs details { border-bottom: 1px solid var(--line); background: transparent; }
.faqs details[open] { background: var(--paper); }
.faqs summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
}
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary:hover,
.faqs summary:focus-visible { color: var(--accent-deep); }
.plus {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  position: relative;
  flex: none;
}
.plus::before,
.plus::after {
  content: "";
  position: absolute;
  background: var(--accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.plus::before { width: 12px; height: 1.5px; }
.plus::after { width: 1.5px; height: 12px; }
details[open] .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faqs details p { padding: 0 4px 16px; max-width: 75ch; }

.icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  display: block;
}
.card .icon { margin-bottom: 0.25rem; }
.bento .card:first-child { background: var(--accent-soft); }
.mini-chart { margin-top: 12px; width: 100%; height: auto; }

.assistant-grid,
.privacy-layout { display: grid; gap: 1.25rem; }

.chat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 420px;
}
.chat-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.msg {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.5;
}
.msg-user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg-bot { align-self: flex-start; background: var(--ice-soft); color: var(--ink); border-bottom-left-radius: 4px; }
.msg:nth-child(2) { animation: slide-up 0.6s ease both; }
.msg:nth-child(3) { animation: slide-up 0.6s ease 0.1s both; }
.msg:nth-child(4) { animation: slide-up 0.6s ease 0.2s both; }
.msg:nth-child(5) { animation: slide-up 0.6s ease 0.3s both; }

.fact-grid .card strong { display: block; font-family: var(--serif); font-size: 1.8rem; font-weight: 400; margin-bottom: 0.35rem; }

.diagram {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.diagram-box,
.diagram-mid {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  padding: 16px;
  min-height: 120px;
}
.diagram-box strong,
.diagram-mid strong { display: block; font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }
.diagram-mid { display: grid; gap: 12px; background: var(--ice-soft); }
.diagram-stop { background: var(--accent-soft); }
.tag {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ice);
}

.band-accent { background: var(--accent); color: #fff; }
.band-accent .kicker { color: #f1d8fb; }
.band-accent .muted,
.band-accent p { color: #f7f1fb; }
.band-accent a { color: #fff; }
.band-accent .btn-primary { background: var(--paper); color: var(--accent-deep); }
.band-accent .btn-primary:hover,
.band-accent .btn-primary:focus-visible,
.band-accent .btn-primary:active { background: #fff; color: var(--accent-deep); }
.band-accent .btn-line { color: #fff; border-color: #fff; }
.band-accent .btn-line:hover,
.band-accent .btn-line:focus-visible,
.band-accent .btn-line:active { background: #fff; color: var(--accent-deep); }

.contact-band {
  display: grid;
  gap: 1.25rem;
}
.who { font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1; }
.mail-link {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: inherit;
  font-weight: 600;
}

.site-footer {
  padding-top: 2.5rem;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  border-top: 1px solid var(--line);
}
.wordmark {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 8vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.footer-grid { display: grid; gap: 1.25rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); font-weight: 600; text-decoration: none; }
.fine { margin-top: 1rem; max-width: 70ch; }

.page-hero { padding: 2rem 0 1rem; }
.page-hero-grid { display: grid; gap: 1rem; align-items: center; }
.page-chart { width: 100%; height: auto; display: block; }
.date-line { margin-top: 0.8rem; font-weight: 600; }

.article-layout {
  display: grid;
  gap: 1rem;
  padding-bottom: 4rem;
}
.toc-side { display: none; }
.toc-details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: 4px 14px;
}
.toc-details summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}
.toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  border-left: 2px solid var(--line);
  padding-left: 10px;
}
.toc a:hover,
.toc a:focus-visible { border-color: var(--accent); color: var(--accent-deep); }
.prose { max-width: 72ch; }
.prose h2 { margin: 2rem 0 0.6rem; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.prose p,
.prose li { margin-bottom: 0.9rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.prose h2[id],
.section[id] { scroll-margin-top: 5.5rem; }

.form-card label { display: block; font-weight: 600; margin: 0 0 6px; }
.form-card input,
.form-card textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.form-card textarea { min-height: 150px; resize: vertical; }
.form-note { margin-bottom: 14px; }

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (min-width: 640px) {
  .actions { flex-direction: row; flex-wrap: wrap; }
  .btn { width: auto; }
  .bento,
  .fact-grid { grid-template-columns: 1fr 1fr; }
  .bento .card:first-child { grid-column: span 2; }
  .form-card .btn { width: auto; }
}

@media (min-width: 900px) {
  .hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 36px;
    align-items: stretch;
    min-height: calc(100dvh - var(--nav) - 3.5rem);
  }
  .hero-copy { justify-content: center; max-width: none; }
  .hero-visual,
  .stack { min-height: 100%; }
  .note { animation-name: slide-side; }
  .platform-grid { grid-template-columns: 1fr 1fr; }
  .device { width: min(100%, 300px); }
  .approach-grid { grid-template-columns: 0.82fr 1.18fr; align-items: start; gap: 48px; }
  .approach-sticky { position: sticky; top: 5.5rem; }
  .route { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .assistant-grid,
  .privacy-layout,
  .contact-band,
  .contact-grid,
  .page-hero-grid,
  .footer-grid { grid-template-columns: 1fr 1fr; align-items: center; }
  .diagram { grid-template-columns: 1fr 1fr 1fr; align-items: stretch; }
  .article-layout { grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 40px; }
  .toc-details { display: none; }
  .toc-side { display: block; position: sticky; top: 5.5rem; }
  .section { padding: 4.5rem 0; }
}

@media (min-width: 1200px) {
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bento .card:first-child { grid-column: span 2; grid-row: span 2; }
}

@media (max-height: 500px) {
  .hero { min-height: 0; padding: 0.75rem 0 1rem; }
  .hero h1 { font-size: 2rem; }
  .hero-copy { gap: 0.5rem; }
  .hero-visual,
  .stack { min-height: 0; }
}

@media (hover: hover) {
  .card,
  .platform,
  .who-card { transition: transform 0.25s ease; }
  .card:hover,
  .platform:hover,
  .who-card:hover { transform: translateY(-3px); }
}
.card:focus-within,
.card:active,
.platform:focus-within,
.platform:active { transform: translateY(-3px); }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal,
  .js .reveal.is-in { opacity: 1; transform: none; }
}
