/* The CLVR website (ADR-059).
 *
 * Colours come from the app: the graphite, white and bulb light of the screens before sign-in
 * (`DSBrand` in DesignSystemKit) and the app's green for actions (`DSColor.accent`). Green is for
 * buttons and small highlights only; amber is only ever the bulb's light. Backgrounds stay neutral.
 *
 * The page starts in the device's light or dark setting. Pressing the bulb overrides it for the visit
 * (`data-theme` on <html>, set by theme.js). The two dark blocks below must stay identical.
 *
 * No inline styles anywhere on the site: the pages are served with `style-src 'self'`.
 */

:root {
  color-scheme: light;
  --ink: #1D201F;
  --text: #1D201F;
  --text2: #5B625F;
  --line: rgba(29, 32, 31, .12);
  --page: #FFFFFF;
  --hero: linear-gradient(180deg, #FFFFFF 0%, #F7F7F9 44%, #F0F1F4 100%);
  --card: #F5F5F7;
  --accent: #147D51;
  --accent-hover: #0E5C3B;
  --on-accent: #FFFFFF;
  --frame-o: .07;
  --base-o: .78;
  --bulb-off: #2C302E;
  --lit: 0;
  --glow-scale: .72;
  --bezel: #1D201F;
  --shadow: 0 40px 70px -34px rgba(29, 32, 31, .45);
  --shot: 1;
  --nav: rgba(255, 255, 255, .72);
  --bad: #B3261E;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #FFFFFF;
    --text: #F5F5F7;
    --text2: #A6ABA8;
    --line: rgba(255, 255, 255, .12);
    --page: #050606;
    --hero: linear-gradient(180deg, #2B2E2D 0%, #121413 44%, #050606 100%);
    --card: #141615;
    --accent: #34D17E;
    --accent-hover: #2AB86C;
    --on-accent: #06130C;
    --frame-o: .10;
    --base-o: .70;
    --bulb-off: #8E9290;
    --lit: 1;
    --glow-scale: 1;
    --bezel: #000000;
    --shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
    --shot: .93;
    --nav: rgba(18, 20, 19, .72);
    --bad: #FF8A7A;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #FFFFFF;
  --text: #F5F5F7;
  --text2: #A6ABA8;
  --line: rgba(255, 255, 255, .12);
  --page: #050606;
  --hero: linear-gradient(180deg, #2B2E2D 0%, #121413 44%, #050606 100%);
  --card: #141615;
  --accent: #34D17E;
  --accent-hover: #2AB86C;
  --on-accent: #06130C;
  --frame-o: .10;
  --base-o: .70;
  --bulb-off: #8E9290;
  --lit: 1;
  --glow-scale: 1;
  --bezel: #000000;
  --shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
  --shot: .93;
  --nav: rgba(18, 20, 19, .72);
  --bad: #FF8A7A;
}

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

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .6s ease, color .6s ease;
}

main { flex: 1 0 auto; }

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

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

[id] { scroll-margin-top: 88px; }

/* `hidden` must win over a class that sets `display` (the sent form is a flex column). */
[hidden] { display: none !important; }

.skip {
  position: absolute;
  left: -9999px;
  top: 16px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.skip:focus { left: 16px; }

.wrap { max-width: 1200px; margin-inline: auto; }

/* ---------- Buttons and links ---------- */

.btn {
  border: 0;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: background-color .2s ease;
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn--quiet { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn--quiet:hover { background: var(--page); color: var(--text); }

.more { color: var(--accent); font-size: 17px; font-weight: 500; }
.more:hover { text-decoration: underline; }
.more--small { font-size: 16px; }

/* ---------- The mark (traced from the app icon, as DSBrandMark draws it) ---------- */

.bulb {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.soft { transition: opacity .6s ease, transform .6s ease; }

.mark { position: relative; display: block; aspect-ratio: 0.99664; }
.mark svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.mark__frame { fill: var(--ink); opacity: var(--frame-o); }
.mark__off { fill: var(--bulb-off); opacity: calc(1 - var(--lit)); }
.mark__on { opacity: var(--lit); }
.mark__base { fill: var(--ink); opacity: var(--base-o); }

.mark__glow {
  position: absolute;
  border-radius: 50%;
  aspect-ratio: 1;
  opacity: var(--lit);
  transform: scale(var(--glow-scale));
  pointer-events: none;
}
.mark__glow--wide {
  left: 2%;
  top: -6.5%;
  width: 96%;
  background: radial-gradient(closest-side, rgba(255, 200, 48, .34), rgba(255, 200, 48, .10) 46%, rgba(255, 200, 48, 0));
}
.mark__glow--heart {
  left: 31%;
  top: 20.2%;
  width: 38%;
  background: radial-gradient(closest-side, rgba(255, 200, 48, .46), rgba(255, 200, 48, 0));
}

/* ---------- Top bar ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-inline: 24px;
  background: var(--nav);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.nav__in { min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 24px; }

.brand { display: flex; align-items: center; gap: 6px; }
.brand__bulb { width: 44px; height: 44px; margin-left: -8px; padding: 6px; }
.brand__bulb svg { display: block; width: 100%; height: 100%; }
.brand__ink { fill: var(--ink); }
.brand__off { fill: var(--ink); opacity: calc(1 - var(--lit)); }
.brand__on { fill: #FFD60A; opacity: var(--lit); }
/* The CLVR name is the outline of the letters in Morn, the company's typeface (ADR-059 Q1): the
   typeface itself is not served. The link is as tall as a finger needs. */
.brand__name { display: block; padding: 15px 0; }
.wordmark { display: block; height: 14px; width: auto; fill: var(--ink); }

.nav__links { display: flex; gap: 36px; font-size: 15px; color: var(--text2); }
.nav__links a { padding: 12px 0; }

/* ---------- Opening ---------- */

.hero { background: var(--hero); padding: 72px 24px 96px; overflow: hidden; }
.hero__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 56px 48px; }
.hero__text { position: relative; z-index: 1; flex: 1 1 440px; min-width: 0; max-width: 600px; }
.hero__title {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -.035em;
  text-wrap: balance;
  color: var(--ink);
}
.hero__sub {
  margin-top: 28px;
  max-width: 520px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.4;
  color: var(--text2);
  text-wrap: pretty;
}
.cta { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.cta--centre { justify-content: center; gap: 14px; }

.hero__art { position: relative; flex: 0 1 500px; min-width: 0; display: flex; justify-content: center; align-items: flex-start; }
.hero__glow {
  position: absolute;
  left: -40%;
  top: 50%;
  width: 180%;
  margin-top: -90%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 200, 48, .36), rgba(255, 200, 48, .20) 42%, rgba(255, 200, 48, .06) 72%, rgba(255, 200, 48, 0));
  opacity: var(--lit);
  transform: scale(var(--glow-scale));
  pointer-events: none;
}

/* ---------- Phones ---------- */

.phone { position: relative; flex: 0 1 250px; padding: 8px; border-radius: 40px; background: var(--bezel); }
.phone img { width: 100%; border-radius: 32px; filter: brightness(var(--shot)); }
.phone--lifted { box-shadow: var(--shadow); }
.phone--back { margin: 80px -56px 0 0; }
.phone--front { flex-basis: 290px; border-radius: 44px; }
.phone--front img { border-radius: 36px; }
.phone--large { flex-basis: 280px; border-radius: 44px; }
.phone--large img { border-radius: 36px; }
.phone--wallpaper img { filter: none; }

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

.section { padding: 100px 24px; }
.section--follow { padding-top: 0; }
.section--inside { padding-top: 20px; }
.section--last { padding-bottom: 120px; }

.eyebrow { font-size: 17px; font-weight: 600; color: var(--accent); }
.eyebrow a { text-decoration: underline; text-underline-offset: 3px; }
.hero__eyebrow { margin-bottom: 16px; }

.section__sub { margin-top: 16px; max-width: 620px; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; color: var(--text2); }
.section__more { margin-top: 24px; }

/* The small label above a tile's title: a time of day. */
.kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text2); }
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.h2 {
  font-size: clamp(34px, 3.9vw, 56px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.03em;
  text-wrap: balance;
  color: var(--ink);
}
.h2--lead { margin-top: 12px; max-width: 820px; }

/* ---------- Tiles ---------- */

.bento { margin-top: 56px; display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 20px; }

.tile {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  background: var(--card);
  overflow: hidden;
}
.tile--wide { flex: 2 1 520px; }
.tile--third { flex-basis: 320px; }
.tile--split { flex-direction: row; flex-wrap: wrap; }

.tile__text { padding: 36px 36px 0; }
.tile--split .tile__text { flex: 1 1 280px; padding-bottom: 36px; }
.tile__title { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.tile__body { margin-top: 10px; max-width: 520px; font-size: 17px; line-height: 1.5; color: var(--text2); }
.tile__more { margin-top: 20px; }
.tile--text .tile__text { padding-bottom: 36px; }

/* A phone rises from the bottom edge of its tile; the tile cuts it, never the picture itself. */
.tile__art { margin-top: auto; padding-top: 32px; height: 440px; display: flex; justify-content: center; gap: 28px; overflow: hidden; }
.tile__art .phone { align-self: flex-start; }
.tile__art--side { flex: 1 1 260px; align-self: flex-end; margin-top: 0; padding: 36px 36px 0; height: 560px; }

.tile--lights {
  flex: none;
  display: block;
  padding: 40px 24px 64px;
  background: var(--hero);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: center;
}
.tile--lights .mark { width: min(420px, 100%); margin: 0 auto calc(min(420px, 100%) * -.19); }
.lights__title { position: relative; max-width: 720px; margin: 16px auto 0; }
.lights__body {
  position: relative;
  max-width: 480px;
  margin: 16px auto 0;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.45;
  color: var(--text2);
}

/* ---------- What's inside, who it's for ---------- */

.split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 64px; }
.split__title { flex: 1 1 320px; }
.split__main { flex: 2 1 480px; min-width: 0; }

.inside__row { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.inside__row:last-of-type { border-bottom: 1px solid var(--line); }
.inside__name { flex: 0 0 220px; font-size: 19px; font-weight: 600; }
.inside__items { flex: 1 1 260px; font-size: 17px; line-height: 1.5; color: var(--text2); }

.chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 12px; }
.chips li { padding: 11px 20px; border-radius: 999px; background: var(--card); font-size: 16px; }
.for__body { margin-top: 28px; max-width: 560px; font-size: 19px; line-height: 1.5; color: var(--text2); text-wrap: pretty; }

/* ---------- A group of tools, with its screens (What's inside) ---------- */

.group { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 64px; padding: 72px 0; border-top: 1px solid var(--line); }
.group:first-child { padding-top: 0; border-top: 0; }
.group:last-child { padding-bottom: 0; }
.group__text { flex: 1 1 400px; min-width: 0; }
.group__art {
  flex: 1 1 420px;
  min-width: 0;
  height: 440px;
  padding-top: 40px;
  display: flex;
  justify-content: center;
  gap: 28px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--card);
}
.group__art .phone { align-self: flex-start; flex-basis: 230px; }

.tools { margin-top: 28px; }
.tools li { padding: 16px 0; border-top: 1px solid var(--line); }
.tools li:last-child { border-bottom: 1px solid var(--line); }
.tools__name { font-size: 19px; font-weight: 600; }
.tools__what { margin-top: 4px; font-size: 17px; line-height: 1.5; color: var(--text2); }

/* ---------- A page of words (About) ---------- */

.lead { background: var(--hero); padding: 96px 24px 80px; }
.prose { max-width: 720px; }
.prose p { margin-top: 24px; font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; color: var(--text2); text-wrap: pretty; }
.prose p:first-child { margin-top: 0; color: var(--text); }

.prose--doc h2 { margin-top: 48px; font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.prose--doc h2 + p { margin-top: 12px; }
.prose--doc p, .prose--doc p:first-child { font-size: 18px; line-height: 1.6; color: var(--text); }
.prose--doc ul { margin-top: 12px; padding-left: 22px; list-style: disc; }
.prose--doc li { margin-top: 8px; font-size: 18px; line-height: 1.6; }
.prose--doc .more { font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- The contact page and its form ---------- */

.talk { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px 72px; }
.talk__form { flex: 2 1 480px; min-width: 0; max-width: 720px; }
.talk__aside { flex: 1 1 240px; min-width: 0; }
.talk__title { font-size: 19px; font-weight: 600; color: var(--ink); }
.talk__title + .talk__text { margin-top: 8px; }
.talk__text { font-size: 17px; line-height: 1.5; color: var(--text2); }
.talk__text + .talk__title { margin-top: 32px; }

.form { display: flex; flex-direction: column; gap: 24px; }
.form__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.form__row { display: flex; flex-wrap: wrap; gap: 24px 20px; }
.field { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.form__label { padding: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.form__optional { margin-left: 6px; font-weight: 400; color: var(--text2); }
.field__input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  line-height: 1.4;
}
.field__input:hover { border-color: var(--text2); }
.field__input:focus-visible { outline-offset: 2px; }
.field__input--tall { min-height: 160px; resize: vertical; }

.choice { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; }
.choice__item { position: relative; display: inline-flex; cursor: pointer; }
.choice__item input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice__item span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; transition: background-color .2s ease, color .2s ease; }
.choice__item input:checked + span { background: var(--accent); color: var(--on-accent); box-shadow: none; font-weight: 600; }
.choice__item input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 4px; }

/* A field people never see; programs that fill in everything fill it in too. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__status { min-height: 24px; font-size: 16px; line-height: 1.5; color: var(--text2); }
.form__status:empty { display: none; }
.form__status--bad { color: var(--bad); font-weight: 600; }
.form__send { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form__note { font-size: 15px; color: var(--text2); }
.btn:disabled { opacity: .55; cursor: default; }
.form__done:focus { outline: none; }

/* ---------- Contact ---------- */

.contact { padding: clamp(56px, 7vw, 96px) 24px; border-radius: 36px; background: var(--card); text-align: center; }
.contact__body { max-width: 520px; margin: 20px auto 0; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; color: var(--text2); }
.contact__mail { margin-top: 28px; font-size: 16px; color: var(--text2); }

/* ---------- Foot ---------- */

.footer { margin-top: auto; padding: 28px 24px 40px; border-top: 1px solid var(--line); }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; font-size: 13px; color: var(--text2); }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 28px; }

/* ---------- Narrow screens, reduced motion ---------- */

@media (max-width: 1035px) {
  .hero__in { justify-content: center; }
}

@media (max-width: 760px) {
  .wide-only { display: none !important; }
  .nav__links { order: 3; flex: 1 0 100%; gap: 28px; margin: 0 -24px; padding: 0 24px 4px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .nav__links::-webkit-scrollbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
