/* ══════════════════════════════════════════════
   Max & Naomi — Styles
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@400;500;600&display=swap');

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

:root {
  --bg: #0B0D1A;
  --bg2: #10132A;
  --card: rgba(255,255,255,.04);
  --card-border: rgba(255,255,255,.08);
  --text: #E8E0F0;
  --text-dim: #8B82A0;
  --accent: #D4889A;
  --accent2: #E8C170;
  --accent3: #B8A9D4;
  --accent4: #7EC8C8;
  --pink: #B06078;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ══ SKY ══ */
.sky {
  position: fixed; inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 70% 20%, #151940 0%, #0B0D1A 60%, #080a14 100%);
}
.stars-layer, .stars-layer-2 {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,.3), transparent),
    radial-gradient(1.5px 1.5px at 50% 10%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,.3), transparent);
  background-size: 200px 200px;
}
.stars-layer-2 {
  background-size: 300px 300px;
  opacity: .5;
}

/* Twinkle stars */
.twinkle-container {
  position: fixed; inset: 0;
  z-index: 0; pointer-events: none;
}
.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  opacity: var(--bright, .5);
}
@keyframes twinkle {
  0%, 100% { opacity: var(--bright, .5); transform: scale(1); }
  50% { opacity: .1; transform: scale(.5); }
}

/* Moon */
.moon {
  position: fixed;
  top: 8%; right: 12%;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f5f0e8 0%, #d4cfc4 80%);
  box-shadow:
    0 0 40px rgba(245,240,232,.2),
    0 0 80px rgba(245,240,232,.1),
    0 0 120px rgba(245,240,232,.05);
  z-index: 1;
}

/* Aurora */
.aurora {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 40vh;
  z-index: 0;
  pointer-events: none;
  opacity: .3;
}
.aurora-band {
  position: absolute;
  width: 200%;
  height: 100%;
  filter: blur(80px);
}
.aurora-band--1 {
  background: linear-gradient(90deg, transparent 0%, rgba(184,169,212,.15) 30%, rgba(126,200,200,.1) 60%, transparent 100%);
  animation: aurora1 25s ease-in-out infinite;
}
.aurora-band--2 {
  background: linear-gradient(90deg, transparent 0%, rgba(212,136,154,.1) 40%, rgba(232,193,112,.08) 70%, transparent 100%);
  animation: aurora2 30s ease-in-out infinite;
  top: 10%;
}
.aurora-band--3 {
  background: linear-gradient(90deg, transparent 0%, rgba(126,200,200,.08) 35%, rgba(184,169,212,.06) 65%, transparent 100%);
  animation: aurora3 35s ease-in-out infinite;
  top: -5%;
}
@keyframes aurora1 { 0%,100%{transform:translateX(-25%)} 50%{transform:translateX(0%)} }
@keyframes aurora2 { 0%,100%{transform:translateX(0%)} 50%{transform:translateX(-30%)} }
@keyframes aurora3 { 0%,100%{transform:translateX(-15%)} 50%{transform:translateX(-5%)} }

/* ══ SHOOTING STARS — all travel forward (left-to-right, top-left to bottom-right) ══ */
.shoot {
  position: fixed;
  width: 120px; height: 1.5px;
  background: linear-gradient(90deg, rgba(255,255,255,.7), transparent);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  border-radius: 2px;
}
.shoot--1 {
  top: 15%; left: -120px;
  transform: rotate(15deg);
  animation: shootFwd1 8s 2s linear infinite;
}
.shoot--2 {
  top: 30%; left: -120px;
  transform: rotate(25deg);
  animation: shootFwd2 12s 5s linear infinite;
}
.shoot--3 {
  top: 10%; left: -120px;
  transform: rotate(10deg);
  animation: shootFwd3 10s 8s linear infinite;
}

@keyframes shootFwd1 {
  0%   { opacity: 0; transform: translate(0, 0) rotate(15deg); }
  2%   { opacity: 1; }
  15%  { opacity: 0; transform: translate(calc(100vw + 200px), 120px) rotate(15deg); }
  100% { opacity: 0; transform: translate(calc(100vw + 200px), 120px) rotate(15deg); }
}
@keyframes shootFwd2 {
  0%   { opacity: 0; transform: translate(0, 0) rotate(25deg); }
  2%   { opacity: 1; }
  12%  { opacity: 0; transform: translate(calc(100vw + 200px), 180px) rotate(25deg); }
  100% { opacity: 0; transform: translate(calc(100vw + 200px), 180px) rotate(25deg); }
}
@keyframes shootFwd3 {
  0%   { opacity: 0; transform: translate(0, 0) rotate(10deg); }
  2%   { opacity: 1; }
  10%  { opacity: 0; transform: translate(calc(100vw + 200px), 80px) rotate(10deg); }
  100% { opacity: 0; transform: translate(calc(100vw + 200px), 80px) rotate(10deg); }
}

/* Fireflies */
.fireflies {
  position: fixed; inset: 0;
  z-index: 1; pointer-events: none;
}
.fly {
  position: absolute;
  border-radius: 50%;
  animation: flyMove var(--dur, 8s) ease-in-out infinite;
  opacity: var(--bright, .3);
}
@keyframes flyMove {
  0%, 100% { transform: translate(0, 0); opacity: var(--bright, .3); }
  25% { transform: translate(var(--tx, 20px), var(--ty, -15px)); opacity: calc(var(--bright, .3) * 1.5); }
  50% { transform: translate(calc(var(--tx, 20px) * -0.5), calc(var(--ty, -15px) * 1.2)); opacity: var(--bright, .3); }
  75% { transform: translate(calc(var(--tx, 20px) * 0.8), calc(var(--ty, -15px) * -0.7)); opacity: calc(var(--bright, .3) * 1.3); }
}

/* ══ NAV ══ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  z-index: 100;
  transition: background .3s, backdrop-filter .3s;
}
.nav.scrolled {
  background: rgba(11,13,26,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: flex; align-items: center; gap: 6px;
}
.nav-logo svg { width: 16px; height: 16px; color: var(--accent); fill: var(--accent); }
.nav-right { display: flex; gap: 20px; }
.nav-right a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: .85rem;
  transition: color .3s;
}
.nav-right a:hover { color: var(--text); }

/* ══ HERO ══ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-flags {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.flag { font-size: 1.6rem; }
.flag-line {
  width: 40px; height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  opacity: .5;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.amp {
  font-style: italic;
  color: var(--accent);
  margin: 0 8px;
}
.tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--accent3);
  opacity: .85;
  margin-bottom: 16px;
}
.desc {
  max-width: 440px;
  color: var(--text-dim);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 28px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: 1px solid var(--card-border);
  border-radius: 40px;
  color: var(--text);
  text-decoration: none;
  font-size: .9rem;
  transition: all .3s;
  background: rgba(255,255,255,.03);
}
.hero-cta:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
}
.hero-cta svg { width: 16px; height: 16px; }

/* ══ SCROLL HINT — properly centered on all screens ══ */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: .4;
  animation: scrollBounce 2.5s ease-in-out infinite;
}
.scroll-hint span {
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.scroll-arrow {
  width: 1px;
  height: 24px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  position: relative;
}
.scroll-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 6px; height: 6px;
  border-right: 1px solid var(--text-dim);
  border-bottom: 1px solid var(--text-dim);
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* Secret star egg */
.secret-star {
  position: absolute;
  top: 12%; right: 18%;
  width: 20px; height: 20px;
  cursor: pointer;
  z-index: 5;
}
.secret-star::before {
  content: '\2726';
  font-size: 10px;
  color: rgba(232,193,112,.4);
  animation: secretPulse 4s ease-in-out infinite;
}
@keyframes secretPulse {
  0%, 100% { opacity: .3; }
  50% { opacity: .7; }
}

/* ══ BOND SECTION ══ */
.bond {
  position: relative;
  z-index: 2;
  padding: 100px 24px 60px;
  max-width: 1000px;
  margin: 0 auto;
}
.section-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s ease;
}
.section-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.bond-header {
  text-align: center;
  margin-bottom: 50px;
}
.bond-label {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 12px;
}
.bond-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 400;
  margin-bottom: 14px;
}
.bond-sub {
  color: var(--text-dim);
  font-size: .95rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}
.secret-word {
  color: var(--accent4);
  cursor: pointer;
  border-bottom: 1px dashed rgba(126,200,200,.3);
  transition: color .3s;
}
.secret-word:hover { color: var(--accent); }

/* Bond Grid */
.bond-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}
.bond-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 28px 24px;
  transition: transform .3s, border-color .3s;
}
.bond-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.12);
}
.bond-emoji {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 12px;
}
.bond-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.bond-card p {
  color: var(--text-dim);
  font-size: .88rem;
  line-height: 1.65;
}

/* ══ DISTANCE RIBBON ══ */
.distance-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 36px 24px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}
.d-stat { text-align: center; min-width: 100px; }
.d-num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  color: var(--accent2);
  cursor: pointer;
}
.d-label {
  font-size: .78rem;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: .05em;
}
.d-divider {
  width: 1px;
  height: 36px;
  background: var(--card-border);
}

/* Bond Quote */
.bond-quote {
  text-align: center;
  padding: 20px 0 40px;
}
.bond-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--text);
  opacity: .8;
  max-width: 520px;
  margin: 0 auto 10px;
  line-height: 1.6;
}
.attr {
  font-size: .8rem;
  color: var(--text-dim);
}

/* ══ ENVELOPE SECTION ══ */
.envelope-section {
  position: relative;
  z-index: 2;
  padding: 80px 24px 100px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.env-label {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 12px;
}
.env-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 8px;
}
.env-hint {
  font-size: .82rem;
  color: var(--text-dim);
  margin-bottom: 36px;
}

/* Envelope */
.env-wrap { cursor: pointer; perspective: 600px; }
.envelope {
  position: relative;
  width: 200px;
  height: 140px;
}
.envelope-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #2a2540 0%, #1e1a35 100%);
  border-radius: 8px;
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.env-icon { width: 32px; height: 32px; color: var(--text-dim); opacity: .5; }
.envelope-flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 70px;
  background: linear-gradient(160deg, #322d50, #252040);
  border-radius: 8px 8px 0 0;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform-origin: top center;
  transition: transform .6s ease;
  z-index: 3;
  border: 1px solid var(--card-border);
}
.envelope-flap.open {
  transform: rotateX(180deg);
}
.seal {
  position: absolute;
  top: 42px;
  left: 50%; transform: translateX(-50%);
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: all .3s;
}
.seal svg { width: 16px; height: 16px; color: #fff; fill: #fff; }
.seal.broken {
  transform: translateX(-50%) scale(.6);
  opacity: 0;
}

/* ══ LETTER OVERLAY ══ */
.letter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}
.letter-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.letter {
  position: relative;
  background: linear-gradient(160deg, #1e1a35 0%, #15122a 100%);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(30px);
  transition: transform .4s ease;
}
.letter-overlay.show .letter {
  transform: translateY(0);
}
.letter-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dim);
  transition: all .3s;
}
.letter-close:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.letter-close svg { width: 16px; height: 16px; }
.letter-from {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--accent);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.letter-from svg { width: 14px; height: 14px; }
.letter h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 18px;
}
.letter p {
  color: var(--text-dim);
  font-size: .92rem;
  line-height: 1.75;
  margin-bottom: 16px;
}
.sign {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sign-sub {
  font-size: .82rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 4px;
}
.letter-deco {
  position: absolute;
  bottom: 20px; right: 24px;
  opacity: .06;
}
.letter-deco svg { width: 60px; height: 60px; }

/* ══ CONFETTI ══ */
#confetti {
  position: fixed;
  inset: 0;
  z-index: 210;
  pointer-events: none;
}

/* ══ EGGS ══ */
.egg-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 180;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.egg-bg.show { opacity: 1; pointer-events: auto; }

.egg {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.9);
  background: linear-gradient(160deg, #1e1a35 0%, #15122a 100%);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 36px 30px;
  max-width: 420px;
  width: calc(100% - 48px);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  text-align: center;
}
.egg.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.egg-x {
  position: absolute;
  top: 14px; right: 14px;
  background: none;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dim);
}
.egg-x svg { width: 14px; height: 14px; }
.egg-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent4);
  margin-bottom: 14px;
}
.egg-tag svg { width: 12px; height: 12px; }
.egg h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.egg-msg {
  color: var(--text-dim);
  font-size: .88rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.egg-sign {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  font-size: .95rem;
}

/* ══ FOOTER ══ */
footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 50px 24px 40px;
  border-top: 1px solid var(--card-border);
}
.footer-flags {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 10px;
}
footer p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.made-with {
  font-size: .78rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.made-with svg { width: 12px; height: 12px; color: var(--accent); fill: var(--accent); }

/* ══ MOBILE RESPONSIVE ══ */
@media (max-width: 768px) {
  .nav { padding: 12px 18px; }
  .nav-right a { font-size: .78rem; }
  .nav-right { gap: 14px; }

  .hero { padding: 0 20px; }
  .hero h1 { font-size: clamp(2.4rem, 10vw, 3.5rem); }

  .bond { padding: 60px 18px 40px; }
  .bond-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .distance-ribbon {
    flex-direction: column;
    gap: 20px;
    padding: 28px 18px;
  }
  .d-divider { display: none; }

  .envelope-section { padding: 60px 18px 80px; }

  .letter { padding: 30px 22px; }
  .letter h3 { font-size: 1.3rem; }

  .egg { padding: 28px 22px; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 2.2rem; }
  .flag { font-size: 1.3rem; }
  .nav-logo { font-size: 1rem; }
}

/* ══ SCROLLBAR ══ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

/* ══ SELECTION ══ */
::selection { background: rgba(212,136,154,.3); color: #fff; }
