/* The landing page. Loads after styles.css (shared tokens, legal pages) and only touches .home,
   so privacy, terms and support are untouched.

   Built after the user's two references (wayk.io for the page's bones, the Brainrot page for its
   weight and swagger), in Dialed's own charcoal. The phones are the real iPhone frame from the App
   Store screenshots: assets/images/paywall-phone-frame.png, with the screenshot sat in its screen
   box and the same glass highlight over it. */

:root {
  --faint: #6d7079;
  --lift: rgba(255, 255, 255, 0.05);
  --glow: rgba(244, 166, 90, 0.18);
  --display: 'Figtree', 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body.home {
  padding-inline: 0;
  font-family: var(--display);
  background:
    radial-gradient(130% 62% at 50% -8%, #272932 0%, rgba(18, 19, 22, 0) 60%),
    var(--bg);
  background-repeat: no-repeat;
  overflow-x: hidden;
}
.home ::selection { background: var(--dawn); color: #15161a; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.home .shell {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(22px, env(safe-area-inset-left, 0px));
  padding-right: max(22px, env(safe-area-inset-right, 0px));
}

/* ---------------------------------------------------------------- header */

/* The bar spans the window; only the row inside it is held to the page's column. Keeping the
   translucent background on the inner column drew its edges as a visible box (2026-11-08). */
.home .navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18, 19, 22, 0.72);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.home .navbar.stuck { border-bottom-color: var(--line); background: rgba(18, 19, 22, 0.86); }
.home .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 15px;
}
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.lockup img { width: 32px; height: 32px; border-radius: 8.5px; display: block; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 4px 14px rgba(0, 0, 0, 0.5); }
.lockup b { font-family: var(--display); font-weight: 800; font-size: 20.5px; letter-spacing: -0.035em; color: var(--fg); }
.home .navlinks { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.home .navlinks a { color: var(--muted); text-decoration: none; transition: color 0.18s ease; }
.home .navlinks a:hover { color: var(--fg); }
@media (max-width: 900px) { .home .navlinks { display: none; } }

/* ------------------------------------------------------------- the asks */

.pill {
  font-family: var(--display);
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: -0.012em;
  border: 0;
  cursor: pointer;
  background: #f4f4f6;
  color: #0c0c0e;
  padding: 11px 21px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 0;
  cursor: pointer;
  font-family: var(--display);
  text-align: left;
  background: #f4f4f6;
  color: #0b0b0d;
  padding: 10px 22px 11px;
  border-radius: 12px;
}
.badge svg { width: 25px; height: 25px; flex: none; fill: currentColor; }
.badge span { display: block; font-size: 11px; letter-spacing: 0.015em; font-weight: 500; opacity: 0.7; line-height: 1.25; }
.badge b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.028em; line-height: 1.12; }

.sell { font-size: 14.5px; font-weight: 600; color: var(--muted); margin: 15px 0 0; }

/* ------------------------------------------------------------------ hero */

.hero { text-align: center; padding-block: 86px 0; }
.tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dawn);
  margin: 0 0 22px;
}
.tagline::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--dawn);
  box-shadow: 0 0 0 4px var(--glow);
}
.hero h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(42px, 7.2vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0 0 22px;
  text-wrap: balance;
}
.hero .lede {
  font-size: clamp(17px, 2.1vw, 21px);
  font-weight: 500;
  color: var(--muted);
  max-width: 30em;
  margin: 0 auto 34px;
  text-wrap: balance;
}

/* ------------------------------------------------- the phone, really framed */

.device {
  position: relative;
  width: min(320px, 78vw);
  margin: 0 auto;
  aspect-ratio: 1350 / 2760;
}
.device .glowpad {
  position: absolute;
  inset: 6% -26% -10%;
  background: radial-gradient(48% 40% at 50% 52%, var(--glow) 0%, rgba(244, 166, 90, 0) 70%);
  z-index: -1;
}
.device .screen {
  position: absolute;
  left: 5.333%;
  top: 2.5%;
  width: 89.333%;
  height: 95%;
  border-radius: 15.75% / 7.25%;
  overflow: hidden;
  background: #000;
}
.device .screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.device .case { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* The glass catching light from the upper left, exactly as the App Store screenshots do it. */
.device .glass {
  position: absolute;
  left: 5.333%;
  top: 2.5%;
  width: 89.333%;
  height: 95%;
  border-radius: 15.75% / 7.25%;
  pointer-events: none;
  background:
    radial-gradient(110% 40% at 0% 0%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0) 80%),
    radial-gradient(70% 32% at 100% 0%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
}
.hero .device { margin-top: 62px; width: min(344px, 80vw); }

/* the two cards that float beside the hero phone */
.staged { position: relative; }
.float {
  position: absolute;
  width: 252px;
  background: rgba(32, 34, 40, 0.86);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 17px;
  padding: 13px 15px;
  text-align: left;
  box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.8);
}
.float .top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.float .top i {
  width: 19px; height: 19px; border-radius: 5.5px; flex: none;
  background: var(--dawn);
  display: grid; place-items: center;
}
.float .top i svg { width: 12px; height: 12px; display: block; }
.float .top u {
  text-decoration: none;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.float .top em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--faint); }
.float p { margin: 0; font-size: 14px; line-height: 1.42; color: var(--fg); font-weight: 600; }
.float p span { color: var(--muted); font-weight: 500; }
.float.one { left: 0; top: 15%; }
.float.two { right: 0; top: 46%; }
@media (max-width: 1040px) { .float { display: none; } }

/* ------------------------------------------------------------------ bands */

.band { padding-block: 92px; }
.band.edged { border-top: 1px solid var(--line); }
.band h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.band .sub { font-size: 17.5px; font-weight: 500; max-width: 31em; margin: 0 0 50px; color: var(--muted); }
.centred { text-align: center; }
.centred .sub { margin-inline: auto; }
.centred .pane { text-align: left; }

/* ------------------------------------------------------------------ three */

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pane {
  background: linear-gradient(180deg, var(--lift) 0%, rgba(255, 255, 255, 0.013) 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 26px 30px;
}
.pane h3 { font-family: var(--display); margin: 0 0 8px; font-size: 19px; font-weight: 800; letter-spacing: -0.025em; }
.pane p { margin: 0; font-size: 15.5px; font-weight: 500; }
.pane .glyph { width: 34px; height: 34px; margin-bottom: 18px; color: var(--dawn); }
.pane .glyph svg { width: 100%; height: 100%; display: block; }
@media (max-width: 820px) { .three { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ steps */

.track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: s; }
.beat { position: relative; padding-top: 28px; border-top: 1px solid var(--line); }
.beat::before {
  counter-increment: s;
  content: "0" counter(s);
  position: absolute;
  top: -1px; left: 0;
  padding-top: 10px;
  font-size: 12px; font-weight: 900; letter-spacing: 0.06em;
  color: var(--dawn);
  border-top: 2px solid var(--dawn);
}
.beat h3 { font-family: var(--display); margin: 12px 0 7px; font-size: 17.5px; font-weight: 800; letter-spacing: -0.025em; }
.beat p { margin: 0; font-size: 14.5px; font-weight: 500; }
@media (max-width: 900px) { .track { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .track { grid-template-columns: 1fr; } }

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

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding-block: 60px; }
.row + .row { border-top: 1px solid var(--line); }
.row .device { width: min(292px, 74vw); }
.row.flip .shot { order: 2; }
.row h3 {
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.038em;
  margin: 0 0 14px;
  color: var(--fg);
  font-weight: 900;
}
.row p { font-size: 16.5px; font-weight: 500; margin: 0; max-width: 29em; }
.row .kicker { font-size: 12px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dawn); margin: 0 0 13px; }
@media (max-width: 880px) {
  .row { grid-template-columns: 1fr; gap: 38px; padding-block: 48px; text-align: center; }
  .row.flip .shot { order: 0; }
  .row p { margin-inline: auto; }
}

/* -------------------------------------------------------------------- faq */

.ask { max-width: 760px; margin: 0 auto; text-align: left; }
.ask details { border-bottom: 1px solid var(--line); }
.ask details:first-of-type { border-top: 1px solid var(--line); }
.ask summary {
  cursor: pointer;
  list-style: none;
  padding: 21px 46px 21px 0;
  position: relative;
  font-family: var(--display);
  font-weight: 800;
  font-size: 17.5px;
  letter-spacing: -0.022em;
  color: var(--fg);
}
.ask summary::-webkit-details-marker { display: none; }
.ask summary::after {
  content: "";
  position: absolute;
  right: 8px; top: 50%;
  width: 9px; height: 9px;
  margin-top: -6px;
  border-right: 2.2px solid var(--faint);
  border-bottom: 2.2px solid var(--faint);
  transform: rotate(45deg);
  transition: transform 0.22s ease, border-color 0.22s ease, margin-top 0.22s ease;
}
.ask details[open] summary::after { margin-top: -2px; transform: rotate(-135deg); border-color: var(--dawn); }
.ask details p { margin: 0 0 21px; font-size: 16px; font-weight: 500; max-width: 46em; }

/* ------------------------------------------------------------------ close */

.close {
  text-align: center;
  padding: 92px 28px 98px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background:
    radial-gradient(85% 115% at 50% 0%, rgba(244, 166, 90, 0.14) 0%, rgba(244, 166, 90, 0) 60%),
    linear-gradient(180deg, var(--lift) 0%, rgba(255, 255, 255, 0.013) 100%);
}
.close h2 { margin-bottom: 16px; }

/* ----------------------------------------------------------------- footer */

.home footer.foot {
  border-top: 1px solid var(--line);
  margin-top: 96px;
  padding-block: 48px 60px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 38px;
  font-size: 15px;
}
.foot .lockup { margin-bottom: 12px; }
.foot p { font-size: 14.5px; font-weight: 500; margin: 0; max-width: 24em; }
.foot h4 { font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 0 0 15px; font-weight: 800; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.foot a { color: var(--muted); text-decoration: none; transition: color 0.18s ease; }
.foot a:hover { color: var(--fg); }
.foot .fine {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  color: var(--faint);
  font-size: 13.5px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
}
@media (max-width: 760px) { .home footer.foot { grid-template-columns: 1fr 1fr; } .foot .about { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ modal */

dialog.sheet {
  border: 1px solid var(--line);
  background: #1c1e23;
  color: var(--fg);
  border-radius: 24px;
  padding: 0;
  width: min(392px, calc(100vw - 36px));
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.9);
}
dialog.sheet::backdrop { background: rgba(8, 9, 11, 0.66); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.sheet .inner { padding: 30px 28px 26px; text-align: center; }
.sheet .ring {
  width: 54px; height: 54px; margin: 0 auto 18px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: rgba(244, 166, 90, 0.14);
  color: var(--dawn);
}
.sheet .ring svg { width: 26px; height: 26px; display: block; }
.sheet h3 { font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: -0.032em; margin: 0 0 9px; }
.sheet p { font-size: 15px; font-weight: 500; color: var(--muted); margin: 0 0 22px; }
.sheet .pill { width: 100%; padding-block: 13px; font-size: 15px; }
.sheet .quiet {
  display: block; margin-top: 13px;
  font-size: 13.5px; font-weight: 600; color: var(--faint);
  background: none; border: 0; cursor: pointer; width: 100%;
  font-family: var(--display);
}
.sheet .quiet:hover { color: var(--muted); }

/* ----------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  .pill, .badge { transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease; }
  .pill:hover, .badge:hover { transform: translateY(-2.5px); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.9); }
  .pill:active, .badge:active { transform: translateY(0); }
  .pane, .row .device, .float { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
  .pane:hover { transform: translateY(-4px); }

  /* Each section arrives as it comes into view. Only hidden when scripting is on (html.js), so the
     page is never left blank by a failed observer or a browser with JS off. */
  .js .reveal { opacity: 0; transform: translateY(26px); }
  .js .reveal.seen { opacity: 1; transform: none; transition: opacity 0.72s ease, transform 0.72s cubic-bezier(0.22, 1, 0.36, 1); }
  .js .reveal.seen.s1 { transition-delay: 0.07s; }
  .js .reveal.seen.s2 { transition-delay: 0.14s; }
  .js .reveal.seen.s3 { transition-delay: 0.21s; }
  .js .reveal.seen.s4 { transition-delay: 0.28s; }

  /* The hero does not wait for an observer: it plays on load, so the first frame is never empty. */
  .intro { animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .intro.i1 { animation-delay: 0.08s; }
  .intro.i2 { animation-delay: 0.16s; }
  .intro.i3 { animation-delay: 0.24s; }
  .intro.i4 { animation-delay: 0.34s; }
  @keyframes rise { from { opacity: 0; transform: translateY(26px); } }

  /* The hero phone breathes, very slightly. */
  .hero .device { animation: drift 7s ease-in-out 1.4s infinite; }
  @keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
  .float.one { animation: drift 7s ease-in-out 2.1s infinite; }
  .float.two { animation: drift 7s ease-in-out 2.7s infinite; }

  dialog.sheet[open] { animation: pop 0.26s cubic-bezier(0.22, 1, 0.36, 1); }
  @keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.96); } }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* The badge and the pill became real links once the app went live (2026-11-08): links need the
   button's own box back, since an <a> is inline by default. */
a.pill { display: inline-block; text-decoration: none; }
a.badge { text-decoration: none; }
