:root {
  --bg: #f4f7f2;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #1a1f1c;
  --text-secondary: #526059;
  --text-tertiary: #7a8d85;
  --primary: #3d6356;
  --primary-light: #4f8071;
  --primary-soft: #8fb3a7;
  --primary-bg: rgba(61, 99, 86, 0.08);
  --accent: #436274;
  --warm: #695d40;
  --border: rgba(61, 99, 86, 0.12);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 32px rgba(61, 99, 86, 0.1);
  --shadow-lg: 0 24px 64px rgba(61, 99, 86, 0.12);
  --radius-sm: 0.75rem;
  --radius-md: 1.25rem;
  --radius-lg: 1.75rem;
}

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

html { min-height: 100%; }

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(143, 179, 167, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(67, 98, 116, 0.15) 0%, transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Atmosphere blobs */
.atmosphere {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.4;
}

.atmosphere-1 {
  top: -12rem;
  right: -6rem;
  width: 32rem;
  height: 32rem;
  background: rgba(143, 179, 167, 0.6);
}

.atmosphere-2 {
  bottom: -8rem;
  left: -8rem;
  width: 28rem;
  height: 28rem;
  background: rgba(67, 98, 116, 0.4);
}

.atmosphere-3 {
  top: 40%;
  left: 50%;
  width: 20rem;
  height: 20rem;
  background: rgba(105, 93, 64, 0.15);
}

/* Navigation */
.site-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.nav-brand {
  font-family: "Noto Serif", serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 150ms ease;
}

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

/* Main layout */
.page {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* Buttons */
.btn {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.75rem;
  min-height: 3.25rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 16px rgba(61, 99, 86, 0.25);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 6px 24px rgba(61, 99, 86, 0.3);
}

.btn-ghost {
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  background: var(--surface-solid);
  color: var(--text);
}

.btn-full {
  width: 100%;
}

.link-button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--primary);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  padding: 0;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 3rem;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2rem;
}

.hero-section h1 {
  margin: 0;
  font-family: "Noto Serif", serif;
  font-size: clamp(2.2rem, 4.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-body {
  margin: 1.25rem 0 0;
  max-width: 38ch;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Hero visual / card stack */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card-stack {
  position: relative;
  width: 19rem;
  height: 15.5rem;
}

.preview-card {
  position: absolute;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.preview-card-back {
  top: 0;
  left: 2rem;
  right: 0;
  height: 11.25rem;
  background: linear-gradient(160deg, #eef3ec 0%, #dde8e1 100%);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  align-items: stretch;
}

.preview-summary {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.preview-summary-label {
  color: var(--text-tertiary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.preview-summary strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.preview-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.preview-pill {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.preview-itinerary {
  display: grid;
  gap: 0.45rem;
}

.preview-itinerary span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
}

.preview-itinerary span::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--primary-soft);
  box-shadow: 0 0 0 0.2rem rgba(79, 128, 113, 0.12);
}

.preview-card-front {
  bottom: 0;
  left: 0;
  right: 2rem;
  min-height: 11.5rem;
  background: #f8faf7;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(61, 99, 86, 0.08);
}

.preview-photo {
  position: relative;
  min-height: 6.6rem;
  background:
    linear-gradient(180deg, rgba(253, 196, 211, 0.2) 0%, rgba(253, 196, 211, 0) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 420'%3E%3Cdefs%3E%3ClinearGradient id='sky' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%237fb8df'/%3E%3Cstop offset='56%25' stop-color='%23c9e7f5'/%3E%3Cstop offset='100%25' stop-color='%23fce9ef'/%3E%3C/linearGradient%3E%3ClinearGradient id='ground' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0%25' stop-color='%23518474'/%3E%3Cstop offset='100%25' stop-color='%233e5d4f'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='640' height='420' fill='url(%23sky)'/%3E%3Ccircle cx='470' cy='96' r='36' fill='%23fff3dd'/%3E%3Cpath d='M0 274c82-50 182-64 300-42 70 13 118 14 182 2 53-10 106-31 158-62v248H0V274z' fill='url(%23ground)'/%3E%3Cpath d='M196 270 320 92l118 178H196z' fill='%23f8fbfd'/%3E%3Cpath d='M250 182 320 92l70 90-22 12c-28 14-61 22-96 22-31 0-60-8-85-22l-18-12z' fill='%2390a7b5'/%3E%3Cpath d='M0 312c66-31 130-46 190-46 86 0 154 27 224 27 77 0 139-17 226-63v190H0V312z' fill='%23659280' opacity='.9'/%3E%3Cpath d='M0 338c105-44 180-55 239-38 58 17 93 47 150 47 61 0 111-18 251-79v152H0V338z' fill='%233f5b4d' opacity='.92'/%3E%3Cg fill='%23f8c6d5'%3E%3Ccircle cx='96' cy='122' r='10'/%3E%3Ccircle cx='132' cy='96' r='14'/%3E%3Ccircle cx='160' cy='124' r='11'/%3E%3Ccircle cx='132' cy='142' r='12'/%3E%3Ccircle cx='560' cy='140' r='12'/%3E%3Ccircle cx='594' cy='112' r='14'/%3E%3Ccircle cx='622' cy='144' r='10'/%3E%3Ccircle cx='596' cy='162' r='12'/%3E%3C/g%3E%3Cpath d='M96 122 60 248M132 96 118 248M160 124 176 250M560 140 538 246M594 112 590 244M622 144 640 248' stroke='%236a4d46' stroke-width='8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.preview-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 26, 22, 0.02) 0%, rgba(16, 26, 22, 0.24) 100%);
}

.preview-photo-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 1;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: #5f4a47;
  font-size: 0.72rem;
  font-weight: 800;
}

.preview-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem 1.1rem;
}

.preview-details-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.preview-country {
  color: var(--text);
  font-family: "Noto Serif", serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.preview-score {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-dates {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
}

.preview-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.preview-highlights span {
  padding: 0.28rem 0.52rem;
  border-radius: 999px;
  background: rgba(61, 99, 86, 0.08);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
}

/* ========================================
   FEATURES ROW
   ======================================== */
.features-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding-bottom: 1rem;
}

.feature-card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
}

.feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ========================================
   FRIEND INVITE
   ======================================== */
.invite-section {
  max-width: 28rem;
  margin: 2rem auto;
}

.invite-section[hidden] { display: none; }
.invite-section.is-visible { display: block; }

.invite-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.invite-header {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.invite-avatar {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(61, 99, 86, 0.2);
}

.invite-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invite-avatar-fallback {
  color: #fff;
  font-family: "Noto Serif", serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.invite-sender {
  min-width: 0;
}

.invite-label {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.invite-name {
  margin: 0.15rem 0 0;
  font-family: "Noto Serif", serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-meta {
  margin: 0.2rem 0 0;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-body {
  margin-bottom: 1.5rem;
}

.invite-message {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.invite-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Invite steps */
.invite-steps {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 50%;
}

.step-text strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
}

.step-text p {
  margin: 0.2rem 0 0;
  color: var(--text-tertiary);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* ========================================
   DOWNLOAD SECTION
   ======================================== */
.download-section {
  max-width: 32rem;
  margin: 2rem auto;
  text-align: center;
}

.download-section[hidden] { display: none; }
.download-section.is-visible { display: block; }

.download-hero {
  margin-bottom: 2rem;
}

.download-hero h2 {
  margin: 0;
  font-family: "Noto Serif", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.download-hero p {
  margin: 0.5rem 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.download-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 0.9rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.store-badge:hover {
  transform: translateY(-1px);
}

.store-badge.is-disabled {
  cursor: default;
  pointer-events: none;
}

.store-badge__image {
  display: block;
  height: 3.5rem;
  width: auto;
  max-width: 100%;
}

.download-note {
  margin-top: 1.5rem;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* ========================================
   OPEN APP SECTION
   ======================================== */
.open-section {
  max-width: 30rem;
  margin: 2rem auto;
}

.open-section[hidden] { display: none; }
.open-section.is-visible { display: block; }

.open-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.open-card .hero-eyebrow {
  margin-bottom: 1rem;
}

.open-card h2 {
  margin: 0;
  font-family: "Noto Serif", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.open-body {
  margin: 1rem 0 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* ========================================
   PRIVACY SECTION
   ======================================== */
.privacy-section {
  max-width: 42rem;
  margin: 2rem auto;
}

.privacy-section[hidden] { display: none; }
.privacy-section.is-visible { display: block; }

.privacy-content {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.privacy-content h2 {
  margin: 0 0 0.25rem;
  font-family: "Noto Serif", serif;
  font-size: 1.75rem;
  font-weight: 700;
}

.policy-meta {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 0.88rem;
}

.policy-block {
  margin-top: 1.5rem;
}

.policy-block h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.policy-block p {
  margin: 0.4rem 0 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.policy-list {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.policy-list li + li {
  margin-top: 0.15rem;
}

.policy-block a {
  color: var(--accent);
  font-weight: 700;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 0.82rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .site-nav {
    padding: 1rem 1.25rem;
  }

  .page {
    padding: 0 1.25rem 2rem;
  }

  .hero-section {
    grid-template-columns: 1fr;
    padding: 2rem 0 1.5rem;
    gap: 1.5rem;
  }

  .hero-visual {
    display: flex;
    order: -1;
    justify-content: center;
  }

  .hero-section h1 {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .hero-card-stack {
    width: min(100%, 21rem);
    height: 17rem;
  }

  .preview-card-back {
    left: 1.25rem;
    height: 11.75rem;
    padding: 1rem;
  }

  .preview-card-front {
    right: 1.25rem;
    min-height: 12.4rem;
  }

  .preview-photo {
    min-height: 7.3rem;
  }

  .preview-country {
    font-size: 1.25rem;
  }

  .button-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .feature-card {
    padding: 1.25rem;
  }

  .invite-card {
    padding: 1.5rem;
  }

  .invite-header {
    gap: 0.85rem;
  }

  .invite-avatar {
    width: 3.25rem;
    height: 3.25rem;
  }

  .invite-avatar-fallback {
    font-size: 1.2rem;
  }

  .invite-name {
    font-size: 1.15rem;
  }

  .privacy-content {
    padding: 1.5rem;
  }

  .open-card {
    padding: 1.5rem;
  }

  .download-grid {
    align-items: stretch;
  }

  .store-badge {
    width: 100%;
  }

  .store-badge__image {
    width: min(100%, 12.75rem);
    height: auto;
  }

  .nav-links {
    gap: 1.25rem;
  }
}
