/*
 * OnDose landing page, in the app's Organizer direction: raised cream plastic, sunken
 * compartments and one sage lid band. Colors and depth recipes mirror
 * mobile/src/theme/tokens.ts. Spacing sits on a 4px grid, and nested radii add up:
 * outer = inner + padding.
 */

:root {
  color-scheme: light dark;

  --page: #F3EFE6;
  --surface: #FDFBF6;
  --well: #F0EBE1;
  --text: #211C15;
  --text2: #62594C;
  --sage: #43684E;
  --sage-ink: #375840;
  --sage-soft: #E3E9E0;
  --on-sage: #FDFBF6;
  --lid: #43684E;
  --lid-text: #E3E9E0;
  --lid-soft: #E3E9E0;
  --lid-soft-text: #375840;
  --lid-tab: rgba(55, 88, 64, 0.2);
  --key: #FDFBF6;
  --key-text: #375840;
  --groove-dark: rgba(60, 48, 28, 0.09);
  --groove-light: rgba(255, 255, 255, 0.95);
  --hairline: rgba(33, 28, 21, 0.08);

  /* Materials: the app's depth recipes. Neutral shadows only. */
  --mold: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -2px 0 rgba(60, 48, 28, 0.045), 0 1px 2px rgba(60, 48, 28, 0.07), 0 10px 24px -10px rgba(60, 48, 28, 0.22);
  --mold-sm: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -2px 0 rgba(60, 48, 28, 0.05), 0 1px 2px rgba(60, 48, 28, 0.08), 0 4px 10px -4px rgba(60, 48, 28, 0.14);
  --sunk: inset 0 2px 4px rgba(60, 48, 28, 0.13), inset 0 -1px 0 rgba(255, 255, 255, 0.85);
  --sunk-sm: inset 0 1.5px 2.5px rgba(60, 48, 28, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.85);
  --capmold: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -2px 0 rgba(60, 48, 28, 0.07), 0 1px 2px rgba(60, 48, 28, 0.1);
  --solid: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -2px 0 rgba(0, 0, 0, 0.14), 0 1px 2px rgba(33, 28, 21, 0.2);
  --lidmold: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -3px 0 rgba(0, 0, 0, 0.12);
  --lidshade: inset 0 8px 8px -8px rgba(33, 28, 21, 0.28);
  --lidsoftmold: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 0 rgba(33, 28, 21, 0.07), 0 1px 2px rgba(60, 48, 28, 0.12);
  --keymold: inset 0 -2px 0 rgba(60, 48, 28, 0.1), 0 1px 2px rgba(0, 0, 0, 0.24);
  --bar: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 1px 2px rgba(60, 48, 28, 0.1), 0 16px 32px -12px rgba(60, 48, 28, 0.32);
  /* Letters printed into the lid band. */
  --deboss: 0 -1px 0 rgba(0, 0, 0, 0.22);

  --bezel: #14120F;
  --bezel-edge: rgba(33, 28, 21, 0.16);
  --phone-shadow: 0 1px 2px rgba(60, 48, 28, 0.14), 0 18px 32px -16px rgba(60, 48, 28, 0.4);
  /* A phone resting in the hero's slot sits lower, so it casts less. */
  --phone-shadow-sm: 0 1px 2px rgba(60, 48, 28, 0.16), 0 10px 20px -10px rgba(60, 48, 28, 0.36);
  --mascot-shadow: drop-shadow(0 8px 8px rgba(60, 48, 28, 0.16));

  /* Lock screen wallpaper: a wall above a counter, with morning light on the counter. */
  --wall: #EAE3D6;
  --counter: #DDD3C1;
  --counter-edge: #E5DCCB;
  --counter-light: #E6DECF;
  --notice: #FDFBF6;

  /* The check printed on a sage cap, in the on-sage color. */
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FDFBF6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  /* The status bar's signal and battery. */
  --status-glyphs: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 13'%3E%3Crect y='8.5' width='3' height='4' rx='1'/%3E%3Crect x='4.5' y='6' width='3' height='6.5' rx='1'/%3E%3Crect x='9' y='3.5' width='3' height='9' rx='1'/%3E%3Crect x='13.5' y='1' width='3' height='11.5' rx='1'/%3E%3Crect x='26.5' y='.5' width='23' height='12' rx='3.5' fill='none' stroke='%23000' stroke-opacity='.45'/%3E%3Crect x='28.5' y='2.5' width='17' height='8' rx='2'/%3E%3Crect x='51' y='4.5' width='2' height='4' rx='1' fill-opacity='.45'/%3E%3C/svg%3E");

  --font-display: 'Nunito', ui-rounded, system-ui, sans-serif;
  --font-text: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --gutter: 20px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #161310;
    --surface: #211D18;
    --well: #1A1713;
    --text: #F3EFE6;
    --text2: #ADA493;
    --sage: #9CBFA5;
    --sage-ink: #B7D3BE;
    --sage-soft: #27302A;
    --on-sage: #14190F;
    --lid: #2D4535;
    --lid-text: #B7D3BE;
    --lid-soft: #27302A;
    --lid-soft-text: #B7D3BE;
    --lid-tab: rgba(183, 211, 190, 0.16);
    --key: #9CBFA5;
    --key-text: #14190F;
    --groove-dark: rgba(0, 0, 0, 0.4);
    --groove-light: rgba(255, 255, 255, 0.04);
    --hairline: rgba(243, 239, 230, 0.08);

    --mold: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 24px -10px rgba(0, 0, 0, 0.7);
    --mold-sm: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.4);
    --sunk: inset 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    --sunk-sm: inset 0 1.5px 2.5px rgba(0, 0, 0, 0.55), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    --capmold: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.4);
    --solid: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.5);
    --lidmold: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 -3px 0 rgba(0, 0, 0, 0.25);
    --lidshade: inset 0 8px 8px -8px rgba(0, 0, 0, 0.7);
    --lidsoftmold: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.4);
    --keymold: inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.5);
    --bar: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.5), 0 16px 32px -12px rgba(0, 0, 0, 0.8);

    --bezel: #0B0A08;
    --bezel-edge: rgba(243, 239, 230, 0.12);
    --phone-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 32px -16px rgba(0, 0, 0, 0.8);
    --phone-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 20px -10px rgba(0, 0, 0, 0.7);
    --mascot-shadow: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.4));

    --wall: #1C1915;
    --counter: #2A251F;
    --counter-edge: #332D25;
    --counter-light: #312B24;
    --notice: #332D25;

    --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314190F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  }
}

:root[data-theme="dark"] {
  --page: #161310;
  --surface: #211D18;
  --well: #1A1713;
  --text: #F3EFE6;
  --text2: #ADA493;
  --sage: #9CBFA5;
  --sage-ink: #B7D3BE;
  --sage-soft: #27302A;
  --on-sage: #14190F;
  --lid: #2D4535;
  --lid-text: #B7D3BE;
  --lid-soft: #27302A;
  --lid-soft-text: #B7D3BE;
  --lid-tab: rgba(183, 211, 190, 0.16);
  --key: #9CBFA5;
  --key-text: #14190F;
  --groove-dark: rgba(0, 0, 0, 0.4);
  --groove-light: rgba(255, 255, 255, 0.04);
  --hairline: rgba(243, 239, 230, 0.08);

  --mold: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 24px -10px rgba(0, 0, 0, 0.7);
  --mold-sm: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.4);
  --sunk: inset 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  --sunk-sm: inset 0 1.5px 2.5px rgba(0, 0, 0, 0.55), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  --capmold: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.4);
  --solid: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.5);
  --lidmold: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 -3px 0 rgba(0, 0, 0, 0.25);
  --lidshade: inset 0 8px 8px -8px rgba(0, 0, 0, 0.7);
  --lidsoftmold: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.4);
  --keymold: inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.5);
  --bar: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.5), 0 16px 32px -12px rgba(0, 0, 0, 0.8);

  --bezel: #0B0A08;
  --bezel-edge: rgba(243, 239, 230, 0.12);
  --phone-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 32px -16px rgba(0, 0, 0, 0.8);
  --phone-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 20px -10px rgba(0, 0, 0, 0.7);
  --mascot-shadow: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.4));

  --wall: #1C1915;
  --counter: #2A251F;
  --counter-edge: #332D25;
  --counter-light: #312B24;
  --notice: #332D25;

  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314190F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

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

@media (min-width: 960px) {
  :root { --gutter: 40px; }
}

/* 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(--page);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.125rem;
  line-height: 1.5556;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
}

p,
figure,
dl,
dd { margin: 0; }

p { text-wrap: pretty; }

img { max-width: 100%; }

a { color: inherit; }

.icon {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
}

:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--mold-sm);
  color: var(--text);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip:focus-visible { transform: none; }

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

/* Header */

.site-header { padding-block: 16px 8px; }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(33, 28, 21, 0.2);
}

/* The section links sit in a floating molded capsule, like the app's tab bar on the web. */
.nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 4px;
  list-style: none;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--bar);
}

.nav a,
.menu a,
.menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 16px;
  border-radius: 22px;
  color: var(--text2);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3333;
  text-decoration: none;
}

.nav a:hover,
.menu a:hover {
  background: var(--well);
  box-shadow: var(--sunk-sm);
  color: var(--text);
}

@media (max-width: 899px) {
  .nav { display: none; }
}

/* On smaller screens the same links fold into one molded button that opens the capsule below it. */
.menu details { position: relative; }

.menu summary {
  background: var(--surface);
  box-shadow: var(--mold-sm);
  cursor: pointer;
  list-style: none;
}

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

.menu summary:hover,
.menu details[open] summary {
  background: var(--well);
  box-shadow: var(--sunk-sm);
  color: var(--text);
}

.menu ul {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 4px;
  list-style: none;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--bar);
}

.menu a { display: flex; }

@media (min-width: 900px) {
  .menu { display: none; }
}

/* Buttons: a sage fill for the main action, molded plastic for the rest. */

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 26px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.button-primary {
  background: var(--sage);
  box-shadow: var(--solid);
  color: var(--on-sage);
}

.button-primary:hover { background: var(--sage-ink); }

.button-secondary {
  background: var(--surface);
  box-shadow: var(--mold-sm);
  color: var(--sage-ink);
}

.button-secondary:hover {
  background: var(--well);
  box-shadow: var(--sunk-sm);
}

/*
 * Not out yet: a closed compartment, soft sage plastic printed in sage ink, sized like a
 * button but not one. It sits where the download button will go.
 */
.soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 26px;
  background: var(--lid-soft);
  box-shadow: var(--lidsoftmold);
  color: var(--lid-soft-text);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .nav a,
  .menu a,
  .menu summary { transition: background-color 160ms var(--ease), box-shadow 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease); }
  .button:active { transform: scale(0.97); }
}

@media (max-width: 599px) {
  .actions > * {
    flex: 1 1 auto;
    padding-inline: 20px;
  }
}

/* Hero */

.hero { padding-block: 16px 64px; }

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

.mascot {
  display: block;
  width: 120px;
  height: auto;
  margin: 0 0 16px -8px;
  filter: var(--mascot-shadow);
}

.hero h1 {
  max-width: 11em;
  font-size: clamp(2.5rem, 1.5rem + 3.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.lede {
  max-width: 33rem;
  margin-top: 24px;
  color: var(--text2);
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
}

/*
 * The hero's signature: the product view sits in an organizer tray under its sage lid
 * band, with the weekdays printed on the lid and Thursday's raised key. The phone stands
 * in a sunken slot and disappears behind the tray's front lip. Sizes run in container
 * units of the tray body, so the slot always shows the same part of the phone.
 */
.hero-art {
  justify-self: center;
  width: min(100%, 360px);
}

.organizer {
  border-radius: 36px;
  background: var(--surface);
  box-shadow: var(--mold);
}

.lid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  min-height: 60px;
  padding-inline: 12px;
  border-radius: 36px 36px 0 0;
  background: var(--lid);
  box-shadow: var(--lidmold);
  color: var(--lid-text);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3333;
  text-shadow: var(--deboss);
}

.lid span {
  display: grid;
  place-items: center;
  justify-self: center;
  min-width: 36px;
  min-height: 44px;
  padding-inline: 4px;
  border-radius: 12px;
}

.lid .key {
  background: var(--key);
  box-shadow: var(--keymold);
  color: var(--key-text);
  text-shadow: none;
}

.organizer-body {
  container-type: inline-size;
  padding: 16px 16px 20px;
  border-radius: 0 0 36px 36px;
  box-shadow: var(--lidshade);
}

/*
 * The slot is the body's full width (100cqi) and the phone 24 narrower; a phone is 2.099
 * times as tall as it is wide, and --show is how much of it stands above the lip.
 */
.slot {
  --show: 0.78;
  position: relative;
  height: calc(12px + var(--show) * 2.099 * (100cqi - 24px));
  overflow: hidden;
  padding: 12px 12px 0;
  /* Concentric with the phone's corners on top (16% of its width + 12); cut straight at the lip. */
  border-radius: calc(16cqi + 8px) calc(16cqi + 8px) 0 0;
  background: var(--well);
  box-shadow: var(--sunk);
}

/* The front lip: a molded edge the phone slides behind. */
.slot::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--groove-light);
  box-shadow: 0 -1px 0 var(--groove-dark);
}

.slot .device { --phone-shadow: var(--phone-shadow-sm); }

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 48px;
  }

  .hero-art { justify-self: end; }
}

@media (min-width: 960px) {
  .hero { padding-block: 40px 112px; }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 392px;
    gap: 80px;
  }

  .hero-art { width: 392px; }

  .mascot {
    width: 152px;
    margin-bottom: 24px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .hero-art { animation: rise 520ms var(--ease) both; }
  .hero-art { animation-delay: 80ms; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* Sections */

.section { padding-block: 16px; }

@media (min-width: 960px) {
  .section { padding-block: 24px; }
}

main h2 {
  font-size: clamp(2.125rem, 1.6rem + 1.4vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

/* A section label is a sunken pill, like the app's time pills, with the section's icon. */
.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-bottom: 16px;
  padding: 8px 16px 8px 12px;
  border-radius: 18px;
  background: var(--well);
  box-shadow: var(--sunk-sm);
  color: var(--text2);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3333;
}

.label .icon {
  width: 18px;
  height: 18px;
  color: var(--sage-ink);
}

.text {
  max-width: 31rem;
  margin-top: 16px;
  color: var(--text2);
}

/* List bullets are the organizer's recorded compartment: a sage cap with a check. */
.points {
  display: grid;
  gap: 12px;
  max-width: 31rem;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  min-height: 28px;
  padding-left: 40px;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.6471;
}

.points li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sage) var(--tick) center / 14px no-repeat;
  box-shadow: var(--solid);
}

/*
 * A feature is a molded card: the copy sits on its raised face and the screens stand in
 * a sunken compartment. Card radius 32 = compartment 20 + padding 12 (40 = 24 + 16 wide).
 */
.feature {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--mold);
}

.copy { padding: 20px 12px 24px; }

.stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 20px 20px;
  border-radius: 20px;
  background: var(--well);
  box-shadow: var(--sunk);
}

.stage .phone {
  flex: 1 1 0;
  max-width: 260px;
}

.stage.single .phone { max-width: 280px; }

@media (min-width: 600px) {
  .feature {
    padding: 16px;
    border-radius: 40px;
  }

  .copy { padding: 32px 24px 32px; }

  .stage {
    gap: 24px;
    padding: 40px 32px 28px;
    border-radius: 24px;
  }
}

@media (min-width: 960px) {
  .feature {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: 16px;
  }

  .copy { padding: 40px 16px 40px 40px; }

  .feature.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .feature.flip .copy {
    order: 2;
    padding: 40px 40px 40px 16px;
  }

  /* One phone needs a narrower compartment. */
  .feature.flip.single { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }

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

  .feature.wide .copy {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: end;
    gap: 64px;
    padding: 40px 40px 24px;
  }

  .feature.wide .points { margin-top: 0; }

  .stage {
    gap: 32px;
    padding: 48px 40px 32px;
  }

  .feature.wide .stage { gap: 48px; }
  .feature.wide .stage .phone { max-width: 272px; }
}

/* Phones: on small screens, a row that scrolls sideways inside its compartment. */
@media (max-width: 599px) {
  .stage.row {
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    scrollbar-width: none;
  }

  .stage.row::-webkit-scrollbar { display: none; }

  .stage.row .phone {
    flex: 0 0 76%;
    scroll-snap-align: start;
  }
}

figcaption {
  margin-top: 16px;
  color: var(--text2);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2857;
  text-align: center;
}

/*
 * Device frame. Sizes are in container units of the figure, so the bezel,
 * radii and status bar scale with the phone. The screen is 390 wide in app
 * points: a 54pt status bar, the 390 x 756 capture, a 34pt home indicator.
 */
.phone {
  container-type: inline-size;
  width: 100%;
}

.device {
  --top: var(--top-light, #F3EFE6);
  --bottom: var(--bottom-light, #F3EFE6);
  --status: var(--status-light, #211C15);
  padding: 2.8cqi;
  border-radius: 16cqi;
  background: var(--bezel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 1px var(--bezel-edge), var(--phone-shadow);
}

/* Screenshots follow the system appearance through <picture>, so the bands do too. */
@media (prefers-color-scheme: dark) {
  .device:not([data-variant="light"]) {
    --top: var(--top-dark, #161310);
    --bottom: var(--bottom-dark, #161310);
    --status: var(--status-dark, #F3EFE6);
  }
}

.device[data-variant="dark"] {
  --top: var(--top-dark, #161310);
  --bottom: var(--bottom-dark, #161310);
  --status: var(--status-dark, #F3EFE6);
}

.screen {
  overflow: hidden;
  border-radius: 13.2cqi;
  background: var(--top);
}

.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 13.1cqi;
  padding-inline: 10.4cqi 6.8cqi;
  background: var(--top);
  color: var(--status);
  font-size: 4.1cqi;
  font-weight: 600;
  line-height: 1;
}

.status::after {
  content: '';
  width: 13.1cqi;
  height: 3.2cqi;
  margin-left: auto;
  background: currentColor;
  -webkit-mask: var(--status-glyphs) center / contain no-repeat;
  mask: var(--status-glyphs) center / contain no-repeat;
}

.screen picture { display: block; }

.screen > img,
.screen picture img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 756;
  background: var(--top);
}

.home {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 8.2cqi;
  padding-bottom: 1.9cqi;
  background: var(--bottom);
}

.home::before {
  content: '';
  width: 32.4cqi;
  height: 1.2cqi;
  border-radius: 1cqi;
  background: var(--status);
}

/* Lock screen, drawn in HTML from the page tones. */

.device.lock {
  --top: var(--wall);
  --bottom: var(--counter);
  --status: var(--text);
}

.lock-view {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  aspect-ratio: 390 / 756;
  padding-top: 6cqi;
  background: var(--wall);
  color: var(--text);
}

.lock-counter {
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  border-top: 1.2cqi solid var(--counter-edge);
  background: var(--counter);
}

.lock-light {
  position: absolute;
  bottom: 9%;
  left: 14%;
  width: 72%;
  height: 13%;
  background: var(--counter-light);
  clip-path: polygon(22% 0, 100% 0, 78% 100%, 0 100%);
}

.lock-date,
.lock-clock,
.notice { position: relative; }

.lock-date {
  font-size: 5cqi;
  font-weight: 500;
  line-height: 1.3;
}

.lock-clock {
  font-family: var(--font-display);
  font-size: 23cqi;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 3.2cqi;
  width: calc(100% - 7.2cqi);
  margin-top: auto;
  /* Rests on the wall just above the counter; percentages here follow the width. */
  margin-bottom: 62%;
  padding: 3.6cqi;
  border-radius: 5.6cqi;
  background: var(--notice);
  box-shadow: 0 0 0 1px var(--hairline), 0 1px 2px rgba(33, 28, 21, 0.08);
}

.notice-icon {
  display: block;
  width: 10cqi;
  height: 10cqi;
}

.notice-title,
.notice-body {
  overflow: hidden;
  font-size: 3.9cqi;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.notice-title { font-weight: 600; }

.notice-when {
  align-self: start;
  color: var(--text2);
  font-size: 3.4cqi;
  line-height: 1.5;
}

/* What OnDose won't do: four closed compartments in one tray, each with its rule beneath. */

.principles { padding-block: 80px 24px; }

.intro { max-width: 40rem; }
.intro .text { max-width: none; }

.rules {
  display: grid;
  gap: 8px;
  margin-top: 32px;
  padding: 12px;
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--mold);
}

.rule {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

/* A closed lid: sage soft plastic, printed in sage ink, with a finger tab. */
.rule dt {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 80px;
  padding: 16px 16px 24px;
  border-radius: 20px;
  background: var(--lid-soft);
  box-shadow: var(--lidsoftmold);
  color: var(--lid-soft-text);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2727;
  text-align: center;
}

.rule dt::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 24px;
  height: 4px;
  margin-left: -12px;
  border-radius: 2px;
  background: var(--lid-tab);
}

.rule dd {
  padding: 0 8px 12px;
  color: var(--text2);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

@media (min-width: 600px) {
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule dt { min-height: 96px; }
}

@media (min-width: 960px) {
  .principles { padding-block: 112px 32px; }

  .rules {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 40px;
  }

  .rule dt { min-height: 112px; }
}

/* Under the hood: one molded panel split by grooves. */

.hood { padding-block: 64px 24px; }

.specs {
  display: grid;
  margin-top: 32px;
  padding: 4px 20px;
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--mold);
}

.spec {
  position: relative;
  padding: 20px 0 20px 60px;
}

/* A groove: a dark line over a light one. */
.spec + .spec::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 60px;
  right: 0;
  height: 1px;
  background: var(--groove-dark);
  box-shadow: 0 1px 0 var(--groove-light);
}

.spec .cap {
  position: absolute;
  top: 20px;
  left: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sage-soft);
  box-shadow: var(--capmold);
  color: var(--sage-ink);
}

.spec .cap .icon {
  width: 22px;
  height: 22px;
}

.spec dt {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.2632;
}

.spec dd {
  margin-top: 4px;
  color: var(--text2);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

@media (min-width: 960px) {
  .hood { padding-block: 96px 32px; }

  .specs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 8px;
  }

  .spec { padding: 24px; }

  .spec .cap {
    position: static;
    margin-bottom: 20px;
  }

  .spec dd { margin-top: 8px; }

  .spec + .spec::before {
    top: 24px;
    bottom: 24px;
    left: -1px;
    right: auto;
    width: 1px;
    height: auto;
    box-shadow: 1px 0 0 var(--groove-light);
  }
}

/*
 * Pricing: the price sits in a sunken compartment of a molded card, with what it includes
 * and the closed coming-soon lid below. Card radius 32 = compartment 20 + padding 12.
 */

.pricing { padding-block: 64px 96px; }

.split {
  display: grid;
  gap: 32px;
}

@media (min-width: 960px) {
  .pricing { padding-block: 96px 128px; }

  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: 64px;
  }
}

.price-card {
  display: grid;
  gap: 24px;
  padding: 12px;
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--mold);
}

.price-well {
  padding: 32px 24px 28px;
  border-radius: 20px;
  background: var(--well);
  box-shadow: var(--sunk);
  text-align: center;
}

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 12px;
}

.price-amount {
  font-family: var(--font-display);
  font-size: clamp(4rem, 3.2rem + 3vw, 5.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.price-term {
  color: var(--text2);
  font-size: 1.25rem;
  font-weight: 600;
}

.price-note {
  max-width: 24rem;
  margin: 16px auto 0;
  color: var(--text2);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4667;
}

.price-card .points {
  max-width: none;
  margin: 0;
  padding-inline: 12px;
}

.price-card .soon { width: 100%; }

/* The page marks <html> with .ph for visitors in the Philippines, who see the peso price. */
.price-ph { display: none; }
.ph .price-ph { display: inline; }
.ph .price-intl { display: none; }

/* Footer */

.site-footer { padding-block: 0 64px; }

.footer-top {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 40px;
}

/* A molded groove closes the page. */
.footer-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--groove-dark);
  box-shadow: 0 1px 0 var(--groove-light);
}

.footer-brand p {
  margin-top: 4px;
  color: var(--text2);
  font-size: 0.9375rem;
  line-height: 1.4667;
}

.footer-links {
  display: flex;
  gap: 4px;
  margin: 0 -16px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 16px;
  border-radius: 22px;
  color: var(--text2);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  background: var(--well);
  box-shadow: var(--sunk-sm);
  color: var(--text);
}

.disclaimer {
  max-width: 46rem;
  margin-top: 32px;
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--well);
  box-shadow: var(--sunk);
  color: var(--text2);
  font-size: 0.9375rem;
  line-height: 1.4667;
}

.disclaimer strong {
  color: var(--text);
  font-weight: 600;
}
