/* SayLess site: one stylesheet for every page. Colours follow the app (accent #E5484D). */

:root {
  --accent: #e5484d;
  --accent-strong: #ce2c31;
  --on-accent: #ffffff;
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --surface: #ffffff;
  --border: #e4e4e7;
  --text: #111113;
  --text-2: #5c5f66;
  --chip: #f0f0f3;
  /* A note's card, as in the app (backgroundElement) */
  --note-bg: #f3ede3;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.06);
  --radius: 20px;
  --max: 1080px;
  --read: 68ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #ec5d5e;
    --accent-strong: #ff7d7a;
    --bg: #111113;
    --bg-soft: #18191b;
    --surface: #212225;
    --border: #2e3135;
    --text: #edeef0;
    --text-2: #b0b4ba;
    --chip: #2e3135;
    --note-bg: #1e1c19;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-strong);
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 750;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  left: 8px;
}

/* Header and footer */

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

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

.nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--text);
}

.nav .hide-sm {
  display: none;
}

@media (min-width: 640px) {
  .nav .hide-sm {
    display: inline;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 40px 0;
  color: var(--text-2);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  align-items: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer a {
  color: var(--text-2);
}

.site-footer a:hover {
  color: var(--text);
}

/* Buttons and badges */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
}

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

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

.btn-ghost {
  background: var(--chip);
  color: var(--text);
}

.btn-ghost:hover {
  color: var(--text);
  filter: brightness(0.97);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Landing: hero */

.hero {
  padding: 56px 0 72px;
}

.hero .wrap {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1.05fr 1fr;
  }
}

.hero .lead {
  font-size: 1.2rem;
  color: var(--text-2);
  max-width: 34ch;
}

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

.hero .note-small {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-2);
}

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

/* The before/after illustration */

.demo {
  display: grid;
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.demo .label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  margin-bottom: 10px;
}

.mic-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mic-dot svg {
  width: 15px;
  height: 15px;
}

.bars {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  height: 18px;
  margin-left: auto;
}

.bars i {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  animation: bar 1.1s ease-in-out infinite;
}

.bars i:nth-child(1) { height: 40%; animation-delay: -0.2s; }
.bars i:nth-child(2) { height: 90%; animation-delay: -0.5s; }
.bars i:nth-child(3) { height: 60%; animation-delay: -0.1s; }
.bars i:nth-child(4) { height: 100%; animation-delay: -0.7s; }
.bars i:nth-child(5) { height: 50%; animation-delay: -0.3s; }

@keyframes bar {
  50% { transform: scaleY(0.4); }
}

@media (prefers-reduced-motion: reduce) {
  .bars i { animation: none; }
  html { scroll-behavior: auto; }
}

.transcript {
  color: var(--text-2);
  font-style: italic;
  margin: 0;
}

.transcript s {
  opacity: 0.6;
}

.arrow {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-2);
}

.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.chip.on {
  background: var(--accent);
  color: var(--on-accent);
}

.result h3 {
  margin-bottom: 6px;
}

.result ul {
  margin: 0;
  padding-left: 1.2em;
}

.result p {
  margin: 0;
}

/* The hero's result cycling through Clean, To-do and Email: stacked in one cell (as tall as the
   tallest), each shown for a third of the loop, with its chip lit at the same time */
.cycle {
  display: grid;
}

.cycle > .result {
  grid-area: 1 / 1;
  opacity: 0;
  animation: cycle-show 12s infinite;
}

.cycle > .r2,
.cycle-chip.c2::after { animation-delay: 4s; }

.cycle > .r3,
.cycle-chip.c3::after { animation-delay: 8s; }

/* A chip lights up with a lit copy of itself fading in on top: the same opacity animation as its
   card, so the two run on the same timeline (colour animations run elsewhere and drifted apart) */
.cycle-chip {
  position: relative;
}

.cycle-chip::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: var(--accent);
  color: var(--on-accent);
  opacity: 0;
  animation: cycle-show 12s infinite;
}

/* One rhythm for a card and its chip, so they change together: each turn is a third of the loop,
   fading in over its first 3%, and out over the 3% after it (while the next fades in) */
@keyframes cycle-show {
  0% { opacity: 0; }
  3%, 33.3% { opacity: 1; }
  36.3%, 100% { opacity: 0; }
}

/* No motion wanted: the to-do list stays, with its chip lit */
@media (prefers-reduced-motion: reduce) {
  .cycle > .result,
  .cycle-chip::after {
    animation: none;
  }

  .cycle > .r1,
  .cycle > .r3 {
    display: none;
  }

  .cycle > .r2 {
    opacity: 1;
  }

  .cycle-chip.c2::after {
    opacity: 1;
  }
}

/* Sections */

.section {
  padding: 72px 0;
}

.section.soft {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.section-head p {
  color: var(--text-2);
  font-size: 1.1rem;
}

.grid {
  display: grid;
  gap: 16px;
}

/* A card that takes a whole row, e.g. the odd one out at the end of a grid */
.grid > .span-all { grid-column: 1 / -1; }

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

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

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

@media (min-width: 1000px) {
  .grid.four { grid-template-columns: repeat(4, 1fr); }
}

.feature p,
.step p {
  color: var(--text-2);
  margin: 0;
}

.icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.icon svg {
  width: 22px;
  height: 22px;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.styles-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

/* Living topics: three notes become a topic, drawn like the app's topic page and cards */

.topic-demo {
  display: grid;
  gap: 16px;
  align-items: center;
}

@media (min-width: 900px) {
  .topic-demo {
    grid-template-columns: 1fr auto 1.25fr;
    gap: 24px;
  }
}

.topic-notes {
  display: grid;
  gap: 10px;
}

.mini-note {
  background: var(--note-bg);
  border-left: 4px solid var(--hue, var(--accent));
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 0.95rem;
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.mini-note .day {
  flex-shrink: 0;
  width: 2.6em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.topic-arrow {
  font-size: 1.6rem;
  transform: rotate(90deg);
}

@media (min-width: 900px) {
  .topic-arrow {
    transform: none;
  }
}

/* Each topic in its own colour (--hue, set on the card), as the app shows it */
.topic-page,
.topic-card,
.topic-notes {
  /* Its colour as text: darker in light mode, lighter in dark, so it reads on the tinted card */
  --hue-text: color-mix(in srgb, var(--hue, var(--accent)) 60%, var(--text));
}

.topic-page,
.topic-card {
  background: color-mix(in srgb, var(--hue, var(--accent)) 7%, var(--surface));
  border-color: color-mix(in srgb, var(--hue, var(--accent)) 28%, var(--border));
}

.topic-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topic-top h3 {
  margin: 0;
  font-size: 1.3rem;
}

.kind-chip {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hue, var(--accent)) 16%, transparent);
  color: var(--hue-text);
  font-size: 0.8rem;
  font-weight: 700;
}

.topic-status {
  color: var(--text-2);
  margin: 10px 0 4px;
}

.topic-label {
  margin-top: 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hue-text);
}

.topic-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.topic-line .ring,
.topic-line .tick {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--hue, var(--accent));
}

.topic-line .tick {
  border-color: #30a46c;
  background: #30a46c
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}

.topic-line.done {
  color: var(--text-2);
}

.bell {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hue-text);
}

.bell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bell svg {
  width: 13px;
  height: 13px;
}

.noticed {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--hue, var(--accent)) 10%, var(--surface));
  font-size: 0.95rem;
}

.noticed-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 2px;
}

.topic-cards {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

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

.topic-card .stat {
  font-weight: 700;
  color: var(--hue-text);
}

.kinds-title {
  margin-top: 48px;
}

.kinds .kind {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.kinds .kind span {
  color: var(--text-2);
  font-size: 0.95rem;
}

/* The study demo: a spoken summary as study notes, a quiz and flashcards (the hero's cycling) */
.study {
  margin-top: 56px;
}

.study-head {
  max-width: 640px;
  margin-bottom: 20px;
}

.study-head h3 {
  font-size: 1.4rem;
}

.study-head p {
  color: var(--text-2);
  margin: 0;
}

.study-result {
  display: grid;
  gap: 14px;
}

.study-result .arrow {
  justify-self: start;
}

@media (min-width: 900px) {
  .study-demo {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
    gap: 24px;
  }
}

.quiz {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 8px;
}

.quiz span {
  display: block;
  color: var(--text-2);
  font-size: 0.92rem;
}

.result .answers {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-2);
}

.cards {
  margin: 0;
  display: grid;
  gap: 8px;
}

.cards > div {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.cards dt {
  font-weight: 700;
}

.cards dd {
  margin: 2px 0 0;
  color: var(--text-2);
}

/* A feature that's part of Pro, after its name */
.pro-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Plans */

.plan h3 {
  font-size: 1.4rem;
}

.plan .sub {
  color: var(--text-2);
  margin-bottom: 16px;
}

.plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.plan li {
  display: flex;
  gap: 10px;
}

.plan li::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e5484d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.plan.pro {
  border: 2px solid var(--accent);
}

.fineprint {
  color: var(--text-2);
  font-size: 0.9rem;
  margin-top: 20px;
}

/* FAQ */

.faq {
  max-width: 760px;
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 20px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 18px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

.faq summary::after {
  content: '+';
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
}

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

.faq details p,
.faq details ul {
  color: var(--text-2);
}

.faq details ul {
  margin: -0.5em 0 1em;
  padding-left: 1.2em;
}

.faq details li {
  margin-bottom: 0.4em;
}

/* Legal pages */

.doc {
  padding: 48px 0 80px;
}

.doc .wrap {
  max-width: calc(var(--read) + 64px);
}

.doc .meta {
  color: var(--text-2);
  margin-bottom: 32px;
}

.doc h2 {
  font-size: 1.4rem;
  margin-top: 2.2em;
  padding-top: 0.2em;
}

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

.doc ul,
.doc ol {
  padding-left: 1.3em;
}

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

.doc .summary {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 32px;
}

.doc .summary ul {
  margin: 0;
}

.toc {
  columns: 2 220px;
  padding-left: 1.3em;
  margin-bottom: 32px;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1em;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

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

th {
  font-weight: 700;
  background: var(--bg-soft);
}

.placeholder {
  background: #fff3c4;
  color: #6b4e00;
  padding: 0 4px;
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  .placeholder {
    background: #4a3a00;
    color: #ffe08a;
  }
}

/* 404 */

.center-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px 0;
}
