/* =========================================================
   TBL Medical — app.tbl.no
   Shared styles for landing + invite
   ========================================================= */

:root {
  --burgundy: #8E2554;
  --burgundy-deep: #6E1A40;
  --burgundy-soft: #B85278;
  --burgundy-tint: #F4E5EC;
  --ink: #1F1A1C;
  --ink-soft: #4A4347;
  --ink-mute: #6E6669;
  --line: #E8E2DC;
  --line-soft: #F0EBE5;
  --bg: #FBF7F2;
  --bg-card: #FFFFFF;
  --bg-warm: #F5EFE6;
  --shadow-soft: 0 1px 2px rgba(31, 26, 28, 0.04), 0 8px 24px rgba(31, 26, 28, 0.04);
  --shadow-card: 0 1px 2px rgba(31, 26, 28, 0.05), 0 12px 32px rgba(31, 26, 28, 0.06);

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --maxw: 1120px;
  --maxw-narrow: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--burgundy); text-decoration: none; }
a:hover { color: var(--burgundy-deep); }

::selection { background: var(--burgundy); color: #fff; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 0;
}

h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.25;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.005em;
}

p { margin: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
  text-wrap: pretty;
}

.body-text {
  color: var(--ink-soft);
  text-wrap: pretty;
}

.muted { color: var(--ink-mute); }

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  max-width: var(--maxw-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: clamp(72px, 9vw, 128px) 0;
  border-top: 1px solid var(--line-soft);
}

section:first-of-type { border-top: 0; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 56px;
  max-width: 60ch;
}

/* ---------- Top nav ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 242, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.topnav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--burgundy);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Faktisk TBL Medical-logo (SVG, ferget burgundy). Erstatter
   den gamle tekstbaserte `.brand-mark`-sirkelen. Setter BÅDE
   width og max-height eksplisitt — uten det kan SVG-en regne ut
   feil intrinsic størrelse på enkelte browsere og blåse opp.
   aspect-ratio sikrer riktig forhold. */
.brand-logo {
  display: block;
  width: auto;
  height: 40px;
  max-height: 40px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name { font-weight: 500; }
.brand-app  {
  color: var(--burgundy);
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  letter-spacing: 0.02em;
  /* Visuell separator fra logoen */
  padding-left: 12px;
  border-left: 1px solid rgba(142, 37, 84, 0.2);
}

.footer-brand .brand-logo {
  height: 56px;
  max-height: 56px;
  margin-bottom: 12px;
}

.topnav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  color: var(--ink-soft);
}

.topnav-links a { color: var(--ink-soft); }
.topnav-links a:hover { color: var(--burgundy); }

@media (max-width: 720px) {
  .topnav-links { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--burgundy);
  color: #fff;
  border-color: var(--burgundy);
}
.btn-primary:hover {
  background: var(--burgundy-deep);
  border-color: var(--burgundy-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(142, 37, 84, 0.22);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}

.btn-link {
  background: transparent;
  border: 0;
  color: var(--burgundy);
  padding: 14px 4px;
}
.btn-link:hover { color: var(--burgundy-deep); }

.btn .arrow { transition: transform 200ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  color: #fff;
  padding: 12px 22px 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid #000;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.appstore-badge:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.appstore-badge .as-label {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-family: var(--sans);
}
.appstore-badge .as-small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.9;
  letter-spacing: 0.02em;
}
.appstore-badge .as-big {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.005em;
  margin-top: 1px;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: clamp(56px, 7vw, 112px);
  border-top: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--burgundy);
}

.hero h1 { margin-bottom: 22px; }
.hero h1 em {
  font-style: italic;
  color: var(--burgundy);
  font-weight: 500;
}

.hero-lede { margin-bottom: 36px; }

.hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-meta {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--ink-mute);
  flex-wrap: wrap;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { color: var(--burgundy); }

.hero-phone {
  position: relative;
  justify-self: center;
}

/* Faktisk app-screenshot inni .phone → .phone-screen-rammen.
   Fyller hele "skjermen" siden bildet allerede inkluderer
   status-bar + tab-bar — vi trenger ingen Claude Design-
   placeholder lenger. */
.phone-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-phone { order: 2; }
}

/* ---------- Phone frame (iPhone-ish) ---------- */

.phone {
  width: 320px;
  aspect-ratio: 9 / 19.5;
  background: #1F1A1C;
  border-radius: 46px;
  padding: 10px;
  box-shadow:
    0 0 0 1px rgba(31, 26, 28, 0.08),
    0 30px 60px -20px rgba(31, 26, 28, 0.25),
    0 60px 120px -30px rgba(31, 26, 28, 0.18);
  position: relative;
}

.phone::before,
.phone::after {
  content: "";
  position: absolute;
  background: #2A2326;
  border-radius: 999px;
}

/* power button */
.phone::before {
  width: 3px;
  height: 80px;
  right: -3px;
  top: 130px;
}
/* volume buttons */
.phone::after {
  width: 3px;
  height: 50px;
  left: -3px;
  top: 110px;
  box-shadow: 0 70px 0 #2A2326, 0 130px 0 #2A2326;
  height: 50px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-screen .notch {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 105px;
  height: 28px;
  background: #1F1A1C;
  border-radius: 999px;
  z-index: 3;
}

.phone-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  height: 44px;
  flex-shrink: 0;
  z-index: 2;
}
.phone-statusbar .status-icons {
  display: flex; gap: 5px; align-items: center;
}

.phone-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 18px,
      rgba(142, 37, 84, 0.05) 18px,
      rgba(142, 37, 84, 0.05) 19px
    ),
    var(--bg-warm);
  color: var(--burgundy);
  border-top: 1px solid rgba(142, 37, 84, 0.08);
  border-bottom: 1px solid rgba(142, 37, 84, 0.08);
  margin: 0;
}
.phone-placeholder .ph-label {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  margin-bottom: 6px;
}
.phone-placeholder .ph-sub {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--burgundy);
  opacity: 0.6;
}

/* Klikkbare galleri-telefoner — knapp-reset så den oppfører seg
   som en normal phone-card, men trigger lightbox ved klikk. */
.phone-clickable {
  border: 0;
  background: #1F1A1C;
  padding: 10px;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  transition: transform 0.18s ease;
}
.phone-clickable:hover { transform: translateY(-3px); }
.phone-clickable:focus-visible {
  outline: 3px solid var(--burgundy);
  outline-offset: 4px;
}

/* Lightbox-overlay som viser galleri-bildet i full størrelse.
   Hidden by default — toggles via [hidden]-attributt fra app.js. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 14, 18, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: lb-fade-in 0.2s ease;
}
.lightbox[hidden] { display: none; }

@keyframes lb-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-figure {
  margin: 0;
  max-width: 360px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 22px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  background: #fff;
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--sans);
  font-size: 14px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* phone in gallery (smaller) */
.phone-sm {
  width: 100%;
  max-width: 220px;
  border-radius: 36px;
  padding: 8px;
}
.phone-sm .phone-screen { border-radius: 28px; }
.phone-sm .notch {
  width: 78px; height: 21px; top: 7px;
}
.phone-sm .phone-statusbar {
  padding: 10px 20px 0;
  font-size: 11px;
  height: 32px;
}
.phone-sm .phone-placeholder .ph-label { font-size: 17px; }
.phone-sm .phone-placeholder .ph-sub   { font-size: 9px; }

/* ---------- How it works (numbered steps) ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 36px 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}
.step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--burgundy-tint);
}

.step-num {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 400;
  color: var(--burgundy);
  line-height: 1;
  display: block;
  margin-bottom: 24px;
  font-feature-settings: "lnum";
}

.step h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: -0.005em;
}

.step p {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.55;
}

.steps-note {
  margin-top: 36px;
  padding: 22px 26px;
  background: var(--burgundy-tint);
  border-radius: var(--r-md);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--burgundy-deep);
  font-size: 14.5px;
  line-height: 1.5;
}
.steps-note svg { flex-shrink: 0; margin-top: 2px; color: var(--burgundy); }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Follow treatment section ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}
.split-reverse { grid-template-columns: 1.1fr 1fr; }

.bullet-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.bullet-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  align-items: start;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.bullet-list .check {
  margin-top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--burgundy-tint);
  color: var(--burgundy);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

@media (max-width: 880px) {
  .split, .split-reverse { grid-template-columns: 1fr; gap: 48px; }
  .split-reverse > :first-child { order: 2; }
}

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  align-items: end;
}
.gallery .phone-sm { width: 100%; }

@media (max-width: 1000px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (max-width: 600px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* ---------- Trust markers ---------- */

.trust {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  overflow: hidden;
}

.trust-item {
  padding: 32px 26px;
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.trust-item:last-child { border-right: 0; }
.trust-item .ti-icon {
  width: 36px;
  height: 36px;
  color: var(--burgundy);
}
.trust-item .ti-label {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.25;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.trust-item .ti-sub {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.4;
}

@media (max-width: 1000px) {
  .trust { grid-template-columns: repeat(2, 1fr); }
  .trust-item { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
  .trust-item:nth-child(2n) { border-right: 0; }
  .trust-item:nth-last-child(-n+1) { border-bottom: 0; }
}
@media (max-width: 560px) {
  .trust { grid-template-columns: 1fr; }
  .trust-item { border-right: 0; }
  .trust-item:last-child { border-bottom: 0; }
}

/* ---------- Privacy ---------- */

.privacy-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(36px, 5vw, 56px);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: clamp(24px, 4vw, 40px);
}
.privacy-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--burgundy-tint);
  color: var(--burgundy);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.privacy-card h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin-bottom: 16px;
}
.privacy-card p { color: var(--ink-soft); line-height: 1.6; max-width: 60ch; text-wrap: pretty; }
.privacy-card a { color: var(--burgundy); text-decoration: underline; text-decoration-color: rgba(142, 37, 84, 0.3); text-underline-offset: 3px; }

@media (max-width: 600px) {
  .privacy-card { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-q {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 26px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  text-align: left;
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  letter-spacing: -0.005em;
  line-height: 1.3;
  transition: color 160ms ease;
}
.faq-q:hover { color: var(--burgundy); }

.faq-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--burgundy);
  transition: transform 240ms ease, background 240ms ease, border-color 240ms ease;
  position: relative;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 1px;
  transition: transform 240ms ease, opacity 240ms ease;
}
.faq-icon::before { width: 12px; height: 1.5px; }
.faq-icon::after  { width: 1.5px; height: 12px; }
.faq-item[open] .faq-icon {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: #fff;
}
.faq-item[open] .faq-icon::after { transform: rotate(90deg); opacity: 0; }

.faq-a {
  padding: 0 4px 28px;
  max-width: 70ch;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.62;
  text-wrap: pretty;
}
.faq-a p + p { margin-top: 12px; }

/* ---------- Final CTA ---------- */

.final-cta {
  text-align: center;
  /* Burgundy-til-mørkere-burgundy gradient. Erstatter den
     opprinnelige svarte boksen med radial-gradient-glow. */
  background: linear-gradient(135deg, #8E2554 0%, #5D1835 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: clamp(56px, 7vw, 88px) 24px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Subtil høylys topp-venstre for å gi gradienten mer dybde */
  background: radial-gradient(ellipse at 30% 0%, rgba(255, 255, 255, 0.12), transparent 55%);
  pointer-events: none;
}

.final-cta > * { position: relative; }

.final-cta .eyebrow { color: var(--burgundy-soft); }
.final-cta h2 {
  color: #fff;
  font-size: clamp(34px, 5vw, 56px);
  margin: 12px 0 18px;
  font-style: italic;
  font-weight: 400;
}
.final-cta p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 50ch;
  margin: 0 auto 36px;
}
.final-cta-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.final-cta .btn-ghost {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.final-cta .btn-ghost:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.final-contact {
  margin-top: 28px;
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}
.final-contact a { color: rgba(255, 255, 255, 0.85); }
.final-contact a:hover { color: #fff; }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line-soft);
  padding: 56px 0 40px;
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.footer-grid h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 16px;
}

.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer-grid ul a { color: var(--ink-soft); }
.footer-grid ul a:hover { color: var(--burgundy); }

.footer-grid .footer-brand {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 12px;
}
.footer-blurb {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 32ch;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--ink-mute);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom .credit { font-size: 12px; }

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Scroll fade-in ---------- */

.fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms cubic-bezier(0.2, 0.6, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.6, 0.2, 1);
  will-change: opacity, transform;
}
.fade-in.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   INVITE PAGE
   ========================================================= */

.invite-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.invite-main {
  flex: 1;
  padding: clamp(48px, 6vw, 80px) 0 clamp(56px, 7vw, 96px);
}

.invite-hero {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}
.invite-hero h1 {
  font-size: clamp(40px, 5.5vw, 60px);
  font-style: italic;
  font-weight: 400;
  margin: 24px 0 20px;
  color: var(--burgundy);
}
.invite-hero p {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 48ch;
  margin: 0 auto;
  text-wrap: pretty;
}

.invite-brand-row {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.code-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(40px, 5vw, 64px) 32px;
  text-align: center;
  max-width: 540px;
  margin: 0 auto 56px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.code-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(142, 37, 84, 0.06), transparent 65%);
  pointer-events: none;
}
.code-card > * { position: relative; }

.code-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 18px;
}

.code-display {
  font-family: var(--serif);
  font-size: clamp(56px, 9vw, 92px);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1;
  margin: 0 0 18px;
  font-feature-settings: "lnum", "tnum";
}

.code-sub {
  font-size: 15px;
  color: var(--ink-mute);
  margin: 0;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.code-copy {
  margin-top: 24px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 160ms ease;
}
.code-copy:hover { border-color: var(--burgundy); color: var(--burgundy); }
.code-copy.copied { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }

.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto 64px;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 240ms ease, transform 240ms ease, box-shadow 240ms ease;
}
.action-card:hover {
  border-color: var(--burgundy-tint);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.action-card .ac-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.action-card h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.005em;
}
.action-card p {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 8px;
  flex: 1;
}

@media (max-width: 600px) {
  .actions-grid { grid-template-columns: 1fr; }
}

.next-steps {
  max-width: 620px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding-top: 48px;
}
.next-steps h2 {
  font-size: clamp(24px, 3vw, 30px);
  margin-bottom: 28px;
  text-align: center;
}
.next-steps ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  counter-reset: ns;
}
.next-steps li {
  counter-increment: ns;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 18px;
  align-items: start;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.next-steps li::before {
  content: counter(ns);
  font-family: var(--serif);
  font-size: 22px;
  color: var(--burgundy);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--burgundy-tint);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--burgundy-tint);
}
.next-steps li strong { color: var(--ink); font-weight: 600; }

.help-line {
  margin-top: 48px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-mute);
  line-height: 1.6;
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}
.help-line a { color: var(--burgundy); }

.invite-footer {
  border-top: 1px solid var(--line-soft);
  padding: 32px 0;
  font-size: 13px;
  color: var(--ink-mute);
  text-align: center;
  background: var(--bg);
}
.invite-footer a { color: var(--ink-soft); }
.invite-footer a:hover { color: var(--burgundy); }
.invite-footer .credit { display: block; margin-top: 8px; font-size: 12px; opacity: 0.8; }
