/* base.css: structure shared by every generated site.
   Override the tokens in styles.css. Put the app-specific look there, not here. */

:root {
  --bg: #111;
  --surface: #1c1c1c;
  --text: #fff;
  --muted: rgb(255 255 255 / .68);
  --line: rgb(255 255 255 / .1);
  --primary: #6b5bff;
  --accent: #ffcc33;
  --accent-ink: #111;
  --radius: 20px;
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: var(--font-display);
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; }
main { flex: 1; }

/* layout */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* a11y */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* site header */
.site-header { padding-block: 18px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

/* language switcher (plain links) */
.lang-switch { display: inline-flex; gap: 4px; font-size: 14px; }
.lang-switch a { padding: 4px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); }
.lang-switch a[aria-current="true"] { color: var(--text); background: var(--line); }

/* legal / support pages */
.prose { max-width: 68ch; margin-inline: auto; padding: clamp(24px, 6vw, 64px) var(--gutter) 64px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.prose .meta { color: var(--muted); font-size: .95em; margin-bottom: 2em; }
.prose h2 { font-size: 1.3rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.08rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: .95em; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; white-space: nowrap; }
.prose details { border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; margin-bottom: 10px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.prose summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.prose details[open] summary { margin-bottom: 4px; }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 1.5em 0 2em; background: color-mix(in srgb, var(--surface) 75%, transparent); }

/* footer */
.site-footer { padding-block: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ===== Live Baby Monitor: the app's "night nursery" palette (lib/ui/tokens.dart) ===== */
:root {
  color-scheme: dark;
  --bg: #0E1420;
  --surface: #172033;
  --surface-raised: #1F2A40;
  --outline: #2C3850;
  --text: #EAEFF7;
  --muted: #9AA6BA;
  --line: rgb(234 239 247 / .09);
  --primary: #F2B544;
  --accent: #F2B544;
  --accent-ink: #1A1305;
  --ok: #7CC4A4;
  --alarm: #F06A5B;
  --radius: 16px;
  --font-display: system-ui, -apple-system, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background:
    radial-gradient(90% 60% at 72% 0%, rgb(242 181 68 / .10), transparent 60%),
    radial-gradient(70% 50% at 10% 10%, rgb(124 196 164 / .05), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

.brand img { border-radius: 8px; }
.brand span { letter-spacing: -.01em; }

/* night sky decoration */
.sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.sky .star {
  position: absolute; width: var(--s, 10px); height: var(--s, 10px); color: var(--text); opacity: var(--o, .14);
}
.sky .star svg { width: 100%; height: 100%; }
.page-legal .sky .star { opacity: calc(var(--o, .14) * .5); }

/* ===== hero ===== */
.hero { position: relative; isolation: isolate; }
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(24px, 5vw, 64px);
  min-height: min(calc(100svh - 76px - 64px), 720px);
  padding-block: clamp(24px, 5vw, 56px);
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 12px; border-radius: 999px;
  background: rgb(242 181 68 / .12); border: 1px solid rgb(242 181 68 / .28);
  color: var(--text); font-size: 14px; font-weight: 500; margin-bottom: 22px;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgb(242 181 68 / .18); }
.chip.is-live { background: rgb(124 196 164 / .12); border-color: rgb(124 196 164 / .3); }
.chip.is-live .dot { background: var(--ok); box-shadow: 0 0 0 4px rgb(124 196 164 / .18); }
.hero h1 {
  font-size: clamp(2.75rem, 7vw, 4.75rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.02; margin-bottom: 18px;
}
.hero h1 .warm { color: var(--accent); }
.lead { font-size: clamp(1.25rem, 2.4vw, 1.5rem); line-height: 1.4; max-width: 30ch; margin-bottom: 12px; color: var(--text); font-weight: 500; }
.hero .desc { color: var(--muted); max-width: 46ch; margin-bottom: 28px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14.5px; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { width: 16px; height: 16px; color: var(--ok); flex: none; }

/* hero visual: the mark under a night-light glow, two phones linked over Wi-Fi */
.night {
  position: relative; justify-self: center; width: min(100%, 400px); aspect-ratio: 1;
  display: grid; place-items: center;
}
.night::before {
  content: ""; position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle, rgb(242 181 68 / .30), rgb(242 181 68 / .08) 45%, transparent 70%);
  filter: blur(8px);
}
.night .mark { position: relative; width: 52%; height: auto; border-radius: 23%; box-shadow: 0 30px 80px rgb(0 0 0 / .45), 0 0 0 1px rgb(255 255 255 / .06); }
.night .link { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--muted); overflow: visible; }
.night .phone {
  position: absolute; width: 19%; aspect-ratio: 9 / 18; border-radius: 14px;
  background: var(--surface); border: 1.5px solid var(--outline);
  box-shadow: 0 14px 30px rgb(0 0 0 / .35);
  display: grid; place-items: center;
}
.night .phone::after { content: ""; position: absolute; top: 6px; width: 28%; height: 3px; border-radius: 2px; background: var(--outline); }
.night .phone svg { width: 46%; height: auto; }
.night .phone.cam { left: 0; bottom: 6%; transform: rotate(-8deg); color: var(--muted); }
.night .phone.parent { right: 0; top: 6%; transform: rotate(7deg); color: var(--ok); }
.night .tag {
  position: absolute; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap;
  background: rgb(14 20 32 / .75); padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line);
}
.night .tag.cam { left: -2%; bottom: 0; }
.night .tag.parent { right: -2%; top: 0; }

/* ===== store buttons (from the skill's store-buttons.html) ===== */
.store-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.store-btn {
  --btn-bg: #000; --btn-fg: #fff;
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  min-width: 172px; height: 56px; padding: 0 18px 0 14px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid rgb(255 255 255 / .18); border-radius: 14px;
  text-decoration: none; line-height: 1.1;
  box-shadow: 0 6px 20px rgb(0 0 0 / .25);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn .store-top { display: block; font-size: 11px; opacity: .85; letter-spacing: .01em; }
.store-btn .store-bottom { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
a.store-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgb(0 0 0 / .35); border-color: rgb(255 255 255 / .35); }
a.store-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.store-btn.is-soon { cursor: default; opacity: .78; filter: saturate(.6); box-shadow: none; }
.store-btn.is-soon .soon-tag {
  position: absolute; top: -9px; right: 10px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}

/* ===== sections ===== */
.section { position: relative; padding-block: clamp(40px, 7vw, 80px); }
.section h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 650; letter-spacing: -.015em; margin-bottom: 10px; }
.section .intro { color: var(--muted); max-width: 52ch; margin-bottom: 32px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 20px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: rgb(242 181 68 / .28); box-shadow: 0 16px 40px rgb(0 0 0 / .3); }
.card .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: rgb(242 181 68 / .14); color: var(--accent);
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 15.5px; line-height: 1.55; margin: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; counter-reset: step; }
.steps li { position: relative; padding: 20px 22px 20px 64px; border-radius: var(--radius); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 20px; top: 18px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: var(--accent); color: var(--accent-ink);
}
.steps strong { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 15.5px; }

.price {
  margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
  padding: 24px 26px; border-radius: 20px;
  background: linear-gradient(135deg, rgb(242 181 68 / .12), rgb(242 181 68 / .03) 60%), var(--surface);
  border: 1px solid rgb(242 181 68 / .22);
}
.price p { margin: 0; max-width: 56ch; }
.price .muted { color: var(--muted); font-size: 15px; margin-top: 4px; }

.notice {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 18px;
  padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); color: var(--muted); font-size: 15px;
}
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--text); }
.notice strong { color: var(--text); }

/* legal pages */
.prose h1 { font-weight: 700; letter-spacing: -.02em; }
.prose a { color: var(--accent); }
.prose table th { color: var(--text); }
.prose td { color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.prose .lede { font-size: 1.12em; color: var(--text); }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.contact-card p { margin: 0; }
.contact-card .btn {
  display: inline-flex; align-items: center; height: 48px; padding: 0 22px; border-radius: 28px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
}
.contact-card .btn:hover { filter: brightness(1.06); }
.prose .contact-card a.btn { color: var(--accent-ink); }

.footer-note { width: 100%; font-size: 13px; opacity: .85; }

/* responsive */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; }
  .night { order: -1; width: min(62%, 240px); margin-top: 8px; }
  .night .tag { font-size: 11px; padding: 2px 8px; }
  .night .phone { border-radius: 10px; }
}
@media (max-width: 420px) {
  .chip { font-size: 13px; padding: 5px 12px 5px 10px; }
  .store-buttons { flex-direction: column; }
  .store-btn { width: 100%; justify-content: center; }
}

/* motion */
@media (prefers-reduced-motion: no-preference) {
  .sky .star { animation: twinkle var(--d, 7s) ease-in-out var(--delay, 0s) infinite; }
  .night .mark { animation: float 9s ease-in-out infinite; }
  .night .phone.cam { animation: bob-l 8s ease-in-out infinite; }
  .night .phone.parent { animation: bob-r 8s ease-in-out 1.2s infinite; }
  .night .link path { stroke-dasharray: 3 7; animation: flow 3s linear infinite; }
  .rise { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .rise-2 { animation-delay: .08s; }
  .rise-3 { animation-delay: .16s; }
}
@keyframes twinkle { 0%, 100% { opacity: var(--o, .14); transform: scale(1); } 50% { opacity: calc(var(--o, .14) * 2.2); transform: scale(1.15); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-1.5deg); } }
@keyframes bob-l { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-6deg) translateY(-6px); } }
@keyframes bob-r { 0%, 100% { transform: rotate(7deg) translateY(0); } 50% { transform: rotate(5deg) translateY(6px); } }
@keyframes flow { to { stroke-dashoffset: -20; } }
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
