/* My Battery site. Tokens are the app's (OlsPalettes.Battery / BatteryDark in onelifestack-native-ui); keep them in step. */
@font-face { font-family: Inter; font-weight: 400 800; font-display: swap; src: url(/assets/fonts/inter-var.woff2) format("woff2"); }
@font-face { font-family: Bricolage; font-weight: 600; font-display: swap; src: url(/assets/fonts/bricolage-600.woff2) format("woff2"); }
@font-face { font-family: Bricolage; font-weight: 700; font-display: swap; src: url(/assets/fonts/bricolage-700.woff2) format("woff2"); }

:root {
  --bg: #F5F2EA; --surface: #FFFFFF; --outline: #E2DBCC; --ink: #1D1C19; --muted: #5B574E;
  --primary: #2E6A4B; --on-primary: #FFFFFF; --tint: #E4EFE6; --sand: #F8E6D3; --clay: #A84E0C; --on-clay: #FFFFFF;
  --link: #2E6A4B; --promise-bg: #2E6A4B; --promise-ink: #E4EFE6; --phone: #151714;
  --shadow: 0 18px 40px rgba(29, 28, 25, .14);
  --radius: 20px; --pill: 999px; --maxw: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151714; --surface: #1E211D; --outline: #33382F; --ink: #EEEBE3; --muted: #B5B0A4;
    --primary: #8CC7A3; --on-primary: #0F2A1B; --tint: #23382B; --sand: #3A2716; --link: #8CC7A3;
    --promise-bg: #8CC7A3; --promise-ink: #0F2A1B; --phone: #000000; --shadow: 0 18px 40px rgba(0, 0, 0, .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.6 Inter, system-ui, sans-serif; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: Bricolage, Inter, system-ui, sans-serif; font-weight: 700; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: var(--pill); z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }
.eyebrow { font-weight: 700; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .7em; }
.note { font-size: .95rem; color: var(--muted); }
.after { margin-top: 22px; }

/* header */
header.site { padding: 18px 0; }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.4rem Bricolage, sans-serif; color: var(--ink); text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
nav.main { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-left: auto; }
nav.main a { color: var(--ink); font-weight: 600; text-decoration: none; padding: 10px 2px; }
nav.main a:hover, nav.main a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: var(--pill); font: 700 1.02rem Inter, sans-serif; text-decoration: none; border: 2px solid transparent; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--outline); }
.btn.ghost:hover { border-color: var(--ink); }
.btn[aria-disabled="true"] { background: var(--outline); color: var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 8px; }

/* hero */
.hero { padding: 36px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.25rem; color: var(--muted); max-width: 32em; }
.hero-art { position: relative; display: grid; place-items: center; min-height: 560px; }
.phone { position: relative; width: min(290px, 72vw); border-radius: 40px; background: var(--phone); padding: 9px; box-shadow: var(--shadow); }
.phone img { display: block; width: 100%; border-radius: 32px; }
.nudge { position: absolute; left: -24px; top: 44px; width: min(300px, 78vw); background: var(--surface); color: var(--ink); border: 1px solid var(--outline); border-radius: 22px; padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 2px; font-size: .92rem; z-index: 2; }
.nudge-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; margin-bottom: 4px; }
.nudge-top img { border-radius: 6px; }
.nudge span { color: var(--muted); }
.nudge-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.nudge-btns span { border: 1px solid var(--outline); border-radius: var(--pill); padding: 6px 4px; text-align: center; font-weight: 700; color: var(--ink); font-size: .82rem; }

/* promise strip */
.promise { background: var(--promise-bg); color: var(--promise-ink); padding: 20px 0; }
.promise ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 26px; font-weight: 700; }
.promise li::before { content: "✓"; margin-right: 8px; }

/* sections */
section { padding: 72px 0; }
section.tint { background: var(--tint); }
.section-head { max-width: 42em; margin-bottom: 34px; }
.section-head p { color: var(--muted); font-size: 1.12rem; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.tile { border-radius: var(--radius); padding: 26px; color: var(--ink); border: 1px solid var(--outline); }
.tile.mint { background: var(--surface); } .tile.sand { background: var(--sand); } .tile.plain { background: var(--bg); }
.tile h3 { margin-bottom: .35em; }
.tile p { margin: 0; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 26px; }
.two { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: start; }
.keep, .never, .makers { list-style: none; padding: 0; margin: 0; }
.keep li, .never li { padding: 8px 0 8px 32px; position: relative; }
.keep li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 800; }
.never li::before { content: "✕"; position: absolute; left: 0; color: var(--muted); font-weight: 800; }
.makers li { padding: 10px 0; border-top: 1px solid var(--outline); }
.makers li:first-child { border-top: 0; padding-top: 0; }
.steps { counter-reset: s; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 26px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font: 700 1.25rem Bricolage, sans-serif; margin-bottom: 14px; }
.steps p { color: var(--muted); margin: 0; }
.gallery { display: grid; gap: 28px 18px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.gallery figure { margin: 0; }
.gallery .phone { width: 100%; padding: 7px; border-radius: 30px; }
.gallery .phone img { border-radius: 24px; }
.gallery figcaption { margin-top: 12px; font-weight: 700; text-align: center; }

/* faq */
details { background: var(--surface); border: 1px solid var(--outline); border-radius: 18px; padding: 4px 22px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 700; padding: 16px 0; }
details p { color: var(--muted); }
details[open] { border-color: var(--primary); }

/* article pages (privacy, terms, ...) */
.article { padding: 28px 0 80px; }
.article .wrap { max-width: 780px; }
.article h1 { font-size: clamp(2rem, 5vw, 3rem); }
.article h2 { font-size: 1.55rem; margin-top: 1.6em; }
.article h2.flush { margin-top: 0; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: .5em; }
.crumbs { font-size: .95rem; margin-bottom: 18px; }
figure.flush { margin: 0; }
.press-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.press-icon { border-radius: 22px; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { width: 120px; }
.swatch span { display: block; height: 64px; border-radius: 16px; border: 1px solid var(--outline); margin-bottom: 6px; }
.swatch code { font-size: .85rem; }

footer.site { border-top: 1px solid var(--outline); padding: 40px 0 56px; color: var(--muted); font-size: .97rem; }
footer.site .wrap { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr; }
footer.site h2 { font: 700 .82rem Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin: 0 0 10px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 6px; }
footer.site a { color: var(--muted); }
footer.site small { display: block; margin-top: 22px; grid-column: 1 / -1; }

/* how it works: on wide screens the phone follows the step in view */
.how-phone { display: none; }
.shots { position: relative; aspect-ratio: 1080 / 2160; border-radius: 32px; overflow: hidden; }
.shots img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; opacity: 0; transition: opacity .5s ease; }
.shots img.on { opacity: 1; }
@media (min-width: 861px) {
  .js .how { display: grid; grid-template-columns: 1fr 320px; gap: 56px; align-items: start; }
  .js .how .steps { grid-template-columns: 1fr; gap: 24px; }
  .js .how .steps li { min-height: 44vh; display: flex; flex-direction: column; justify-content: center; opacity: .55; transition: opacity .4s ease, transform .4s ease; }
  .js .how .steps li.active { opacity: 1; transform: translateX(8px); }
  .js .how-phone { display: block; position: sticky; top: 14vh; }
  .js .how-phone .phone { width: 100%; }
}

@media (max-width: 860px) {
  .hero .wrap, .two, footer.site .wrap { grid-template-columns: 1fr; }
  .hero-art { min-height: 0; padding-top: 70px; }
  .nudge { left: 0; top: 0; }
  nav.main { margin-left: 0; width: 100%; }
  section { padding: 52px 0; }
}

/* motion, only when welcome */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes pop { 0%, 8% { opacity: 0; transform: translateY(-14px) scale(.96); } 14%, 78% { opacity: 1; transform: none; } 86%, 100% { opacity: 0; transform: translateY(-14px) scale(.96); } }
@media (prefers-reduced-motion: no-preference) {
  .hero .wrap > div:first-child > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero .wrap > div:first-child > :nth-child(2) { animation-delay: .08s; } .hero .wrap > div:first-child > :nth-child(3) { animation-delay: .16s; }
  .hero .wrap > div:first-child > :nth-child(4) { animation-delay: .24s; } .hero .wrap > div:first-child > :nth-child(5) { animation-delay: .32s; }
  .float { animation: float 7s ease-in-out infinite; }
  .nudge { animation: pop 8s ease-in-out infinite both; animation-delay: 1.2s; }
  .paused .float, .paused .nudge, .hero-art.off .float, .hero-art.off .nudge { animation-play-state: paused; }
  .motion .reveal { opacity: 0; translate: 0 24px; transition: opacity .7s ease, translate .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 80ms); }
  .motion .reveal.in { opacity: 1; translate: none; }
  .btn { transition: transform .2s ease, border-color .2s ease; }
  .btn:not([aria-disabled="true"]):hover { transform: translateY(-2px); }
  .tile, .panel { transition: transform .25s ease; }
  .tile:hover { transform: translateY(-4px); }
  .gallery .phone { transition: transform .3s ease; }
  .gallery figure:hover .phone { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .shots img, .js .how .steps li { transition: none; } }
