/* ==========================================================================
   Happy Parking — Landing Page Styles
   ========================================================================== */

:root {
  --primary: #4388D3;
  --primary-dark: #10437D;
  --primary-mid: #2876C2;
  --text-dark: #1B212D;
  --text-grey: #78828A;
  --text-light-grey: #94A3B8;
  --border-grey: #E2E8F0;
  --bg-light: #F8FAFC;
  --bg-alt: #ECF3FA;
  --pink: #D53F8C;
  --white: #FFFFFF;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgba(16, 67, 125, 0.08);
  --shadow-md: 0 12px 32px rgba(16, 67, 125, 0.14);
  --container: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; }

button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 999;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border-grey);
  box-shadow: 0 2px 12px rgba(16, 67, 125, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-weight: 500;
  color: var(--text-grey);
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--primary); }

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--primary-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  margin: 0 auto;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(160deg, var(--primary-mid) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--bg-alt);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.eyebrow-light {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 20px;
  font-weight: 800;
}

.hero-sub {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 560px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-primary.btn-light {
  background: var(--primary);
  color: #fff;
}
.btn-primary.btn-light:hover { background: var(--primary-dark); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.9rem; font-weight: 800; }
.stat span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.75); }

/* ===== Hero visual / phone mockup ===== */
.hero-visual { position: relative; display: flex; justify-content: center; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.35;
  z-index: 0;
}
.blob-1 { width: 220px; height: 220px; background: #7CC0FF; top: -40px; right: 0; }
.blob-2 { width: 160px; height: 160px; background: #FFD166; bottom: -20px; left: 10px; }

.phone-mockup {
  position: relative;
  z-index: 1;
  width: 280px;
  height: 560px;
  background: #0c1a2e;
  border-radius: 42px;
  padding: 14px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  animation: floaty 6s ease-in-out infinite;
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 20px;
  background: #0c1a2e;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-screen {
  height: 100%;
  width: 100%;
  background: var(--bg-light);
  border-radius: 30px;
  padding: 34px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
.mock-topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.mock-pill { flex: 1; height: 10px; border-radius: 999px; background: var(--border-grey); }

.mock-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(16, 67, 125, 0.08);
}
.mock-card-map {
  height: 150px;
  background: linear-gradient(135deg, var(--bg-alt), #B9D6F5);
  position: relative;
}
.mock-pin {
  position: absolute;
  width: 16px; height: 16px;
  background: var(--pink);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  top: 40%; left: 30%;
}
.mock-pin-alt { background: var(--primary); top: 55%; left: 60%; }

.mock-row { display: flex; align-items: center; gap: 10px; }
.mock-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--bg-alt); flex-shrink: 0; }
.mock-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.mock-lines span { display: block; height: 8px; border-radius: 999px; background: var(--border-grey); }
.mock-lines span.short { width: 60%; }

.mock-card-btn {
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  background: var(--primary);
  padding: 12px;
}
.mock-card-btn-alt { background: var(--pink); }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ===== Trust bar ===== */
.trust-bar { background: var(--bg-light); padding: 28px 0; border-bottom: 1px solid var(--border-grey); }
.trust-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
.trust-item strong { display: block; font-size: 1.1rem; color: var(--primary-dark); }
.trust-item span { font-size: 0.85rem; color: var(--text-grey); }

/* ===== Generic section ===== */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-light); }

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 14px; font-weight: 800; }
.section-head p { color: var(--text-grey); margin: 0; font-size: 1.02rem; }

/* ===== Features ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border-grey);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.feature-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  margin-bottom: 20px;
}

.feature-card h3 { margin: 0 0 10px; font-size: 1.15rem; font-weight: 700; }
.feature-card p { margin: 0; color: var(--text-grey); font-size: 0.95rem; }

/* ===== Tabs (How it works) ===== */
.tabs { max-width: 760px; margin: 0 auto; }

.tab-list {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  background: #fff;
  border: 1px solid var(--border-grey);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--text-grey);
  transition: all 0.2s ease;
}
.tab-btn.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeIn 0.35s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.steps { list-style: none; display: flex; flex-direction: column; gap: 28px; }
.steps li { display: flex; gap: 20px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.steps h4 { margin: 6px 0 6px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--text-grey); }

/* ===== Security ===== */
.security-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.security-grid .lead { font-size: 1.05rem; color: var(--text-grey); margin: 0 0 24px; }

.check-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--text-dark);
  font-weight: 500;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 13l4 4L19 7" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/14px no-repeat;
}

.security-visual { display: flex; justify-content: center; }
.shield {
  width: 200px; height: 200px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* ===== FAQ ===== */
.faq-container { max-width: 720px; }

.accordion-item {
  border-bottom: 1px solid var(--border-grey);
}
.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: 22px 4px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
  text-align: left;
}
.accordion-trigger .chev { transition: transform 0.25s ease; flex-shrink: 0; color: var(--primary); }
.accordion-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.accordion-panel p { margin: 0 0 20px; color: var(--text-grey); padding-right: 24px; }

/* ===== Download ===== */
.download {
  background: linear-gradient(160deg, var(--primary-mid) 0%, var(--primary-dark) 100%);
  color: #fff;
}
.download-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.download h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 14px; font-weight: 800; }
.download p { color: rgba(255, 255, 255, 0.85); margin: 0 0 28px; max-width: 480px; }

.store-badges { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
.store-badge {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.store-badge:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.store-badge span { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.store-badge small { font-size: 0.68rem; opacity: 0.8; }
.store-badge strong { font-size: 0.95rem; }

.waitlist-form { display: flex; gap: 10px; max-width: 420px; flex-wrap: wrap; }
.waitlist-form input {
  flex: 1;
  min-width: 200px;
  padding: 14px 18px;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-size: 0.95rem;
}
.waitlist-form input:focus { outline: 3px solid rgba(255, 255, 255, 0.5); }

.form-status { margin-top: 12px; font-size: 0.9rem; min-height: 1.2em; }
.form-status.is-success { color: #B7F7C7; }
.form-status.is-error { color: #FFC2C2; }

.download-visual { display: flex; justify-content: center; }
.qr-card {
  background: #fff;
  color: var(--text-dark);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  width: 200px;
  box-shadow: var(--shadow-md);
}
.qr-card img { margin: 0 auto 14px; }
.qr-card p { margin: 0; font-size: 0.85rem; color: var(--text-grey); }

/* ===== Footer ===== */
.site-footer { background: #0F1B2D; color: rgba(255, 255, 255, 0.75); padding: 64px 0 24px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand .brand { color: #fff; margin-bottom: 10px; }
.footer-brand p { font-size: 0.9rem; max-width: 260px; }
.footer-col h5 { color: #fff; margin: 0 0 16px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; }
.footer-col a { display: block; font-size: 0.92rem; margin-bottom: 12px; transition: color 0.2s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom { padding-top: 24px; font-size: 0.85rem; }

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 90;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); }

/* ===== Animate-on-scroll ===== */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 24px; }
  .phone-mockup { width: 220px; height: 440px; }
  .security-grid { grid-template-columns: 1fr; }
  .security-visual { order: -1; }
  .download-inner { grid-template-columns: 1fr; }
  .download-visual { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    box-shadow: 0 12px 24px rgba(16, 67, 125, 0.1);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s ease;
  }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-link { padding: 14px 0; border-bottom: 1px solid var(--border-grey); }
  .nav-cta { text-align: center; margin-top: 14px; }
  .nav-toggle { display: flex; }

  .trust-inner { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .footer-inner { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
}

@media (max-width: 480px) {
  .hero { padding: 64px 0 72px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .waitlist-form { flex-direction: column; }
  .store-badges { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone-mockup { animation: none; }
  [data-animate] { opacity: 1; transform: none; transition: none; }
}
