/* DayGlint site. System fonts, no frameworks, no gradients, light and dark from prefers-color-scheme. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-band: #000000;          /* the Apple Watch band stays dark in both modes */
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --line: #d2d2d7;
  --accent: #2a78d6;           /* the app's Blue theme */
  --accent-text: #1f63b8;      /* the Blue theme's accentText, AA on white and grey */
  --btn: #111111;
  --btn-text: #ffffff;
  --btn-2: #f2f2f2;
  --btn-2-text: #111111;
  --btn-2-hover: #e8e8ed;
  --btn-2-on-alt: #e6e6eb;
  --btn-2-on-alt-hover: #dcdce1;
  --bezel: #1d1d1f;
  --bezel-edge: #c7c7cc;
  --focus: #2a78d6;
  --card: #ffffff;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1040px;
  --gutter: 22px;
  --section: clamp(76px, 11vw, 148px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #111113;
    --bg-band: #161618;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --line: #38383c;
    --accent: #3987e5;
    --accent-text: #78aef0;
    --btn: #ffffff;
    --btn-text: #111111;
    --btn-2: #2a2a2d;
    --btn-2-text: #f5f5f7;
    --btn-2-hover: #343438;
    --btn-2-on-alt: #2a2a2d;
    --btn-2-on-alt-hover: #343438;
    --bezel: #1c1c1e;
    --bezel-edge: #3a3a3c;
    --focus: #3987e5;
    --card: #1c1c1e;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }
picture { display: block; }

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-text);
  font-weight: 500;
}
.skip:focus { top: 10px; text-decoration: none; }

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

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.site-nav { display: flex; gap: 22px; }
.site-nav a {
  color: var(--text);
  font-size: 14px;
  letter-spacing: -0.01em;
  opacity: 0.86;
}
.site-nav a:hover { opacity: 1; text-decoration: none; }
.site-nav a[aria-current="page"] { opacity: 1; font-weight: 600; }

/* ---------- type ---------- */

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1, h2, h3 { margin: 0; font-weight: 600; }
.display {
  font-size: clamp(54px, 11vw, 112px);
  line-height: 1;
  letter-spacing: -0.035em;
}
.headline {
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.028em;
}
.lede {
  margin: 20px 0 0;
  color: var(--text-2);
  font-size: clamp(19px, 2.3vw, 24px);
  line-height: 1.38;
  letter-spacing: -0.018em;
  max-width: 34em;
}
.lede strong { color: var(--text); font-weight: 600; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- buttons (solid near-black pill; flat grey secondary; no icons, no shadow) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-text);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}
.btn:hover { text-decoration: none; opacity: 0.86; }
.btn--secondary { background: var(--btn-2); color: var(--btn-2-text); }
.btn--secondary:hover { background: var(--btn-2-hover); opacity: 1; }
.alt .btn--secondary { background: var(--btn-2-on-alt); }
.alt .btn--secondary:hover { background: var(--btn-2-on-alt-hover); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.center .actions { justify-content: center; }

/* ---------- sections ---------- */

section { padding: var(--section) 0; }
.alt { background: var(--bg-alt); }

/* hero */
.hero { padding: clamp(56px, 8vw, 104px) 0 0; overflow: hidden; }
.hero .kicker {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.hero .lede { color: var(--text); font-size: clamp(22px, 3.2vw, 32px); line-height: 1.22; letter-spacing: -0.024em; font-weight: 500; max-width: 22em; }
.hero .sub { margin: 18px auto 0; color: var(--text-2); max-width: 31em; font-size: clamp(17px, 1.9vw, 19px); }
.soon {
  margin: 28px 0 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hero-devices {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: clamp(44px, 6vw, 72px);
  padding-bottom: clamp(56px, 8vw, 96px);
}
.hero-devices .phone { --w: clamp(232px, 30vw, 390px); }
.hero-devices .watch {
  --w: clamp(112px, 14.5vw, 200px);
  position: absolute;
  left: calc(50% + clamp(60px, 11.5vw, 172px));
  bottom: clamp(70px, 10vw, 128px);
}
@media (max-width: 560px) {
  .hero-devices { justify-content: flex-start; padding-left: 4%; }
  .hero-devices .watch { left: auto; right: 4%; }
}

/* ---------- device frames (flat bezels, no reflections) ---------- */

.phone {
  --w: 300px;
  flex: none;
  width: calc(var(--w) * 1.07);
  margin: 0;
  padding: calc(var(--w) * 0.035);
  border-radius: calc(var(--w) * 0.172);
  background: var(--bezel);
  box-shadow: 0 0 0 1px var(--bezel-edge);
}
.phone img { width: 100%; border-radius: calc(var(--w) * 0.137); }

.watch {
  --w: 180px;
  flex: none;
  position: relative;
  width: calc(var(--w) * 1.17);
  margin: 0;
  padding: calc(var(--w) * 0.085);
  border-radius: calc(var(--w) * 0.31);
  background: #121214;
  box-shadow: 0 0 0 1.5px #3a3a3c;
}
.watch img { width: 100%; border-radius: calc(var(--w) * 0.2); }
.watch::before, .watch::after {
  content: "";
  position: absolute;
  right: calc(var(--w) * -0.05);
  width: calc(var(--w) * 0.05);
  border-radius: 0 4px 4px 0;
  background: #3a3a3c;
}
.watch::before { top: 22%; height: 15%; }                 /* Digital Crown */
.watch::after { top: 49%; height: 20%; width: calc(var(--w) * 0.025); right: calc(var(--w) * -0.025); } /* side button */

.screen-card {
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 0 0 1px var(--line);
}

/* ---------- two-column feature ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}
.feature--flip { grid-template-columns: auto minmax(0, 1fr); }
.feature--flip .feature-media { order: -1; }
.feature-media { display: flex; justify-content: center; }
.feature-media .phone { --w: clamp(236px, 27vw, 330px); }
@media (max-width: 820px) {
  .feature, .feature--flip { grid-template-columns: 1fr; }
  .feature--flip .feature-media { order: 0; }
}

/* plain rows with hairlines, used for scores and facts */
.rows { margin: 40px 0 0; padding: 0; }
.rows > div {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  gap: 6px 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.rows > div:last-child { border-bottom: 1px solid var(--line); }
.rows dt { font-weight: 600; font-size: 19px; letter-spacing: -0.02em; line-height: 1.3; }
.rows dt span { display: block; margin-top: 2px; color: var(--text-2); font-size: 15px; font-weight: 400; letter-spacing: -0.01em; font-family: var(--rounded); }
.rows dd { margin: 0; color: var(--text-2); line-height: 1.47; }
@media (max-width: 520px) {
  .rows > div { grid-template-columns: 1fr; }
}

/* numbers */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: clamp(64px, 9vw, 112px) 0 0;
  padding: 0;
  list-style: none;
}
.stats li { border-top: 1px solid var(--line); padding-top: 22px; }
.stats b {
  display: block;
  font-family: var(--rounded);
  font-size: clamp(40px, 5.6vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stats span { display: block; margin-top: 12px; color: var(--text-2); max-width: 17em; }
@media (max-width: 700px) {
  .stats { grid-template-columns: 1fr; gap: 0; }
  .stats li { padding: 22px 0; }
  .stats li:last-child { border-bottom: 1px solid var(--line); }
}

/* board section: plain verb list */
.verbs { margin: 36px 0 0; padding: 0; list-style: none; }
.verbs li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--text-2); }
.verbs li:last-child { border-bottom: 1px solid var(--line); }
.verbs b { color: var(--text); font-weight: 600; margin-right: 6px; }

/* metric groups */
.groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 32px;
  margin: clamp(56px, 8vw, 96px) 0 0;
}
.groups h3 { font-size: 19px; letter-spacing: -0.02em; padding-top: 16px; border-top: 1px solid var(--line); }
.groups p { margin: 8px 0 0; color: var(--text-2); font-size: 15px; line-height: 1.5; }
@media (max-width: 900px) { .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 340px) { .groups { grid-template-columns: 1fr; gap: 28px; } }

/* Apple Watch band */
.band { background: var(--bg-band); color: #f5f5f7; }
.band .lede { color: #a1a1a6; }
.band .lede strong { color: #f5f5f7; }
.band .eyebrow { color: #78aef0; }
.band a { color: #78aef0; }
.band :focus-visible { outline-color: #78aef0; }
.watches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 28px;
  margin: clamp(56px, 8vw, 88px) 0 0;
}
.watches figure { margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.watches .watch { --w: clamp(150px, 15vw, 188px); }
.watches figcaption { margin-top: 28px; max-width: 17em; color: #a1a1a6; font-size: 16px; }
.watches figcaption b { display: block; margin-bottom: 4px; color: #f5f5f7; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
@media (max-width: 760px) {
  .watches { grid-template-columns: 1fr; gap: 56px; }
}

/* apps that save to Health */
.names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 26px;
  margin: 44px auto 0;
  padding: 0;
  max-width: 900px;
  list-style: none;
}
.names li {
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--text);
}
.names li.more { color: var(--text-2); font-weight: 500; }
.hub {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(40px, 7vw, 88px);
  align-items: center;
  margin-top: clamp(64px, 9vw, 104px);
}
.hub .phone { --w: clamp(236px, 27vw, 330px); }
.hub-text .screen-card { max-width: 420px; margin-top: 36px; }
@media (max-width: 820px) {
  .hub { grid-template-columns: 1fr; justify-items: center; }
  .hub-text { width: 100%; }
}
.hub h3, .feature h3 { font-size: 24px; letter-spacing: -0.022em; line-height: 1.2; }
.hub p, .feature p.body { color: var(--text-2); margin: 10px 0 0; max-width: 30em; }
.hub h3 + p + h3 { margin-top: 28px; }

/* sleep */
.sleep-media { display: flex; align-items: flex-end; gap: 28px; justify-content: center; }
.sleep-media .watch { --w: clamp(112px, 12vw, 150px); margin-bottom: 24px; }
@media (min-width: 821px) {
  /* beside the text column the Watch overlaps the phone, as in the hero, so the text keeps its width */
  .sleep-media { position: relative; }
  .sleep-media .watch { position: absolute; right: -64px; bottom: 64px; margin: 0; }
}
@media (max-width: 420px) {
  .sleep-media { flex-direction: column; align-items: center; }
  .sleep-media .watch { margin-bottom: 0; }
}
.note {
  margin: 32px 0 0;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--bg-alt);
  color: var(--text-2);
  max-width: 32em;
}
.note b { color: var(--text); font-weight: 600; }

/* privacy points */
.points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: clamp(48px, 7vw, 80px) 0 0;
  padding: 0;
  list-style: none;
}
.points li { border-top: 1px solid var(--line); padding-top: 18px; color: var(--text-2); }
.points b { display: block; margin-bottom: 6px; color: var(--text); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
@media (max-width: 760px) { .points { grid-template-columns: 1fr; gap: 24px; } }
.points--stack { grid-template-columns: 1fr; gap: 0; margin-top: 36px; }
.points--stack li { padding: 16px 0; }
.points--stack li:last-child { border-bottom: 1px solid var(--line); }

/* closing */
.closing img { width: clamp(96px, 12vw, 128px); height: auto; margin: 0 auto 28px; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
  padding: 36px 0 44px;
}
.site-footer p { margin: 0 0 10px; max-width: 60em; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.site-footer nav a { color: var(--text); }
.site-footer a { color: var(--text); }

/* ---------- article pages (privacy, support, 404) ---------- */

.page { padding: clamp(48px, 8vw, 96px) 0 clamp(72px, 10vw, 128px); }
.page .wrap { max-width: calc(720px + var(--gutter) * 2); }
.page h1 { font-size: clamp(36px, 6vw, 52px); line-height: 1.08; letter-spacing: -0.03em; }
.page .meta { margin: 18px 0 0; color: var(--text-2); font-size: 15px; }
.page .meta span { display: block; }
.prose h2 {
  margin: 48px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.022em;
}
.prose h2:first-child { margin-top: 40px; }
.prose p, .prose li { color: var(--text); }
.prose p { margin: 14px 0 0; }
.prose ul { margin: 14px 0 0; padding-left: 1.2em; }
.prose li { margin: 10px 0 0; padding-left: 4px; }
.prose li::marker { color: var(--text-2); }
.intro { margin: 18px 0 0; color: var(--text-2); font-size: 21px; line-height: 1.4; letter-spacing: -0.018em; }

.faq { margin: 56px 0 0; }
.faq h2 { font-size: 28px; letter-spacing: -0.024em; margin: 0 0 8px; }
.faq h3 {
  margin: 0;
  padding-top: 22px;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.faq .qa { border-top: 1px solid var(--line); padding-bottom: 22px; }
.faq .qa:last-child { border-bottom: 1px solid var(--line); }
.faq p { margin: 8px 0 0; color: var(--text-2); }
.faq p + p { margin-top: 10px; }
.contact-card {
  margin: 36px 0 0;
  padding: 28px;
  border-radius: 22px;
  background: var(--bg-alt);
}
.contact-card h2 { font-size: 24px; letter-spacing: -0.022em; }
.contact-card p { margin: 8px 0 0; color: var(--text-2); }
.contact-card .actions { margin-top: 20px; }
.kbd-path { color: var(--text); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .site-nav a { transition: opacity 0.15s ease, background-color 0.15s ease; }
}

/* 404 */
.notfound img { width: 96px; height: auto; margin: 0 auto 28px; }
.notfound .intro { margin-left: auto; margin-right: auto; }
.notfound .actions { justify-content: center; }
