/* Note to Self website. Colors are the app's tokens from Doc/design.md: Blue in light mode,
   Midnight in dark mode, following the visitor's appearance. Type is SF Pro through the system
   font stack, as in the app. */

:root {
  --background: #FFFFFF;
  --surface: #F4F6FA;
  --card: #FFFFFF;
  --divider: #E5E5EA;
  --text: #000000;
  --text-muted: #6E6E73;
  --accent: #0A6CFF;
  --accent-text: #0A6CFF;
  --marker: #FFE07A;
  --marker-text: #000000;
  --hero: #0A6CFF;
  --hero-glow: #5AA2FF;
  --hero-text: #FFFFFF;
  --midnight: #0E1117;
  --midnight-text: #ECEFF5;
  --midnight-muted: #9AA3B5;
  --cobalt: #3355E6;
  --bezel: #111216;
  --shadow: 0 30px 60px rgb(14 17 23 / 0.22);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0E1117;
    --surface: #131720;
    --card: #171B24;
    --divider: #222836;
    --text: #ECEFF5;
    --text-muted: #9AA3B5;
    --accent: #3355E6;
    --accent-text: #8EA4FF;
    --marker-text: #0E1117;
    --hero: #0E1117;
    --hero-glow: #3355E6;
    --hero-text: #ECEFF5;
    --midnight: #080A0F;
    --bezel: #2A2E38;
    --shadow: 0 30px 60px rgb(0 0 0 / 0.5);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body > main { flex: 1; }

a { color: var(--accent-text); text-underline-offset: 0.18em; }
:focus-visible { outline: 2.5px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { text-wrap: balance; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.container.narrow { max-width: 760px; }

.mark {
  color: var(--marker-text);
  background: var(--marker);
  padding: 0 0.14em;
  border-radius: 0.12em 0.22em 0.16em 0.26em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--background) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--divider) 70%, transparent);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

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

.site-nav { display: flex; gap: 22px; font-size: 15px; font-weight: 600; }
.site-nav a { color: var(--text-muted); text-decoration: none; padding-block: 12px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

@media (max-width: 640px) {
  .wide-only { display: none; }
  .site-nav { gap: 16px; }
}

/* Call to action */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--text);
  color: var(--background);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}

.cta:hover { opacity: 0.9; }

.cta-soon::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--marker);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--marker) 30%, transparent);
}

/* Phone */

.phone {
  position: relative;
  width: min(300px, 72vw);
  aspect-ratio: 1320 / 2868;
  padding: 10px;
  border-radius: 50px;
  background: var(--bezel);
  box-shadow: var(--shadow), inset 0 0 0 2px #3A3C44;
  flex: none;
}

.phone::after {
  /* The Dynamic Island. */
  content: "";
  position: absolute;
  top: 21px;
  left: 50%;
  width: 30%;
  height: 3.1%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}

.phone img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 40px;
  object-fit: cover;
}

/* A Home Screen drawn around the widget renders, as the App Store screenshot does. */
.home-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5%;
  padding: 10px;
  overflow: hidden;
}

.home-screen::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 40px;
  background: linear-gradient(135deg, #3355E6 0%, #1B2A6B 55%, #0E1117 100%);
}

.home-screen > * { position: relative; }
.home-screen .hs-status { align-self: flex-start; margin: 4.5% 0 4% 12%; color: #fff; font-weight: 600; font-size: 14px; }
.home-screen picture { width: 84%; }
.home-screen picture img { height: auto; border-radius: 0; }
.home-screen .hs-dock {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 4.5%;
  display: flex;
  justify-content: flex-end;
  padding: 11px 16px;
  border-radius: 30px;
  background: rgb(255 255 255 / 0.18);
}
.home-screen .hs-dock img { width: 52px; height: 52px; border-radius: 12px; }

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 30% 40%, color-mix(in srgb, var(--hero-glow) 85%, transparent), transparent 70%),
    var(--hero);
  color: var(--hero-text);
}

.home .site-header {
  background: color-mix(in srgb, var(--hero) 78%, transparent);
  border-bottom-color: transparent;
  transition: background-color 0.25s, -webkit-backdrop-filter 0.25s, backdrop-filter 0.25s;
}

/* At the top of the home page the bar is see-through over the hero, which runs up under it;
   site.js sets at-top, so without it the bar keeps its blur and stays readable. */
.home .site-header.at-top {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.home .hero { margin-top: -61px; padding-top: 61px; }
.home .site-header .brand, .home .site-nav a { color: var(--hero-text); }
.home .site-nav a { opacity: 0.82; }
.home .site-nav a:hover { opacity: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding-block: 72px 96px;
}

/* On a desktop, the hero fills the window under the header, and the phone grows or shrinks with
   the window's height so it always fits: its height is about 2.2 times its width. */
@media (min-width: 861px) {
  .hero-grid {
    min-height: calc(100vh - 61px);
    min-height: calc(100svh - 61px);
    padding-block: 48px;
  }

  .hero-art .phone { width: clamp(240px, calc((100svh - 61px - 120px) / 2.2), 380px); }
  .float-widget { width: clamp(240px, calc((100svh - 61px - 120px) / 2.2), 360px); }
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(44px, 7vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero-lede { margin: 0 0 32px; max-width: 32em; font-size: 20px; line-height: 1.5; opacity: 0.92; }

.hero .cta { background: #FFFFFF; color: #000000; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.85;
}

.hero-facts li::before { content: "✓"; margin-right: 7px; color: var(--marker); }

.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art .phone { transform: rotate(3deg); }

.float-widget {
  position: absolute;
  left: max(0px, calc(50% - 300px));
  bottom: 9%;
  width: min(300px, 64vw);
  transform: rotate(-4deg);
  filter: drop-shadow(0 24px 40px rgb(14 17 23 / 0.35));
}

.float-widget img { display: block; width: 100%; height: auto; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; padding-block: 48px 72px; }
  .hero-lede { margin-inline: auto; }
  .hero-facts { justify-content: center; }
  .float-widget { left: 50%; bottom: 6%; width: min(260px, 60vw); transform: translateX(-74%) rotate(-4deg); }
}

/* Sections */

.section { padding-block: 104px; }
.section + .section { padding-top: 0; }

.section-head { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.section-head p { margin: 0; font-size: 20px; color: var(--text-muted); }

/* Features, alternating sides */

.feature {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 64px;
  max-width: 920px;
  margin: 0 auto;
  padding: 56px 64px;
  border-radius: 40px;
  background: var(--surface);
}

.feature + .feature { margin-top: 32px; }
.feature.flip { grid-template-columns: auto 1fr; }
.feature.flip .feature-copy { order: 2; }

.feature h3 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.feature p { margin: 0; font-size: 19px; color: var(--text-muted); max-width: 26em; }
.feature .phone { width: min(260px, 64vw); }

@media (max-width: 760px) {
  .feature, .feature.flip { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 40px; padding: 44px 24px; }
  .feature.flip .feature-copy { order: 0; }
}

/* The reel */

.reel-section { padding-top: 0; }
.reel {
  display: block;
  width: 100%;
  max-width: 960px;
  height: auto;
  margin: 0 auto;
  border-radius: 28px;
  background: #0A6CFF;
  box-shadow: var(--shadow);
}

/* Private by design: always Midnight, like the app's dark look. */

.private {
  padding-block: 104px;
  background:
    radial-gradient(ellipse 50% 60% at 50% 0%, rgb(51 85 230 / 0.45), transparent 70%),
    var(--midnight);
  color: var(--midnight-text);
}

.section + .private, .private + .section { padding-top: 104px; }
.private .section-head p { color: var(--midnight-muted); }

.promise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.promise-grid li {
  padding: 28px 24px;
  border-radius: 24px;
  background: rgb(255 255 255 / 0.05);
  border: 1px solid rgb(255 255 255 / 0.08);
}

.promise-grid svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--marker);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.promise-grid h3 { margin: 16px 0 6px; font-size: 19px; }
.promise-grid p { margin: 0; color: var(--midnight-muted); font-size: 15px; }
.private-more { margin: 40px 0 0; text-align: center; font-weight: 600; }
.private-more a { color: #8EA4FF; }

@media (max-width: 900px) { .promise-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .promise-grid { grid-template-columns: 1fr; } }

/* Everything else */

.more-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 56px;
  max-width: 920px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.more-grid li { padding: 20px 0; border-top: 1px solid var(--divider); color: var(--text-muted); }
.more-grid strong { color: var(--text); }

@media (max-width: 680px) { .more-grid { grid-template-columns: 1fr; } }

/* FAQ */

.faq details { border-top: 1px solid var(--divider); }
.faq details:last-of-type { border-bottom: 1px solid var(--divider); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-block: 16px;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; font-weight: 400; color: var(--text-muted); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--text-muted); max-width: 40em; }

/* Closing call to action */

.closing {
  padding-block: 120px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, color-mix(in srgb, var(--hero-glow) 80%, transparent), transparent 70%),
    var(--hero);
  color: var(--hero-text);
}

.closing img { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 18px 40px rgb(0 0 0 / 0.25); }
.closing h2 { margin: 28px 0 12px; font-size: clamp(34px, 5.5vw, 60px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 800; }
/* The rotating end of the closing headline (site.js): one phrase at a time under the highlighter. */
.rotator { display: inline-block; white-space: nowrap; vertical-align: bottom; padding-block: 0.06em; overflow: hidden; }
.rotator .mark { display: inline-block; }
.closing p { margin: 0 0 32px; font-size: 20px; opacity: 0.9; }
.closing .cta { background: #FFFFFF; color: #000000; }

/* Footer */

.site-footer { border-top: 1px solid var(--divider); color: var(--text-muted); font-size: 15px; }
.closing + .site-footer, main:has(> .closing:last-child) + .site-footer { border-top: 0; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
  padding-block: 56px 32px;
}

.footer-brand p { margin: 12px 0 0; max-width: 22em; }
.site-footer h2 { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.site-footer nav a { display: block; padding-block: 5px; color: var(--text-muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--text); }
.footer-legal { padding-block: 20px 40px; font-size: 13px; }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Document pages (privacy, support, 404) */

.doc { padding-block: 56px 96px; }

.doc h1 {
  font-size: clamp(36px, 6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 12px;
}

.doc h2 { font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; margin: 48px 0 8px; }
.doc h3 { font-size: 18px; margin: 28px 0 4px; }
.doc p { margin: 0 0 12px; }
.doc h3 + p { margin-top: 0; }
.doc .lede { color: var(--text-muted); }
