/*
 * syncme.click: the public site (docs/SITO.md). Light theme only, like the app.
 * Paper and ink from the app, terracotta from the mark, the app's calendar colours for threads.
 */

@font-face {
  font-family: "Funnel Display";
  src: url("/fonts/funnel-display.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

@font-face {
  font-family: "Funnel Sans";
  src: url("/fonts/funnel-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  color-scheme: light;

  --paper: oklch(97.6% 0.003 265); /* #F6F7F9 */
  --surface: oklch(99.4% 0.001 286); /* #FDFDFE */
  --line: oklch(92.4% 0.008 261); /* #E3E6EB */
  --line-strong: oklch(88.4% 0.011 262); /* #D5D9E0 */
  --ink: oklch(26.9% 0.014 267); /* #23262D */
  --ink-soft: oklch(36.8% 0.022 267); /* #3A3F4B */
  --muted: oklch(50.2% 0.020 264); /* #5E6470 */
  --on-ink: oklch(93% 0.008 265);
  --on-ink-muted: oklch(78% 0.014 265);

  --terracotta: oklch(62% 0.155 42); /* #D7612E, the mark */
  --terracotta-dark: oklch(52% 0.14 40); /* #B04A1D, buttons and accented text */
  --terracotta-tint: oklch(95.5% 0.022 50);
  --terracotta-line: oklch(87% 0.06 48);

  /* The app's calendar colours (backend/static/syncme/app.css). */
  --cal-0: oklch(59.1% 0.157 259);
  --cal-1: oklch(64.0% 0.135 57);
  --cal-2: oklch(61.1% 0.093 192);
  --cal-3: oklch(62.1% 0.122 125);
  --cal-4: oklch(59.1% 0.165 297);
  --cal-5: oklch(62.3% 0.156 2);
  --cal-6: oklch(62.0% 0.117 85);
  --cal-work: var(--cal-0);
  --cal-acme: var(--cal-4);
  --cal-personal: var(--cal-2);

  --display: "Funnel Display", ui-sans-serif, system-ui, sans-serif;
  --text: "Funnel Sans", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 11vw, 144px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--terracotta-dark);
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.05;
}

h3 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.wrap {
  width: min(1180px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

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

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface);
}

.skip:focus {
  top: 12px;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--terracotta-dark);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow a {
  text-decoration: none;
}

.lede {
  max-width: 60ch;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 19px;
}

.small {
  color: var(--muted);
  font-size: 14px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--terracotta-dark);
  border-radius: 14px;
  background: var(--terracotta-dark);
  color: oklch(99% 0.004 60);
  font: 600 17px/1 var(--text);
  text-decoration: none;
  transition:
    background-color 160ms var(--ease),
    transform 160ms var(--ease);
}

.button:hover {
  background: oklch(46% 0.13 38);
  color: oklch(99% 0.004 60);
}

.button:active {
  transform: translateY(1px);
}

.button.small {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 15px;
}

.button.ghost {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button.ghost:hover {
  border-color: var(--ink-soft);
  background: var(--surface);
  color: var(--ink);
}

.button.inverse {
  border-color: var(--surface);
  background: var(--surface);
  color: var(--terracotta-dark);
}

.button.inverse:hover {
  background: var(--terracotta-tint);
  color: var(--terracotta-dark);
}

.tick {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid transparent;
  background: var(--paper);
  transition: border-color 200ms var(--ease);
}

.top.scrolled {
  border-bottom-color: var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 72px;
}

.brand img {
  width: auto;
  height: 32px;
}

.sections {
  display: flex;
  gap: 26px;
  margin-right: auto;
  font-size: 15px;
  font-weight: 500;
}

.sections a,
.signin {
  color: var(--ink-soft);
  text-decoration: none;
}

.sections a:hover,
.signin:hover {
  color: var(--ink);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}

/* The language menu: a <details>, so it opens without JavaScript too. */
.languages details {
  position: relative;
}

.languages summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

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

.languages summary::after {
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.languages details[open] summary::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.languages summary:hover {
  border-color: var(--muted);
  color: var(--ink);
}

.languages abbr {
  text-decoration: none;
}

.languages ul {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 11rem;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 18px 40px -18px oklch(26.9% 0.014 267 / 0.35);
  list-style: none;
}

.languages ul a {
  display: block;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.languages ul a:hover {
  background: var(--paper);
  color: var(--ink);
}

.languages ul a[aria-current="true"] {
  background: var(--terracotta-tint);
  color: var(--terracotta-dark);
  font-weight: 600;
}

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

.hero {
  padding: clamp(40px, 7vw, 88px) 0 var(--section);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}

.hero h1 {
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
}

/* The phrase that changes: two lines are kept for it, so nothing below moves. */
.rotor {
  display: block;
  color: var(--terracotta-dark);
}

.rotor-text {
  display: inline-block;
  transition:
    opacity 280ms var(--ease),
    transform 380ms var(--ease);
}

.rotor-text.leaving {
  opacity: 0;
  transform: translateY(-0.18em);
}

.rotor-text.entering {
  opacity: 0;
  transform: translateY(0.22em);
  transition: none;
}

.claim {
  margin-top: 14px;
  font: 600 clamp(22px, 2.3vw, 28px) / 1.25 var(--display);
  letter-spacing: -0.015em;
}

.intro {
  max-width: 52ch;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
}

.note .tick {
  color: var(--cal-2);
}

/* The product in miniature: the map of rules and a day with the copies arriving. */
.demo {
  display: grid;
  margin: 0;
}

.demo-map {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  padding: 18px 18px 40px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 24px 60px -32px oklch(26.9% 0.014 267 / 0.35);
}

.demo-head,
.demo-rule {
  display: grid;
  grid-template-columns: 6.5rem minmax(4rem, 1fr) 7.5rem;
  align-items: center;
  column-gap: 10px;
}

.demo-head {
  padding: 0 6px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.demo-head span:first-child {
  justify-self: end;
}

.demo-head span:last-child {
  grid-column: 3;
}

.demo-rule {
  min-height: 48px;
  padding: 0 6px;
  border-radius: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.demo-rule > .chip:first-child {
  justify-self: end;
}

.chip i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cal);
}

.chip.ghost {
  visibility: hidden;
}

.wire {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--cal);
}

.wire b {
  flex: 1;
  min-width: 6px;
  border-top: 1.5px solid var(--cal);
}

.wire em {
  margin: 0 6px;
  padding: 1px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}

.wire s {
  width: 0;
  height: 0;
  margin-left: -1px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--cal);
}

.demo-rule.branch .wire {
  position: relative;
}

.demo-rule.branch .wire::before {
  content: "";
  position: absolute;
  bottom: 50%;
  left: -6px;
  width: 12px;
  height: 36px;
  border-bottom: 1.5px solid var(--cal);
  border-left: 1.5px solid var(--cal);
  border-bottom-left-radius: 10px;
}

.demo-rule.branch .wire b:first-child {
  margin-left: 6px;
}

.demo-day {
  position: relative;
  z-index: 2;
  width: min(78%, 330px);
  margin: -26px 0 0 auto;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 30px 70px -30px oklch(26.9% 0.014 267 / 0.4);
}

.demo-day-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.demo-day-head i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cal);
}

.demo-day-head span {
  margin-left: auto;
  color: var(--muted);
}

.demo-hours {
  --hour: 34px;
  position: relative;
  height: calc(5 * var(--hour) + 10px);
  margin-left: 26px;
  border-left: 1px solid var(--line);
}

/* Colours and positions by class: the pages carry no inline styles, which the
   Content-Security-Policy of _headers would block. */
.cal-0 { --cal: var(--cal-0); }
.cal-1 { --cal: var(--cal-1); }
.cal-2 { --cal: var(--cal-2); }
.cal-3 { --cal: var(--cal-3); }
.cal-4 { --cal: var(--cal-4); }
.cal-5 { --cal: var(--cal-5); }
.cal-6 { --cal: var(--cal-6); }
.cal-work { --cal: var(--cal-work); }
.cal-acme { --cal: var(--cal-acme); }
.cal-personal { --cal: var(--cal-personal); }

.demo-hours > .h0 { --h: 0; }
.demo-hours > .h1 { --h: 1; }
.demo-hours > .h2 { --h: 2; }
.demo-hours > .h3 { --h: 3; }
.demo-hours > .h4 { --h: 4; }
.demo-hours > .h5 { --h: 5; }
.slot.own { --from: 0; --to: 0.75; }
.slot.c1 { --from: 1.5; --to: 3; }
.slot.c2 { --from: 4; --to: 5; }

.demo-hours > span {
  position: absolute;
  top: calc(var(--h) * var(--hour));
  left: -26px;
  width: calc(100% + 26px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 0;
}

.demo-hours > span:last-of-type {
  display: none;
}

.slot {
  position: absolute;
  top: calc(var(--from) * var(--hour) + 2px);
  right: 4px;
  left: 6px;
  height: calc((var(--to) - var(--from)) * var(--hour) - 4px);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
}

.slot.own {
  background: color-mix(in oklch, var(--cal-work) 16%, var(--surface));
  color: color-mix(in oklch, var(--cal-work) 70%, var(--ink));
}

.slot.copy {
  border: 1px dashed color-mix(in oklch, var(--cal) 70%, var(--surface));
  background: repeating-linear-gradient(
    -45deg,
    color-mix(in oklch, var(--cal) 13%, var(--surface)) 0 6px,
    color-mix(in oklch, var(--cal) 6%, var(--surface)) 6px 12px
  );
  color: color-mix(in oklch, var(--cal) 65%, var(--ink));
}

/* The copies arrive after their rule lights up; with reduced motion they are simply there. */
@media (prefers-reduced-motion: no-preference) {
  .demo .r1,
  .demo .r3 {
    animation: rule-pulse 1.4s var(--ease) both;
  }

  .demo .r1 {
    animation-delay: 0.6s;
  }

  .demo .r3 {
    animation-delay: 2s;
  }

  .slot.copy {
    animation: copy-arrives 700ms var(--ease) both;
  }

  .slot.c1 {
    animation-delay: 1.3s;
  }

  .slot.c2 {
    animation-delay: 2.7s;
  }
}

@keyframes rule-pulse {
  0%,
  100% {
    background: transparent;
  }

  35% {
    background: color-mix(in oklch, var(--cal) 10%, var(--surface));
  }
}

@keyframes copy-arrives {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
}

/* --- Sections ----------------------------------------------------------------------- */

.problem,
.how,
.features,
.faq {
  padding: var(--section) 0;
}

.problem {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.section-head {
  max-width: 760px;
}

.quotes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 5vw, 72px);
  margin: clamp(48px, 6vw, 72px) 0 0;
  padding: 0;
  list-style: none;
}

.quotes li {
  padding: 28px 0 34px;
  border-top: 1px solid var(--line);
}

.quote {
  margin-bottom: 12px;
  font: 600 clamp(24px, 2.6vw, 32px) / 1.15 var(--display);
  letter-spacing: -0.02em;
}

.quotes li p:last-child {
  max-width: 44ch;
  color: var(--ink-soft);
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin: clamp(48px, 6vw, 72px) 0 0;
  padding: 0;
  list-style: none;
}

/* The thread that joins the three steps, like the one in the mark. */
.steps::before {
  content: "";
  position: absolute;
  top: 27px;
  right: 16%;
  left: 28px;
  border-top: 2px dashed var(--terracotta-line);
}

.steps li {
  position: relative;
}

.step-number {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 26px;
  border-radius: 18px;
  background: var(--terracotta);
  color: oklch(99% 0.004 60);
  font: 700 24px/1 var(--display);
  box-shadow: 0 0 0 8px var(--paper);
}

.steps h3 {
  margin-bottom: 10px;
}

.steps p {
  color: var(--ink-soft);
}

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

.features-grid,
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr);
  align-items: start;
  gap: clamp(40px, 6vw, 96px);
}

.sticky {
  position: sticky;
  top: 112px;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(28px, 4vw, 48px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 19px;
}

/* A calendar's dot before each title: the same marks the app uses. */
.feature-list h3::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cal);
  transform: translateY(-1px);
}

.feature-list p {
  padding-left: 22px;
  color: var(--ink-soft);
}

.privacy {
  padding: var(--section) 0;
  background: var(--ink);
  color: var(--on-ink);
  line-height: 1.7;
}

.privacy .eyebrow {
  color: oklch(78% 0.11 50);
}

.privacy .lede {
  color: var(--on-ink-muted);
}

.privacy-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 6vw, 96px);
}

.arrow-link {
  display: inline-block;
  margin-top: 28px;
  font-weight: 600;
}

.arrow-link::after {
  content: " →";
}

.privacy a:hover {
  color: oklch(82% 0.1 50);
}

.checks {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks li {
  display: flex;
  gap: 14px;
}

.checks .tick {
  margin-top: 4px;
}

.privacy .checks {
  gap: 0;
}

.privacy .checks li {
  padding: 18px 0;
  border-top: 1px solid oklch(40% 0.02 267);
  font-size: 18px;
}

.privacy .checks .tick {
  color: oklch(78% 0.11 50);
}

.pricing {
  padding: var(--section) 0;
  background: var(--terracotta-tint);
}

.plan {
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--terracotta-line);
  border-radius: 28px;
  background: var(--surface);
}

.trial {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--terracotta-tint);
  color: var(--terracotta-dark);
  font-size: 14px;
  font-weight: 600;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 16px 0 6px;
}

.price-note {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
}

.price-note strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.price strong {
  font: 800 clamp(64px, 8vw, 96px) / 1 var(--display);
  letter-spacing: -0.04em;
}

.price span {
  color: var(--muted);
  font-size: 19px;
}

.plan .checks {
  margin-bottom: 32px;
}

.plan .checks .tick {
  color: var(--terracotta-dark);
}

.plan .small {
  margin-top: 14px;
}

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

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

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font: 600 20px/1.3 var(--display);
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

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

summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 200ms var(--ease);
}

details[open] summary::after {
  transform: rotate(225deg) translateY(-3px);
}

details p {
  max-width: 62ch;
  padding: 0 0 26px;
  color: var(--ink-soft);
}

.close {
  padding: clamp(64px, 9vw, 120px) 0;
  background: var(--terracotta-dark);
  color: oklch(99% 0.004 60);
}

.close-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.close h2 {
  max-width: 12ch;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.close p {
  margin-top: 14px;
  color: oklch(92% 0.03 50);
}

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

.foot {
  padding: 64px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.foot-brand img {
  width: auto;
  height: 28px;
  margin-bottom: 14px;
}

.foot-brand p,
.foot-grid p {
  color: var(--muted);
}

.foot h2 {
  margin-bottom: 12px;
  font: 600 14px/1.4 var(--text);
  letter-spacing: 0;
}

.foot nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.foot nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.foot nav a:hover {
  color: var(--terracotta-dark);
}

.foot-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.foot-languages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.foot-languages a {
  text-decoration: none;
}

.foot-languages a[aria-current="true"] {
  color: var(--ink);
  font-weight: 600;
}

/* --- Legal pages and 404 ------------------------------------------------------------ */

.prose {
  max-width: 760px;
  padding: clamp(40px, 6vw, 72px) 0 var(--section);
}

.prose h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
}

/* Long German compounds (Datenschutzerklärung, Geschäftsbedingungen) are wider than a phone:
   they are hyphenated where the language allows, broken anywhere as a last resort. */
.prose h1,
.prose h2 {
  overflow-wrap: break-word;
  hyphens: auto;
}

.updated {
  margin: 12px 0 40px;
  color: var(--muted);
  font-size: 15px;
}

.prose h2 {
  margin: 44px 0 12px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.prose p,
.prose ul {
  max-width: 68ch;
  color: var(--ink-soft);
}

.prose p + p {
  margin-top: 14px;
}

.prose ul {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding-left: 20px;
}

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

.prose code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--line);
  font-size: 0.88em;
}

.prose h3 {
  margin: 26px 0 6px;
  font: 600 17px / 1.35 var(--text);
  color: var(--ink);
}

.prose h3 + p {
  margin-top: 0;
}

.prose p + ul,
.prose ul + p,
.prose .table + p,
.prose p + .table {
  margin-top: 14px;
}

/* Tables of the legal pages: on a phone they scroll sideways inside their box, the page does
   not. */
.prose .table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

/* Three columns and more need room: they keep it and scroll. */
.prose .table:has(th:nth-child(3)) table {
  min-width: 36rem;
}

.prose th,
.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--ink);
  font-weight: 600;
  background: var(--paper);
}

.prose td {
  color: var(--ink-soft);
}

.prose tr:last-child td {
  border-bottom: 0;
}

.missing-inner {
  display: grid;
  gap: 18px;
  align-content: center;
  justify-items: start;
  min-height: 100vh;
  padding: 48px 0;
}

.missing-inner .brand img {
  width: auto;
  height: 32px;
  margin-bottom: 32px;
}

.missing-inner h1 {
  font-size: clamp(40px, 6vw, 64px);
}

.missing-languages {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 15px;
  list-style: none;
}

/* --- Smaller screens ---------------------------------------------------------------- */

@media (max-width: 1040px) {
  .sections {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .features-grid,
  .faq-grid,
  .privacy-grid,
  .pricing-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sticky {
    position: static;
  }

  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .top-inner {
    gap: 12px;
    min-height: 64px;
  }

  .brand img {
    height: 28px;
  }

  .signin {
    display: none;
  }

  .top-actions {
    gap: 10px;
  }

  .top .button.small {
    padding: 0 12px;
    font-size: 14px;
  }

  .actions .button {
    flex: 1 1 100%;
  }

  .quotes,
  .steps,
  .feature-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps::before {
    top: 28px;
    bottom: 28px;
    right: auto;
    left: 27px;
    border-top: 0;
    border-left: 2px dashed var(--terracotta-line);
  }

  .demo-head,
  .demo-rule {
    grid-template-columns: 5.6rem minmax(3rem, 1fr) 6.6rem;
    column-gap: 6px;
  }

  .chip {
    padding: 5px 9px;
    font-size: 13px;
  }

  .demo-day {
    width: 86%;
  }
}

@media (max-width: 400px) {
  .languages summary {
    padding: 5px 9px 5px 10px;
  }

  .top .button.small {
    font-size: 13px;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
