/* Hey Ping web pages. Palette = docs/CHARACTER.md. Fonts are self-hosted (no Google request). */
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("fonts/nunito-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: swap; src: url("fonts/nunito-latin-900-normal.woff2") format("woff2"); }

:root {
  --turquoise: #22C7E0;
  --turquoise-deep: #12A8BF;
  --face: #F4FBFD;
  --navy: #1B2340;
  --coral: #FF6A3D;
  --blush: #FF9AA2;
  --bg: #FFFFFF;
  --bg-soft: #F4FBFD;
  --text: #1B2340;
  --muted: #55607A;
  --line: #E1EEF2;
  --card: #FFFFFF;
  --radius: 22px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1428;
    --bg-soft: #151C36;
    --text: #EEF6F9;
    --muted: #A8B3C7;
    --line: #26304F;
    --card: #182042;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
/* overflow-x: clip is a safety net only; layouts below are sized to never exceed the viewport. */
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--turquoise-deep); }
@media (prefers-color-scheme: dark) { a { color: var(--turquoise); } }
h1, h2, h3 { font-family: "Nunito", -apple-system, sans-serif; font-weight: 900; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.2rem; font-weight: 800; }
.accent { color: var(--turquoise); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right)); }
.narrow { max-width: 760px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.top .logo img { height: 34px; width: auto; }
.top nav { margin-left: auto; display: flex; gap: 18px; align-items: center; font-weight: 600; font-size: 15px; }
.top nav a { color: var(--text); text-decoration: none; }
.top nav a:hover { color: var(--turquoise-deep); }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
@media (max-width: 560px) { .top nav .hide-s { display: none; } }

/* Hero */
.hero { background: linear-gradient(180deg, var(--turquoise) 0%, #7fdcec 55%, var(--bg) 100%); color: var(--navy); padding: 56px 0 24px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.hero h1 .accent { color: #fff; }
.hero p.lead { font-size: 1.15rem; max-width: 34em; }
.kicker { display: inline-block; background: var(--coral); color: #fff; font: 800 13px/1 "Nunito", sans-serif; letter-spacing: .08em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; margin-bottom: 18px; }
.hero-art { position: relative; justify-self: center; width: 100%; max-width: 320px; }

.hero-art .ping { position: absolute; width: 40%; left: -24%; bottom: 4%; filter: drop-shadow(0 10px 18px rgba(27,35,64,.25)); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 13px 22px; font: 800 16px/1 "Nunito", sans-serif; text-decoration: none; }
.btn.dark { background: var(--navy); color: #fff; }
.btn.ghost { background: rgba(255,255,255,.75); color: var(--navy); }
.soon { font-size: 14px; color: var(--navy); opacity: .8; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 240px; margin-left: 70px; }
}

/* Sections */
section { padding: 64px 0; }
section.soft { background: var(--bg-soft); }
.center { text-align: center; }
.sub { color: var(--muted); font-size: 1.08rem; max-width: 40em; margin: 0 auto 36px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; }
.step img { width: 120px; margin: 0 auto 12px; }
.step .n { display: inline-block; width: 30px; height: 30px; border-radius: 50%; background: var(--coral); color: #fff; font: 900 16px/30px "Nunito", sans-serif; margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.shots { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 18px; margin: 0 -16px; }
.shots img { flex: 0 0 auto; width: 220px; border-radius: 22px; scroll-snap-align: center; box-shadow: 0 10px 30px rgba(27,35,64,.12); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .ico { font-size: 26px; line-height: 1; margin-bottom: 10px; }
.feature p { color: var(--muted); margin: 0; font-size: 15.5px; }

.split { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: center; }
.split img { width: 200px; }
@media (max-width: 680px) { .split { grid-template-columns: 1fr; } .split img { width: 140px; margin: 0 auto; } }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.pill-list li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 15px; }

/* Legal / support pages */
.page { padding: 48px 0 64px; }
.page h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.page h2 { font-size: 1.45rem; margin-top: 2em; }
.page h3 { margin-top: 1.4em; }
.page .updated { color: var(--muted); font-size: 15px; }
.page ul { padding-left: 1.2em; }
.page li { margin: .3em 0; }
.box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 24px 0; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 700; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--coral); font-weight: 900; }
details[open] summary::before { content: "–"; }
details > div { padding: 8px 0 0 1.2em; color: var(--muted); }
.page-ping { width: 110px; float: right; margin: 0 0 12px 16px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14.5px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer a { color: var(--muted); }

/* Hero video in a phone frame */
.hero-copy { min-width: 0; }
.phone-frame { border-radius: 40px; border: 8px solid var(--navy); background: var(--navy); overflow: hidden; box-shadow: 0 30px 60px rgba(27,35,64,.25); aspect-ratio: 590 / 1278; }
.phone-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.cta-note { font-size: 14px; color: var(--navy); opacity: .75; margin: 10px 0 0; }
.soon-pill { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--navy); color: var(--navy); border-radius: 999px; padding: 11px 18px; font: 800 15px/1 "Nunito", sans-serif; background: rgba(255,255,255,.55); }
.soon-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(255,106,61,.25); }
.store-badge img { height: 48px; width: auto; }
.btn.coral { background: var(--coral); color: #fff; }
.btn { border: 0; cursor: pointer; }
.kicker + h2 { margin-top: 4px; }

/* "Ping moves in" episodes: grid on wide screens, swipeable row on phones (the row scrolls, the page does not) */
.story { background: linear-gradient(180deg, var(--bg) 0%, #FFF4EE 100%); }
@media (prefers-color-scheme: dark) { .story { background: linear-gradient(180deg, var(--bg) 0%, #1d1a2e 100%); } }
.episodes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ep { margin: 0; min-width: 0; }
.ep-vid { position: relative; border-radius: 26px; overflow: hidden; background: var(--navy); aspect-ratio: 9 / 16; box-shadow: 0 16px 36px rgba(27,35,64,.18); }
.ep-vid video { display: block; width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, transparent 55%, rgba(27,35,64,.35)); border: 0; cursor: pointer; padding: 0; }
.play span { width: 74px; height: 74px; border-radius: 50%; background: var(--coral); box-shadow: 0 8px 22px rgba(255,106,61,.45); position: relative; transition: transform .2s; }
.play span::after { content: ""; position: absolute; left: 29px; top: 22px; border-left: 24px solid #fff; border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
.play:hover span, .play:focus-visible span { transform: scale(1.08); }
.ep-vid.playing .play { display: none; }
.ep figcaption { padding: 14px 4px 0; }
.ep-n { font: 800 12px/1 "Nunito", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--coral); }
.ep h3 { margin: 6px 0 4px; }
.ep p { margin: 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 760px) {
  .episodes { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .ep { flex: 0 0 76%; scroll-snap-align: center; }
}
.story-cta { margin-top: 36px; display: flex; align-items: center; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.story-cta img { width: 84px; flex: 0 0 auto; }
.story-cta div { flex: 1 1 auto; min-width: 0; }
.story-cta h3 { margin: 0 0 2px; }
.story-cta p { margin: 0; color: var(--muted); }
@media (max-width: 600px) { .story-cta { flex-direction: column; text-align: center; } }

/* Notify form */
.notify-sec { background: var(--bg-soft); }
.notify-ping { width: 130px; margin: 0 auto 8px; }
.notify { max-width: 520px; margin: 0 auto; text-align: left; }
.notify .row { display: flex; gap: 10px; }
.notify input[type=email] { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 17px; padding: 14px 18px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--text); }
.notify input[type=email]:focus { outline: none; border-color: var(--turquoise); }
.notify button { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 14px 22px; background: var(--coral); color: #fff; font: 800 16px/1 "Nunito", sans-serif; cursor: pointer; }
.notify button:disabled { opacity: .6; }
.notify .consent { font-size: 13.5px; color: var(--muted); margin: 12px 4px 0; line-height: 1.5; }
.notify .also { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin: 10px 4px 0; line-height: 1.5; cursor: pointer; }
.notify .also input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--coral); }
.notify .msg { min-height: 1.5em; margin: 10px 4px 0; font-weight: 700; }
.notify .msg.good { color: #12805c; }
.notify .msg.bad { color: #c2410c; }
.notify.done .row { opacity: .5; pointer-events: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.center-cta { justify-content: center; margin-top: 28px; }
@media (max-width: 480px) { .notify .row { flex-direction: column; } .notify button { width: 100%; } }
footer { padding-bottom: max(40px, env(safe-area-inset-bottom)); }

/* "Hey Ping gives back" (#donations) */
.donations .kicker { margin-bottom: 10px; }
.donations .muted { color: var(--muted); }
.donations .small { font-size: 14px; margin-bottom: 0; }
.donations .box h3 { margin: 0 0 6px; }
.donations .box p:last-child { margin-bottom: 0; }
.donations .lead-sm { font-size: 1.1rem; margin-top: -4px; }
