:root {
  --bg: #ffffff;
  --fg: #111;
  --subtle: #555;
  --accent: #007aff;
  --radius: 18px;
  --max-width: 900px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

.setting img {
  cursor: pointer;
}

/* NAVBAR */
.app-navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #eee;
  z-index: 1000;
  transition: padding 0.25s ease, background 0.25s ease;
  padding: 1rem 0;
}

.app-navbar.shrink {
  padding: 0.4rem 0;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: block;
  max-height: 100px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--fg);
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-links a.active {
  color: #007aff;
  font-weight: 600;
}

/* MOBILE */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 700px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-left: 1px solid #eee;
    border-bottom: 1px solid #eee;
    width: 200px;
    flex-direction: column;
    padding: 1rem;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }
}

/* HERO */
.hero {
  padding: 7rem 1.5rem 5.5rem;
  text-align: center;
  background: linear-gradient(180deg, #f7f9ff 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Headline */
.hero h1 {
  font-size: clamp(2.6rem, 5.2vw, 3.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.022em;
  margin-bottom: 1.4rem;
  color: #111;
  text-wrap: balance;

  /* Crisp Apple-like rendering */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subheadline */
.hero p {
  font-size: 1.28rem;
  color: #4a4a4a;
  max-width: 640px;
  margin: 0.75rem auto 2.4rem;
  line-height: 1.45;
}


.cta {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
}

/* INLINE PHOTO */
.photo-break img {
  width: 100%;
  max-width: 900px;
  display: block;
  margin: 3rem auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.photo-divider {
  position: relative;
  width: 100%;
  height: 55vh;
  background: url('images/dashcam_road.jpg') center center/cover no-repeat;
  margin: 4rem 0;
  border-radius: 24px;
  overflow: hidden;
}

.photo-divider-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-divider-overlay h2 {
  color: white;
  font-size: 2.2rem;
  font-weight: 600;
  text-align: center;
  padding: 0 1rem;
}


/* Video Break */
.video-divider {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 1.5rem; /* whitespace on sides */
}

/* Let the video define the height */
.video-wrapper {
  position: relative;
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: #000; /* fallback */
}

/* Video fills width, height adjusts automatically */
.video-wrapper .video-bg {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain; /* preserves watermark */
  border-radius: 28px; /* ensures video matches container rounding */
}

/* Overlay stays centered */
.video-wrapper .video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.video-wrapper h2 {
  color: white;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-align: center;
  text-shadow: 0 6px 24px rgba(0,0,0,0.35);
}


/* FEATURE SECTIONS */
.section {
  max-width: var(--max-width);
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.feature-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 2rem;
}

.feature {
  background: rgba(255,255,255,0.85);
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.85),
    rgba(245,245,245,0.7)
  );
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.feature h3 {
  margin-top: 0.25rem;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature p {
  color: var(--subtle);
  font-size: 1rem;
  line-height: 1.55;
  margin-top: 0.75rem;
}

/* SETTINGS GRID */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.setting img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: block;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 2000;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  transition: transform 0.25s ease;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 3rem 1rem;
  color: #777;
  font-size: 0.9rem;
}
