/* ==========================================================================
   Polyglot Subs – site styles
   --------------------------------------------------------------------------
   To change the brand colour, edit --accent below. Every other accent shade
   (links, buttons, highlights) is mixed from it automatically, in both light
   and dark mode. Mid-tone colours work best.
   ========================================================================== */

:root {
  --accent: #1fa2a0;

  /* Light theme: warm paper and ink */
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --text: #1d1c1a;
  --muted: #5d5a54;
  --border: #e4e0d8;

  /* Derived from --accent – no need to edit */
  --accent-ink: color-mix(in srgb, var(--accent) 72%, #000);   /* links, accent text */
  --accent-fill: var(--accent-ink);                             /* button background */
  --on-accent: #ffffff;                                         /* text on buttons */
  --accent-soft: color-mix(in srgb, var(--accent) 13%, var(--surface));

  /* Noun gender colours in the language samples */
  --g-masc: #2566c9;
  --g-fem: #c2345a;
  --g-neut: #2a7a3b;

  /* No web fonts: these are already on people's devices */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Sitka Heading", "Sitka Text", Charter, "Palatino Linotype", Georgia, "Noto Serif", serif;
  --font-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;

  --container: 1080px;
  --measure: 660px;
  --gutter: 20px;
  --header-h: 64px;
  --space: clamp(56px, 8vw, 96px);

  color-scheme: light dark;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412;
    --surface: #1c1b19;
    --surface-2: #23221f;
    --text: #ecebe7;
    --muted: #aaa69e;
    --border: #33312d;

    --accent-ink: color-mix(in srgb, var(--accent) 70%, #fff);
    --accent-fill: var(--accent);
    --on-accent: #04191a;
    --accent-soft: color-mix(in srgb, var(--accent) 18%, var(--surface));

    --g-masc: #86b4ff;
    --g-fem: #ff91ad;
    --g-neut: #84d494;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2 {
  margin: 0 0 0.5em;
  font-family: var(--font-serif);
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2.125rem);
  font-weight: 600;
}

h3, h4 {
  margin: 0 0 0.4em;
  font-size: 1.125rem;
  line-height: 1.3;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { text-decoration-thickness: 2px; }

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

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

:lang(ja) { font-family: var(--font-ja); }

strong { font-weight: 650; }

figure { margin: 0; }

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: var(--measure); }

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

.small { font-size: 0.9375rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
}

.btn-primary:hover { background: color-mix(in srgb, var(--accent-fill) 86%, var(--text)); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover { border-color: var(--muted); }

.btn-small {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 0.9375rem;
}

.btn-block { width: 100%; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 28px;
  height: 28px;
}

.nav { margin-left: auto; }

.nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.975rem;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.header-cta { margin-left: 8px; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 859px) {
  .menu-toggle { display: inline-flex; }
  .header-cta { margin-left: auto; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .nav.is-open { display: block; }

  .nav ul { flex-direction: column; }

  .nav a {
    padding: 12px 4px;
    font-size: 1.0625rem;
  }
}

@media (max-width: 419px) {
  .header-inner { gap: 8px; }
  .header-cta { padding-inline: 12px; }
}

@media (max-width: 359px) {
  .header-cta { display: none; }
  .menu-toggle { margin-left: auto; }
}

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

main { display: block; }

.section {
  padding-block: var(--space);
  scroll-margin-top: var(--header-h);
}

.section + .section { border-top: 1px solid var(--border); }

/* Heading on the left, content on the right (stacks on phones) */
.split {
  display: grid;
  gap: 8px 56px;
}

@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
}

.split > h2 { margin-bottom: 16px; }

.split + .split,
.split + .shot-wide,
.shot-wide + .split { margin-top: 48px; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(48px, 7vw, 88px) var(--space); }

.hero-text { max-width: 720px; }

.hero .lead {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.hero-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Demo video under the intro */

.hero-video { margin-top: clamp(40px, 6vw, 64px); }

.demo-video {
  display: block;
  width: 100%;
  height: auto;   /* shape comes from the width/height in the HTML */
  border-radius: 10px;
  background: #0a1014;
}

/* ---------- How it works ---------- */

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

.steps li {
  position: relative;
  padding-left: 48px;
  counter-increment: step;
}

.steps li + li { margin-top: 20px; }

.step-action { margin: 12px 0 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  top: -0.1em;
  left: 0;
  color: var(--accent-ink);
  font-family: var(--font-serif);
  font-size: 1.75rem;
  line-height: 1.2;
}

/* ---------- Screenshots ---------- */

.shot {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.shots-2 {
  display: grid;
  gap: 32px 24px;
  margin-top: 48px;
}

@media (min-width: 720px) {
  .shots-2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- Windows app feature list ---------- */

.feature-list { margin: 24px 0; }

.feature-list div {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.feature-list div:last-child { border-bottom: 1px solid var(--border); }

.feature-list dt { font-weight: 650; }

.feature-list dd {
  margin: 2px 0 0;
  color: var(--muted);
}

@media (min-width: 600px) {
  .feature-list div {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
  }

  .feature-list dd { margin: 0; }
}

/* ---------- Languages ---------- */

.langs {
  display: grid;
  margin-top: 40px;
}

.lang { padding-block: 24px; }

.lang + .lang { border-top: 1px solid var(--border); }

@media (min-width: 900px) {
  .langs { grid-template-columns: repeat(3, 1fr); }

  .lang { padding: 0 32px; }
  .lang:first-child { padding-left: 0; }
  .lang:last-child { padding-right: 0; }

  .lang + .lang {
    border-top: 0;
    border-left: 1px solid var(--border);
  }
}

.lang h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
}

.lang h3 span {
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 400;
}

.sample-line {
  margin: 0 0 4px;
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.5;
}

.sample-line:lang(ja) { line-height: 2.1; }

.sample-en {
  margin: 0 0 14px;
  color: var(--muted);
}

.lang-note {
  margin: 0;
  font-size: 0.9375rem;
}

rt {
  color: var(--accent-ink);
  font-size: 0.55em;
  font-weight: 500;
}

.g-m { color: var(--g-masc); }
.g-f { color: var(--g-fem); }
.g-n { color: var(--g-neut); }

.sep {
  text-decoration: underline 2px var(--accent);
  text-underline-offset: 0.25em;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.swatch {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.swatch-m { background: var(--g-masc); }
.swatch-f { background: var(--g-fem); }
.swatch-n { background: var(--g-neut); }

/* ---------- Pricing ---------- */

.plans {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

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

.plan {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.plan-best {
  padding: 23px;
  border: 2px solid var(--accent);
}

.plan-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 1.0625rem;
}

.save {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.875rem;
  font-weight: 700;
}

.price {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.price small {
  color: var(--muted);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
}

.plan-sub {
  margin-bottom: 20px;
  color: var(--muted);
}

.plan .btn { margin-top: auto; }

.needs {
  margin: 0;
}

.needs div {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.needs div:last-child { border-bottom: 1px solid var(--border); }

.needs dt { font-weight: 650; }

.needs dd {
  margin: 2px 0 0;
  color: var(--muted);
}

/* ---------- Questions and answers ---------- */

.qa-item + .qa-item { margin-top: 28px; }

.qa-item h3 { font-size: 1.0625rem; }

.qa-item p { color: var(--muted); }

.qa-item p:last-child { margin-bottom: 0; }

.qa-more { margin: 28px 0 0; }

.measure ul {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.measure li + li { margin-top: 0.3em; }

/* ---------- Inner pages ---------- */

.page-hero { padding-block: clamp(48px, 7vw, 80px) clamp(24px, 4vw, 40px); }

.page-hero h1 { margin-bottom: 12px; }

.page-hero .lead {
  max-width: var(--measure);
  margin: 0;
  color: var(--muted);
  font-size: 1.1875rem;
}

.page-body { padding-bottom: var(--space); }

.page-body .split + .split {
  margin-top: 0;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.page-body .split { padding-bottom: 48px; }

/* ---------- Legal and long text ---------- */

.prose { max-width: 700px; }

.prose h2 {
  margin-top: 2em;
  font-size: 1.5rem;
}

.prose h3 { margin-top: 1.6em; }

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.prose li { margin-bottom: 0.4em; }

.prose li::marker { color: var(--muted); }

.updated {
  color: var(--muted);
  font-size: 0.9375rem;
}

.summary-box {
  margin: 32px 0 8px;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
}

.summary-box h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.summary-box ul { margin: 0; }

.credit {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.credit h3 { margin-top: 0; }

.credit p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-inner {
  display: grid;
  gap: 16px;
}

.footer-inner p { margin: 0; }

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a,
.footer-inner a {
  color: var(--text);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-inner a:hover,
.footer-nav a[aria-current="page"] { text-decoration: underline; }

.site-footer .brand img {
  width: 24px;
  height: 24px;
}

/* ---------- Print (handy for the legal pages) ---------- */

@media print {
  .site-header,
  .site-footer,
  .skip-link { display: none; }

  body { background: #fff; color: #000; }
}
