/* ============================================================
   meliora travel — melioratravel.app
   Design tokens from constants/theme.ts (summerColors)
   Wordmark spec from app/login.tsx (logoText style)
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── Design Tokens ── */
:root {
  --bg:           #F8FAFC;
  --bg-tint:      #F1F5F9;
  --amber:        #D97706;
  --amber-hover:  #B45309;
  --amber-soft:   rgba(217, 119, 6, 0.10);
  --blue:         #0284C7;
  --blue-soft:    rgba(2, 132, 199, 0.08);
  --dark:         #1E293B;
  --muted:        #64748B;
  --white:        #FFFFFF;
  --border:       rgba(15, 23, 42, 0.09);

  /* login.tsx logoText */
  --wordmark-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --wordmark-weight: 300;
  --wordmark-spacing: 0.12em;
  --wordmark-color: #1C1917;

  /* app theme fonts */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-pill: 999px;

  --shadow-card:  0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-phone: 0 0 0 1px rgba(0,0,0,0.15), 0 30px 80px rgba(0,0,0,0.22), 0 8px 24px rgba(0,0,0,0.12);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: var(--amber);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.38);
}

.logo-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  /* logo-glyph.png is white on transparent — perfect on amber */
}

.logo-wordmark {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-name {
  font-family: var(--wordmark-family);
  font-weight: var(--wordmark-weight);
  letter-spacing: var(--wordmark-spacing);
  color: var(--wordmark-color);
  font-size: 20px;
  line-height: 1.1;
}

.logo-sub {
  font-family: var(--wordmark-family);
  font-weight: var(--wordmark-weight);
  letter-spacing: var(--wordmark-spacing);
  color: var(--amber);
  font-size: 13px;
  line-height: 1.2;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--muted);
}

.nav-links a {
  transition: color 0.15s;
}

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

.nav-dot { color: var(--border); font-size: 18px; line-height: 1; }

/* App Store badge — standard 2-line Apple format */
.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000000;
  color: #ffffff;
  border-radius: 10px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
  text-decoration: none;
}

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

.app-store-badge svg { flex-shrink: 0; }

.badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}

.badge-line1 {
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #ffffff;
}

.badge-line2 {
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  min-height: auto;
  display: flex;
  align-items: center;
}

/* Ambient gradient orbs */
.hero::before {
  content: '';
  position: absolute;
  top: -160px;
  left: -160px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(217,119,6,0.13) 0%, transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -160px;
  right: -160px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(2,132,199,0.10) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px 32px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
  position: relative;
  z-index: 1;
}

/* Hero content */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber);
  color: var(--white);
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 62px);
  font-weight: 700;
  line-height: 1.08;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 460px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(217,119,6,0.30);
}

.btn-primary:hover {
  background: var(--amber-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217,119,6,0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--dark);
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--white);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-card);
}

.btn-outline:hover {
  border-color: var(--dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

/* ── Phone Frames ── */
.hero-phones {
  position: relative;
  /* Width = two phone frames (248px each) minus ~90px overlap + rotation padding */
  width: 420px;
  height: 580px;
  flex-shrink: 0;
  margin-left: auto;
}

.phone {
  position: absolute;
}

/* Back phone: behind and to the right, overlapping the front phone */
.phone-back {
  top: 50px;
  left: 158px; /* 248 - 90px overlap = 158 */
  z-index: 1;
  transform: rotate(6deg) scale(0.93);
  opacity: 0.78;
  filter: blur(0.4px);
}

/* Front phone: primary, slight counter-tilt, anchored left */
.phone-front {
  top: 0;
  left: 0;
  z-index: 2;
  transform: rotate(-3deg);
}

.phone-frame {
  width: 248px;
  background: #111111;
  border-radius: 48px;
  padding: 14px;
  box-shadow: var(--shadow-phone);
  position: relative;
  /* subtle edge highlight */
  outline: 1.5px solid rgba(255,255,255,0.06);
}

/* Dynamic island */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 28px;
  background: #000000;
  border-radius: 20px;
  z-index: 10;
}

/* Side buttons (decorative) */
.phone-frame::after {
  content: '';
  position: absolute;
  top: 80px;
  right: -3px;
  width: 3px;
  height: 60px;
  background: #2a2a2a;
  border-radius: 2px;
}

.phone-screen {
  border-radius: 36px;
  overflow: hidden;
  background: #F8FAFC;
  /* account for dynamic island space */
  padding-top: 22px;
}

.phone-screen img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

/* ============================================================
   FEATURE CHIPS & EXPANDABLE DRAWER
   ============================================================ */
.chips-section {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 32px 28px;
}

.chips-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  user-select: none;
}

.chip:hover {
  background: var(--white);
  border-color: var(--amber);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.16);
}

.chip.active {
  background: var(--amber);
  color: var(--white);
  border-color: var(--amber);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35);
  transform: translateY(-1px);
}

/* Expandable feature drawer */
.feature-drawer {
  max-width: 840px;
  margin: 22px auto 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
  display: none;
}

.feature-drawer.is-open {
  display: block;
  animation: drawerAppear 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawerAppear {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.feature-drawer-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--amber);
  text-transform: uppercase;
}

.feature-drawer-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.feature-drawer-close:hover {
  color: var(--dark);
  background: rgba(0, 0, 0, 0.05);
}

.feature-drawer-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.feature-drawer-body p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 10px;
}

.feature-drawer-body p:last-child {
  margin-bottom: 0;
}

.feature-drawer-body strong {
  color: var(--dark);
  font-weight: 600;
}

/* ============================================================
   PAGE HEADER (for inner pages)
   ============================================================ */
.page-hero {
  padding: 80px 32px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(217,119,6,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.page-tag {
  display: inline-flex;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: 16px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.page-sub {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ============================================================
   CONTENT SECTIONS (for Privacy & Support pages)
   ============================================================ */
.content-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

.content-section h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}

.content-section h2:first-child { margin-top: 0; }

.content-section p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 12px;
}

.content-section a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-section ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.content-section ul li {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
}

.content-section ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 600;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}

.faq-item .faq-q {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.faq-item .faq-a {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

/* Support contact card */
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 48px;
}

.contact-icon {
  width: 52px;
  height: 52px;
  background: var(--amber-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.contact-info .contact-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.contact-info .contact-email {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--amber);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-domain {
  font-family: var(--wordmark-family);
  font-weight: var(--wordmark-weight);
  letter-spacing: var(--wordmark-spacing);
  font-size: 13px;
  color: var(--muted);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-link {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  transition: color 0.15s;
}

.footer-link:hover { color: var(--dark); }

.footer-copy {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--border);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px 24px 24px;
    gap: 36px;
  }

  .hero-ctas { justify-content: center; }
  .hero-sub { margin: 0 auto; }
  .hero-badge { margin: 0 auto; }

  .hero-phones {
    height: 420px;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
  }

  .phone-frame { width: 200px; }
  .phone-back { right: 0; top: 30px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-inner { padding: 0 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .chips-section { padding: 20px 16px 24px; }
  .chips-inner { gap: 8px; }
  .chip { font-size: 13px; padding: 8px 14px; }
  .feature-drawer { padding: 18px 18px; margin-top: 16px; }
  .feature-drawer-title { font-size: 18px; }
  .content-section { padding: 0 20px 60px; }
  .page-hero { padding: 48px 20px 36px; }
}
