/* InkVoice — monochrome.
   White page, black type, one inverted element: the reading panel (the app at night).
   Literata for headlines and reading text; Instrument Sans for the interface. */

:root {
  --white: #ffffff;
  --black: #000000;
  --grey: #5c5c5c;        /* secondary text */
  --mute: #8a8a8a;        /* tertiary text */
  --rule: #e7e7e7;        /* hairlines */
  --tint: #f6f6f6;        /* quiet surfaces */

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "DejaVu Sans Mono", monospace;

  /* type scale — modest */
  --t-xs: 0.8125rem;
  --t-sm: 0.9rem;
  --t-base: 1rem;
  --t-md: 1.125rem;
  --t-lg: 1.3rem;
  --t-xl: clamp(1.6rem, 2.8vw, 2.15rem);
  --t-demo: clamp(1.3rem, 2.4vw, 1.95rem);
  --t-hero: clamp(2.2rem, 4.6vw, 3.5rem);

  --wrap: 66rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 12px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font: 400 var(--t-base) / 1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: rgba(0, 0, 0, 0.25); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--black); }
:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.9em; }
cite { font-style: italic; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.small { font-size: var(--t-sm); color: var(--grey); }

.skip { position: absolute; left: -999px; top: 0; background: var(--black); color: var(--white); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* ------------------------------------------------------------------ nav */

.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 1.4rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; font: 500 1.05rem/1 var(--serif); }
.brand img { border-radius: 6px; }
.nav nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 1.9rem); }
.nav nav a { text-decoration: none; color: var(--grey); font-size: var(--t-sm); }
.nav nav a:hover { color: var(--black); }
.nav nav a.nav-cta { color: var(--white); background: var(--black); padding: 0.45rem 0.95rem; border-radius: 999px; }
.nav nav a.nav-cta:hover { background: #2b2b2b; }
@media (max-width: 640px) { .nav nav a:not(.nav-cta) { display: none; } }

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

.hero { padding-top: clamp(2.5rem, 7vw, 5rem); }
.hero h1 {
  margin: 0;
  font: 400 var(--t-hero) / 1.08 var(--serif);
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.lede {
  margin: 1.1rem 0 0;
  font-size: var(--t-md);
  line-height: 1.55;
  color: var(--grey);
  max-width: 44ch;
}
.get { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-top: 1.75rem; }
.get-meta { margin: 0; color: var(--mute); font-size: var(--t-sm); }
.get-meta a { color: var(--grey); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 500 var(--t-base) / 1 var(--sans);
  text-decoration: none; border-radius: 999px;
  padding: 0.85rem 1.4rem;
  transition: background 0.2s ease, transform 0.12s ease;
}
.btn-primary { background: var(--black); color: var(--white); }
.btn-primary:hover { background: #2b2b2b; }
.btn-primary:active { transform: scale(0.98); }

/* the reading panel: the one inverted, bold element */
.demo {
  margin: clamp(2.75rem, 6vw, 4rem) 0 0;
  padding: clamp(1.75rem, 4.5vw, 3.25rem) clamp(1.5rem, 5vw, 3.5rem) clamp(1.25rem, 3vw, 1.75rem);
  background: var(--black);
  color: var(--white);
  border-radius: calc(var(--radius) + 4px);
}
.demo-text {
  position: relative;
  margin: 0;
  font: 400 var(--t-demo) / 1.5 var(--serif);
  font-optical-sizing: auto;
  max-width: 44ch;
  text-wrap: pretty;
}
.demo-text .w { position: relative; z-index: 1; transition: color 0.2s ease, opacity 0.25s ease; }
.demo.playing .demo-text .w { opacity: 0.4; }
.demo.playing .demo-text .w.said { opacity: 1; }
.demo-text .w.now { color: var(--black); opacity: 1; }
.marker {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 4px;
  background: var(--white);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.16s ease-out, width 0.16s ease-out, opacity 0.3s ease;
  z-index: 0;
}
.marker.on { opacity: 1; }
.marker.jump { transition: opacity 0.3s ease; }

.demo-bar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.listen {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: 500 var(--t-sm) / 1 var(--sans);
  color: var(--black); background: var(--white);
  border: 0; border-radius: 999px; padding: 0.6rem 1.05rem 0.6rem 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.12s ease;
}
.listen:hover { background: #e9e9e9; }
.listen:active { transform: scale(0.97); }
.listen:focus-visible { outline-color: var(--white); }
.listen svg { width: 1rem; height: 1rem; fill: currentColor; }
.listen .i-pause, .listen[aria-pressed="true"] .i-play { display: none; }
.listen[aria-pressed="true"] .i-pause { display: block; }
.demo-note { color: rgba(255, 255, 255, 0.55); font-size: var(--t-sm); }

/* ------------------------------------------------------------------ screenshot */

.shot { margin-top: clamp(5rem, 11vw, 8rem); }
.shot figure { margin: 0; }
.shot img {
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 30px 70px -30px rgba(0, 0, 0, 0.35);
}
.shot figcaption { margin-top: 1rem; color: var(--grey); font-size: var(--t-sm); }

/* ------------------------------------------------------------------ section heads */

section h2 {
  font: 400 var(--t-xl) / 1.2 var(--serif);
  letter-spacing: -0.012em;
  margin: 0 0 clamp(1.5rem, 3.5vw, 2.25rem);
  max-width: 24ch;
}

/* ------------------------------------------------------------------ features */

.features { margin-top: clamp(5rem, 11vw, 8rem); }
.features dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 4vw, 3rem);
}
.features dl > div { padding-block: 1.25rem 1.5rem; border-top: 1px solid var(--rule); }
.features dt { font: 500 var(--t-md) / 1.3 var(--serif); margin-bottom: 0.4rem; }
.features dd { margin: 0; color: var(--grey); font-size: var(--t-sm); line-height: 1.6; max-width: 34ch; }
@media (max-width: 900px) { .features dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features dl { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ steps */

.steps {
  margin-top: clamp(5rem, 11vw, 8rem);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}
.steps ol { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 1.35rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; color: var(--grey); font-size: var(--t-sm); max-width: 38ch; }
.steps li::before { content: counter(s); font: 400 var(--t-md) / 1.35 var(--serif); color: var(--black); }
.steps li p { margin: 0; }
.steps li strong { display: block; color: var(--black); font-weight: 500; font-size: var(--t-base); margin-bottom: 0.1rem; }
.steps img { border-radius: var(--radius); box-shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.35); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ download */

.download { margin-top: clamp(5rem, 11vw, 8rem); }
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 1.25rem); }
.platform {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
  display: flex; flex-direction: column; align-items: flex-start;
}
.platform.mine { border-color: var(--black); }
.platform h3 { font: 500 var(--t-lg) / 1.2 var(--serif); margin: 0 0 0.3rem; }
.platform > p { margin: 0 0 1.2rem; color: var(--grey); font-size: var(--t-sm); }
.platform .small { margin: 0.9rem 0 0; }
.cmd {
  width: 100%;
  display: flex; align-items: stretch;
  background: var(--tint);
  border-radius: 10px;
  overflow: hidden;
}
.cmd code { flex: 1; padding: 0.75rem 0.9rem; overflow-x: auto; white-space: nowrap; font-size: 0.8rem; }
.copy {
  font: 500 var(--t-xs) / 1 var(--sans);
  background: var(--black); color: var(--white);
  border: 0; padding: 0 1rem; cursor: pointer;
}
.copy:hover { background: #2b2b2b; }
.also { color: var(--grey); margin-top: 1.25rem; font-size: var(--t-sm); }
@media (max-width: 760px) { .platforms { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ faq */

.faq { margin-top: clamp(5rem, 11vw, 8rem); }
.faq-list { max-width: 44rem; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1rem 2.25rem 1rem 0;
  position: relative;
  font: 500 var(--t-base) / 1.4 var(--sans);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { /* plus / minus */
  content: ""; position: absolute; right: 0.3rem; top: 50%;
  width: 0.75rem; height: 1.5px; background: var(--black);
  transition: transform 0.2s ease;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { margin: 0 0 1.15rem; color: var(--grey); font-size: var(--t-sm); max-width: 62ch; }

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

.foot { margin-top: clamp(5rem, 11vw, 7rem); padding-block: 2rem 2.5rem; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot p { margin: 0; font-size: var(--t-sm); color: var(--grey); max-width: 52ch; }
.foot .brand { font-size: var(--t-base); color: var(--black); }

@media (prefers-reduced-motion: reduce) {
  .marker, .demo-text .w, .listen, .btn, .faq summary::after { transition: none; }
}
