:root {
  --cream: #f5efdf;
  --paper: #fffaf0;
  --ink: #0d162c;
  --night: #111a34;
  --blue: #22375d;
  --gold: #b9914a;
  --sage: #6f806b;
  --rose: #b76e68;
  --line: rgba(13, 22, 44, 0.16);
  --shadow: 0 24px 70px rgba(9, 15, 31, 0.22);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
}

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

a {
  color: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  color: var(--paper);
  background: rgba(13, 22, 44, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 250, 240, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 250, 240, 0.68);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  font-size: 0.9rem;
  font-weight: 600;
}

nav a,
footer a {
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  padding: 116px clamp(20px, 6vw, 84px) 76px;
  color: var(--paper);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 15, 31, 0.9), rgba(9, 15, 31, 0.56) 48%, rgba(9, 15, 31, 0.24)),
    linear-gradient(0deg, rgba(9, 15, 31, 0.46), transparent 42%);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--serif);
  letter-spacing: 0;
  line-height: 0.98;
}

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(3.1rem, 10vw, 7rem);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.45rem, 6vw, 5rem);
}

h3 {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1.05;
}

.hero p,
.section-copy p,
.gift-copy p,
.automation-flow p,
.steps p,
.json-note p {
  line-height: 1.75;
}

.hero-content > p:not(.eyebrow) {
  max-width: 590px;
  margin-bottom: 32px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255, 250, 240, 0.86);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: var(--night);
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

section {
  padding: 96px clamp(20px, 6vw, 84px);
}

.builder-section {
  background: var(--paper);
}

.section-copy {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-copy.compact {
  max-width: 680px;
}

.section-copy p:not(.eyebrow) {
  color: rgba(13, 22, 44, 0.72);
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.compact-builder {
  grid-template-columns: 360px minmax(700px, 700px);
  gap: clamp(20px, 4vw, 46px);
  justify-content: center;
}

.creator-panel {
  align-self: start;
  padding: 20px;
  background: #f7f0df;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(13, 22, 44, 0.1);
}

.creator-panel label,
legend {
  display: block;
  margin-bottom: 9px;
  color: var(--night);
  font-weight: 800;
}

.wizard-panel {
  position: sticky;
  top: 96px;
  width: 360px;
  max-width: 100%;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-bottom: 10px;
}

.progress-step {
  display: grid;
  gap: 5px;
  justify-items: center;
  min-height: 58px;
  padding: 7px 4px;
  color: rgba(13, 22, 44, 0.62);
  background: rgba(255, 253, 247, 0.72);
  border: 1px solid rgba(13, 22, 44, 0.12);
  border-radius: 8px;
  cursor: pointer;
  font: 800 0.72rem var(--sans);
}

.progress-step span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: var(--paper);
  background: rgba(13, 22, 44, 0.56);
  border-radius: 50%;
}

.progress-step.is-active {
  color: var(--night);
  border-color: var(--gold);
  background: #fffdf7;
  box-shadow: 0 8px 22px rgba(185, 145, 74, 0.16);
}

.progress-step.is-active span {
  background: var(--gold);
}

.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
  animation: step-in 220ms ease both;
}

.wizard-step h3 {
  margin-bottom: 15px;
  font-size: 1.55rem;
}

.wizard-step > p {
  color: rgba(13, 22, 44, 0.68);
  line-height: 1.65;
}

.story-note {
  padding: 12px;
  background: rgba(185, 145, 74, 0.12);
  border: 1px solid rgba(185, 145, 74, 0.24);
  border-radius: 8px;
  font-size: 0.9rem;
}

.step-kicker {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-box {
  position: relative;
}

input[type="search"],
input[type="text"] {
  width: 100%;
  height: 48px;
  padding: 0 64px 0 14px;
  color: var(--night);
  background: #fffdf7;
  border: 1px solid rgba(13, 22, 44, 0.2);
  border-radius: 8px;
  font: 600 1rem var(--sans);
  outline: none;
}

input[type="search"]:focus,
input[type="text"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(185, 145, 74, 0.16);
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--blue);
}

#search-help {
  margin: 8px 0 0;
  color: rgba(13, 22, 44, 0.58);
  font-size: 0.9rem;
}

.suggestions {
  min-height: 0;
  margin: 9px 0 16px;
  padding: 0;
  list-style: none;
}

.suggestions li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  margin-bottom: 6px;
  cursor: pointer;
  background: #fffdf7;
  border: 1px solid rgba(13, 22, 44, 0.12);
  border-radius: 8px;
  font-size: 0.92rem;
}

.suggestions li:hover,
.suggestions li[aria-selected="true"] {
  border-color: var(--gold);
}

fieldset {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.field-pair {
  margin-bottom: 16px;
}

.date-alert {
  display: none;
  margin-top: 10px;
  padding: 11px 12px;
  color: #7a241c;
  background: #fff2ea;
  border: 1px solid rgba(183, 110, 104, 0.45);
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.date-alert.is-visible {
  display: block;
}

.date-alert button {
  display: inline;
  margin: 4px 0 0;
  padding: 0;
  color: var(--night);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: 800 0.88rem var(--sans);
  text-decoration: underline;
}

.upload-box {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 13px;
  background: #fffdf7;
  border: 1px dashed rgba(13, 22, 44, 0.28);
  border-radius: 8px;
}

.upload-box::before {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: var(--paper);
  background: var(--night);
  border-radius: 6px;
  font-size: 1.35rem;
  font-weight: 800;
}

.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-box strong,
.upload-box span {
  display: block;
}

.upload-box span {
  margin-top: 5px;
  color: rgba(13, 22, 44, 0.62);
  font-size: 0.88rem;
  line-height: 1.45;
}

.style-options {
  display: grid;
  gap: 8px;
}

.style-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  background: #fffdf7;
  border: 1px solid rgba(13, 22, 44, 0.14);
  border-radius: 8px;
  cursor: pointer;
}

.style-options input {
  accent-color: var(--gold);
}

.memory-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.memory-list span,
.memory-list button {
  padding: 8px 10px;
  color: var(--night);
  background: rgba(185, 145, 74, 0.16);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.memory-list button {
  cursor: pointer;
}

.memory-list button.is-active {
  color: var(--paper);
  background: var(--night);
}

.wizard-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.wizard-actions.two {
  grid-template-columns: 1fr 1fr;
}

.wizard-actions.stacked {
  grid-template-columns: 1fr;
}

.panel-button,
.buy-button,
.ghost-button,
.add-place-button {
  width: 100%;
  border: 0;
  color: var(--paper);
  background: var(--night);
  cursor: pointer;
}

.ghost-button {
  color: var(--night);
  background: #fffdf7;
  border: 1px solid rgba(13, 22, 44, 0.16);
}

.add-place-button {
  position: relative;
  min-height: 58px;
  gap: 12px;
  color: var(--night);
  background: #fffdf7;
  border: 2px solid var(--gold);
  box-shadow: 0 10px 24px rgba(185, 145, 74, 0.18);
  overflow: hidden;
}

.photo-add-button {
  min-height: 48px;
  margin-top: 12px;
  background: #fff8e8;
}

.add-place-button::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(185, 145, 74, 0.55);
  border-radius: 5px;
  pointer-events: none;
}

.add-place-button:hover,
.add-place-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(185, 145, 74, 0.25);
}

.add-place-button:active {
  transform: translateY(1px) scale(0.99);
}

.add-place-button.is-clicked {
  animation: add-button-click 360ms ease;
}

.add-place-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.add-pulse {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--paper);
  background: var(--gold);
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
}

.add-pulse::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 2px solid rgba(185, 145, 74, 0.45);
  border-radius: 50%;
  animation: add-click-pulse 1.45s ease-out infinite;
}

@keyframes add-click-pulse {
  0% {
    opacity: 0.85;
    transform: scale(0.72);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.42);
  }
}

@keyframes add-button-click {
  0% {
    box-shadow: 0 0 0 0 rgba(185, 145, 74, 0.5);
  }

  100% {
    box-shadow: 0 0 0 18px rgba(185, 145, 74, 0);
  }
}

.wow-button {
  background: var(--gold);
}

.final-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.final-actions .panel-button,
.final-actions .buy-button {
  margin-top: 0;
}

.buy-button {
  background: var(--gold);
}

.buy-button:disabled {
  cursor: not-allowed;
  opacity: 0.78;
}

.wizard-step small {
  display: block;
  margin-top: 12px;
  color: rgba(13, 22, 44, 0.58);
  line-height: 1.5;
}

.poster-preview {
  position: relative;
  width: 700px;
  aspect-ratio: 7 / 5;
  min-height: auto;
  padding: clamp(18px, 3.2vw, 34px);
  overflow: hidden;
  background: var(--cream);
  border: 16px solid #fffdf7;
  box-shadow: var(--shadow);
  isolation: isolate;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.poster-stage {
  width: 700px;
  max-width: 100%;
  overflow: visible;
}

.poster-preview.is-glowing {
  animation: poster-glow 520ms ease;
}

@keyframes poster-glow {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.012);
    box-shadow: 0 30px 90px rgba(185, 145, 74, 0.3);
  }

  100% {
    transform: scale(1);
  }
}

.poster-preview::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 3;
  border: 1px solid rgba(13, 22, 44, 0.22);
  pointer-events: none;
}

.map-backdrop {
  display: none;
}

.poster-topline {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
}

.live-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #e8e2d2;
  border: 0;
  box-shadow: none;
}

.leaflet-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  filter: saturate(0.72) sepia(0.18) contrast(0.92);
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-container {
  overflow: hidden;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  user-select: none;
}

.leaflet-marker-icon,
.leaflet-marker-shadow {
  display: block;
}

.leaflet-pane > svg {
  width: 100%;
  height: 100%;
}

.leaflet-container {
  background: #e8e2d2;
  font-family: var(--sans);
}

.leaflet-tile-pane {
  opacity: 0.82;
}

.leaflet-overlay-pane {
  z-index: 610;
}

.leaflet-route-pane {
  z-index: 520;
}

.leaflet-marker-pane {
  z-index: 720;
}

.leaflet-pane svg path {
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 rgba(255, 250, 240, 0.95)) drop-shadow(0 -1px 0 rgba(255, 250, 240, 0.75));
}

.photo-marker-icon {
  background: transparent;
  border: 0;
  overflow: visible !important;
  width: 78px !important;
  height: 98px !important;
}

.marker-photo {
  position: relative;
  width: 72px;
  height: 72px;
  padding: 5px;
  background: #fffdf7;
  border: 2px solid var(--night);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(13, 22, 44, 0.24);
  cursor: pointer;
  transform: rotate(-3deg);
  transition: transform 180ms ease, border-color 180ms ease;
}

.marker-photo::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 14px;
  height: 14px;
  background: var(--night);
  border-radius: 50% 50% 50% 0;
  transform: translateX(-50%) rotate(-45deg);
}

.marker-photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 5px;
}

.marker-photo span {
  position: absolute;
  right: -8px;
  top: -8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--paper);
  background: var(--gold);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 900;
}

.photo-marker-icon.is-active .marker-photo {
  border-color: var(--gold);
  transform: rotate(1deg) scale(1.08);
  z-index: 4;
}

.poster-preview.modern .leaflet-map {
  filter: grayscale(1) contrast(1.15) brightness(0.78);
}

.poster-preview.modern .leaflet-tile-pane {
  opacity: 0.62;
}

.poster-preview.modern .marker-photo {
  background: #111827;
  border-color: var(--gold);
}

.poster-preview.watercolor .leaflet-map {
  filter: saturate(0.78) contrast(0.84) brightness(1.04);
}

.poster-preview.modern {
  color: #f8f2e8;
  background: #090d18;
  border-color: #161b28;
}

.poster-preview.modern::before {
  border-color: rgba(255, 250, 240, 0.2);
}

.poster-preview.modern .map-backdrop {
  opacity: 0.44;
  filter: grayscale(1) contrast(1.25) brightness(0.62);
}

.poster-preview.watercolor {
  color: #193040;
  background: #f6f1e7;
  border-color: #fff9ef;
}

.poster-preview.watercolor .map-backdrop {
  opacity: 0.36;
  filter: saturate(0.92) contrast(0.82) brightness(1.08);
}

.process-section {
  background: #f1e7d2;
}

.steps,
.automation-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.steps article,
.automation-flow article,
.json-note {
  padding: 26px;
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.steps span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 24px;
  color: var(--paper);
  background: var(--night);
  border-radius: 50%;
  font-weight: 900;
}

.gift-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 1fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  color: var(--paper);
  background: var(--night);
}

.gift-copy {
  max-width: 640px;
}

.gift-copy h2 {
  color: var(--paper);
}

.gift-copy p:not(.eyebrow) {
  color: rgba(255, 250, 240, 0.78);
}

.gift-section img {
  width: 100%;
  height: min(58vw, 560px);
  object-fit: cover;
  border: 10px solid rgba(255, 250, 240, 0.12);
}

.automation-section {
  background: var(--paper);
}

.automation-flow {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.automation-flow article {
  min-height: 230px;
}

.automation-flow h3,
.steps h3,
.json-note h3 {
  color: var(--night);
}

.json-note {
  margin-top: 18px;
  background: var(--night);
  color: var(--paper);
}

.json-note h3 {
  color: var(--paper);
}

.json-note p {
  max-width: 880px;
  color: rgba(255, 250, 240, 0.78);
}

.json-note pre {
  max-width: 100%;
  margin: 22px 0 0;
  padding: 18px;
  overflow: auto;
  color: #fff7e6;
  background: rgba(255, 250, 240, 0.08);
  border: 1px solid rgba(255, 250, 240, 0.16);
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.55;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 6vw, 84px);
  color: var(--paper);
  background: #080d19;
}

footer span {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
  }

  nav {
    display: none;
  }

  .hero {
    min-height: 82vh;
    padding-top: 104px;
  }

  .builder-grid,
  .gift-section {
    grid-template-columns: 1fr;
  }

  .compact-builder {
    grid-template-columns: minmax(0, 1fr);
  }

  .wizard-panel {
    position: static;
  }

  .steps,
  .automation-flow {
    grid-template-columns: 1fr;
  }

  .poster-preview {
    width: min(100%, 700px);
  }

  .poster-stage {
    width: min(100%, 700px);
  }

}

@media (max-width: 560px) {
  section {
    padding: 72px 18px;
  }

  .hero {
    min-height: 86vh;
    padding: 96px 18px 54px;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.7rem);
  }

  h2 {
    font-size: clamp(2.4rem, 13vw, 3.8rem);
  }

  .creator-panel {
    padding: 18px;
  }

  .poster-preview {
    border-width: 10px;
  }

  .poster-topline {
    font-size: 2.1rem;
  }

  .gift-section img {
    height: 340px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
