/* Yomita — product pages (/products/*)
 *
 * Loaded after /styles.css and builds on its tokens and components: .topbar,
 * .hero, .head, .ph, .btn, .eyebrow, .chip, .principles. Nothing here redefines
 * a token. A change to the palette belongs in styles.css, not here.
 *
 * In a file of its own rather than in <style> for the same reason as wave.js:
 * the Content-Security-Policy is `style-src 'self'` with no 'unsafe-inline'
 * (client/nginx.conf). Inline `style=""` attributes are blocked too, so every
 * one-off goes into a class here.
 *
 * The three `.ph` shapes below carry real art and so are cut to what was
 * actually shot: screenshots at roughly the iPhone's 1170×2470 (the captured 2532
 * less the debug HUD along the bottom, which is a dev-build overlay and not
 * part of the app), photographs at 16:9 wide and 4:5 tall.
 * Change a crop and change the matching aspect-ratio, or `object-fit: cover`
 * will silently trim the subject out of the frame.
 */

/* --- header: mark the current page -------------------------------------- */

nav a[aria-current="page"] { color: var(--ink); }

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

.p-hero { padding-block: clamp(56px, 9vw, 112px) 0; }

.p-hero .eyebrow { margin-bottom: 22px; }
.p-hero .eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.p-hero h1 { max-width: 15ch; }

.p-hero .specs { margin-top: 22px; }

.p-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: end;
}

@media (min-width: 900px) {
  .p-hero-grid { grid-template-columns: 1.25fr 1fr; gap: 64px; }
}

/* --- image frames ---------------------------------------------------------
 * Three shapes: a phone screenshot, a wide photograph, and a portrait one.
 * Each keeps a gradient in `--g` so a frame whose image has not arrived yet
 * still reads as part of the page rather than as a hole. */

.ph.phone {
  aspect-ratio: 1170 / 2470;
  max-width: 320px;
  margin-inline: auto;
  border-radius: 36px;
  box-shadow: inset 0 0 0 1px var(--line);
  --g: linear-gradient(170deg, #f7f1fa 0%, #fbf4ec 100%);
}

.ph.photo-wide {
  aspect-ratio: 16 / 9;
  --g: radial-gradient(120% 90% at 50% 110%, #fce9d2 0%, #f6e6ef 40%, #e6ddf5 75%, #f5f1fb 100%);
}

.ph.photo-tall {
  aspect-ratio: 4 / 5;
  --g: linear-gradient(160deg, #efe6f7, #fbf1e6);
}

.p-hero .ph.photo-wide { margin-top: clamp(40px, 6vw, 72px); }

/* --- mode switch cards (Translator) -------------------------------------- */

.modes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 760px) { .modes { grid-template-columns: 1fr 1fr; } }

.mode-card {
  display: block;
  text-decoration: none;
  border-radius: 10px;
  padding: clamp(24px, 3.4vw, 40px);
  background: var(--wash);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.2s, background 0.2s;
}

.mode-card:hover { background: #f3eef6; box-shadow: inset 0 0 0 1px #ddd4e4; }

.mode-card .eyebrow { color: var(--accent); }

.mode-card h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 14px 0 10px;
}

.mode-card p { margin: 0; color: var(--ink-2); max-width: 36ch; }

.mode-card .specs { margin-top: 22px; }

.mode-card .go {
  display: inline-block;
  margin-top: 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

/* --- feature split: text beside a screenshot ------------------------------ */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .split { grid-template-columns: 1.15fr 1fr; gap: 72px; }
  .split.flip-order > :first-child { order: 2; }
}

.split h2 { max-width: 13ch; }

.split .lede-sm {
  color: var(--ink-2);
  font-size: 18px;
  max-width: 40ch;
  margin: 22px 0 0;
  text-wrap: pretty;
}

.points { list-style: none; padding: 0; margin: 36px 0 0; }

.points li {
  border-top: 1px solid var(--line);
  padding: 18px 0 16px;
}

.points h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
}

.points p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 46ch; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  background: #fff;
}

/* The row of moods under Converse. Rose outline on the one that is "on", so
   the row reads as a control rather than a list of adjectives. */
.tag.on { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-soft); background: rgb(222 59 98 / 5%); }

/* Seventeen of them rather than five, so the row wants to breathe and to read
   as a catalogue instead of as a control. */
.tags.langs { gap: 10px; margin-top: 0; max-width: 72ch; }
.tags.langs .tag { font-size: 13px; padding: 8px 14px; }

/* --- scenarios: small photo cards ---------------------------------------- */

.scenes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px 20px;
}

@media (min-width: 600px) { .scenes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .scenes { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .scenes.three { grid-template-columns: repeat(3, 1fr); } }

.scene h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.015em;
  margin: 16px 0 4px;
}

.scene p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 30ch; }

.scene .chip { margin-top: 10px; }

/* --- comparison table ----------------------------------------------------- */

.compare-wrap { overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }

.compare {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
}

.compare th,
.compare td {
  text-align: left;
  vertical-align: top;
  padding: 16px 16px 16px 0;
  border-top: 1px solid var(--line);
}

.compare { table-layout: fixed; }
.compare thead td { border-top: 0; width: 22%; }

.compare thead th {
  border-top: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  padding-bottom: 12px;
}

.compare tbody th {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  width: 22%;
  padding-top: 19px;
}

.compare td { color: var(--ink-2); width: 39%; }

/* --- speech bubbles (Tutor) ------------------------------------------------
 * The four things you can say to a person that you cannot say to a flashcard.
 * Drawn as the brand's shape language — a round body and one point — rather
 * than as an icon set. */

.asks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px)  { .asks { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .asks { grid-template-columns: repeat(4, 1fr); } }

.ask { display: flex; flex-direction: column; }

.ask .bubble {
  position: relative;
  margin: 0;
  max-width: none;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(21px, 2.1vw, 25px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  background: var(--wash);
  border-radius: 20px 20px 20px 6px;
  padding: 22px 22px 24px;
  box-shadow: inset 0 0 0 1px var(--line);
}

@media (min-width: 1080px) { .ask .bubble { min-height: 132px; } }

.ask .bubble .said {
  display: block;
  margin-top: 10px;
  font-family: var(--body);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0;
  color: var(--muted);
}

.ask h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.015em;
  margin: 20px 0 4px;
}

.ask p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 32ch; }

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

.steps { list-style: none; padding: 0; margin: 36px 0 0; counter-reset: step; }

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0 14px;
  border-top: 1px solid var(--line);
  padding: 18px 0 16px;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  padding-top: 5px;
}

.steps h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
}

.steps p { grid-column: 2; margin: 0; color: var(--ink-2); font-size: 15px; max-width: 46ch; }

/* --- the 1-10 ladder ------------------------------------------------------ */
/* Built from the same parts as .steps — a mono number in the accent, a rule
   above each row — because it is the same kind of list and a second visual
   language for it would read as a second idea. The phase is the only addition:
   a heading row with the range where a number would be. */

.ladder { margin-top: 44px; display: grid; gap: 44px; }

/* The second paragraph in the levels head: what the classes actually cover. */
.focus { margin-top: 14px !important; color: var(--ink) !important; }

.phase-head {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0 14px;
  align-items: baseline;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}

.phase-head .range {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}

.phase-head h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 0;
}

.phase-head p {
  grid-column: 2;
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  max-width: 46ch;
}

.rungs { list-style: none; padding: 0; margin: 10px 0 0; }

.rungs li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0 14px;
  border-top: 1px solid var(--line);
  padding: 16px 0 14px;
}

.rungs .n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  padding-top: 5px;
}

.rungs h4 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
}

.rungs p { grid-column: 2; margin: 0; color: var(--ink-2); font-size: 15px; max-width: 52ch; }

@media (min-width: 900px) {
  /* Two columns of phases on a wide screen: ten rungs in one column is a
     scroll nobody finishes, and the phases are the natural break. */
  .ladder { grid-template-columns: 1fr 1fr; gap: 44px 48px; }
}

/* --- two phones side by side --------------------------------------------- */

.phones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 520px;
  margin-inline: auto;
  width: 100%;
}

.phones .ph.phone { max-width: none; border-radius: 28px; }

/* --- FAQ ------------------------------------------------------------------ */

.faq { border-bottom: 1px solid var(--line); }

.faq details { border-top: 1px solid var(--line); }

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(18px, 1.8vw, 21px);
  letter-spacing: -0.015em;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-weight: 400;
  color: var(--muted);
  flex: none;
}

.faq details[open] summary::after { content: "–"; }

.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.faq details p {
  margin: 0 0 24px;
  color: var(--ink-2);
  max-width: 64ch;
}

/* --- cross-sell ----------------------------------------------------------- */

.sibling {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  border-radius: 10px;
  padding: clamp(24px, 4vw, 48px);
  background: var(--wash);
  text-decoration: none;
}

@media (min-width: 760px) { .sibling { grid-template-columns: 1fr auto; } }

.sibling h2 { margin-top: 10px; font-size: clamp(28px, 3.4vw, 40px); max-width: 20ch; }
.sibling p { margin: 10px 0 0; color: var(--ink-2); max-width: 44ch; }
