/* Noxi website: How it works, the guides, Child safety and Delete account. Afterglow look.
   The colors, the fonts, the header, the buttons and the footer are in chrome.css. Load that file first.
   Phone first; the desktop layout starts at 900px. */
:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Older names. The stored guides in .seo-engine/drafts still use them in their own style block. */
  --soft: var(--ink); --moon: var(--ink); --muted: var(--quiet); --star: var(--ink);
}
html { scroll-behavior: smooth; }
.still { scroll-behavior: auto; }
body { font-size: 16px; line-height: 1.5; overflow-x: hidden; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--content); margin: 0 auto; padding-left: max(var(--margin), env(safe-area-inset-left)); padding-right: max(var(--margin), env(safe-area-inset-right)); }
[id] { scroll-margin-top: 96px; }

/* Type. Cinzel Bold is for headlines only. It has no italic, so the marked word is lit, not slanted. */
h1, h2, h3 { margin: 0; }
p { margin: 0; }
.serif { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; text-wrap: balance; }
.serif i, .serif em { font-style: normal; color: var(--head-mark); }
.kick { font: 700 12px/1.2 var(--text); letter-spacing: .18em; text-transform: uppercase; color: var(--quiet); }
.kick--moon { color: var(--mark); }
.lead { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; max-width: 34em; }
.fine { font-size: 13px; font-weight: 600; color: var(--quiet); }
.cta--big { min-height: 66px; padding: 0 40px; font-size: 19px; }

/* ---------- pages of plain text: guides, Child safety, Delete account ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 48px var(--margin) 80px; display: flex; flex-direction: column; gap: 22px; }
.doc h1 { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.1; }
.doc h2 { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.15; margin-top: 10px; }
.doc h3 { font-size: 18px; margin-top: 6px; }
.doc p, .doc li { line-height: 1.6; }
.doc ol, .doc ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.doc a { color: inherit; font-weight: 700; text-underline-offset: .18em; }
.doc .meta { font-size: 13px; color: var(--quiet); }

/* ---------- How it works ---------- */
.sec { padding-block: clamp(56px, 8vw, 110px); }
.h2 { font-size: clamp(26px, 4vw, 46px); line-height: 1.1; text-wrap: balance; }
.final { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hiw__hero { padding: 44px 0 20px; }
.hiw__hero h1 { font-size: clamp(28px, 4.6vw, 56px); line-height: 1.1; }
.hiw { display: grid; gap: 0; }
.hiw__steps { display: flex; flex-direction: column; }
.moment { padding: 34px 0 34px 24px; border-left: 2px solid var(--hair); position: relative; display: flex; flex-direction: column; gap: 10px; transition: opacity .4s; }
/* each hour has a mosaic tile on the line; the tile lights up when its hour is on */
.moment::before { content: ""; position: absolute; left: -8px; top: 40px; width: 14px; height: 14px; border-radius: 3px; border: 2px solid var(--ink); background: var(--page); transition: transform .3s var(--ease), background .3s, box-shadow .3s; }
.moment h2 { font-size: clamp(22px, 2.8vw, 34px); line-height: 1.12; }
.moment p { max-width: 30em; line-height: 1.55; font-size: clamp(15px, 1.3vw, 17px); }
.moment.is-on::before { background: var(--pink); border-color: var(--pink); transform: rotate(45deg) scale(1.2); box-shadow: 0 0 14px var(--pink); }
.moment .kick { color: var(--ink); }
.moment.is-on .kick { color: var(--mark); }
/* photos: 14 px corner */
.pic { position: relative; overflow: hidden; border-radius: var(--photo-radius); background: var(--card); aspect-ratio: 4 / 3; }
.pic img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.p1 { object-position: 45% 30%; } .p2 { object-position: 50% 42%; } .p3 { object-position: 50% 30%; } .p4 { object-position: 50% 38%; }
.p5 { object-position: 50% 18%; } .p6 { object-position: 50% 22%; } .p7 { object-position: 40% 30%; }
.moment .pic { width: min(420px, 100%); margin-top: 10px; }
.hiw__phone { display: none; }
.hiw__bar { position: fixed; left: 0; right: 0; bottom: 0; height: 4px; background: var(--deep); z-index: 16; }
.hiw__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--coral)); transition: width .25s var(--ease); }

/* Phones: the button that stays at the bottom */
.float { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px max(16px, env(safe-area-inset-left)) calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(rgb(var(--night-n) / 0), var(--page) 40%); z-index: 15; transform: translateY(110%); transition: transform .3s var(--ease); pointer-events: none; }
.float.is-on { transform: none; pointer-events: auto; }
.float .cta { width: 100%; box-shadow: none; }
body.has-float { padding-bottom: 84px; }

/* Rise into view on scroll. Only with script on, and only when motion is on. */
.js:not(.still) [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js:not(.still) [data-reveal].is-in { opacity: 1; transform: none; }
.js:not(.still) .hiw__hero [data-reveal] { transition-delay: calc(var(--i, 0) * 90ms); }
.still .float, .still .moment, .still .moment::before, .still .hiw__bar i { transition: none; }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .float { display: none; }
  body.has-float { padding-bottom: 0; }
  /* How it works: the photo stays put while the hours scroll */
  .hiw { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 80px; align-items: start; }
  .moment .pic { display: none; }
  .moment { padding: 26px 0 26px 30px; }
  /* the hours that are not on are dimmed; the text still passes 4.5 to 1 */
  .js .moment { opacity: .6; }
  .js .moment.is-on { opacity: 1; }
  .hiw__phone { display: block; position: sticky; top: 110px; align-self: start; }
  .hiw__phone .pic { width: 100%; border: 5px solid var(--frame); border-radius: 6px; transform: rotate(-2deg); box-shadow: 0 14px 34px rgb(0 0 0 / .35); }
  .hiw__phone .pic img { opacity: 0; transition: opacity .45s var(--ease); }
  .hiw__phone .pic img.is-on { opacity: 1; }
  .still .hiw__phone .pic img { transition: none; }
}
@media (min-width: 900px) { .hiw__phone .cta { margin-top: 22px; } }
