/* Fraunces and Inter, served with the app instead of from Google (faster, and no third-party
   requests). SIL Open Font License: see fonts/OFL-*.txt. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Sunup website (landing, terms, privacy). Same palette and type as the app. */
/* Layout: a sunrise hero with the real app, then a morning-to-alert timeline. */

:root {
  --bg: #fff6ec;
  --bg-2: #fdebd8;
  --surface: #ffffff;
  --ink: #221d33;
  --muted: #6c6580;
  --line: #f0e1d0;
  --sun-a: #f2705e;
  --sun-b: #f7963e;
  --sun-c: #ffc54d;
  --accent: #c24129;
  --ok: #1f8f67;
  --night: #221d33;
  --night-2: #3a2f55;
  --night-ink: #f7f0e8;
  --night-muted: #b9b0cb;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(80, 40, 10, 0.05), 0 12px 32px rgba(80, 40, 10, 0.09);
  /* The phone frames' outer edge: only needed on a dark page, where the bezel would disappear. */
  --phone-edge: transparent;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #15131f;
    --bg-2: #1c1929;
    --surface: #211e30;
    --ink: #f7f0e8;
    --muted: #b0a8c0;
    --line: #353049;
    --accent: #ff8a73;
    --ok: #4fca9c;
    --night: #0f0d18;
    --night-2: #2a2340;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.3);
    --phone-edge: #3b3552;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #15131f;
  --bg-2: #1c1929;
  --surface: #211e30;
  --ink: #f7f0e8;
  --muted: #b0a8c0;
  --line: #353049;
  --accent: #ff8a73;
  --ok: #4fca9c;
  --night: #0f0d18;
  --night-2: #2a2340;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.3);
  --phone-edge: #3b3552;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: 20px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 600 16px/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
}

.btn.primary {
  border-color: transparent;
  color: #fff;
  /* Deeper than the sun art, so white text stays readable (4.5:1). */
  background: linear-gradient(135deg, #cf4330, #c25510);
  box-shadow: 0 8px 20px rgba(242, 112, 94, 0.3);
}

.btn.sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14.5px;
  border-radius: 12px;
}

.btn:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.ic {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* header */

.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

/* hero */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 56px 0;
  background: radial-gradient(900px 420px at 75% 100%, rgba(255, 197, 77, 0.35), transparent 70%), linear-gradient(180deg, var(--bg), var(--bg-2));
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: end;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 64px;
  min-width: 0;
}

.hero h1 {
  font-size: clamp(40px, 6.4vw, 70px);
}

.hero .lead {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 34em;
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Apple's App Store badge, unaltered, as tall as the buttons beside it (Apple's minimum is 40px). */
.store-badge {
  display: inline-flex;
  border-radius: 9px;
}

.store-badge img {
  display: block;
  width: auto;
  height: 52px;
}

.fine {
  font-size: 14px;
  color: var(--muted);
}

.phone {
  position: relative;
  width: min(330px, 100%);
  margin: 0 auto;
  padding: 12px 12px 0;
  border-radius: 46px 46px 0 0;
  background: #17141f;
  box-shadow: 0 0 0 1px var(--phone-edge), 0 40px 80px rgba(60, 20, 10, 0.25);
}

.phone img {
  border-radius: 34px 34px 0 0;
  aspect-ratio: 780 / 1628;
  object-fit: cover;
  object-position: top;
  height: auto;
  max-height: 560px;
  width: 100%;
}

.phone.full {
  border-radius: 46px;
  padding: 12px;
}

.phone.full img {
  border-radius: 34px;
  max-height: none;
}

/* photos */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  min-width: 0;
}

.hero-photo {
  width: min(400px, 86%);
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-bottom: 96px;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-visual .phone {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(240px, 56%);
  margin: 0;
  padding: 9px 9px 0;
  border-radius: 36px 36px 0 0;
}

.hero-visual .phone img {
  border-radius: 28px 28px 0 0;
  max-height: 440px;
}

.photo {
  margin: 0;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.collage {
  position: relative;
  padding: 0 0 40px;
}

.collage .photo {
  width: 86%;
}

.collage .phone.full {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44%;
  margin: 0;
  padding: 7px;
  border-radius: 30px;
}

.collage .phone.full img {
  border-radius: 24px;
}

/* Two phones side by side, the second a little lower. */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.duo .phone.full {
  width: 100%;
  margin: 0;
  padding: 8px;
  border-radius: 34px;
}

.duo .phone.full img {
  border-radius: 26px;
}

.duo .phone + .phone {
  margin-top: 64px;
}

@media (min-width: 861px) {
  .split:has(.duo) {
    grid-template-columns: 1fr 500px;
  }
}

/* facts */

.facts {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.facts .wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr) 1.2fr;
  gap: 28px;
  padding-block: 30px;
  align-items: center;
}

.fact strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 48px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.fact span {
  color: var(--muted);
  font-size: 15px;
}

.source {
  font-size: 13px;
  color: var(--muted);
}

/* sections */

section.block {
  padding-block: 88px;
}

section.block.tight {
  padding-top: 0;
}

.block-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 40em;
  margin-bottom: 44px;
}

.block-head h2 {
  font-size: clamp(32px, 4.4vw, 48px);
}

.block-head p {
  color: var(--muted);
  font-size: 18px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--sun-a), var(--sun-b));
}

.steps h3 {
  font-size: 22px;
}

.steps p {
  color: var(--muted);
  font-size: 16px;
}

/* the ladder (night section) */

.night {
  background: radial-gradient(800px 400px at 15% 0%, rgba(242, 112, 94, 0.25), transparent 70%), linear-gradient(180deg, var(--night), var(--night-2));
  color: var(--night-ink);
}

.night .eyebrow {
  color: var(--sun-c);
}

.night .block-head p {
  color: var(--night-muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: center;
}

.split.flip {
  grid-template-columns: 340px 1fr;
}

@media (min-width: 861px) {
  .split.flip:has(.collage) {
    grid-template-columns: 400px 1fr;
  }
}

.split > * {
  min-width: 0;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.timeline li {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.timeline li:first-child {
  border-top: none;
}

.timeline time {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--sun-c);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline strong {
  display: block;
  font-size: 17px;
}

.timeline span {
  color: var(--night-muted);
  font-size: 15px;
}

.timeline .who {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 2px;
  color: var(--night);
  background: var(--sun-c);
}

.timeline .who.you {
  color: var(--night-ink);
  background: rgba(255, 255, 255, 0.16);
}

.night .note {
  margin-top: 22px;
  color: var(--night-muted);
  font-size: 15px;
}

/* circle */

.checks {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.checks .ic {
  color: var(--ok);
  margin-top: 3px;
}

.quote {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.25;
}

/* features */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.feature .ic {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.feature h3 {
  font-size: 20px;
}

.feature p {
  color: var(--muted);
  font-size: 15.5px;
}

/* pricing */

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 860px;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.plan.best {
  border: 2px solid var(--sun-a);
  box-shadow: var(--shadow);
}

.plan h3 {
  font-size: 24px;
}

.price {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 600;
  line-height: 1;
}

.price small {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15.5px;
}

.plan li {
  display: flex;
  gap: 10px;
}

.plan li .ic {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  color: var(--ok);
}

.plan .btn {
  margin-top: auto;
}

/* faq */

.faq {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding-block: 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  list-style-position: outside;
}

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

/* closing + footer */

.closing {
  text-align: center;
  padding-block: 96px;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
}

.closing .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.closing h2 {
  font-size: clamp(34px, 5vw, 54px);
  max-width: 16em;
}

.closing .ctas {
  justify-content: center;
}

footer {
  border-top: 1px solid var(--line);
  padding-block: 28px;
  font-size: 14px;
  color: var(--muted);
}

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

footer nav {
  display: flex;
  gap: 18px;
}

/* legal pages */

.legal {
  max-width: 720px;
  padding-block: 48px 80px;
}

.legal h1 {
  font-size: clamp(34px, 5vw, 46px);
  margin-bottom: 8px;
}

.legal h2 {
  font-size: 24px;
  margin: 36px 0 10px;
}

.legal p,
.legal li {
  color: var(--ink);
}

.legal p + p,
.legal ul {
  margin-top: 12px;
}

.legal li + li {
  margin-top: 6px;
}

.draft {
  margin: 18px 0 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 15px;
}

/* small screens */

@media (max-width: 860px) {
  .hero .wrap,
  .split,
  .split.flip {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    padding-bottom: 8px;
  }
  .split .phone,
  .split .collage,
  .split .duo {
    order: 2;
  }
  .collage,
  .duo,
  .split > .photo {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
  }
  .steps,
  .features {
    grid-template-columns: 1fr;
  }
  .facts .wrap {
    grid-template-columns: 1fr 1fr;
  }
  .facts .source {
    grid-column: 1 / -1;
  }
  .plans {
    grid-template-columns: 1fr;
  }
  section.block {
    padding-block: 64px;
  }
  section.block.tight {
    padding-top: 0;
  }
}

@media (max-width: 420px) {
  .wrap {
    padding-inline: 16px;
  }
  .ctas .btn {
    width: 100%;
  }
  .timeline li {
    grid-template-columns: 64px 1fr;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.checks + .fine {
  margin-top: 18px;
}

/* Owner dashboard (admin.html) */
[hidden] {
  display: none !important;
}

.admin main {
  padding-top: 32px;
  padding-bottom: 64px;
}

.admin h1 {
  font-size: 36px;
  margin: 0 0 6px;
}

.admin h2 {
  font-size: 18px;
  margin: 32px 0 12px;
}

.unlock {
  display: grid;
  gap: 10px;
  max-width: 420px;
  margin-top: 24px;
}

.unlock input {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.tile strong {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.1;
}

.tile span {
  font-weight: 600;
}

.tile small {
  color: var(--muted);
  font-size: 13px;
}

.tile.bad {
  border-color: var(--accent);
}

.tile.bad strong {
  color: var(--accent);
}

.tile.good strong {
  color: var(--ok);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.backup-list summary {
  cursor: pointer;
  font-weight: 600;
  margin-top: 8px;
}

.backup-list ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.backup-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
