:root {
  --brand-red: #e31e24;
  --brand-red-800: #b31217;
  --dark-900: #0f0f12;
  --dark-800: #151518;
  --dark-700: #1b1b20;
  --text: #ffffff;
  --muted: #b5b7c0;
  --accent: #3dd2ff;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--dark-900);
}
/* Prevent horizontal scroll on mobile */
html, body { width: 100%; overflow-x: hidden; overscroll-behavior-x: none; }

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

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  overflow-wrap: anywhere;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  backdrop-filter: saturate(120%) blur(8px);
  background: linear-gradient(0deg, rgba(20,20,24,.7), rgba(20,20,24,.7));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; letter-spacing: .3px; color: #fff; text-decoration: none; font-size: 20px; }
.logo span { color: var(--brand-red); }
.nav-toggle { display: none; background: none; color: #fff; border: none; font-size: 22px; }
.main-nav ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.main-nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; opacity: .9; }
.main-nav a:hover { opacity: 1; }
.main-nav .cta { padding: 10px 14px; background: var(--brand-red); border-radius: 8px; }

/* Sections */
.section { padding: 80px 0; }
.section.red { background:
  linear-gradient(180deg, var(--brand-red) 0%, var(--brand-red-800) 100%);
}
/* Hero with local background image overlay */
#hero.section.red {
  background-image:
    linear-gradient(180deg, rgba(227,30,36,0.85) 0%, rgba(179,18,23,0.85) 100%),
    url('../img/hero-bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Enlarge hero height and center content */
#hero {
  min-height: 560px;
  padding: 120px 0 140px;
  display: grid;
  place-items: center;
}
.section.dark { background: var(--dark-800); }
.sub { color: var(--muted); margin-top: -8px; }
.lead { color: #fff; opacity: .9; max-width: 760px; }
h1 { font-size: 40px; line-height: 1.1; margin: 0 0 14px; }
h2 { font-size: 30px; line-height: 1.2; margin: 0 0 14px; }
h3 { font-size: 18px; margin: 0 0 8px; }
p { color: #eaeaf0; }

/* Fluid type for mobile scaling */
h1 { font-size: clamp(28px, 5vw, 40px); }
h2 { font-size: clamp(22px, 3.6vw, 30px); }
h3 { font-size: clamp(16px, 2.6vw, 18px); }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 1px solid rgba(255,255,255,.18); }
.btn-light { background: #fff; color: #111; border-color: #fff; }
.btn-outline { color: #fff; background: transparent; }
.btn:hover { transform: translateY(-1px); transition: .2s ease; }
.btn { min-height: 44px; touch-action: manipulation; }

.hero-inner { text-align: center; max-width: 900px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }

/* Desktop-specific hero centering and sizing tweaks */
@media (min-width: 981px) {
  #hero .hero-inner { display: flex; flex-direction: column; align-items: center; }
  #hero h1 { font-size: 40px; line-height: 1.12; }
  #hero .lead { font-size: 18px; max-width: 800px; }
  .hero-actions .btn { padding: 14px 22px; }
}

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.feature-card { background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.12); padding: 24px; border-radius: 16px; }
.feature-card .icon { font-size: 24px; margin-bottom: 8px; }

/* Two columns */
.two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 24px; align-items: center; }
.mockup {
  border-radius: 24px;
  overflow: hidden;
}
.mockup.phone {
  height: 320px; border: 1px dashed rgba(255,255,255,.18);
  background:
    radial-gradient(120px 80px at 20% 20%, rgba(255,255,255,.16), transparent),
    radial-gradient(160px 120px at 80% 80%, rgba(255,255,255,.12), transparent),
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.2));
}

.list { padding-left: 16px; }
.list li { margin-bottom: 8px; }
.checklist { padding-left: 0; list-style: none; }
.checklist li::before { content: "✓"; color: var(--accent); margin-right: 8px; }
.checklist li { margin: 8px 0; }

.grid-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; }
.grid-list li { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: 16px; border-radius: 12px; }

.numbered { counter-reset: step; list-style: none; padding: 0; }
.numbered li { position: relative; padding-left: 40px; margin: 10px 0; }
.numbered li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: #fff; color: #000; font-weight: 800; }

.panel-note { background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 18px; }
.note { color: #fff; opacity: .9; }
.image-placeholder {
  height: 320px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
}
.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* Contact form styles */
.contact-form {
  margin-top: 24px;
  display: grid;
  gap: 18px;
  max-width: 600px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 2px rgba(227, 30, 36, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted);
}

.contact-form button {
  align-self: flex-start;
  margin-top: 8px;
}

.meet { text-align: center; }

/* Meet section: city grid */
#meet .city-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
#meet .city-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; overflow: hidden; }
#meet .city-thumb { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid rgba(255,255,255,.12); }
#meet .city-content { padding: 14px 16px 18px; }
#meet .city-content h3 { font-size: 20px; color: #fff; margin: 0 0 6px; }
#meet .city-content p { font-size: 15px; color: #f0f0f0; }

/* Stories */
.stories-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.story-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); padding: 18px; border-radius: 16px; }

/* FAQs */
.faq-list { display: grid; gap: 12px; }
.faq-item { background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; overflow: hidden; }
.faq-question { width: 100%; text-align: left; padding: 14px 16px; background: transparent; border: 0; color: #fff; font-weight: 700; cursor: pointer; }
.faq-answer { display: none; padding: 0 16px 14px; color: #eaeaf0; }
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-question { background: rgba(255,255,255,.06); }

/* App Store buttons */
.store-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.store { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 12px; text-decoration: none; font-weight: 700; }
.store.ios { background: #fff; color: #000; }
.store.android { background: #34a853; color: #fff; }

/* App section layout improvements */
.app { align-items: center; gap: 32px; }
.app-visual { margin: 0; max-width: 560px; justify-self: center; }
.app-visual img { width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.section.dark#app { padding-bottom: 96px; }
.section.dark#app .store-buttons { margin-top: 16px; }
.section.dark#app p:last-of-type { margin-bottom: 0; }

/* Anchor offset for sticky header */
.section[id] { scroll-margin-top: 72px; }

/* Footer */
.site-footer { background: var(--dark-700); padding: 30px 0; border-top: 1px solid rgba(255,255,255,.1); padding-bottom: calc(30px + var(--safe-bottom)); }
.footer-inner { display: block; }
.footer-inner .brand { font-weight: 800; }
.footer-inner .brand span { color: var(--brand-red); }
/* Footer groups */
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 24px; align-items: start; }
.footer-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.footer-group h4 { margin: 0 0 8px; font-size: 14px; font-weight: 800; color: #fff; opacity: .85; }
.footer-group ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-group a { color: #fff; text-decoration: none; opacity: .9; }
.footer-group a:hover { opacity: 1; }
.footer-bottom { margin-top: 16px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; text-align: center; }

/* Responsive */
@media (max-width: 980px) {
  .nav-toggle { display: inline-block; }
  /* Mobile/Tablet overlay menu (animated) */
  .main-nav {
    position: fixed; right: 0; left: 0;
    top: calc(64px + var(--safe-top));
    height: calc(100dvh - (64px + var(--safe-top)));
    z-index: 2000;
    background: var(--dark-800);
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 10px 24px rgba(0,0,0,.35);
    overflow: auto; -webkit-overflow-scrolling: touch;
    padding: 12px 20px calc(16px + var(--safe-bottom));
    /* hidden state */
    visibility: hidden; opacity: 0; transform: translateY(-16px);
    pointer-events: none;
    will-change: transform, opacity;
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  .main-nav.open {
    visibility: visible; opacity: 1; transform: translateY(0);
    pointer-events: auto;
    transition: opacity .25s ease, transform .25s ease;
  }
  .main-nav ul { flex-direction: column; }
  .main-nav .cta { display: inline-flex; width: 100%; justify-content: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .app { gap: 18px; }
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #meet .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .container { padding: 0 24px; }
  .features-grid { grid-template-columns: minmax(0, 1fr); }
  .stories-grid { grid-template-columns: minmax(0, 1fr); }
  #meet .city-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-actions { flex-direction: column; align-items: center; }
  .app-visual { max-width: 100%; }
  #hero { min-height: 480px; padding: 96px 0 112px; }
  .footer-groups { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
