/* Layout: the lock screen is the stage. A quiet studio frame, a live lock screen in the hero,
   and one full-bleed chapter per app in that app's own colors. */
:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --ink: #101614;
  --muted: #56615c;
  --line: #dde4e0;
  --accent: #0a736c;

  /* NowTodo chapter: deep green from the app's screenshots, dark in both themes */
  --nt-bg: #0a2a27;
  --nt-ink: #e9f4f1;
  --nt-muted: #a3c0ba;
  --nt-line: #1f4642;
  --nt-accent: #3fd0bd;

  /* BabyKok chapter: the app's warm paper and apricot */
  --bk-bg: #f7f4ed;
  --bk-ink: #2a2017;
  --bk-muted: #6c5f50;
  --bk-line: #e4dccb;
  --bk-accent: #b45104;

  --display: "Gabarito", ui-rounded, system-ui, sans-serif;
  --body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --clock: -apple-system, BlinkMacSystemFont, "Gabarito", system-ui, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f0e;
    --surface: #131917;
    --ink: #e8efec;
    --muted: #97a39e;
    --line: #232c29;
    --accent: #3fd0bd;

    --nt-bg: #0a2522;
    --nt-line: #1d403c;

    --bk-bg: #1a1510;
    --bk-ink: #f2e9dc;
    --bk-muted: #b5a691;
    --bk-line: #352a20;
    --bk-accent: #fba419;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex: none; }
.site-nav { display: flex; gap: clamp(14px, 3vw, 28px); font-size: 0.9375rem; font-weight: 500; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; padding-block: clamp(48px, 8vw, 96px); }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.5rem); font-weight: 800; line-height: 1; margin-block: 16px 22px; }
.lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 33em; }
.hero-apps { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.app-chip {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 10px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.app-chip:hover { border-color: var(--muted); transform: translateY(-1px); }
.app-chip img { width: 44px; height: 44px; border-radius: 10px; }
.app-chip strong { display: block; font-weight: 600; line-height: 1.25; }
.app-chip small { display: block; color: var(--muted); font-size: 0.8125rem; line-height: 1.3; }

/* Phone and lock screen: a physical object, same colors in both themes */
.phone {
  justify-self: center;
  width: min(310px, 100%);
  aspect-ratio: 310 / 640;
  padding: 11px;
  border-radius: 52px;
  background: #1b1f1e;
  box-shadow: 0 0 0 1px #2e3533, 0 40px 80px -30px rgba(10, 42, 39, 0.55), 0 18px 36px -18px rgba(0, 0, 0, 0.35);
}
.screen {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(95% 55% at 50% 108%, #fbb03b 0%, #e57a0e 22%, rgba(130, 64, 18, 0.55) 46%, rgba(10, 42, 39, 0) 72%),
    linear-gradient(180deg, #04201d 0%, #0b3a35 54%, #11302a 100%);
}
.island { flex: none; width: 92px; height: 27px; margin-top: 11px; border-radius: 20px; background: #000; }
.ls-date { margin-top: 24px; font-family: var(--clock); font-size: 15px; font-weight: 600; opacity: 0.9; }
.ls-time { font-family: var(--clock); font-size: 84px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ls-stack { display: grid; gap: 8px; width: 100%; margin-top: auto; padding-inline: 10px; }
.la {
  display: flex; align-items: center; gap: 11px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(14, 18, 17, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14);
}
.la-text { flex: 1; min-width: 0; }
.la-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.62); }
.la-title { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 0.3s; }
.ring { position: relative; flex: none; width: 42px; height: 42px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: rgba(255, 255, 255, 0.16); }
.ring .bar { stroke: #3fd0bd; transition: stroke-dashoffset 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ring-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.la-btn { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); transition: background 0.25s, transform 0.25s; }
.la-btn svg { width: 16px; height: 16px; }
.la.is-done .la-btn { background: #3fd0bd; transform: scale(1.08); }
.la.is-done .la-title { opacity: 0.45; text-decoration: line-through; }
.la-title.rise { animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.la-icon { flex: none; width: 36px; height: 36px; border-radius: 9px; }
.la-time { flex: none; font-size: 17px; font-weight: 700; color: #fbb03b; font-variant-numeric: tabular-nums; }
.ls-bottom { display: flex; justify-content: space-between; width: 100%; padding: 16px 34px 10px; }
.ls-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.ls-btn svg { width: 18px; height: 18px; }
.home-bar { flex: none; width: 118px; height: 5px; margin-bottom: 8px; border-radius: 3px; background: rgba(255, 255, 255, 0.85); }

/* ---------- App chapters ---------- */
.chapter { padding-block: clamp(64px, 10vw, 120px); }
.chapter.nt { background: var(--nt-bg); color: var(--nt-ink); --c-muted: var(--nt-muted); --c-line: var(--nt-line); --c-accent: var(--nt-accent); }
.chapter.bk { background: var(--bk-bg); color: var(--bk-ink); --c-muted: var(--bk-muted); --c-line: var(--bk-line); --c-accent: var(--bk-accent); }
.chapter .eyebrow { color: var(--c-accent); }
.chapter-head { display: flex; align-items: center; gap: 22px; }
.app-icon { flex: none; width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.chapter h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 700; margin-top: 6px; }
.chapter-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; margin-top: 28px; }
.chapter-intro p { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); color: var(--c-muted); max-width: 36em; }
.badge { display: inline-block; border-radius: 9px; }
.badge img { width: auto; height: 50px; }

.gallery {
  display: flex; gap: 16px;
  margin-top: 48px;
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  padding-bottom: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  scrollbar-width: thin;
  scrollbar-color: var(--c-line) transparent;
}
.gallery figure { flex: 0 0 auto; width: clamp(150px, 18vw, 206px); scroll-snap-align: start; }
.gallery img { width: 100%; height: auto; aspect-ratio: 360 / 783; border-radius: 18px; box-shadow: 0 0 0 1px var(--c-line); }
.gallery figcaption { margin-top: 10px; font-size: 0.8125rem; line-height: 1.4; color: var(--c-muted); }
.gallery-note { margin-top: 6px; font-size: 0.8125rem; color: var(--c-muted); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 32px; margin-top: 64px; }
.feature { padding-top: 20px; border-top: 1px solid var(--c-line); }
.feature h3 { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; }
.feature ul { list-style: none; display: grid; gap: 8px; }
.feature li { font-size: 0.9375rem; line-height: 1.5; color: var(--c-muted); }

.facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px 64px; margin-top: 72px; align-items: start; }
.facts h3 { font-size: 1.1875rem; font-weight: 700; margin-bottom: 6px; }
.facts .sub { font-size: 0.875rem; color: var(--c-muted); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.specs div { display: flex; justify-content: space-between; gap: 24px; padding-block: 12px; border-bottom: 1px solid var(--c-line); font-size: 0.9375rem; }
.specs div:first-child { border-top: 1px solid var(--c-line); }
.specs dt { color: var(--c-muted); }
.specs dd { text-align: right; font-weight: 500; }
.notes { display: grid; gap: 10px; padding-left: 1.1em; }
.notes li { font-size: 0.9375rem; line-height: 1.5; color: var(--c-muted); }
.notes li::marker { color: var(--c-accent); }
.disclaimer { max-width: 48em; margin-top: 48px; font-size: 0.8125rem; color: var(--c-muted); }

/* ---------- Studio ---------- */
.studio { padding-block: clamp(72px, 10vw, 128px); }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px 72px; align-items: start; }
.studio h2 { font-size: clamp(2rem, 4vw, 3rem); margin-top: 10px; }
.studio-intro p { max-width: 34em; margin-top: 18px; font-size: 1.0625rem; color: var(--muted); }
.studio-intro .founder { display: grid; gap: 2px; margin-top: 28px; padding-left: 16px; border-left: 2px solid var(--accent); font-size: 0.9375rem; }
.founder strong { font-family: var(--display); font-size: 1.125rem; font-weight: 700; color: var(--ink); }
.studio-log h3 { font-size: 0.8125rem; font-family: var(--body); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.timeline { position: relative; list-style: none; display: grid; gap: 22px; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline time { font-size: 0.8125rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline p { margin-top: 2px; font-size: 1rem; line-height: 1.5; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 80px; }
.principle { padding-top: 20px; border-top: 1px solid var(--line); }
.principle h3 { font-size: 1.125rem; margin-bottom: 8px; }
.principle p { font-size: 0.9375rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; padding-block: 72px; border-top: 1px solid var(--line); }
.contact h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
.contact p { margin-top: 8px; color: var(--muted); }
.contact-links { display: grid; gap: 6px; justify-items: start; }
.mail { font-family: var(--display); font-size: clamp(1.375rem, 3vw, 2rem); font-weight: 700; color: var(--accent); text-decoration: none; }
.mail:hover { text-decoration: underline; }
.more { font-size: 0.9375rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.more:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { padding-block: 28px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Document pages: support, privacy, 404 ---------- */
.doc { max-width: calc(760px + 2 * var(--gutter)); padding-block: clamp(48px, 7vw, 88px) clamp(64px, 9vw, 112px); }
.doc h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 800; }
.doc .meta { margin-top: 10px; font-size: 0.9375rem; color: var(--muted); }
.doc h2 { font-size: 1.5rem; margin-top: 48px; margin-bottom: 12px; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 12px; }
.doc ul { display: grid; gap: 8px; margin-top: 8px; padding-left: 1.2em; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { color: var(--accent); }
.doc .lead { margin-top: 16px; }
.callout { margin-top: 28px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.callout p { color: var(--ink); }
.callout p + p { margin-top: 6px; color: var(--muted); font-size: 0.9375rem; }
.doc-app { display: flex; align-items: center; gap: 14px; margin-top: 56px; }
.doc-app img { width: 48px; height: 48px; border-radius: 11px; }
.doc-app h2 { margin: 0; }
.faq { margin-top: 18px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 18px 40px 18px 0; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--display); font-size: 1.5rem; font-weight: 400; color: var(--muted); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding-bottom: 20px; }
.not-found { text-align: center; }
.not-found .lead { margin-inline: auto; }
.not-found .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin-top: 28px; font-weight: 600; }
.not-found .actions a { text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-grid, .facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .chapter-intro { grid-template-columns: minmax(0, 1fr); }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 56px; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .chapter-head { align-items: flex-start; gap: 16px; }
  .app-icon { width: 60px; height: 60px; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
