/* Voice Context — product site.
   Editorial direction: mincho display type, hanging numerals, rules instead of
   cards, generous measure. The product's claim is that it does not exaggerate,
   so the page does not either. */

:root {
  --paper: #f7f7f9;
  --paper-raised: #ffffff;
  --paper-sunk: #eeeef3;
  --ink: #17171c;
  --ink-soft: #52525e;
  --ink-faint: #8a8a97;
  --rule: #dedee6;
  --rule-strong: #c2c2ce;
  /* From the app icon: the wave's blue-violet, with its cyan as a second note. */
  --accent: #3a2ef0;
  --accent-2: #01bfee;

  --font-display: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --shell: min(1120px, 100% - 3rem);
  --measure: 34rem;
  --step: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101014;
    --paper-raised: #191920;
    --paper-sunk: #0a0a0d;
    --ink: #eceaf2;
    --ink-soft: #a2a0ae;
    --ink-faint: #74727f;
    --rule: #2a2a33;
    --rule-strong: #3e3e4a;
    --accent: #8d82ff;
    --accent-2: #4fd8f5;
  }
}

:root[data-theme="dark"] {
  --paper: #101014;
  --paper-raised: #191920;
  --paper-sunk: #0a0a0d;
  --ink: #eceaf2;
  --ink-soft: #a2a0ae;
  --ink-faint: #74727f;
  --rule: #2a2a33;
  --rule-strong: #3e3e4a;
  --accent: #8d82ff;
  --accent-2: #4fd8f5;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Paper grain. Kept very low contrast so it reads as material, not texture. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

.shell { width: var(--shell); margin-inline: auto; position: relative; z-index: 1; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent); }

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

/* ---------- masthead ---------- */

.masthead {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.75rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  white-space: nowrap;
}

.masthead nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.masthead nav a { text-decoration: none; }
.masthead nav a:hover { color: var(--ink); text-decoration: underline; }

.lang-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding-left: 1.5rem;
  border-left: 1px solid var(--rule);
}

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

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.hero::after {
  /* A hairline that runs off the right edge: the page reads as a spread, not a box. */
  content: "";
  position: absolute;
  left: 0;
  right: -50vw;
  bottom: 0;
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eyebrow::before {
  content: "";
  width: 2.25rem;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.8vw, 3.5rem);
  /* Japanese headlines break mid-phrase by default; browsers that know how to
     break on phrase boundaries should. */
  word-break: auto-phrase;
  line-height: 1.28;
  letter-spacing: 0.01em;
  margin: 0 0 1.75rem;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lede {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  color: var(--ink-soft);
  max-width: 30rem;
  margin: 0 0 2.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  line-height: 1.35;
}

.badge span:first-child {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
}

.badge span:last-child { font-size: 0.9375rem; }

.badge[aria-disabled="true"] {
  background: transparent;
  color: var(--ink);
  border-style: dashed;
  border-color: var(--rule-strong);
  cursor: default;
}

.hero-note {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  max-width: 16rem;
  line-height: 1.7;
  margin: 0;
}

/* device */

.device {
  position: relative;
  justify-self: center;
  width: min(280px, 78%);
  margin-top: 0.75rem;
}

.device::before {
  /* Ghosted rules behind the phone, so it sits on the page instead of floating. */
  content: "";
  position: absolute;
  inset: -18% -32% -8%;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--rule) 0 1px,
    transparent 1px 2.25rem
  );
  opacity: 0.55;
  z-index: -1;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
}

.device img {
  width: 100%;
  border-radius: 2.25rem;
  border: 1px solid var(--rule-strong);
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.04),
    0 12px 28px -12px rgba(0, 0, 0, 0.22),
    0 40px 70px -40px rgba(0, 0, 0, 0.35);
  background: var(--paper-raised);
}

/* ---------- sections ---------- */

section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
section + section { border-top: 1px solid var(--rule); }

.section-head {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0 1.5rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.section-num {
  /* Placed explicitly. Without this the generic `.section-head p` rule below
     also matched the number, took column 2, and pushed the heading into the
     4.5rem column — where Japanese wraps one character per line. */
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  padding-top: 0.65rem;
}

.section-head h2 {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  line-height: 1.45;
  margin: 0;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.section-head p:not(.section-num) {
  grid-column: 2;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.section-body { margin-left: 6rem; max-width: var(--measure); }

@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 0.5rem; }
  .section-num { padding-top: 0; grid-column: 1; grid-row: auto; }
  .section-head h2 { grid-column: 1; grid-row: auto; }
  .section-head p:not(.section-num) { grid-column: 1; }
  .section-body { margin-left: 0; }
}

/* pull quote */

.pull {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3vw, 2rem);
  line-height: 1.7;
  margin: 0;
  max-width: 40rem;
  letter-spacing: 0.01em;
}

.pull-attrib {
  margin: 1.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* structured-output list */

.fields {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.fields li {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.fields dfn {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 1.0625rem;
}

.fields span { color: var(--ink-soft); font-size: 0.9375rem; }

@media (max-width: 620px) {
  .fields li { grid-template-columns: 1fr; }
}

/* two-up: text beside a screen */

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.showcase.flip { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr); }
.showcase.flip .showcase-text { order: 2; }

.showcase-text { max-width: var(--measure); }
.showcase-text h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 1rem;
}
.showcase-text p { color: var(--ink-soft); margin: 0 0 1rem; }
.showcase-text p:last-child { margin-bottom: 0; }

.showcase .device { width: min(240px, 82%); margin-top: 0; }

@media (max-width: 820px) {
  .showcase, .showcase.flip { grid-template-columns: 1fr; }
  .showcase.flip .showcase-text { order: 0; }
  .showcase .device { justify-self: start; }
}

/* privacy ledger */

.ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule-strong);
}

.ledger > div {
  padding: 1.75rem 1.75rem 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}

.ledger > div + div { border-left: 1px solid var(--rule); padding-left: 1.75rem; }

@media (max-width: 720px) {
  .ledger > div + div { border-left: 0; padding-left: 0; }
}

.ledger h3 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.75rem;
  font-weight: 500;
}

.ledger p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.75;
}

/* honest limits */

.limits { list-style: none; margin: 0; padding: 0; }

.limits li {
  position: relative;
  padding: 0 0 1.5rem 2.25rem;
  color: var(--ink-soft);
}

.limits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 1.25rem;
  height: 1px;
  background: var(--accent);
}

.limits strong { color: var(--ink); font-weight: 600; }

/* callout */

.callout {
  border-left: 2px solid var(--accent);
  background: var(--paper-sunk);
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0 0;
}

.callout p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }
.callout p + p { margin-top: 0.75rem; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule-strong);
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: start;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  justify-content: flex-end;
}

.site-footer p { margin: 0 0 0.5rem; max-width: 26rem; }
.site-footer .fine { color: var(--ink-faint); font-size: 0.8125rem; }

@media (max-width: 680px) {
  .footer-grid { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
}

/* ---------- responsive hero ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .device { justify-self: start; width: min(260px, 70%); margin-top: 1.5rem; }
}

/* ---------- motion ---------- */

.rise {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.rise.in { opacity: 1; transform: none; }

.hero .rise { transition-delay: var(--d, 0ms); }

@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
}

/* On a phone the in-page anchors cost a whole extra row of masthead for very
   little — the page is short enough to scroll. Support and language stay. */
@media (max-width: 760px) {
  .masthead { gap: 1rem; padding-top: 1.25rem; }
  .masthead nav { gap: 1.25rem; }
  .masthead nav a[href^="#"] { display: none; }
  .lang-link { padding-left: 1.25rem; }
}
