/*
 * The site's shared theme: tokens, base type, the floating nav and the footer.
 *
 * Every page under public/ links this except the published legal versions, which stay
 * self-contained on purpose — each of those is hashed in versions.json and must render exactly as
 * it did the day somebody accepted it, so it cannot depend on a file that changes.
 *
 * Values here are the theme's own, from ASSETS/WEBSITE/nectarblocks_global_settings.json: #28638a
 * is accentPrimary, #cae6ff and #f6e7d2 are the two tints, Poppins for headings and Inter below.
 */

:root {
  --brand: #28638a;
  --ink: #202020;
  --navy: #202020;
  --deep: #14273a;
  --body: #4a5560;
  --muted: #7d8894;
  --tint: #f5f9ff;
  --sky: #cae6ff;
  --cream: #f6e7d2;
  --rule: #e4e9f0;
  --white: #ffffff;
  --card-bg: linear-gradient(315deg, rgba(0,0,0,0) 0%, var(--sky) 100%);
  --grad-radial: radial-gradient(circle at right top, var(--brand) 1%, var(--ink) 83%);
  --shadow: 0 18px 40px -18px rgba(20, 39, 58, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0; background: var(--white); color: var(--body);
  font: 400 16px/1.7 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
h1, h2, h3, .display { font-family: Poppins, Inter, sans-serif; font-weight: 500;
  color: var(--ink); line-height: 1.16; margin: 0; }
p { margin: 0 0 1rem; }
a { color: var(--brand); }
img, video { max-width: 100%; display: block; }
.wrap { width: min(1300px, 100% - 3rem); margin-inline: auto; }

/* One plain gradient from the very top of the page down to where the footer starts. */
.page { position: relative; overflow-x: clip;
  background: linear-gradient(180deg, var(--white) 0%, #f5f9ff 100%); }

/* --- navigation ------------------------------------------------------------------------- */
/* A floating glass pill rather than a bar: rgba(255,255,255,.5) over blur(12px), 50px radius,
   1300 wide, 25px from the top, no border and no shadow, and identical at the top of the page and
   scrolled. */
.nav-shell { position: sticky; top: 25px; z-index: 50; margin: 25px auto 0;
  max-width: 1300px; padding: 0; }
.nav { position: relative; display: flex; align-items: center; gap: 2rem; min-height: 65px;
  padding: 0 1.5rem; background: rgba(255,255,255,.5); backdrop-filter: blur(12px);
  border-radius: 50px; }
.nav .logo img { height: 55px; width: auto; }

/* `display: contents` keeps the links and the store buttons in the pill's own flex row on a wide
   screen, while letting the same markup become a dropdown panel on a narrow one — no duplicate
   set of links to keep in step. */
.nav-menu { display: contents; }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav-links a { position: relative; color: var(--ink); text-decoration: none; font-weight: 500;
  font-size: .97rem; padding: .2rem 0; transition: color .25s ease; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--brand); transform: scaleX(0); transform-origin: right;
  transition: transform .28s cubic-bezier(.4,0,.2,1); }
.nav-links a:hover { color: var(--brand); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-actions { display: flex; align-items: center; gap: .6rem; }

.store { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  padding: .5rem 1rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--white);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .88rem;
  transition: border-color .25s ease, transform .25s ease; }
.store:hover { border-color: var(--brand); transform: translateY(-1px); }
.store img { height: 18px; width: auto; }

/* The toggle is a real checkbox so the menu opens without script. It stays focusable rather than
   being display:none, or it could not be reached from the keyboard. */
.menu-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 50%;
  cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .2s ease; }
.menu-toggle:focus-visible + .burger { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (max-width: 980px) {
  .burger { display: flex; }
  .nav-menu {
    display: grid; gap: 1.25rem; position: absolute; top: calc(100% + .6rem); left: 0; right: 0;
    padding: 1.25rem 1.5rem; border-radius: 24px;
    background: rgba(255,255,255,.82); backdrop-filter: blur(12px); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .28s ease, transform .28s cubic-bezier(.4,0,.2,1), visibility .28s;
  }
  .menu-toggle:checked ~ .nav .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-links { flex-direction: column; gap: 1rem; margin: 0; }
  .nav-links a { font-size: 1.05rem; }
  .nav-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
  .nav-actions .store { display: inline-flex; }

  /* three bars into a cross */
  .menu-toggle:checked ~ .nav .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle:checked ~ .nav .burger span:nth-child(2) { opacity: 0; }
  .menu-toggle:checked ~ .nav .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* --- footer ------------------------------------------------------------------------------ */
footer { background: var(--deep); color: #b9c8d6; padding: 4rem 0 2.5rem; }
footer .display { color: var(--white); font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  margin-bottom: 3rem; line-height: 1.35; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: space-between;
  align-items: flex-start; }
footer a { color: #d6e4f0; text-decoration: none; }
footer a:hover { color: var(--white); text-decoration: underline; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .93rem; }
.foot-stores { display: flex; gap: .6rem; flex-wrap: wrap; }
.foot-stores .store { background: transparent; border-color: rgba(255,255,255,.28); color: var(--white); }
.foot-stores .store:hover { border-color: var(--white); }
/* Solid black artwork, invisible against the footer until inverted. */
.foot-stores .store img { filter: brightness(0) invert(1); }

/* #BoaPermuta: 43.2px at a 1440 viewport, which is 3vw, Inter at 500, a 32px gap and 49s linear
   and infinite. Two copies of the run, so translating by half loops seamlessly. */
.boa { margin: 3rem 0 0; overflow: hidden; }
.boa .run { display: flex; gap: 32px; width: max-content;
  animation: marquee 49s linear infinite; will-change: transform; }
.boa span { font-family: Inter, sans-serif; font-weight: 500; font-size: clamp(1.6rem, 3vw, 43.2px);
  line-height: 1.2; color: rgba(255,255,255,.22); white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.legal { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.14);
  font-size: .84rem; color: #8fa3b5; }
.legal a { color: #b9c8d6; }
.copyright { margin: 1.25rem 0 0; text-align: center; font-size: 16px; font-weight: 400;
  color: #8fa3b5; }

/* The two hand-drawn marks, lifted from the original's own markup: the circle strokes in the
   accent at 19.5, the zigzag in #cf2e2e at 6. */
.mark-word { position: relative; display: inline-block; white-space: nowrap; }
.mark-word svg { position: absolute; left: 50%; translate: -50% 0; overflow: visible;
  pointer-events: none; }
.mark-word.circle svg { top: 50%; translate: -50% -50%; width: 118%; height: 176%; }
.mark-word.zigzag svg { top: 98%; width: 94%; height: .46em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .boa .run { animation: none; }
}
