:root {
  /* Glimpse brand palette (June 2025 brand guidelines) */
  --color-bg: #FAF7F6;
  --color-bg-soft: #EDEAE9;
  --color-bg-dim: #C8C6C5;
  --color-fg: #15161C;
  --color-fg-mid: #747271;
  --color-brand: #3042A3;
  --color-eyebrow: #D08A67;

  /* Per-guest accent — overridden below by [data-colorway] */
  --color-accent: #3042A3;
  --color-accent-soft: rgba(48, 66, 163, 0.08);

  --font-display: 'Spectral', 'Source Serif Pro', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --radius-card: 14px;
  --radius-btn: 999px;
  --border-hair: 1px solid var(--color-bg-dim);
}

/* Glimpse colorways — four brand pastels + the indigo default */
body[data-colorway="indigo"]     { --color-accent: #3042A3; --color-accent-soft: rgba(48, 66, 163, 0.08); }
body[data-colorway="moss"]       { --color-accent: #B7C29E; --color-accent-soft: rgba(183, 194, 158, 0.16); }
body[data-colorway="mist"]       { --color-accent: #A9C2C2; --color-accent-soft: rgba(169, 194, 194, 0.18); }
body[data-colorway="sand"]       { --color-accent: #D6B88E; --color-accent-soft: rgba(214, 184, 142, 0.16); }
body[data-colorway="terracotta"] { --color-accent: #D08A67; --color-accent-soft: rgba(208, 138, 103, 0.14); }

/* Synonyms so Airtable colorway values that drift slightly still map to brand hexes. */
body[data-colorway="amber"]   { --color-accent: #D08A67; --color-accent-soft: rgba(208, 138, 103, 0.14); }
body[data-colorway="sage"]    { --color-accent: #B7C29E; --color-accent-soft: rgba(183, 194, 158, 0.16); }
body[data-colorway="teal"]    { --color-accent: #A9C2C2; --color-accent-soft: rgba(169, 194, 194, 0.18); }
body[data-colorway="cream"]   { --color-accent: #D6B88E; --color-accent-soft: rgba(214, 184, 142, 0.16); }
body[data-colorway="peach"]   { --color-accent: #D08A67; --color-accent-soft: rgba(208, 138, 103, 0.14); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-fg);
  background: var(--color-bg);
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(250, 247, 246, 0.96) 0%, rgba(250, 247, 246, 0.99) 100%),
    url('/assets/bg-happier-grocery.jpg') center/cover no-repeat,
    var(--color-bg);
  z-index: -1;
}

/* ───── Header ───── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 22px 20px 18px;
}
.logo {
  height: 26px;
  width: auto;
  display: block;
}
@media (min-width: 480px) {
  .logo { height: 30px; }
}
.logo-divider {
  display: inline-block;
  width: 1px;
  height: 24px;
  background: var(--color-bg-dim);
}

/* ───── Stage ───── */
.stage {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 22px 48px;
}

/* ───── Hero ───── */
.hero {
  margin: 32px 0 36px;
}
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-eyebrow);
  margin-bottom: 14px;
}
.greeting {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 8.5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--color-fg);
}
.greeting-light {
  display: block;
  color: var(--color-brand);
  font-weight: 400;
  margin-top: 4px;
}
.js-name {
  font-style: italic;
}
.hero-sub {
  margin: 18px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-fg-mid);
  max-width: 460px;
}
@media (min-width: 480px) {
  .hero-sub { font-size: 16px; }
}

/* ───── Videos ───── */
.videos {
  display: grid;
  gap: 16px;
  margin-bottom: 40px;
}
@media (min-width: 720px) {
  .videos { grid-template-columns: 1fr 1fr; }
  .video-pour { grid-column: 1 / -1; }
}
.video-card {
  margin: 0;
  background: #ffffff;
  border: var(--border-hair);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(21, 22, 28, 0.04);
}
.video-card video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--color-bg-soft);
  outline: none;
}
.video-card figcaption {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 14px 12px;
  color: var(--color-eyebrow);
}

/* ───── Share ───── */
.share {
  background: var(--color-bg-soft);
  border-radius: var(--radius-card);
  padding: 26px 22px 28px;
  margin-bottom: 32px;
}
.share-title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.005em;
  margin: 0 0 18px;
  color: var(--color-fg);
}

.share-primary {
  text-align: center;
  margin-bottom: 22px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-brand);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
  border: none;
  border-radius: var(--radius-btn);
  padding: 18px 44px;
  cursor: pointer;
  min-width: 220px;
  min-height: 56px;
  box-shadow: 0 6px 18px rgba(48, 66, 163, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(48, 66, 163, 0.32); }
.btn-primary:active { transform: scale(0.97); }
.share-hint {
  font-size: 13px;
  color: var(--color-fg-mid);
  margin: 12px auto 0;
  max-width: 320px;
  line-height: 1.45;
}

.share-secondary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 720px) {
  .share-secondary { grid-template-columns: repeat(5, 1fr); }
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  color: var(--color-brand);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  border: 1.5px solid var(--color-brand);
  border-radius: 10px;
  padding: 13px 14px;
  cursor: pointer;
  min-height: 46px;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--color-brand);
  color: var(--color-bg);
}
.btn-secondary.copied {
  background: var(--color-brand);
  color: var(--color-bg);
  border-color: var(--color-brand);
}

/* ───── Footer ───── */
.bottombar {
  text-align: center;
  font-size: 12px;
  color: var(--color-fg-mid);
  padding: 20px;
}

/* ───── Error state ───── */
.error {
  text-align: center;
  padding: 32px 24px;
  background: var(--color-bg-soft);
  border-radius: var(--radius-card);
  margin-top: 36px;
}
.error p {
  margin: 0;
  color: var(--color-fg-mid);
  font-size: 15px;
  line-height: 1.5;
}

body.loading .stage > section.hero,
body.loading .stage > section.videos,
body.loading .stage > section.share { opacity: 0.45; }

body.no-guest .hero,
body.no-guest .videos,
body.no-guest .share { display: none; }

@media (prefers-reduced-motion: reduce) {
  .btn-primary, .btn-secondary { transition: none; }
}
