:root {
  --porcelain: #f7f6f3;
  --paper: #fbfaf7;
  --ink: #161512;
  --graphite: #6a685e;
  --hairline: #dedbd6;
  --lens: #c7d0d1;
  --content: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--sans);
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.wordmark {
  display: inline-block;
  padding-left: 0.42em;
  color: var(--ink);
  font-size: 15px;
  font-weight: 560;
  letter-spacing: 0.42em;
  line-height: 1;
}

.wordmark--small {
  font-size: 11px;
}

.wordmark--app {
  font-size: 10px;
  letter-spacing: 0.4em;
}

.micro,
.eyebrow {
  color: var(--graphite);
  font-size: 9px;
  font-weight: 590;
  letter-spacing: 0.24em;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.27em;
}

.reveal {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(20px);
  transition: opacity 0.85s var(--ease), filter 0.85s var(--ease), transform 0.85s var(--ease);
}

.reveal[data-visible="true"] {
  opacity: 1;
  filter: none;
  transform: none;
}

/* Intro */
.is-intro {
  overflow: hidden;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  background: var(--porcelain);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.intro.is-exit {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.035);
}

.intro__lens {
  position: relative;
  display: grid;
  width: 148px;
  height: 148px;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
}

.intro__lens::before {
  position: absolute;
  inset: -1px;
  border: 1.5px solid var(--ink);
  border-radius: inherit;
  clip-path: inset(0 100% 0 0);
  content: "";
  animation: intro-ring 0.9s var(--ease) 0.08s forwards;
}

.intro__mark {
  opacity: 0;
  filter: blur(5px);
  animation: intro-mark 0.7s var(--ease) 0.4s forwards;
}

.intro__caption {
  opacity: 0;
  transform: translateY(6px);
  animation: intro-caption 0.65s var(--ease) 0.68s forwards;
}

@keyframes intro-ring {
  to { clip-path: inset(0); }
}

@keyframes intro-mark {
  to { opacity: 1; filter: none; }
}

@keyframes intro-caption {
  to { opacity: 1; transform: none; }
}

/* Navigation */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  padding-inline: max(24px, calc((100vw - var(--content)) / 2));
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.nav.is-scrolled {
  border-bottom-color: rgba(222, 219, 214, 0.75);
  background: rgba(247, 246, 243, 0.78);
  backdrop-filter: blur(18px) saturate(130%);
}

.nav__brand {
  transition: opacity 0.25s ease;
}

.nav__brand:hover {
  opacity: 0.65;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--graphite);
  font-size: 11px;
  font-weight: 520;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav__link span {
  font-size: 14px;
  transition: transform 0.25s var(--ease);
}

.nav__link:hover span {
  transform: translateY(3px);
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  grid-template-columns: minmax(0, 0.94fr) minmax(390px, 1.06fr);
  align-items: center;
  padding: 88px max(24px, calc((100vw - var(--content)) / 2)) 48px;
}

.hero__halo {
  position: absolute;
  top: 50%;
  right: -6vw;
  width: min(74vw, 940px);
  aspect-ratio: 1;
  border: 1px solid rgba(199, 208, 209, 0.58);
  border-radius: 50%;
  background: radial-gradient(circle at 39% 34%, rgba(255,255,255,0.78) 0 6%, rgba(199,208,209,0.34) 31%, rgba(247,246,243,0) 70%);
  opacity: 0.78;
  pointer-events: none;
  transform: translateY(-50%);
  animation: halo-breathe 8s ease-in-out infinite;
}

.hero__halo::after {
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: inherit;
  content: "";
}

@keyframes halo-breathe {
  0%, 100% { opacity: 0.68; scale: 0.985; }
  50% { opacity: 0.86; scale: 1.015; }
}

.hero__copy {
  position: relative;
  z-index: 3;
  max-width: 560px;
}

.hero h1 {
  max-width: 690px;
  margin-top: 25px;
  font-size: clamp(54px, 7vw, 104px);
  font-weight: 180;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.hero h1 em {
  color: var(--graphite);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.lede {
  max-width: 390px;
  margin-top: 32px;
  color: var(--graphite);
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 390;
  letter-spacing: -0.015em;
  line-height: 1.65;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.text-link span {
  transition: transform 0.3s var(--ease);
}

.text-link:hover span {
  transform: translate(3px, 3px);
}

.hero__device {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  height: min(800px, calc(100svh - 118px));
  min-height: 600px;
}

.device-shadow {
  position: absolute;
  bottom: 2%;
  width: 290px;
  height: 54px;
  border-radius: 50%;
  background: rgba(22, 21, 18, 0.19);
  filter: blur(24px);
  transform: scaleX(1.15);
}

.phone {
  --scroll-y: 0px;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  width: min(350px, 37vw, calc((100svh - 118px) * 0.49));
  min-width: 270px;
  aspect-ratio: 350 / 714;
  perspective: 1200px;
  transform: translateY(var(--scroll-y)) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease);
}

.phone__rim {
  position: absolute;
  inset: 0;
  padding: 11px;
  border: 1px solid rgba(22, 21, 18, 0.44);
  border-radius: 57px;
  background: #f9f9f6;
  box-shadow: 0 2px 0 white inset, 0 0 0 4px rgba(255,255,255,0.55) inset, 0 32px 58px -22px rgba(22,21,18,0.34);
}

.hero__device[data-visible="true"] .phone__rim {
  animation: device-arrive 1.15s var(--ease) both;
}

@keyframes device-arrive {
  0% { opacity: 0; transform: translateY(52px) scale(0.94); }
  62% { opacity: 1; transform: translateY(-5px) scale(1.008); }
  100% { opacity: 1; transform: none; }
}

.phone__rim::before,
.phone__rim::after {
  position: absolute;
  left: -3px;
  width: 3px;
  border-radius: 2px 0 0 2px;
  background: #9f9e99;
  content: "";
}

.phone__rim::before { top: 142px; height: 68px; }
.phone__rim::after { top: 226px; height: 45px; }

.phone__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 47px;
  background: var(--porcelain);
}

.app-home {
  display: flex;
  flex-direction: column;
  padding: 39px 25px 22px;
}

.island {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 88px;
  height: 25px;
  border-radius: 999px;
  background: #050505;
  transform: translateX(-50%);
}

.app-head {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
}

.app-head .wordmark {
  justify-self: center;
}

.more {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  justify-self: end;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--graphite);
  font-size: 8px;
  letter-spacing: 1px;
}

.cycle-ring {
  position: relative;
  width: min(250px, 100%);
  aspect-ratio: 1;
  margin: 32px auto 0;
}

.cycle-ring svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cycle-ring circle {
  fill: none;
}

.cycle-ring__track {
  stroke: var(--hairline);
  stroke-width: 1.7;
}

.cycle-ring__value {
  stroke: var(--ink);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  stroke-linecap: round;
  stroke-width: 2.7;
  transform: rotate(-90deg);
  transform-origin: 125px 125px;
}

.cycle-ring__tip {
  fill: var(--ink) !important;
  transform-origin: 125px 125px;
}

.is-drawn .cycle-ring__value {
  animation: draw-cycle 1.7s var(--ease) 0.28s forwards;
}

.is-drawn .cycle-ring__tip {
  animation: move-tip 1.7s var(--ease) 0.28s forwards;
}

@keyframes draw-cycle {
  to { stroke-dashoffset: 35.714; }
}

@keyframes move-tip {
  to { transform: rotate(231.43deg); }
}

.cycle-ring__copy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

.cycle-ring__copy strong {
  margin-top: 3px;
  font-size: 78px;
  font-variant-numeric: tabular-nums;
  font-weight: 110;
  letter-spacing: -0.06em;
  line-height: 0.93;
}

.cycle-ring__of {
  color: var(--graphite);
  font-size: 12px;
  font-weight: 350;
}

.cycle-ring__date {
  margin-top: 7px;
  padding-bottom: 1px;
  border-bottom: 1px dotted rgba(106,104,94,0.5);
  color: rgba(106,104,94,0.8);
  font-size: 9px;
}

.status-line {
  margin-top: 15px;
  color: var(--graphite);
  font-size: 12px;
  font-weight: 390;
  text-align: center;
}

.home-stats {
  display: grid;
  margin-top: 30px;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
}

.home-stats div {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
}

.home-stats i {
  width: 1px;
  height: 31px;
  background: var(--hairline);
}

.home-stats strong {
  font-size: 14px;
  font-weight: 350;
}

.hold-button {
  position: relative;
  display: grid;
  width: 100%;
  height: 55px;
  margin-top: auto;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ink);
  color: var(--porcelain);
  cursor: pointer;
}

.hold-button span {
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.1em;
}

.hold-button svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hold-button rect {
  fill: none;
  stroke: rgba(247,246,243,0.9);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  stroke-width: 1.5;
}

.is-drawn .hold-button rect {
  animation: hold-trace 4.4s var(--ease) 1.3s infinite;
}

@keyframes hold-trace {
  0% { opacity: 1; stroke-dashoffset: 100; }
  40%, 55% { opacity: 1; stroke-dashoffset: 0; }
  65%, 100% { opacity: 0; stroke-dashoffset: 0; }
}

.app-home > small {
  margin-top: 9px;
  color: rgba(106,104,94,0.8);
  font-size: 9px;
  text-align: center;
}

.hero__side-note {
  position: absolute;
  right: 30px;
  bottom: 36px;
  writing-mode: vertical-rl;
}

/* Details */
.details {
  display: grid;
  min-height: 980px;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.78fr);
  gap: clamp(60px, 7vw, 110px);
  padding: 130px max(24px, calc((100vw - var(--content)) / 2));
  border-top: 1px solid var(--hairline);
}

.details__copy {
  max-width: 670px;
}

.feature-list {
  margin-top: 38px;
  border-top: 1px solid var(--hairline);
}

.feature {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  padding: 27px 0 30px;
}

.feature::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--hairline);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.05s var(--ease) 0.16s;
}

.feature[data-visible="true"]::after {
  transform: scaleX(1);
}

.feature > span {
  padding-top: 3px;
  color: rgba(106,104,94,0.65);
  font-size: 10px;
  letter-spacing: 0.17em;
}

.feature h3 {
  font-size: 21px;
  font-weight: 380;
  letter-spacing: -0.025em;
}

.feature p {
  max-width: 480px;
  margin-top: 8px;
  color: var(--graphite);
  font-size: 14px;
  line-height: 1.65;
}

.settings-stage {
  position: sticky;
  top: 112px;
  align-self: start;
}

.crop-device {
  position: relative;
  max-width: 430px;
  margin: 0 auto;
  padding: 15px 13px 0;
  overflow: hidden;
  border: 1px solid rgba(22,21,18,0.4);
  border-bottom: 0;
  border-radius: 54px 54px 0 0;
  background: #f9f9f6;
  box-shadow: 0 34px 70px -34px rgba(22,21,18,0.3);
}

.crop-device__top {
  position: absolute;
  z-index: 2;
  top: 26px;
  left: 50%;
  display: grid;
  width: calc(100% - 72px);
  grid-template-columns: 1fr 82px 1fr;
  align-items: center;
  transform: translateX(-50%);
}

.crop-device__top b {
  height: 24px;
  border-radius: 999px;
  background: var(--ink);
}

.settings-screen {
  min-height: 747px;
  padding: 54px 24px 55px;
  border-radius: 43px 43px 0 0;
  background: var(--porcelain);
}

.sheet-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 33px;
}

.sheet-title h3 {
  font-size: 29px;
  font-weight: 180;
  letter-spacing: -0.04em;
}

.sheet-title button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: transparent;
  color: var(--graphite);
  cursor: pointer;
  font-size: 17px;
  font-weight: 280;
}

.setting-group + .setting-group {
  margin-top: 24px;
}

.setting-group > .micro {
  display: block;
  margin: 0 0 10px 2px;
  font-size: 8px;
}

.cycle-options {
  display: grid;
  gap: 7px;
}

.cycle-option,
.setting-row {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  background: rgba(255,255,255,0.34);
}

.cycle-option {
  cursor: pointer;
  text-align: left;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}

.cycle-option:hover {
  transform: translateX(2px);
}

.cycle-option.is-active {
  border-color: var(--ink);
  background: rgba(255,255,255,0.8);
}

.cycle-option span,
.setting-row > span {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.cycle-option b,
.setting-row b {
  font-size: 13px;
  font-weight: 450;
}

.cycle-option small,
.setting-row small {
  color: var(--graphite);
  font-size: 10px;
}

.cycle-option i {
  position: relative;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--hairline);
  border-radius: 50%;
}

.cycle-option.is-active i {
  border-color: var(--ink);
}

.cycle-option.is-active i::after {
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: var(--ink);
  content: "";
}

.setting-row {
  min-height: 62px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.toggle i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--graphite);
  transition: background 0.25s ease, transform 0.35s var(--ease);
}

.toggle.is-on {
  border-color: var(--ink);
  background: var(--ink);
}

.toggle.is-on i {
  background: var(--porcelain);
  transform: translateX(18px);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stepper button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.stepper output {
  width: 18px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 350;
  text-align: center;
}

.settings-stage__caption {
  margin-top: 22px;
  text-align: center;
}

.footer {
  display: grid;
  min-height: 90px;
  padding: 26px max(24px, calc((100vw - var(--content)) / 2));
  border-top: 1px solid var(--hairline);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: var(--graphite);
  font-size: 11px;
}

.footer .wordmark {
  color: var(--ink);
  justify-self: start;
}

.footer a {
  justify-self: end;
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  border-color: var(--hairline);
}

/* Responsive */
@media (max-width: 960px) {
  .hero {
    min-height: auto;
    padding-top: 130px;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__halo {
    top: 56%;
    right: 50%;
    width: 105vw;
    transform: translate(50%, -38%);
  }

  .hero__copy {
    max-width: 630px;
    margin: 0 auto;
  }

  .lede {
    margin-inline: auto;
  }

  .hero__device {
    height: 780px;
    margin-top: 45px;
  }

  .phone {
    width: 340px;
  }

  .hero__side-note {
    display: none;
  }

  .details {
    grid-template-columns: 1fr;
  }

  .details__copy {
    max-width: none;
  }

  .settings-stage {
    position: relative;
    top: auto;
  }

}

@media (max-width: 620px) {
  .nav {
    height: 62px;
  }

  .nav__link {
    font-size: 9px;
  }

  .hero {
    padding: 112px 20px 42px;
  }

  .hero h1 {
    font-size: clamp(52px, 16vw, 76px);
  }

  .hero__device {
    height: 680px;
    min-height: 0;
  }

  .phone {
    width: 306px;
    min-width: 0;
  }

  .details {
    gap: 68px;
    padding: 90px 20px;
  }

  .feature {
    grid-template-columns: 38px 1fr;
  }

  .crop-device {
    border-radius: 42px 42px 0 0;
  }

  .settings-screen {
    padding-inline: 17px;
    border-radius: 33px 33px 0 0;
  }

  .sleep-setting {
    display: block;
  }

  .footer {
    gap: 14px;
    grid-template-columns: 1fr auto;
  }

  .footer > span:nth-child(2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro { display: none; }
  .reveal { opacity: 1; filter: none; transform: none; transition: none; }
  .phone { transform: none !important; transition: none; }
  .cycle-ring__value { stroke-dashoffset: 35.714; }
  .cycle-ring__tip { transform: rotate(231.43deg); }
  .is-drawn .cycle-ring__value,
  .is-drawn .cycle-ring__tip,
  .is-drawn .hold-button rect,
  .hero__halo,
  .hero__device[data-visible="true"] .phone__rim { animation: none; }
}
