:root {
  --bg: #f4eee3;
  --bg-2: #efe6d6;
  --panel: #fbf7ef;
  --ink: #1e1a15;
  --text: #5d544a;
  --muted: #8a8073;
  --line: rgba(30, 26, 21, 0.12);
  --clay: #b5654a;
  --olive: #6e7a4f;
  --gold: #c79a4b;
  --slate: #4b6e7e;
  --tile-shadow: 0 18px 40px rgba(40, 28, 18, 0.18);
  --shadow-lg: 0 36px 90px rgba(40, 28, 18, 0.22);
  --rail: clamp(22px, 5vw, 96px);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 85% -5%, rgba(199, 154, 75, 0.16), transparent 40%),
    radial-gradient(circle at -5% 12%, rgba(181, 101, 74, 0.12), transparent 34%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Type ---------- */
h1,
h2,
h3 {
  font-family: var(--serif);
  color: var(--ink);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(46px, 6.4vw, 88px);
  font-weight: 600;
  line-height: 0.96;
}

h2 {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1;
}

h3 {
  font-size: 20px;
  line-height: 1.2;
}

p {
  margin: 0;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
}

.lead {
  color: var(--text);
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 400;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px var(--rail);
  background: rgba(244, 238, 227, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  width: 28px;
  height: 28px;
}

.brand-mark.small {
  width: 22px;
  height: 22px;
}

.brand-mark span {
  border-radius: 4px;
  background: var(--clay);
}
.brand-mark span:nth-child(2) {
  background: var(--gold);
}
.brand-mark span:nth-child(3) {
  background: var(--olive);
}
.brand-mark span:nth-child(4) {
  background: var(--slate);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--bg) !important;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 26px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button.primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 14px 30px rgba(30, 26, 21, 0.22);
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(30, 26, 21, 0.3);
}

.button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.button.ghost:hover {
  background: rgba(30, 26, 21, 0.05);
}

/* ---------- Tile photos (shared) ---------- */
.tile-home {
  --photo: url("./assets/tiles/home-workouts.jpg");
}
.tile-meal {
  --photo: url("./assets/tiles/meal-prep.jpg");
}
.tile-dolomites {
  --photo: url("./assets/tiles/dolomites.jpg");
}
.tile-running {
  --photo: url("./assets/tiles/running.jpg");
}
.tile-books {
  --photo: url("./assets/tiles/books.jpg");
}
.tile-movies {
  --photo: url("./assets/tiles/movie-recommendations.jpg");
}
.tile-wedding {
  --photo: url("./assets/tiles/wedding-venues.jpg");
}
.tile-shoulders {
  --photo: url("./assets/tiles/shoulders.jpg");
}
.tile-startup {
  --photo: url("./assets/tiles/startup.jpg");
}
.tile-aitools {
  --photo: url("./assets/tiles/ai-tools.jpg");
}

.slot.is-filled::before,
.ptile::before,
.source-thumb::before,
.save-mover::before,
.mini-grid span::before,
.cta-tiles span::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--photo) center / cover no-repeat;
}

.slot.is-filled::after,
.ptile::after,
.source-thumb::after,
.save-mover::after,
.mini-grid span::after,
.cta-tiles span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 15, 10, 0.06) 0%, rgba(20, 15, 10, 0.5) 64%, rgba(20, 15, 10, 0.86) 100%);
}

.play {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.play::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 10px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #1e1a15;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(440px, 1.08fr);
  align-items: center;
  gap: 40px;
  padding: clamp(48px, 7vw, 96px) var(--rail) clamp(56px, 7vw, 104px);
  overflow: hidden;
}

/* Full-bleed living mosaic behind the whole hero */
.hero-mosaic {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* Cream veil: keeps the headline crisp on the left, lets tiles show on the right */
.hero-mosaic::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      var(--bg) 4%,
      rgba(244, 238, 227, 0.92) 26%,
      rgba(244, 238, 227, 0.5) 50%,
      rgba(244, 238, 227, 0.24) 72%,
      rgba(244, 238, 227, 0.46) 100%
    ),
    linear-gradient(180deg, var(--bg) 0%, transparent 14%, transparent 86%, var(--bg) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-bottom: 22px;
}

.hero-text {
  max-width: 460px;
  margin-bottom: 30px;
  color: var(--text);
  font-size: clamp(17px, 1.7vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.dots {
  display: inline-flex;
  gap: 4px;
}
.dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
}
.dots i:nth-child(2) {
  background: var(--gold);
}
.dots i:nth-child(3) {
  background: var(--slate);
}

/* Hero stage */
.hero-stage {
  position: relative;
  z-index: 1;
  min-height: 644px;
}

/* Every layer's tile period divides 180px (6 × --t), so scrolling the background
   by exactly 180px loops seamlessly. We animate background-position (not transform)
   so the slow drift interpolates sub-pixel instead of snapping to the pixel grid. */
.mosaic-backdrop {
  --t: 30px;
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background-color: #b89a6c; /* grout */
  background-image:
    /* grout lines (top) */
    linear-gradient(rgba(120, 88, 54, 0.5) 2px, transparent 2px),
    linear-gradient(90deg, rgba(120, 88, 54, 0.5) 2px, transparent 2px),
    /* sparse accent tesserae */
    repeating-conic-gradient(from 0deg, rgba(181, 101, 74, 0.55) 0 25%, transparent 0 100%),
    repeating-conic-gradient(from 0deg, rgba(75, 110, 126, 0.5) 0 25%, transparent 0 100%),
    repeating-conic-gradient(from 0deg, rgba(110, 122, 79, 0.5) 0 25%, transparent 0 100%),
    repeating-conic-gradient(from 0deg, rgba(199, 154, 75, 0.5) 0 25%, transparent 0 100%),
    /* base stone checker (bottom) */
    repeating-conic-gradient(#ecdcbd 0deg 90deg, #e3d0ac 90deg 180deg);
  background-size:
    var(--t) var(--t), var(--t) var(--t),
    calc(var(--t) * 2) calc(var(--t) * 2),
    calc(var(--t) * 3) calc(var(--t) * 3),
    calc(var(--t) * 6) calc(var(--t) * 6),
    calc(var(--t) * 6) calc(var(--t) * 6),
    var(--t) var(--t);
  background-position:
    0 0, 0 0,
    0 0, 30px 30px, 60px 0, 90px 60px, 0 0;
  filter: saturate(1.04);
  animation: mosaicFlow 26s linear infinite;
}

/* Social rail — the apps you save from */
.social-rail {
  position: absolute;
  left: 2px;
  top: 50%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(-50%);
}

.social-chip {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(40, 28, 18, 0.22);
  opacity: 0.5;
  transform: scale(0.92);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.social-chip.active {
  opacity: 1;
  transform: scale(1);
}
.social-chip.ig {
  background: linear-gradient(135deg, #feda75, #d62976 55%, #962fbf);
}
.social-chip.tt {
  background: #111;
  box-shadow: inset 3px 0 #69c9d0, inset -3px 0 #ee1d52, 0 10px 22px rgba(40, 28, 18, 0.22);
}
.social-chip.yt {
  background: #ff0033;
}
.social-chip .glyph {
  width: 26px;
  height: 26px;
  color: #fff;
}

/* Success snackbar */
.snackbar {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px 11px 12px;
  border-radius: 999px;
  background: #1f7a3d;
  color: #eafff0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 16px 34px rgba(20, 80, 40, 0.4);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.4, 0.5, 1);
}
.snackbar.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.snack-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #5cf08a;
}
.snack-check::after {
  content: "";
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border: solid #11401f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Source social post */
.source-post {
  position: absolute;
  z-index: 4;
  top: 56px;
  left: 64px;
  width: 188px;
  margin: 0;
  padding: 12px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  opacity: 0;
}

.source-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.src-logo {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  flex: none;
  color: #fff;
  background: linear-gradient(135deg, #feda75, #d62976 45%, #962fbf 80%);
}
.src-logo .glyph {
  width: 15px;
  height: 15px;
}
.glyph {
  display: block;
}
.brand-mark.tiny {
  width: 15px;
  height: 15px;
  gap: 2px;
}
.source-post[data-platform="tiktok"] .src-logo {
  background: #111;
  box-shadow: inset 2px 0 #69c9d0, inset -2px 0 #ee1d52;
}
.source-post[data-platform="youtube"] .src-logo {
  background: #ff0033;
}

.src-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.src-kind {
  font-size: 12px;
  color: var(--muted);
}
.src-kind::before {
  content: "· ";
}

.source-thumb {
  position: relative;
  height: 188px;
  border-radius: 14px;
  overflow: hidden;
}

.source-cap {
  margin: 10px 2px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.source-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.share-label {
  white-space: nowrap;
}
.source-share strong {
  font-weight: 800;
}
.share-ic {
  width: 13px;
  height: 13px;
  border: 2px solid var(--bg);
  border-radius: 3px 3px 0 0;
  border-bottom: none;
  position: relative;
}
.share-ic::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 2px;
  height: 11px;
  background: var(--bg);
  transform: translateX(-50%);
}

/* Tessera phone */
.tessera-phone {
  position: absolute;
  z-index: 3;
  top: 12px;
  height: calc(100% - 24px);
  right: clamp(0px, 2vw, 28px);
  width: min(300px, 76%);
  padding: 16px 14px 20px;
  border-radius: 44px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 6px #fff, var(--shadow-lg);
}

.phone-home {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 116px;
  height: 5px;
  border-radius: 999px;
  background: rgba(30, 26, 21, 0.26);
  transform: translateX(-50%);
}

.phone-fab {
  position: absolute;
  right: 22px;
  bottom: 34px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 14px 28px rgba(30, 26, 21, 0.32);
}
.phone-fab::before,
.phone-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--bg);
  border-radius: 2px;
}
.phone-fab::before {
  width: 18px;
  height: 2.5px;
}
.phone-fab::after {
  width: 2.5px;
  height: 18px;
}

.island {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 92px;
  height: 24px;
  border-radius: 999px;
  background: #1e1a15;
  transform: translateX(-50%);
}

.phone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 6px 14px;
}
.phone-head strong {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
}
.phone-search {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
}

.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 74px;
  gap: 8px;
}

.slot {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
}

.slot.tall {
  grid-row: span 2;
}

.slot.empty {
  border: 1.5px dashed rgba(30, 26, 21, 0.2);
  background: rgba(255, 255, 255, 0.32);
}

.slot strong,
.ptile strong,
.save-mover strong {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 22px;
  z-index: 3;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff8ec;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.slot small,
.ptile small {
  position: absolute;
  left: 9px;
  bottom: 8px;
  z-index: 3;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 248, 236, 0.78);
}

.save-mover {
  position: absolute;
  z-index: 9;
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  box-shadow: 0 26px 56px rgba(20, 12, 6, 0.45);
  pointer-events: none;
}

.slot.just-landed {
  animation: settlePop 0.52s cubic-bezier(0.34, 1.56, 0.64, 1) both,
    ring 0.62s ease-out both;
}

/* ============ HOW IT WORKS ============ */
.section-head {
  max-width: 720px;
  margin-bottom: clamp(34px, 5vw, 56px);
}
.section-head .lead {
  margin-top: 16px;
}

.how {
  padding: clamp(56px, 8vw, 104px) var(--rail);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.step {
  position: relative;
  padding: 26px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(40, 28, 18, 0.08);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 18px;
}

.step h3 {
  margin-bottom: 8px;
}
.step p {
  color: var(--text);
  font-size: 15px;
}

.step-art {
  display: grid;
  place-items: center;
  height: 188px;
  margin-bottom: 22px;
  border-radius: 18px;
  background: linear-gradient(160deg, #f0e7d8, #e7dcc7);
  overflow: hidden;
}

.mini-phone {
  position: relative;
  width: 150px;
  height: 168px;
  padding: 24px 12px 12px;
  border-radius: 22px 22px 6px 6px;
  background: #fffaf1;
  box-shadow: inset 0 0 0 4px #1e1a15, 0 14px 26px rgba(30, 20, 12, 0.2);
}

.mini-notch {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 44px;
  height: 11px;
  border-radius: 999px;
  background: #1e1a15;
  transform: translateX(-50%);
}

.choose-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 9px;
}

/* iOS share-sheet (step 1) */
.share-art .mini-phone {
  padding: 0;
  background: linear-gradient(165deg, #2c2436, #14110d);
  overflow: hidden;
}
.share-art .mini-notch {
  z-index: 4;
}
.ios-sheet {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  z-index: 3;
  display: grid;
  gap: 7px;
  padding: 9px;
  border-radius: 16px;
  background: rgba(251, 247, 239, 0.97);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 7px;
}
.sheet-thumb {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(135deg, #feda75, #d62976 55%, #962fbf);
}
.sheet-thumb .glyph {
  width: 16px;
  height: 16px;
}
.sheet-meta {
  display: grid;
  line-height: 1.15;
  min-width: 0;
}
.sheet-meta strong {
  font-size: 9px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sheet-meta small {
  font-size: 8px;
  color: var(--muted);
}
.sheet-apps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  padding: 7px 0;
  border-top: 1px solid rgba(30, 26, 21, 0.08);
  border-bottom: 1px solid rgba(30, 26, 21, 0.08);
}
.sapp {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  flex: none;
}
.sapp.msg {
  background: linear-gradient(180deg, #5bf675, #1fce4d);
}
.sapp.mail {
  background: linear-gradient(180deg, #41b8ff, #1f7df4);
}
.sapp.more {
  background: #ded5c6;
}
.sapp.te {
  background: #1e1a15;
  box-shadow: 0 0 0 2px var(--clay);
}
.sapp.msg::after,
.sapp.mail::after {
  content: "";
  width: 13px;
  height: 11px;
  border-radius: 4px 4px 4px 1px;
  background: #fff;
}
.sapp.mail::after {
  border-radius: 2px;
}
.sapp.more::after {
  content: "•••";
  font-size: 9px;
  letter-spacing: 1px;
  color: #6f665d;
}
.sheet-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--bg);
  font-size: 10px;
  font-weight: 700;
}
.sheet-cta .glyph {
  width: 13px;
  height: 13px;
}

.choose-art .mini-phone {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.choose-art button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}
.choose-art button.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 42px;
  gap: 6px;
}
.mini-grid span {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #ddd;
}

/* ============ STORY ============ */
.story {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(440px, 46vw, 580px);
  padding: clamp(28px, 5vw, 72px) var(--rail);
  margin: 0 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
  background: #ecdcc0;
}

/* Full-bleed artwork */
.roman-scene {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}
.roman-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}

/* Cream tint on the left so the copy stays readable over the art */
.story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--bg) 0%,
    rgba(244, 238, 227, 0.94) 24%,
    rgba(244, 238, 227, 0.58) 45%,
    rgba(244, 238, 227, 0.12) 64%,
    transparent 80%
  );
}

.story-copy {
  position: relative;
  z-index: 2;
  max-width: 460px;
}
.story-copy h2 {
  margin: 14px 0 18px;
}
.story-copy em {
  font-style: italic;
  color: var(--clay);
}
.story-copy p {
  max-width: 430px;
  color: #4a3f31;
  font-size: clamp(16px, 1.5vw, 19px);
}

/* ============ INTERACTIVE MOSAIC ============ */
.mosaic {
  padding: clamp(40px, 6vw, 88px) var(--rail) clamp(56px, 8vw, 104px);
}

.drag-hint {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--clay);
}

.product-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 150px;
  gap: 14px;
  padding: 16px;
  border-radius: 26px;
  background: linear-gradient(160deg, #efe6d6, #e7dcc7);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.ptile {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  box-shadow: var(--tile-shadow);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
}
.ptile.wide {
  grid-column: span 2;
}
.ptile.tall {
  grid-row: span 2;
}
.ptile:hover {
  transform: translateY(-3px);
}
.ptile.dragging {
  cursor: grabbing;
  z-index: 20;
  transition: none;
  box-shadow: 0 30px 60px rgba(20, 12, 6, 0.4);
}

.pin {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(20, 15, 10, 0.4);
  backdrop-filter: blur(4px);
}
.pin::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff8ec;
}
.ptile.pinned .pin {
  background: var(--gold);
}
.ptile.pinned .pin::after {
  background: #1e1a15;
}

/* ============ VALUES ============ */
.values {
  padding: clamp(20px, 3vw, 36px) var(--rail) clamp(56px, 8vw, 96px);
}
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.value {
  padding: 26px 24px 28px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.value h3 {
  margin: 16px 0 8px;
  font-size: 19px;
}
.value p {
  color: var(--text);
  font-size: 14.5px;
}
.value-ic {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(150deg, #f6ecdb, #efe1c8);
  border: 1px solid rgba(199, 154, 75, 0.4);
}
.value-ic::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
}
.ic-bolt::after {
  width: 14px;
  height: 18px;
  background: var(--clay);
  clip-path: polygon(55% 0, 0 58%, 42% 58%, 30% 100%, 100% 38%, 52% 38%);
}
.ic-grid::after {
  width: 18px;
  height: 18px;
  background:
    linear-gradient(var(--olive), var(--olive)) 0 0 / 7px 7px no-repeat,
    linear-gradient(var(--olive), var(--olive)) 11px 0 / 7px 7px no-repeat,
    linear-gradient(var(--olive), var(--olive)) 0 11px / 7px 7px no-repeat,
    linear-gradient(var(--olive), var(--olive)) 11px 11px / 7px 7px no-repeat;
}
.ic-find::after {
  width: 16px;
  height: 16px;
  border: 3px solid var(--slate);
  border-radius: 50%;
  box-shadow: 7px 7px 0 -1px var(--slate);
  margin: 0 auto auto;
  inset: 12px 0 0 12px;
}
.ic-play::after {
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid var(--gold);
  border-radius: 2px;
}

/* ============ FINAL CTA ============ */
.final-cta {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(40px, 6vw, 76px) var(--rail);
  margin: 0 var(--rail) clamp(40px, 6vw, 72px);
  border-radius: 32px;
  background: linear-gradient(140deg, #211c16, #2c2117);
  color: #f7efe2;
}
.final-cta .eyebrow {
  color: var(--gold);
}
.final-cta h2 {
  color: #fbf4e8;
}
.final-cta .lead {
  margin-top: 16px;
  color: rgba(247, 239, 226, 0.74);
}

.waitlist-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  max-width: 520px;
  margin-top: 26px;
}
.waitlist-form input {
  min-height: 52px;
  border: 1px solid rgba(247, 239, 226, 0.2);
  border-radius: 999px;
  padding: 0 20px;
  background: rgba(247, 239, 226, 0.08);
  color: #f7efe2;
  outline: none;
}
.waitlist-form input::placeholder {
  color: rgba(247, 239, 226, 0.5);
}
.waitlist-form .button.primary {
  background: var(--bg);
  color: var(--ink);
  box-shadow: none;
}
.form-note {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  font-size: 14px;
  color: var(--gold);
}

.cta-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 96px;
  gap: 10px;
}
.cta-tiles span {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}
.cta-tiles span:nth-child(1) {
  grid-row: span 2;
}

/* ============ FOOTER ============ */
.site-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px var(--rail) 48px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}

.foot-links {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-weight: 600;
}
.foot-links a:hover { color: var(--ink); }

/* ============ KEYFRAMES ============ */
@keyframes mosaicFlow {
  to {
    background-position:
      0 180px, 0 180px,
      0 180px, 30px 210px, 60px 180px, 90px 240px, 0 180px;
  }
}

@keyframes settlePop {
  0% {
    transform: scale(1.16);
  }
  55% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes ring {
  0% {
    box-shadow: 0 0 0 0 rgba(199, 154, 75, 0.6), var(--tile-shadow);
  }
  100% {
    box-shadow: 0 0 0 16px rgba(199, 154, 75, 0), var(--tile-shadow);
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1040px) {
  .hero,
  .story,
  .final-cta {
    grid-template-columns: 1fr;
  }
  .hero-stage {
    min-height: 560px;
  }
  .story {
    text-align: left;
  }
  .roman-scene {
    order: -1;
  }
  .value-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-mosaic {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .hero-mosaic::after {
    background:
      linear-gradient(
        180deg,
        var(--bg) 4%,
        rgba(244, 238, 227, 0.92) 26%,
        rgba(244, 238, 227, 0.5) 50%,
        rgba(244, 238, 227, 0.24) 72%,
        rgba(244, 238, 227, 0.46) 100%
      ),
      linear-gradient(180deg, var(--bg) 0%, transparent 14%, transparent 86%, var(--bg) 100%);
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .hero-stage {
    min-height: 680px;
    margin-top: 8px;
  }
  .social-rail {
    left: 0;
    gap: 10px;
  }
  .social-chip {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .source-post {
    width: 150px;
    left: 50px;
    top: 14px;
    z-index: 6;
  }
  .source-thumb {
    height: 120px;
  }
  .source-share {
    font-size: 11px;
    gap: 6px;
  }
  .tessera-phone {
    width: min(266px, 80%);
    right: 0;
    top: 160px;
    height: calc(100% - 172px);
  }
  .hero-actions {
    width: 100%;
  }
  .hero-actions .button {
    flex: 1;
  }
  .value-grid {
    grid-template-columns: 1fr;
  }
  .product-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 130px;
  }
  .ptile.wide,
  .ptile.tall {
    grid-column: span 1;
    grid-row: span 1;
  }
  .waitlist-form {
    grid-template-columns: 1fr;
  }
  .cta-tiles {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 76px;
  }
  /* Mobile: full image band on top, copy on cream below */
  .story {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 0;
  }
  .roman-scene {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 4 / 3;
  }
  .roman-scene img {
    object-position: center;
  }
  .story::before {
    display: none;
  }
  .story-copy {
    max-width: 100%;
    padding: 24px var(--rail) 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .mosaic-backdrop {
    animation: none;
  }
}
