/* Reset, typography, layout, navigation, footer. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--background);
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--link); }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 7vw, 64px); font-weight: 700; }
h2 { font-size: clamp(26px, 4.5vw, 40px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 12px; }
.lead { font-size: clamp(16px, 2.2vw, 19px); color: var(--muted); max-width: 620px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--link); margin-bottom: 10px; display: block; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { margin-bottom: 36px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 10px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--cyan500); outline-offset: 3px; border-radius: 8px; }

/* Sticky glass navigation */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50; display: flex; align-items: center;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), color .3s;
  color: #fff;
}
.nav.solid { background: var(--nav-solid); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 4px 20px rgba(14, 42, 71, 0.08); color: var(--ink); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: inherit; text-decoration: none; min-height: 44px; }
.brand-logo { width: 36px; height: 36px; border-radius: 10px; display: block; box-shadow: 0 4px 12px rgba(14, 42, 71, .28); }
.menu { display: flex; align-items: center; gap: 4px; }
.menu a { color: inherit; text-decoration: none; font-weight: 500; font-size: 14px; padding: 0 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--radius-pill); transition: background .2s; }
.menu a:hover { background: rgba(255, 255, 255, .18); }
.nav.solid .menu a:hover { background: var(--tile); }
.menu a[aria-current="page"] { background: rgba(255, 255, 255, .26); }
.nav.solid .menu a[aria-current="page"] { background: var(--tile); color: var(--link); }
.burger { display: none; width: 48px; height: 48px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .2); color: inherit; cursor: pointer; place-items: center; }
.nav.solid .burger { background: var(--tile); }
.burger span, .burger span::before, .burger span::after { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .3s var(--ease), background .2s; content: ""; }
.burger span::before { position: absolute; top: -7px; }
.burger span::after { position: absolute; top: 7px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* Light / dark toggle */
.theme-toggle { width: 48px; height: 48px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .2); color: inherit; cursor: pointer; display: grid; place-items: center; transition: background .2s, transform .2s var(--ease); }
.theme-toggle:hover { transform: rotate(12deg); }
.nav.solid .theme-toggle { background: var(--tile); }
.theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }

@media (max-width: 860px) {
  .theme-toggle { margin-left: auto; order: 2; }
  .burger { order: 3; }
  .burger { display: grid; }
  .menu {
    position: fixed; inset: var(--nav-h) 12px auto 12px; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px;
    background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-lift); color: var(--ink);
    opacity: 0; transform: translateY(-12px) scale(.98); pointer-events: none; visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .menu.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
  .menu a { min-height: 52px; font-size: 16px; border-radius: 16px; color: var(--ink); }
  .menu a:hover, .menu a[aria-current="page"] { background: var(--tile); color: var(--link); }
}

/* Footer */
.footer { background: var(--footer-bg); color: #C9D8EA; border-top-left-radius: 40px; border-top-right-radius: 40px; padding: 48px 0 36px; margin-top: 24px; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h4 { margin: 0 0 10px; color: #fff; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li a { display: inline-flex; min-height: 40px; align-items: center; font-size: 15px; }
/* Copyright line only: a direct child of .wrap, so it never touches the <small> labels inside store buttons */
.footer .wrap > small { display: block; text-align: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13px; }
.footer .stores { margin-top: 16px; }
.footer .gap { color: #0E2A47; }

/* Routed views (SPA) */
.view { display: none; }
.view.active { display: block; }
