/* Clear Head website: the landing page and the legal pages.
   Colors, fonts and bubbles match the app (app/index.html), so both feel like one product. */

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}

:root {
  --bg: #e7ecf1;
  --dot: #c3ccd7;
  --surface: #f8fafc;
  --line: #ccd5df;
  --fg: #18212c;
  --muted: #5a6878;
  --accent: #2b5bc4;
  --cool: #7f95b0;
  --hot: #e8661f;
  --overdue: #c61f33;
  --on-hot: #1a1108;
  --shadow: 0 10px 30px -12px rgba(24, 33, 44, 0.35);
  --ok: #2e8b62;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --page: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b;
    --dot: #222b37;
    --surface: #18202a;
    --line: #2b3644;
    --fg: #e5ebf2;
    --muted: #8e9bac;
    --accent: #8eaef2;
    --cool: #5d7696;
    --hot: #ff8a3d;
    --overdue: #ff4f61;
    --on-hot: #1b0e05;
    --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
    --ok: #4cc08a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141b;
  --dot: #222b37;
  --surface: #18202a;
  --line: #2b3644;
  --fg: #e5ebf2;
  --muted: #8e9bac;
  --accent: #8eaef2;
  --cool: #5d7696;
  --hot: #ff8a3d;
  --overdue: #ff4f61;
  --on-hot: #1b0e05;
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  --ok: #4cc08a;
  color-scheme: dark;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
}
.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }
}
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
}
.brand .dot-hot {
  color: var(--hot);
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 6px 10px;
  border-radius: 999px;
}
.nav a:not(.btn):hover {
  color: var(--fg);
  background: color-mix(in oklch, var(--fg) 7%, transparent);
}
.nav .lang {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
@media (max-width: 719px) {
  .nav .section-link {
    display: none;
  }
}

/* Buttons, as in the app */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover {
  border-color: var(--muted);
  text-decoration: none;
}
.btn.primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn.primary:hover {
  background: color-mix(in oklch, var(--fg) 86%, var(--bg));
}
.btn.big {
  padding: 12px 22px;
  font-size: 17px;
}
.btn svg {
  width: 18px;
  height: 18px;
}

/* Hero */
.hero {
  padding: 48px 0 56px;
}
.hero .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero {
    padding: 72px 0 80px;
  }
  .hero .wrap {
    grid-template-columns: 1fr 1.05fr;
    gap: 56px;
  }
}
.hero h1 {
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 750;
}
.hero h1 .warm {
  color: var(--hot);
}
.hero .pitch {
  margin-top: 20px;
  font-size: 19px;
  color: var(--muted);
  max-width: 34em;
}
.hero .pitch strong {
  color: var(--fg);
  font-weight: 600;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.hero .small {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

/* Bubble demo: a small copy of the app's canvas */
.demo-wrap {
  width: 100%;
  max-width: 520px;
  justify-self: center;
}
.demo {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  container-type: inline-size;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.4px);
  background-size: 24px 24px;
  background-position: 12px 12px;
}
.demo .clock {
  position: absolute;
  left: 4cqw;
  top: 3.5cqw;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: max(11px, 2.4cqw);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 6px;
  transition: opacity 0.3s;
}
.demo .glabel {
  position: absolute;
  left: 4cqw;
  z-index: 0;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: max(10px, 2.2cqw);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.4s;
}
.demo .glabel.late {
  color: var(--overdue);
}
.demo.tidy .glabel {
  opacity: 1;
  transition-delay: 0.35s;
}
.demo.tidy .clock {
  opacity: 0;
}
.demo .tidy-btn {
  position: absolute;
  right: 4cqw;
  bottom: 4cqw;
  z-index: 3;
  box-shadow: var(--shadow);
  font-size: max(12px, 2.8cqw);
  padding: 1.2cqw 2.8cqw;
  pointer-events: none;
  transition:
    transform 0.15s,
    background 0.15s;
}
.demo .tidy-btn.press {
  transform: scale(0.92);
  background: color-mix(in oklch, var(--accent) 16%, var(--surface));
}

.bubble {
  --c: color-mix(in oklch, var(--hot) var(--mix, 0%), var(--cool));
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(
      circle at 32% 28%,
      color-mix(in oklch, var(--c) var(--fill-hi, 30%), transparent),
      transparent 62%
    ),
    color-mix(in oklch, var(--c) var(--fill, 20%), var(--bg));
  border: 1.5px solid color-mix(in oklch, var(--c) var(--edge, 50%), transparent);
  color: var(--fg);
  transition:
    transform 0.9s cubic-bezier(0.3, 1.15, 0.5, 1),
    background 1.6s ease,
    border-color 1.6s ease,
    color 1.6s ease;
  will-change: transform;
}
.demo:not(.ready) .bubble {
  transition: none;
} /* no flying in from the corner on first paint */
.bubble.hot {
  color: var(--on-hot);
}
.bubble.overdue {
  --c: var(--overdue);
}
.bubble.someday {
  border-style: dashed;
}
.bubble.soon::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--c);
  opacity: 0;
  animation: ripple 2.4s ease-out infinite;
  pointer-events: none;
}
.bubble.overdue::after {
  animation-duration: 1.6s;
}
@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.32);
    opacity: 0;
  }
}
.bubble .inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25em;
  padding: 0 9%;
}
.bubble .name {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  hyphens: manual;
  overflow-wrap: anywhere; /* long words: put a soft hyphen (\u00AD) in the demo text */
}
.bubble .due {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.78;
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}
@media (prefers-reduced-motion: reduce) {
  .bubble,
  .demo .glabel,
  .demo .clock {
    transition: none;
  }
  .bubble.soon::after {
    animation: none;
  }
}

.legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}
.legend > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.legend .ramp {
  width: 64px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cool), var(--hot) 75%, var(--overdue));
}
.legend .sizes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.legend .sizes i {
  display: inline-block;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
}

/* Sections */
section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) {
  section {
    padding: 88px 0;
  }
}
.section-head {
  max-width: 40em;
  margin-bottom: 36px;
}
.section-head h2 {
  font-size: clamp(30px, 4.6vw, 42px);
  font-weight: 750;
  margin-top: 8px;
}
.section-head p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 18px;
}

.features {
  display: grid;
  gap: 16px;
}
@media (min-width: 820px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}
.card h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 16px 0 8px;
}
.card p {
  color: var(--muted);
}
.card .tag {
  display: inline-block;
  margin-left: 6px;
  vertical-align: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  border-radius: 6px;
  padding: 1px 6px;
}
.icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in oklch, var(--hot) 14%, var(--bg));
  color: var(--hot);
}
.icon svg {
  width: 24px;
  height: 24px;
}
.extras {
  display: grid;
  gap: 10px 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
}
@media (min-width: 620px) {
  .extras {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .extras {
    grid-template-columns: repeat(3, 1fr);
  }
}
.extras li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.extras li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cool);
  transform: translateY(-1px);
}

/* Pricing */
.plans {
  display: grid;
  gap: 16px;
}
@media (min-width: 820px) {
  .plans {
    grid-template-columns: 1fr 1fr;
  }
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
}
.plan.plus {
  border: 2px solid var(--hot);
}
.plan h3 {
  font-size: 26px;
  margin: 0;
}
.plan h3 .dot-hot {
  color: var(--hot);
}
.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.price .amount {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg);
}
.price .per {
  color: var(--muted);
}
.price-alt {
  color: var(--muted);
  font-size: 15px;
  margin-top: -12px;
}
.price-alt strong {
  color: var(--fg);
  font-weight: 600;
}
.save {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: color-mix(in oklch, var(--hot) 18%, var(--surface));
  color: var(--fg);
  border-radius: 6px;
  padding: 2px 6px;
  margin-left: 4px;
}
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.checks li {
  display: flex;
  gap: 10px;
}
.checks svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--ok);
}
.checks .limit svg {
  color: var(--muted);
}
.checks .limit {
  color: var(--muted);
}
.plan .btn {
  margin-top: auto;
  align-self: flex-start;
}
.plan .how {
  font-size: 14px;
  color: var(--muted);
  margin-top: -8px;
}
.fine {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
  max-width: 46em;
}

/* Install */
.install {
  display: grid;
  gap: 16px;
}
@media (min-width: 820px) {
  .install {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}
.steps {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
  display: grid;
  gap: 12px;
}
.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}
.steps li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}
.steps .ui {
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
}
.steps .ui svg {
  width: 16px;
  height: 16px;
  vertical-align: -2px;
}
.card h3:first-child {
  margin-top: 0;
}
.card .note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

/* Questions */
.faq {
  display: grid;
  gap: 12px;
  max-width: 46em;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 20px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  font-size: 17px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--muted);
}
.faq details[open] summary::after {
  content: "–";
}
.faq details p {
  padding: 0 0 18px;
  color: var(--muted);
}

/* Closing call to action */
.closing {
  text-align: center;
}
.closing h2 {
  font-size: clamp(30px, 4.6vw, 42px);
  font-weight: 750;
}
.closing .cta {
  justify-content: center;
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  font-size: 14px;
  color: var(--muted);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
footer a {
  color: var(--muted);
}
footer a:hover {
  color: var(--fg);
}

/* Legal pages */
.legal {
  padding: 48px 0 80px;
}
.legal .wrap {
  max-width: 760px;
}
.legal h1 {
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 750;
  margin-bottom: 8px;
}
.legal h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 12px;
}
.legal h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 8px;
  letter-spacing: -0.01em;
}
.legal p,
.legal ul {
  margin: 0 0 12px;
}
.legal ul {
  padding-left: 22px;
}
.legal li {
  margin-bottom: 4px;
}
.legal address {
  font-style: normal;
  margin-bottom: 12px;
}
.legal .stand {
  color: var(--muted);
  font-size: 15px;
}
.draft-note {
  margin: 20px 0 8px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1.5px dashed var(--hot);
  background: color-mix(in oklch, var(--hot) 8%, var(--surface));
  font-size: 15px;
}
.todo {
  background: color-mix(in oklch, var(--hot) 22%, transparent);
  border-radius: 4px;
  padding: 0 4px;
}
