@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --teal: #0E3B43;
  --coral: #B4472F;
  --cream: #FBF4E6;
  --sand: #F2DFBA;
  --bg: var(--cream);
  --text: #1F2440;
  --muted: #5B5F73;
  --accent: var(--coral);
  --line: rgba(31, 36, 64, 0.12);
  --sky-top: #FBF4E6;
  --sky-bottom: #F2DFBA;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 34rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1F2440;
    --text: #F4EEE2;
    --muted: #B9B8C6;
    --accent: #F2B8A6;
    --line: rgba(244, 238, 226, 0.14);
    --sky-top: #1F2440;
    --sky-bottom: #2E2F4F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1F2440;
  --text: #F4EEE2;
  --muted: #B9B8C6;
  --accent: #F2B8A6;
  --line: rgba(244, 238, 226, 0.14);
  --sky-top: #1F2440;
  --sky-bottom: #2E2F4F;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }

/* Header and footer */

.site-header { padding: 1.25rem 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand img { height: 34px; width: auto; }
.brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand .logo-dark { display: block; }
}
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }

.site-nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.site-nav a { color: var(--text); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 5rem;
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--muted); }

/* Sky: the one moving thing, tinted by time of day */

.sky {
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom) 75%, var(--bg));
  transition: background 2s ease;
}
@media (prefers-reduced-motion: reduce) { .sky { transition: none; } }

/* Hero */

.hero { padding: 3rem 0 5rem; }
.hero .wrap { display: grid; gap: 3rem; align-items: center; grid-template-columns: 1.1fr 0.9fr; }
.eyebrow { color: var(--accent); font-size: 0.95rem; margin: 0 0 1rem; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
}
.hero h1 em { color: var(--accent); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: var(--measure); margin: 0 0 2rem; }
.hero-phone { --w: min(320px, 76vw); }

.cta { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--teal);
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}
.button[aria-disabled="true"] { cursor: default; }
:root[data-theme="dark"] .button { background: #F4EEE2; color: #1F2440; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .button { background: #F4EEE2; color: #1F2440; }
}
.cta-note { color: var(--muted); font-size: 0.95rem; }

/* Phone screenshots, framed as an iPhone */

.device {
  --w: min(300px, 72vw);
  --bezel: calc(var(--w) * 0.035);
  position: relative;
  width: var(--w);
  margin: 0;
  justify-self: center;
  padding: var(--bezel);
  background: #15171d;
  border-radius: calc(var(--w) * 0.165);
  box-shadow:
    inset 0 0 0 1.5px #3a3d47,
    0 0 0 1px rgba(31, 36, 64, 0.25),
    0 40px 70px -25px rgba(31, 36, 64, 0.45);
}
.device img {
  width: 100%;
  border-radius: calc(var(--w) * 0.13);
  background: var(--cream);
}
/* Side buttons: power on the right, volume on the left */
.device::before, .device::after {
  content: "";
  position: absolute;
  width: 3px;
  background: #2a2d36;
}
.device::before { right: -3px; top: 27%; height: 13%; border-radius: 0 2px 2px 0; }
.device::after {
  left: -3px; top: 22%; height: 8%; border-radius: 2px 0 0 2px;
  box-shadow: 0 calc(var(--w) * 0.22) 0 #2a2d36;
}

/* Lock screen mockup, matching the real widgets. Sizes scale with the phone via cqw. */

.lockscreen {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 1320 / 2868;
  border-radius: calc(var(--w) * 0.13);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 60% at 50% 100%, #F2A65A 0%, rgba(242, 166, 90, 0) 60%),
    linear-gradient(180deg, #1F2440 0%, #3B3560 45%, #A8607A 80%, #E8A070 100%);
  font-family: var(--sans);
}
.feature .lockscreen p { margin: 0; color: #fff; max-width: none; }
.ls-island {
  position: absolute; top: 3.3cqw; left: 50%; translate: -50% 0;
  width: 31cqw; height: 9cqw; border-radius: 9cqw; background: #000;
}
.feature .lockscreen .ls-date { margin-top: 19cqw; }
.ls-date { text-align: center; font-size: 5.2cqw; font-weight: 600; opacity: 0.9; }
.ls-clock {
  text-align: center; font-size: 27cqw; line-height: 1; font-weight: 600;
  letter-spacing: -0.02em; font-family: system-ui, -apple-system, sans-serif;
  opacity: 0.95;
}
.ls-widgets {
  display: flex; align-items: center; gap: 4cqw;
  margin: 4cqw 9cqw 0;
}
.ls-ring {
  flex: none; position: relative; width: 19cqw; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(255,255,255,0.12) 76%, transparent 78%),
    conic-gradient(#fff calc(var(--p) * 360deg), rgba(255,255,255,0.28) 0);
  display: grid; place-items: center;
}
.ls-ring::before {
  content: ""; position: absolute; inset: 1.9cqw; border-radius: 50%;
  background: rgba(40, 40, 70, 0.55); backdrop-filter: blur(4px);
}
.ls-ring-value { position: relative; font-size: 5.4cqw; font-weight: 700; margin-top: -2cqw; }
.ls-ring-icon { position: absolute; bottom: 3.2cqw; width: 5cqw; height: 5cqw; }
.ls-identity { font-family: var(--serif); font-size: 5.6cqw; line-height: 1.12; }
.ls-activity {
  position: absolute; left: 3.5cqw; right: 3.5cqw; bottom: 30cqw;
  display: flex; align-items: center; justify-content: space-between; gap: 3cqw;
  padding: 5cqw; border-radius: 9cqw;
  background: rgba(31, 36, 64, 0.85);
}
.ls-activity-label { font-size: 3.8cqw; font-weight: 500; opacity: 0.65; }
.ls-activity-part { font-family: var(--serif); font-size: 6.6cqw; line-height: 1.15; }
.ls-activity-timer { font-size: 6.4cqw; font-weight: 600; font-variant-numeric: tabular-nums; }
.ls-finish {
  flex: none; background: #E8B04B; color: #1F2440; font-weight: 600; font-size: 4.2cqw;
  padding: 2.4cqw 5cqw; border-radius: 6cqw;
}
.ls-bottom {
  position: absolute; left: 11cqw; right: 11cqw; bottom: 9cqw;
  display: flex; justify-content: space-between;
}
.ls-button {
  width: 12.5cqw; aspect-ratio: 1; border-radius: 50%;
  background: rgba(20, 20, 40, 0.35); backdrop-filter: blur(6px);
  display: grid; place-items: center;
}
.ls-button svg { width: 5.5cqw; height: 5.5cqw; }
.ls-home {
  position: absolute; bottom: 2.2cqw; left: 50%; translate: -50% 0;
  width: 35cqw; height: 1.2cqw; border-radius: 1cqw; background: rgba(255,255,255,0.85);
}

/* Principles strip */

.principles { padding: 4rem 0; }
.principles ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.2;
}
.principles li::before { content: "·"; color: var(--accent); margin-right: 0.6rem; }

/* Feature rows */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 5rem;
  align-items: center;
  padding: 4rem 0;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature h2, .section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}
.feature p { color: var(--muted); max-width: var(--measure); margin: 0 0 1rem; }

/* Smaller features, as a quiet list rather than cards */

.more { padding: 4rem 0; border-top: 1px solid var(--line); }
.more dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem 3rem; margin: 2rem 0 0; }
.more dt { font-weight: 600; margin-bottom: 0.25rem; }
.more dd { margin: 0; color: var(--muted); }

/* Privacy callout */

.private {
  margin-top: 2rem;
  padding: 3.5rem 0;
  text-align: center;
}
.private p { max-width: 36rem; margin: 0 auto 1rem; color: var(--muted); }
.private .section-title { margin-bottom: 1rem; }

/* Prose pages: privacy, support, blog posts */

.prose { width: min(var(--measure), 100% - 2rem); margin: 2rem auto 0; }
.prose h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  line-height: 1.08;
  margin: 1rem 0 0.75rem;
}
.prose h2 { font-size: 1.15rem; margin: 2.5rem 0 0.5rem; }
.prose p, .prose li { color: var(--text); }
.prose .meta { color: var(--muted); font-size: 0.95rem; margin: 0 0 2rem; }
.prose blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.3;
}

.post-list { list-style: none; padding: 0; margin: 2rem 0 0; }
.post-list li { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.post-list a { font-family: var(--serif); font-size: 1.8rem; line-height: 1.15; color: var(--text); text-decoration: none; }
.post-list a:hover { color: var(--accent); }
.post-list p { margin: 0.4rem 0 0; color: var(--muted); }
.post-list time { color: var(--muted); font-size: 0.9rem; }

/* Phone width */

@media (max-width: 760px) {
  .hero .wrap, .feature { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .feature-text { order: 0; }
  .hero { padding-top: 1.5rem; }
  .site-nav { gap: 1rem; font-size: 0.9rem; }
  .brand img { height: 28px; }
}
