:root {
  --cream: #f7efdf;
  --paper: #fffdf8;
  --ink: #20160d;
  --muted: #5f4b39;
  --line: #dfc7a4;
  --accent: #df7418;
  --accent-dark: #bd5c10;
  --shadow: 0 12px 26px rgba(24, 16, 8, 0.14);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top right, #fff3df 0%, var(--cream) 48%, #f0e6d3 100%);
  display: flex;
  flex-direction: column;
}

/* ---- Header ---- */
.global-header {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.logo {
  text-decoration: none;
  font-family: "Playfair Display", serif;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.logo span { color: var(--accent); }

.header-tag {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---- Carousel core (all viewports) ---- */
.landing-main {
  flex: 1;
  min-height: 0;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 16px;
  overflow: hidden;
}

.screen-track {
  height: 100%;
  display: flex;
  width: 300%;
  transform: translateX(calc(var(--screen-index, 0) * -33.3333%));
  transition: transform 0.28s ease;
}

.screen-panel {
  width: calc(33.3333% - 8px);
  min-width: calc(33.3333% - 8px);
  margin-right: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---- Hero ---- */
.eyebrow {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
}

.hero-emoji-strip {
  display: flex;
  gap: 12px;
  margin: 10px 0 4px;
}

.hero-emoji-strip span {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

h1 {
  margin: 8px 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
}

.lede {
  margin: 0;
  max-width: 700px;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.4;
  color: #3f3021;
}

.cta-group {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
}

.btn {
  text-decoration: none;
  display: inline-block;
  border: 1px solid #c19f74;
  border-radius: 999px;
  background: #fff0db;
  color: #2f2012;
  font-weight: 700;
  padding: 10px 18px;
  font-size: 15px;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover { background: var(--accent-dark); }

/* ---- Build ---- */
h2 {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.1;
}

.tile-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tile {
  border: 1px solid #dec7a8;
  border-radius: 12px;
  background: #fff6e9;
  padding: 14px;
}

.tile-icon {
  font-size: 28px;
  line-height: 1;
  display: block;
  margin-bottom: 6px;
}

.tile h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.tile p {
  margin: 0;
  font-size: 15px;
  color: #4a3928;
  line-height: 1.4;
}

/* ---- Preview ---- */
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.slide-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  border: 1px solid #be9e76;
  border-radius: 12px;
  width: 38px;
  height: 38px;
  background: #fff2de;
  cursor: pointer;
  font-size: 20px;
}

.carousel {
  margin-top: 10px;
  border: 1px solid #dec6a6;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff9ef, #fff2df);
  padding: 16px;
  min-height: 140px;
}

.slide-kicker {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
}

.slide-title {
  margin: 8px 0;
  font-size: 28px;
}

.slide-copy {
  margin: 0;
  color: #493727;
  line-height: 1.4;
  font-size: 16px;
}

.slide-counter {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #584636;
}

.launch-btn {
  margin-top: 14px;
}

/* ---- Bottom nav (all viewports) ---- */
.screen-nav {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.98);
  padding: 8px 16px;
  min-height: 48px;
}

.screen-nav button {
  border: 1px solid #c59f70;
  border-radius: 999px;
  background: #fff0da;
  color: #2d1f11;
  font-weight: 700;
  padding: 7px 14px;
  font-size: 13px;
  min-width: 72px;
  cursor: pointer;
}

.screen-nav button:disabled {
  opacity: 0.45;
  cursor: default;
}

.dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  min-width: 10px;
  background: #d7c2a4;
  cursor: pointer;
}

.dot.active {
  background: var(--accent);
}

/* ---- Mobile density overrides ---- */
@media (max-width: 900px) {
  .header-inner {
    padding: 7px 10px;
  }

  .logo {
    font-size: 15px;
  }

  .header-tag {
    font-size: 9px;
    letter-spacing: 0.04em;
    max-width: 52%;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .landing-main {
    max-width: none;
    padding: 6px 8px;
  }

  .screen-panel {
    width: calc(33.3333% - 5.34px);
    min-width: calc(33.3333% - 5.34px);
    margin-right: 8px;
    border-radius: 12px;
    padding: 10px;
  }

  .hero-emoji-strip {
    gap: 3vw;
    margin: 2vw 0 0;
  }

  .hero-emoji-strip span {
    font-size: 7vw;
  }

  .hero-panel h1 {
    font-size: clamp(36px, 12vw, 52px);
    line-height: 0.95;
    margin: 1.5vw 0;
  }

  .eyebrow {
    font-size: max(10px, 2.8vw);
    letter-spacing: 0.05em;
  }

  .tile-icon {
    font-size: 6vw;
    margin-bottom: 1vw;
  }

  .lede {
    font-size: max(14px, 3.6vw);
    line-height: 1.35;
    max-width: none;
  }

  .cta-group {
    margin-top: 3vw;
    gap: 2vw;
  }

  .btn {
    font-size: max(12px, 3.2vw);
    padding: 2vw 4vw;
  }

  .btn:not(.primary) {
    background: transparent;
    border: 1px solid #d4b48e;
  }

  .build-panel h2,
  .panel-head h2 {
    font-size: clamp(24px, 8vw, 36px);
    line-height: 1;
  }

  .tile-list {
    margin-top: 3vw;
    grid-template-columns: 1fr;
    gap: 2.5vw;
  }

  .tile {
    padding: 2.5vw 3vw;
  }

  .tile h3 {
    font-size: max(15px, 4vw);
    margin-bottom: 1vw;
  }

  .tile p {
    font-size: max(12px, 3.2vw);
    line-height: 1.35;
  }

  .icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 16px;
  }

  .carousel {
    margin-top: 6px;
    min-height: 120px;
    padding: 10px;
    border-radius: 10px;
  }

  .slide-title {
    font-size: 19px;
    margin: 4px 0;
    line-height: 1.1;
  }

  .slide-copy {
    font-size: 12px;
    line-height: 1.3;
  }

  .slide-counter {
    margin-top: 4px;
    font-size: 11px;
  }

  .launch-btn {
    margin-top: 6px;
    font-size: 12px;
    padding: 8px 12px;
  }

  .screen-nav {
    gap: 6px;
    padding: 5px 8px;
    min-height: 40px;
  }

  .screen-nav button {
    padding: 5px 10px;
    font-size: 11px;
    min-width: 60px;
  }

  .dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
  }
}
