/* ClearTime landing page.
 *
 * One palette, taken from the product, with each section on one of its grounds:
 *   cream  #F7F4EF  the dial's face           (hero, everywhere, colors)
 *   mist   #E8F3F5  the app's light ground    (how it works, closing)
 *   white                                     (built for ADHD, around cream cards)
 *   tide   #1F6673  the default timer color   (the maker's note)
 *   deep   #112427  the app's dark ground     (the film band, the footer)
 * The timer object keeps its own colors everywhere. Shapes: buttons are pills; surfaces are 24px.
 */

:root {
  --cream: #f7f4ef;
  --mist: #e8f3f5;
  --white: #ffffff;
  --tide: #1f6673;
  --deep: #112427;
  --tint: #a7d4dc;
  --ink: #16323b;
  --ring: #8fc3cc;

  --text: var(--ink);
  --muted: #4c5c61;
  --hairline: rgba(22, 50, 59, 0.12);
  --chip: rgba(22, 50, 59, 0.08);
  --accent: var(--tide);
  --surface: var(--white);

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(72px, 9vw, 136px);
  --radius: 24px;
  --font: "Manrope", system-ui, -apple-system, sans-serif;
}

.bg-cream {
  background: var(--cream);
}

.bg-mist {
  background: var(--mist);
}

.bg-white {
  background: var(--white);
}

.on-deep,
.on-tide {
  --text: #ffffff;
  --hairline: rgba(255, 255, 255, 0.14);
  --chip: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.on-deep {
  --muted: #9aa7ab;
  --accent: var(--tint);
  --surface: #172f33;
  background: var(--deep);
}

.on-tide {
  --muted: #d4e9ed;
  --accent: #d4e9ed;
  background: var(--tide);
}

*,
*::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(--cream);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

::selection {
  background: var(--tint);
  color: var(--ink);
}

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 16px;
}

/* Type -------------------------------------------------------------------- */

h1,
h2 {
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 1.2rem + 3.9vw, 4.75rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(2.1rem, 1.4rem + 2vw, 3.25rem);
  line-height: 1.05;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head {
  max-width: 38rem;
}

.section-head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.1875rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font: 700 1.0625rem/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-small {
  min-height: 44px;
  padding: 0 22px;
  font-size: 0.9375rem;
}

.btn-dark {
  background: var(--ink);
  color: #ffffff;
}

.btn-dark:hover {
  opacity: 0.88;
}

/* The bezel's light teal, for the hero timer's Pause: dark words, since white fails on it. */
.btn-tint {
  background: var(--tint);
  color: var(--ink);
}

.btn-tint:hover {
  background: var(--ring);
}

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

.btn-soft:hover {
  background: rgba(22, 50, 59, 0.14);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* The dial ----------------------------------------------------------------- */

.dial {
  aspect-ratio: 1;
}

.dial svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

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

.top {
  position: relative;
  z-index: 1;
  background: var(--cream);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 24px;
  height: 24px;
  color: var(--tide);
}

.nav-links {
  display: flex;
  gap: 32px;
  margin-left: auto;
  font-size: 0.9875rem;
  font-weight: 600;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

/* Hero: the words, and a timer you can use ---------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(12px, 3vw, 40px) clamp(64px, 8vw, 112px);
  background: var(--cream);
}

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

.hero h1 {
  margin-top: 22px;
}

.hero .lede {
  max-width: 34rem;
  margin-top: 32px;
  color: var(--muted);
  font-size: clamp(1.1875rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.5;
}

.hero-copy .btn {
  margin-top: 32px;
}

.hero .fine {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.hero-timer {
  display: grid;
  justify-items: center;
  text-align: center;
}

/* Faint rings around the dial, as on the original board. */
.hero-dial-wrap {
  position: relative;
  width: min(100%, 500px);
}

.hero-rings {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 700%;
  max-width: none;
  height: auto;
  color: var(--ring);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-rings * {
  vector-effect: non-scaling-stroke;
}

.hero-dial {
  width: 100%;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 50%;
}

.hero-dial:focus-visible {
  outline-offset: 8px;
}

.hero-time {
  margin-top: 14px;
  font-size: clamp(2.5rem, 1.4rem + 2.4vw, 3.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

.hero-status {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}

.hero-controls {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.hero-controls .btn {
  min-width: 112px;
}

.hero-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-dial-wrap {
    width: min(100%, 340px);
  }
}

/* The film, in its own dark band under the hero ------------------------------ */

.film-band {
  padding-block: clamp(48px, 6vw, 88px);
}

.film {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
}

.film video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.film-toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
}

.film-toggle[hidden] {
  display: none;
}

@media (max-width: 600px) {
  .film-toggle {
    right: 10px;
    bottom: 10px;
    min-height: 32px;
    padding: 0 14px;
    font-size: 0.8125rem;
  }
}

/* Everywhere: the same timer on four devices, then three plain points ------- */

.everywhere {
  padding-block: var(--section);
}

.devices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px 48px;
  margin-top: clamp(40px, 5vw, 64px);
}

.device h3 {
  margin-top: 26px;
  font-size: 1.625rem;
  letter-spacing: -0.02em;
}

.device p {
  margin-top: 8px;
  color: var(--muted);
}

.shot {
  position: relative;
  height: clamp(280px, 26vw, 360px);
  overflow: hidden;
  border-radius: var(--radius);
}

.shot-mac {
  background: #cbd3d8;
}

.mac-window {
  position: absolute;
  left: 6%;
  top: 11%;
  width: 62%;
  height: 100%;
  border-radius: 10px 10px 0 0;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(22, 50, 59, 0.08);
}

.mac-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(22, 50, 59, 0.08);
  border-radius: 10px 10px 0 0;
  background: #f2f3f4;
}

.mac-titlebar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9dcdf;
}

.mac-lines {
  display: grid;
  gap: 12px;
  padding: 30px 32px;
}

.mac-lines span {
  height: 8px;
  border-radius: 4px;
  background: #e5e8ea;
}

.mac-lines span:first-child {
  width: 45%;
  height: 12px;
  background: #d8dde0;
}

.mac-lines span:nth-child(2) { width: 92%; }
.mac-lines span:nth-child(3) { width: 100%; }
.mac-lines span:nth-child(4) { width: 84%; }
.mac-lines span:nth-child(5) { width: 96%; }
.mac-lines span:nth-child(6) { width: 70%; }

.mac-float {
  position: absolute;
  right: 6%;
  top: 50%;
  width: 40%;
  max-width: 220px;
  transform: translateY(-50%);
}

.shot-phone {
  background: #98abb3;
}

.phone-orb {
  position: absolute;
  left: -12%;
  top: 53%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #879fa7;
}

.phone-widget {
  position: absolute;
  left: 50%;
  top: 12%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 44px 18px 20px;
  border-radius: 28px;
  background: #eeede9;
  transform: translateX(-50%);
}

.phone-widget .dial {
  width: clamp(96px, 10vw, 132px);
}

.phone-time {
  font-size: clamp(1.75rem, 1rem + 1.4vw, 2.25rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

.phone-name {
  margin-top: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
}

.phone-island {
  position: absolute;
  left: 50%;
  bottom: 9%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 26px 10px 10px;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  transform: translateX(-50%);
}

.island-disc {
  width: 40px;
  height: 40px;
}

.island-disc svg {
  width: 100%;
  height: 100%;
}

.island-name {
  color: #b9c2c5;
  font-size: 0.75rem;
  font-weight: 600;
}

.island-time {
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.shot-watch,
.shot-tv {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111618;
  color: #ffffff;
}

.watch-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: clamp(190px, 17vw, 240px);
  aspect-ratio: 240 / 290;
  border-radius: 25%;
  background: #000000;
  box-shadow: 0 0 0 7px #1d2225, 0 0 0 8px #353b3f;
}

.watch-body .dial {
  width: 72%;
}

.watch-time,
.tv-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

.watch-time {
  font-size: clamp(1.25rem, 0.8rem + 0.9vw, 1.625rem);
}

.shot-tv {
  gap: clamp(20px, 3vw, 40px);
}

.tv-dial {
  width: clamp(150px, 15vw, 205px);
}

.tv-meta {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.tv-time {
  font-size: clamp(2.75rem, 1.6rem + 2.4vw, 4rem);
}

.tv-label {
  color: #9aa7ab;
  font-size: 0.9375rem;
  font-weight: 600;
}

.tv-pills {
  display: flex;
  gap: 8px;
}

.tv-pills span {
  padding: 8px 20px;
  border-radius: 999px;
  background: #1c3a42;
  font-size: 0.875rem;
  font-weight: 700;
}

.tv-pills span + span {
  background: rgba(255, 255, 255, 0.05);
  color: #9aa7ab;
}

.points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 48px;
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--hairline);
}

.points h3 {
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.points p {
  margin-top: 8px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .devices,
  .points {
    grid-template-columns: minmax(0, 1fr);
  }

  .shot {
    height: 300px;
  }
}

@media (max-width: 420px) {
  .phone-widget {
    padding: 14px 24px 14px 14px;
    gap: 12px;
  }

  .tv-dial {
    width: 128px;
  }
}

/* How it works: one dial that sets, shrinks and ends as the steps pass ----- */

.how {
  padding-block: var(--section);
}

.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}

.how-stage {
  position: sticky;
  top: max(24px, calc(50vh - 260px));
  display: grid;
  justify-items: center;
  gap: 20px;
}

.how-dial {
  width: min(100%, 420px);
}

.how-label {
  font-size: 2.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

.how-steps {
  margin-top: 48px;
  padding-bottom: 12vh;
}

.how-step {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 42vh;
  padding-left: 24px;
  border-left: 3px solid var(--hairline);
  transition: border-color 0.3s ease;
}

.how-step.is-active {
  border-left-color: var(--accent);
}

.how-step h3 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.how-step p {
  max-width: 34ch;
  color: var(--muted);
}

.step-dial {
  display: none;
}

@media (max-width: 880px) {
  .how-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .how-stage {
    display: none;
  }

  .how-steps {
    display: grid;
    gap: 28px;
    margin-top: 36px;
    padding-bottom: 0;
  }

  .how-step {
    grid-template-columns: 112px minmax(0, 1fr);
    column-gap: 20px;
    row-gap: 4px;
    align-items: center;
    align-content: start;
    min-height: 0;
    padding-left: 0;
    border-left: 0;
  }

  .step-dial {
    display: block;
    grid-row: span 2;
    width: 112px;
  }

  .how-step h3 {
    align-self: end;
  }

  .how-step p {
    align-self: start;
  }
}

/* Built for ADHD: a heading beside its paragraph, then four cards ----------- */

.adhd {
  padding-block: var(--section);
}

.adhd-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px 64px;
}

.adhd-head h2 {
  font-size: clamp(2.4rem, 1.4rem + 3vw, 4rem);
}

.adhd-head p {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.1875rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: clamp(40px, 5vw, 72px);
}

.feature {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 40px);
  border-radius: var(--radius);
  background: var(--cream);
}

.feature-visual {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 136px;
  margin-bottom: 28px;
}

.feature h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.feature p {
  margin-top: 10px;
  color: var(--muted);
}

.feature-dial {
  width: 136px;
  flex: none;
}

.blocks {
  gap: 12px;
}

.blocks img:nth-child(odd) {
  width: 52px;
}

.blocks img:nth-child(even) {
  width: 28px;
}

.soon {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0;
}

.note-card {
  display: grid;
  gap: 4px;
  padding: 16px 22px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--white);
}

.note-card strong {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.cues {
  display: grid;
  gap: 10px;
}

.cues span {
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .adhd-head,
  .features {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .blocks {
    gap: 8px;
  }

  .blocks img:nth-child(odd) {
    width: 40px;
  }

  .blocks img:nth-child(even) {
    width: 22px;
  }
}

/* A note from the maker, on Tide ------------------------------------------------ */

.note {
  padding-block: var(--section);
}

.note-inner {
  max-width: 50rem;
}

.note blockquote {
  margin-top: 24px;
}

.note blockquote p {
  font-size: clamp(1.45rem, 1.05rem + 1.4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.38;
}

.maker {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
  color: var(--muted);
}

.maker img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.maker strong {
  display: block;
  color: var(--text);
  font-weight: 700;
}

.maker a {
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 3px;
}

.maker a:hover {
  text-decoration-color: currentColor;
}

/* Your color: round swatches beside one large dial -------------------------------- */

.colors {
  padding-block: var(--section);
}

.colors-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "copy dial"
    "picker dial";
  column-gap: clamp(40px, 7vw, 112px);
  row-gap: 36px;
}

.colors-copy {
  grid-area: copy;
  align-self: end;
}

.colors-copy p {
  max-width: 30rem;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.1875rem;
}

.colors-picker {
  grid-area: picker;
  align-self: start;
}

.colors-stage {
  grid-area: dial;
  display: grid;
  place-items: center;
}

.colors-dial {
  width: min(100%, 460px);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Each swatch is a small body in its colors: the disc inside its bezel tint. */
.swatch {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 7px solid var(--rim);
  border-radius: 50%;
  background: var(--disc);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.swatch:hover {
  transform: scale(1.06);
}

.swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 3px var(--cream), 0 0 0 5px var(--ink);
}

.swatch:focus-visible {
  outline-offset: 7px;
}

.color-name {
  margin-top: 18px;
  font-weight: 700;
}

/* On a phone all seven fit on one row. */
@media (max-width: 480px) {
  .swatches {
    gap: 9px;
  }

  .swatch {
    width: 40px;
    height: 40px;
    border-width: 5px;
  }
}

@media (max-width: 860px) {
  .colors-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "dial"
      "picker";
  }

  .colors-dial {
    width: min(100%, 340px);
  }
}

/* Closing: the same timer, and the way in ------------------------------------------- */

.closing {
  padding-block: var(--section);
  text-align: center;
}

.closing-inner {
  display: grid;
  justify-items: center;
}

.closing-dial {
  width: min(56vw, 240px);
}

.closing-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.closing h2 {
  max-width: 16ch;
  margin-top: 40px;
}

.closing h2 + p {
  max-width: 40ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.1875rem;
}

.closing .btn {
  margin-top: 32px;
}

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

.footer {
  padding-block: 28px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer .brand {
  font-size: 1.0625rem;
}

.footer .brand-mark {
  width: 20px;
  height: 20px;
  color: var(--tint);
}

.footer p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer p a {
  color: var(--text);
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 3px;
}

.footer p a:hover {
  text-decoration-color: currentColor;
}

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