/* Nightsky Prints — mobile-first, black & white */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:  #000;
  --white:  #fff;
  --mid:    #777;
  --dim:    #3a3a3a;
  --border: rgba(255,255,255,0.1);
  --r: 6px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { font-size: 16px; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* ── Nav ──────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  font-weight: 400;
  opacity: 0.85;
}

/* ── Flash ────────────────────────────── */
.flash {
  text-align: center;
  padding: 0.6rem 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  color: var(--mid);
}

/* ── Shell ────────────────────────────── */
main   { flex: 1; }
.footer {
  text-align: center;
  padding: 2rem 1.5rem calc(2rem + var(--safe-bottom));
  color: var(--dim);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════
   GIFT GATE
══════════════════════════════════════ */
.gift-gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.gift-gate--out {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.gift-star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: gift-twinkle var(--dur, 3s) var(--del, 0s) infinite alternate ease-in-out;
}
@keyframes gift-twinkle {
  from { opacity: var(--lo, 0.05); }
  to   { opacity: var(--hi, 0.6);  }
}

.gift-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 2.5rem;
  gap: 1rem;
  max-width: 480px;
}

.gift-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  font-weight: 400;
}

.gift-names {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.4rem, 9vw, 4.2rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
}

.gift-divider {
  width: 36px;
  height: 1px;
  background: rgba(255,255,255,0.18);
  margin: 0.2rem 0;
}

.gift-message {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
}

.gift-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
  font-weight: 300;
}

.gift-btn {
  margin-top: 0.8rem;
  padding: 0.85rem 2.6rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 100px;
  color: rgba(255,255,255,0.65);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.gift-btn:hover, .gift-btn:focus {
  border-color: rgba(255,255,255,0.55);
  color: #fff;
  outline: none;
}
.gift-btn:active { opacity: 0.6; }

/* Show page starts hidden when gate is present */
.show-page--gated {
  opacity: 0;
  transition: opacity 1s ease;
}
.show-page--revealed {
  opacity: 1;
}

/* ══════════════════════════════════════
   SUCCESS BANNER
══════════════════════════════════════ */
.success-banner {
  width: 100%;
  max-width: 440px;
  text-align: center;
  margin-bottom: 2rem;
}
.success-eyebrow {
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.5rem;
}
.success-headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}
.success-sub {
  font-size: 0.78rem;
  color: var(--mid);
  letter-spacing: 0.06em;
}

/* ══════════════════════════════════════
   SHOW PAGE  — the shared experience
══════════════════════════════════════ */
.show-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100dvh - 52px);
  min-height: calc(100vh  - 52px);
  padding: 2rem 1.25rem calc(2.5rem + var(--safe-bottom));
}

/* The poster card — white, floats on black */
.poster-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  /* Premium shadow that makes it feel physical */
  box-shadow:
    0  2px  8px  rgba(0,0,0,0.35),
    0  8px  24px rgba(0,0,0,0.4),
    0 20px  60px rgba(0,0,0,0.5);
}
.poster-card svg { display: block; width: 100%; height: auto; }

/* Actions bar below poster */
.show-actions {
  width: 100%;
  max-width: 440px;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.btn-download {
  display: block;
  width: 100%;
  padding: 0.9rem;
  background: var(--white);
  color: var(--black);
  border: none;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-secondary {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: transparent;
  color: var(--mid);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-secondary:active { opacity: 0.6; }

.expires-note {
  margin-top: 1.2rem;
  text-align: center;
  color: rgba(255,255,255,0.2);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.qr-details {
  width: 100%;
}
.qr-details summary {
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.qr-details summary::-webkit-details-marker { display: none; }

.qr-panel {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.qr-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
}
.qr-code {
  background: var(--white);
  border-radius: 4px;
  padding: 0.75rem;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-code svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ══════════════════════════════════════
   PREVIEW PAGE
══════════════════════════════════════ */
.preview-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.25rem calc(2rem + var(--safe-bottom));
  gap: 1.5rem;
}

.preview-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,0.5);
}
.preview-card svg { display: block; width: 100%; height: auto; }

.preview-label {
  text-align: center;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: -0.5rem;
}

/* Purchase panel */
.buy-panel {
  width: 100%;
  max-width: 440px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 1.5rem;
}

.buy-panel .price-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}
.buy-panel .price-amount {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: -0.02em;
}
.buy-panel .price-note {
  font-size: 0.7rem;
  color: var(--mid);
  letter-spacing: 0.06em;
}

.feature-list {
  list-style: none;
  margin-bottom: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.feature-list li {
  padding: 0.55rem 0;
  font-size: 0.78rem;
  color: var(--mid);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  letter-spacing: 0.02em;
}

.btn-purchase {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--white);
  color: var(--black);
  border: none;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-purchase:active { opacity: 0.85; }

.secure-note {
  text-align: center;
  color: rgba(255,255,255,0.2);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.7rem;
}

.edit-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  color: rgba(255,255,255,0.25);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.edit-link:active { opacity: 0.5; }

/* ══════════════════════════════════════
   NEW / FORM PAGE
══════════════════════════════════════ */
.form-page {
  padding: 2.5rem 1.25rem calc(2rem + var(--safe-bottom));
  max-width: 480px;
  margin: 0 auto;
}

.form-head {
  margin-bottom: 2.5rem;
}
.form-head .eyebrow {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.8rem;
}
.form-head h1 {
  font-size: clamp(1.55rem, 5vw, 2.2rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--white);
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.form-head p {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--mid);
  line-height: 1.65;
}

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.4rem;
}
.field input,
.field textarea {
  width: 100%;
  background: #111;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--r);
  padding: 0.75rem 0.9rem;
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;        /* 1rem prevents iOS zoom on focus */
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.38);
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(120,120,120,0.7); }
.field .hint { color: var(--dim); font-size: 0.7rem; margin-top: 0.3rem; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.geo-btn {
  display: block;
  width: 100%;
  margin: -0.2rem 0 1rem;
  padding: 0.55rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r);
  color: rgba(255,255,255,0.28);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.geo-btn:active { opacity: 0.5; }

.submit-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  margin-top: 0.8rem;
  background: var(--white);
  color: var(--black);
  border: none;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.submit-btn:active { opacity: 0.85; }

.error-box {
  background: rgba(255,50,50,0.07);
  border: 1px solid rgba(255,50,50,0.2);
  border-radius: var(--r);
  padding: 0.85rem 1rem;
  margin-bottom: 1.3rem;
  color: #e05050;
  font-size: 0.8rem;
}
.error-box ul { padding-left: 1rem; }

/* ══════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════ */

/* ── Hero ─────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding: 3.5rem 1.5rem 4rem;
  border-bottom: 1px solid var(--border);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-eyebrow {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.2rem;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

.hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 8vw, 3.8rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1.2rem;
}

.hero h1 em {
  font-style: italic;
  font-weight: 300;
}

.hero-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: 2rem;
  font-weight: 300;
}

.btn-hero {
  display: block;
  width: 100%;
  padding: 1rem 2.2rem;
  background: var(--white);
  color: var(--black);
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.btn-hero:active { opacity: 0.85; }

.hero-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-map-card {
  width: 100%;
  max-width: 300px;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0  4px 16px rgba(0,0,0,0.4),
    0 16px 48px rgba(0,0,0,0.55),
    0 32px 80px rgba(0,0,0,0.5);
}
.hero-map-card svg { display: block; width: 100%; height: auto; }

.hero-map-caption {
  margin-top: 1rem;
  font-size: 0.62rem;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.14em;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  text-transform: uppercase;
}

/* ── How it works ─────────────────────── */
.how-section {
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how-section-label {
  text-align: center;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 3rem;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 680px;
  margin: 0 auto;
}

.step {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 1.2rem;
  align-items: start;
}

.step-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 300;
  color: rgba(255,255,255,0.15);
  line-height: 1;
  padding-top: 0.1rem;
}

.step-body h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.step-body p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.65;
  font-weight: 300;
}

/* ── Create form section ──────────────── */
.create-section {
  padding: 4rem 1.25rem calc(3rem + var(--safe-bottom));
  max-width: 480px;
  margin: 0 auto;
}

.create-section-label {
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.8rem;
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

.create-section h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 2rem;
}

/* ── Desktop refinements ──────────────── */
@media (min-width: 600px) {
  .show-page, .preview-page { padding-top: 3rem; }
  .buy-panel { border-radius: 10px; }
  .preview-page { flex-direction: row; align-items: flex-start; justify-content: center; gap: 2rem; }
  .preview-page .preview-card, .preview-page .buy-panel { max-width: 360px; }
  .preview-page .buy-panel { position: sticky; top: 2rem; }

  /* Landing page desktop */
  .btn-hero { display: inline-block; width: auto; }

  .hero {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    padding: 5rem 4rem 5rem;
    max-width: 1100px;
    margin: 0 auto;
  }
  .hero h1 { font-size: clamp(2.8rem, 4vw, 4.2rem); }
  .hero-map-card { max-width: 100%; }
  .how-section { padding: 5rem 4rem; }
  .create-section { padding: 5rem 4rem calc(4rem + var(--safe-bottom)); }

  .steps {
    flex-direction: row;
    gap: 0;
  }
  .step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 2rem;
    border-left: 1px solid var(--border);
    grid-template-columns: unset;
  }
  .step:first-child { border-left: none; padding-left: 0; }
  .step-num {
    font-size: 2.4rem;
    margin-bottom: 1rem;
  }
  .step-body h3 { font-size: 1.45rem; }
}
