/* HomePad — landing page
   White, type-led, editorial. Devices are drawn in CSS around untouched screenshots. */

:root {
  --black: #1d1d1f;
  --gray: #6e6e73;
  --gray-2: #86868b;
  --line: #d2d2d7;
  --line-soft: #e5e5ea;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-shot: #eceef2;
  --blue: #0071e3;
  --blue-dark: #0058b0;
  --nav-h: 52px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--black);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter',
               'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* No sideways scroll, ever. `clip` rather than `hidden` because `hidden` turns the
   element into a scroll container, which would break every `position: sticky`
   on the page (the nav and the showcase stage). `hidden` stays as the fallback. */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1360px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Type ---------- */

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.035em; line-height: 1.06; }

.display  { font-size: clamp(2.9rem, 7.6vw, 6rem);  letter-spacing: -0.045em; line-height: 0.99; }
.headline { font-size: clamp(2rem, 4.8vw, 3.5rem);  letter-spacing: -0.04em;  line-height: 1.06; }
.subhead  { font-size: clamp(1.35rem, 2.6vw, 1.9rem); letter-spacing: -0.03em; line-height: 1.14; }

.eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.17em;
  text-transform: uppercase; color: var(--gray-2); margin: 0 0 20px;
}

.lede {
  font-size: clamp(1.08rem, 1.8vw, 1.32rem); line-height: 1.45; letter-spacing: -0.016em;
  color: var(--gray); margin: 20px auto 0; max-width: 46ch; font-weight: 400;
}
.lede strong { color: var(--black); font-weight: 600; }

p { margin: 0 0 1em; }
.muted { color: var(--gray); }
.tiny { font-size: 0.8rem; color: var(--gray-2); letter-spacing: 0; }

/* Line-by-line headline reveal */
.lines span { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.lines i { display: block; font-style: normal; transform: translateY(112%); }
.lines.in i { transform: none; transition: transform 1s var(--ease-out); }
.lines.in span:nth-child(2) i { transition-delay: 0.08s; }
.lines.in span:nth-child(3) i { transition-delay: 0.16s; }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: rgba(255,255,255,0.7);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease);
}
.nav.is-scrolled { border-bottom-color: rgba(0,0,0,0.07); }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 0 22px; height: 100%; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 1rem; color: var(--black); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 25px; height: 25px; border-radius: 6.5px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--black); font-size: 0.82rem; opacity: 0.8; letter-spacing: -0.01em; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.lang-switch { font-size: 0.82rem; color: var(--gray-2); display: flex; align-items: center; gap: 6px; }
.lang-switch a { color: var(--gray-2); }
.lang-switch .on { color: var(--black); font-weight: 600; }
.nav-cta {
  background: var(--blue); color: #fff !important; padding: 6px 15px; border-radius: 980px;
  font-size: 0.8rem; font-weight: 500; opacity: 1 !important;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav-cta:hover { background: var(--blue-dark); text-decoration: none; transform: translateY(-1px); }
@media (max-width: 900px) { .nav-links .hide-sm { display: none; } }

/* ---------- Buttons ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; margin-top: 32px; }
.btn-row.left { justify-content: flex-start; }

.btn-store {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--black); color: #fff; border-radius: 14px;
  padding: 11px 21px 11px 18px; text-decoration: none;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
.btn-store:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -10px rgba(0,0,0,0.35); text-decoration: none; }
.btn-store svg { width: 25px; height: 25px; fill: #fff; flex: none; }
.btn-store span { display: block; text-align: left; line-height: 1.15; }
.btn-store .s1 { font-size: 0.64rem; opacity: 0.8; letter-spacing: 0.02em; }
.btn-store .s2 { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.02em; }

.btn-ghost { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-size: 0.98rem; padding: 11px 4px; }
.btn-ghost:hover { text-decoration: underline; }
.btn-ghost .chev { transition: transform 0.3s var(--ease); }
.btn-ghost:hover .chev { transform: translateX(3px); }

/* ---------- Sections ---------- */

section { position: relative; }
.sec { padding: clamp(80px, 12vw, 160px) 0; }
.sec-tight { padding: clamp(40px, 5vw, 64px) 0; }
.sec-alt { background: var(--bg-alt); }
.sec-dark { background: #000; color: #f5f5f7; }
.sec-dark .lede, .sec-dark .muted { color: #a1a1a6; }
.sec-dark .eyebrow { color: #86868b; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
/* two dark sections in a row: a hairline keeps them from reading as one */
.sec-dark.dark-next { border-top: 1px solid rgba(255,255,255,0.09); }

/* ---------- Devices, drawn in CSS ---------- */

.device { position: relative; margin: 0 auto; }
.device img { width: 100%; display: block; }

.device-pad {
  padding: 1.25%;
  border-radius: 2.7% / 3.87%;
  background: linear-gradient(148deg, #55565a 0%, #202023 16%, #0c0c0e 52%, #1d1d20 80%, #4a4b4f 100%);
  /* contact line + one wide, even fall-off. A single huge blur smears sideways
     and reads as a smudge under the bottom edge. */
  box-shadow:
    0 0 0 0.5px rgba(0,0,0,0.26),
    0 1px 2px rgba(0,0,0,0.10),
    0 14px 24px -14px rgba(0,0,0,0.22),
    0 44px 64px -40px rgba(0,0,0,0.26);
}
.device-pad img { border-radius: 1.6% / 2.29%; }

.device-phone {
  padding: 2.5%;
  border-radius: 12.4% / 5.71%;
  background: linear-gradient(150deg, #5a5b60 0%, #232326 14%, #0d0d0f 50%, #1e1e21 78%, #4e4f53 100%);
  box-shadow:
    0 0 0 0.5px rgba(0,0,0,0.26),
    0 1px 2px rgba(0,0,0,0.10),
    0 12px 22px -12px rgba(0,0,0,0.22),
    0 38px 56px -36px rgba(0,0,0,0.26);
}
.device-phone img { border-radius: 10.6% / 4.86%; }

/* Ambient light behind a device — dark sections only. On white it turns the
   area under the device into a coloured smudge. */
.glow { position: relative; }

/* ---------- Hero ---------- */

/* No overflow clipping here: the hero device's shadow falls below the section
   edge, and `overflow: hidden` sliced it off. */
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 84px); text-align: center; }
.hero .display { max-width: 15ch; margin: 0 auto; }
.hero-note { margin-top: 18px; font-size: 0.82rem; color: var(--gray-2); }
.hero-visual { margin: clamp(46px, 6.5vw, 84px) auto 0; max-width: 1000px; padding: 0 24px; will-change: transform; }
.hero-fade { height: clamp(40px, 5vw, 68px); background: linear-gradient(180deg, var(--bg), #eaeaf1); }

/* ---------- Compatibility strip ---------- */

.strip { background: #eaeaf1; border-bottom: 1px solid rgba(0,0,0,0.06); }
.strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(26px, 5vw, 64px); }
.strip img { height: clamp(30px, 3.6vw, 40px); width: auto; opacity: 0.92; }
.strip p { margin: 0; color: var(--gray); font-size: 0.95rem; max-width: 34ch; }
@media (max-width: 760px) { .strip p { text-align: center; } }

/* ---------- Statement ---------- */

.statement {
  font-size: clamp(1.6rem, 4.2vw, 3.1rem); font-weight: 700; letter-spacing: -0.04em;
  line-height: 1.18; max-width: 19ch; margin: 0 auto; text-align: center;
}
.statement .w { color: rgba(29,29,31,0.16); transition: color 0.5s var(--ease); }
.statement .w.lit { color: var(--black); }
.statement .accent.lit { color: var(--blue); }

/* ---------- Sticky showcase ---------- */

.showcase { background: var(--bg-alt); padding: clamp(60px, 8vw, 110px) 0 clamp(70px, 9vw, 130px); }
.showcase-head { max-width: var(--maxw); margin: 0 auto clamp(30px, 5vw, 60px); padding: 0 24px; }
.showcase-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(30px, 5vw, 70px);
  align-items: start;
}
.showcase-stage { position: sticky; top: calc(var(--nav-h) + 6vh); }

/* --- the iPad as a plate in perspective, driven by scroll --- */
.stage-3d { position: relative; perspective: 1500px; perspective-origin: 50% 42%; }
.stage-tilt { transform-style: preserve-3d; will-change: transform; }

.showcase .device-pad {
  transform-style: preserve-3d;
  /* the drop shadow is a separate floor element: a box-shadow would rotate
     with the plate and stop reading as light from above */
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.30), inset 0 0 0 1px rgba(255,255,255,0.06);
}
/* back plane: at ±15° it shows as a sliver of thickness along one edge */
.showcase .device-pad::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(150deg, #46474b, #0b0b0d 60%);
  transform: translateZ(-17px);
}
.device-sheen {
  position: absolute; inset: 1.25%; border-radius: 1.6% / 2.29%;
  pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(102deg,
    transparent 30%, rgba(255,255,255,0.10) 44%,
    rgba(255,255,255,0.03) 54%, transparent 66%);
  transform: translateX(var(--sheen-x, 0%));
  opacity: var(--sheen-o, 0.4);
}
.stage-floor {
  position: absolute; left: 6%; right: 6%; bottom: -7%; height: 16%;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0,0,0,0.34), transparent 72%);
  filter: blur(16px);
  transform: translateX(var(--floor-x, 0px)) scaleY(0.55) scaleX(var(--floor-s, 1));
}

.stage-frames { position: relative; }
.stage-frames img + img { position: absolute; inset: 0; width: 100%; }
.stage-frames img { opacity: 0; }
.stage-frames img:first-child { opacity: 1; }

.showcase-steps { padding-top: 4vh; }
.step { min-height: 74vh; display: flex; flex-direction: column; justify-content: center; max-width: 40ch; }
.step-n { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.17em; color: var(--gray-2); margin-bottom: 14px; }
.step h3 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); letter-spacing: -0.032em; margin-bottom: 14px; }
.step p { color: var(--gray); font-size: 1.03rem; line-height: 1.55; margin: 0; }
.step { opacity: 0.32; transition: opacity 0.6s var(--ease); }
.step.is-on { opacity: 1; }

@media (max-width: 860px) {
  .showcase-inner { grid-template-columns: 1fr; }
  .showcase-stage { position: sticky; top: var(--nav-h); padding: 14px 0 22px; background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg-alt) 88%, rgba(245,245,247,0) 100%); z-index: 2; }
  .showcase-steps { padding-top: 0; }
  .stage-3d { perspective: 1250px; perspective-origin: 50% 50%; }
  .step { min-height: 56vh; max-width: none; opacity: 1; }
}

/* ---------- Interface mosaic ----------
   Tiles keep the pure #000 they sit on inside the app, so on a black section
   their real squircle corners blend in and nothing has to be cut out. */

.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.8vw, 26px); align-items: start; }
.mosaic figure { margin: 0; }
.mosaic figure img { width: 100%; }
.mosaic .wide { grid-column: span 2; }
.mosaic figcaption { margin-top: 12px; font-size: 0.82rem; color: #86868b; letter-spacing: -0.008em; }
.mosaic-sec .lede { margin-left: 0; }

/* Closing cell: honest about what the grid does not show */
.more-card {
  aspect-ratio: 396 / 400;
  background: #1c1c1e;
  border-radius: 14.6%;
  padding: 13% 12%;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
}
.more-card .more-plus { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 600; color: #5a5a5f; line-height: 1; letter-spacing: -0.03em; }
.more-card p { margin: 0; font-size: clamp(0.78rem, 1.05vw, 0.92rem); line-height: 1.4; color: #a1a1a6; letter-spacing: -0.012em; }

@media (max-width: 860px) { .mosaic { grid-template-columns: repeat(2, 1fr); } .mosaic .wide { grid-column: span 2; } }

/* ---------- Two-column rows ---------- */

.row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 6vw, 84px); align-items: center; }
.row.reverse .row-media { order: 2; }
.row.reverse .row-copy { order: 1; }
.row-copy h2 { margin-bottom: 18px; }
.row-copy > p { color: var(--gray); font-size: 1.04rem; line-height: 1.56; max-width: 44ch; }
@media (max-width: 860px) {
  .row { grid-template-columns: 1fr; }
  .row.reverse .row-media, .row.reverse .row-copy { order: initial; }
  .row-copy > p { max-width: none; }
}

/* Paired phones with depth.
   Flex + a negative margin rather than absolute positioning: the group then
   carries its own width and centres itself at any viewport, instead of being
   anchored left and spilling off the screen on a phone. */
.phones { display: flex; align-items: flex-start; justify-content: center; }
.phones .back  { width: 46%; margin-right: -11%; margin-top: 7%; z-index: 0; opacity: 0.96; transform: rotate(-4deg); transform-origin: center; }
.phones .front { width: 52%; z-index: 1; }

/* ---------- Alarm mode pills ---------- */

.modes { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; margin: 28px 0 0; padding: 0; }
.modes li {
  border: 1px solid rgba(255,255,255,0.18); border-radius: 980px;
  padding: 7px 17px; font-size: 0.9rem; letter-spacing: -0.015em; color: #f5f5f7;
}
.modes li.off { color: #86868b; border-color: rgba(255,255,255,0.1); }

/* ---------- Spec rows ---------- */

.specs { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line-soft); max-width: 44ch; }
.specs li { border-bottom: 1px solid var(--line-soft); padding: 13px 0; display: flex; gap: 16px; align-items: baseline; font-size: 0.97rem; }
.specs b { flex: 0 0 34%; font-weight: 600; letter-spacing: -0.015em; }
.specs span { color: var(--gray); }
.sec-dark .specs, .sec-dark .specs li { border-color: rgba(255,255,255,0.12); }
.sec-dark .specs span { color: #a1a1a6; }

/* ---------- Quiet price block ---------- */

.quiet { max-width: 620px; margin: 0 auto; text-align: center; }
.quiet h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.035em; }
.quiet .rule-short { width: 40px; height: 1px; background: var(--line); margin: 0 auto clamp(26px, 4vw, 40px); }

/* ---------- FAQ ---------- */

.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq details:first-of-type { border-top: 1px solid var(--line-soft); }
.faq summary { list-style: none; cursor: pointer; padding: 23px 44px 23px 0; position: relative; font-size: 1.08rem; font-weight: 600; letter-spacing: -0.022em; transition: opacity 0.25s var(--ease); }
.faq summary:hover { opacity: 0.6; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px;
  border-right: 1.6px solid var(--gray-2); border-bottom: 1.6px solid var(--gray-2);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.35s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 40px 24px 0; color: var(--gray); font-size: 0.99rem; line-height: 1.6; }
.faq .answer p:last-child { margin-bottom: 0; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.faq details[open] .answer { animation: faq-in 0.45s var(--ease-out) both; }

/* ---------- Footer ---------- */

.footer { background: var(--bg-alt); padding: 54px 0 42px; font-size: 0.79rem; color: var(--gray-2); }
.footer a { color: var(--gray); }
.footer-top { display: flex; flex-wrap: wrap; gap: 30px 56px; justify-content: space-between; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.footer-col h4 { font-size: 0.79rem; color: var(--black); margin-bottom: 12px; letter-spacing: -0.01em; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-bottom { padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between; }
.footer-bottom p { margin: 0; }

/* ---------- Thumb-reach download button ---------- */

.fab {
  position: fixed; right: 16px; z-index: 90;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 980px;
  background: var(--blue); color: #fff;
  font-size: 0.92rem; font-weight: 500; letter-spacing: -0.015em;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22), 0 1px 2px rgba(0, 0, 0, 0.18);
  transform: translateY(160%); opacity: 0; pointer-events: none;
  transition: transform 0.55s var(--ease-out), opacity 0.35s var(--ease);
}
.fab:hover { text-decoration: none; }
.fab svg { width: 17px; height: 17px; fill: #fff; flex: none; }
.fab.is-in { transform: none; opacity: 1; pointer-events: auto; }

/* Only where a thumb is actually reaching for it — on desktop the sticky nav
   already carries the same button. */
@media (min-width: 901px) { .fab { display: none; } }
@media (prefers-reduced-motion: reduce) { .fab { transition: opacity 0.2s linear; transform: none; } }

/* ---------- Reveal ---------- */

.reveal { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.d1.in { transition-delay: 0.07s; } .d2.in { transition-delay: 0.14s; }
.d3.in { transition-delay: 0.21s; } .d4.in { transition-delay: 0.28s; }
.d5.in { transition-delay: 0.35s; } .d6.in { transition-delay: 0.42s; }
.d7.in { transition-delay: 0.49s; } .d8.in { transition-delay: 0.56s; }
.reveal-scale { opacity: 0; transform: translateY(40px) scale(0.972); }
.reveal-scale.in { opacity: 1; transform: none; transition: opacity 1.15s var(--ease-out), transform 1.15s var(--ease-out); }

a:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 6px; }
::selection { background: rgba(0,113,227,0.15); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-scale { opacity: 1 !important; transform: none !important; transition: none !important; }
  .lines i { transform: none !important; }
  .statement .w { color: var(--black); }
  .step { opacity: 1 !important; }
  .hero-visual { transform: none !important; }
  .faq details[open] .answer { animation: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Devices on dark ground need a rim to separate from the background */
.sec-dark .device-pad,
.sec-dark .device-phone {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.10),
    0 2px 3px rgba(0,0,0,0.5),
    0 40px 90px -30px rgba(90,120,180,0.45);
}
.sec-dark .glow::before {
  content: ''; position: absolute; inset: -12% -8% -18%; z-index: -1; pointer-events: none;
  filter: blur(40px);
  background:
    radial-gradient(52% 44% at 42% 46%, rgba(90,140,255,0.20), transparent 72%),
    radial-gradient(44% 38% at 68% 60%, rgba(255,170,90,0.14), transparent 72%);
}
