/* =============================================
   NORTHBOUND HOUSE — Product Landing Pages
   Shared styles for all product pages
   ============================================= */

/* --- Variables (Light Mode) --- */
:root {
  --primary:    #2B72D7;
  --primary-dk: #1a5bbf;
  --accent:     #C4D600;
  --text:       #111827;
  --text-muted: #6b7280;
  --border:     #e5e7eb;
  --bg:         #ffffff;
  --bg-soft:    #f8f9fb;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-w: 1100px;
  --pad:   1.5rem;

  --radius:    12px;
  --radius-sm: 6px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);

  --ease: 0.2s ease;
}

/* --- Variables (Dark Mode) --- */
@media (prefers-color-scheme: dark) {
  :root {
    --primary:    #5B9BF8;
    --primary-dk: #3a7cd9;
    --accent:     #D4E600;
    --text:       #f3f4f6;
    --text-muted: #9ca3af;
    --border:     #374151;
    --bg:         #111827;
    --bg-soft:    #1f2937;

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.5);
  }
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img   { max-width: 100%; display: block; }
a     { color: inherit; text-decoration: none; }
ul    { list-style: none; }
button { font-family: var(--font); }

/* --- Container --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* =============================================
   HEADER/NAV
   ============================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .header {
    background: rgba(17,24,39,0.96);
  }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  transition: opacity var(--ease);
}

.nav-brand:hover { opacity: 0.7; }

.nav-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav-back {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--ease);
}

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

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--bg-soft) 100%);
}

/* Static subtle gradient background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(43, 114, 215, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(196, 214, 0, 0.10) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .hero::after {
    opacity: 0.75;
  }

  .hero::before {
    background:
      radial-gradient(circle at 20% 50%, rgba(91, 155, 248, 0.1) 0%, transparent 50%),
      radial-gradient(circle at 80% 80%, rgba(212, 230, 0, 0.08) 0%, transparent 50%);
  }
}

/* Ensure orb canvas sits above overlays but behind content */
.hero > canvas {
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

/* Re-enable pointer events for interactive elements */
.hero .container a,
.hero .container button {
  pointer-events: auto;
}

.hero-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.08;
}

.hero-orb--1 {
  width: 520px;
  height: 520px;
  background: var(--primary);
  top: -160px;
  right: -60px;
}

.hero-orb--2 {
  width: 280px;
  height: 280px;
  background: var(--accent);
  opacity: 0.10;
  bottom: -60px;
  left: -60px;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 27px;
  margin: 0 auto 2rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.hero-tagline {
  font-size: 1.2rem;
  font-weight: 600;
  font-style: italic;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-appstore {
  display: inline-block;
  transition: transform var(--ease);
}

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

.btn-appstore img {
  height: 54px;
  width: auto;
}

.platform-badges {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.875rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* =============================================
   SCREENSHOT SECTION
   ============================================= */
.screenshots {
  padding: 4rem 0;
  background: var(--bg);
  overflow: hidden;
}

.screenshots-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Device Showcase (for multiple device screenshots like AmpWidgets) */
.device-showcase {
  position: relative;
  width: 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
}

.device {
  position: absolute;
  transition: transform 0.2s ease;
}

.device img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

@media (prefers-color-scheme: dark) {
  .device img {
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
}

.device:hover {
  transform: scale(1.02);
  z-index: 10;
}

/* Macbook - center, largest */
.device-macbook {
  width: 55%;
  max-width: 650px;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.device-macbook:hover {
  transform: translate(-50%, -50%) scale(1.02);
}

/* iPad - left side */
.device-ipad {
  width: 32%;
  max-width: 380px;
  z-index: 3;
  left: 8%;
  top: 52%;
  transform: translateY(-50%) rotate(-1deg);
}

.device-ipad:hover {
  transform: translateY(-50%) rotate(-1deg) scale(1.02);
}

/* iPhone - right side */
.device-iphone {
  width: 18%;
  max-width: 220px;
  z-index: 4;
  right: 12%;
  top: 45%;
  transform: translateY(-50%) rotate(2deg);
}

.device-iphone:hover {
  transform: translateY(-50%) rotate(2deg) scale(1.02);
}

/* Apple Watch - bottom right */
.device-watch {
  width: 14%;
  max-width: 170px;
  z-index: 2;
  right: 5%;
  bottom: 8%;
  transform: rotate(-4deg);
}

.device-watch:hover {
  transform: rotate(-4deg) scale(1.02);
}

/* Carousel (for apps with multiple screenshots like Road Rover) */
.carousel-wrapper {
  width: 100%;
  position: relative;
  padding: 3rem 0;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 0 2rem;
}

.carousel-slide {
  flex: 0 0 auto;
  width: 280px;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0.5;
  transform: scale(0.85);
}

.carousel-slide.center {
  opacity: 1;
  transform: scale(1);
  z-index: 10;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  user-select: none;
}

.carousel-slide.center img {
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.carousel-dots {
  display: flex;
  gap: 0.625rem;
  justify-content: center;
  margin-top: 2rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}

.carousel-dot:hover {
  background: var(--primary);
  transform: scale(1.2);
}

.carousel-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

/* Simple Grid (for basic screenshot display) */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto 0;
}

.screenshot-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transition: transform var(--ease);
}

.screenshot-item:hover {
  transform: translateY(-2px);
}

.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* =============================================
   FEATURES
   ============================================= */
.features {
  padding: 5rem 0;
  background: var(--bg-soft);
}

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform var(--ease), box-shadow var(--ease);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(43,114,215,0.1), rgba(43,114,215,0.05));
  border: 1px solid rgba(43,114,215,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* =============================================
   CTA SECTION
   ============================================= */
.cta-section {
  padding: 5rem 0;
  background: var(--primary);
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: #111827;
  color: #fff;
  padding: 2.5rem 0;
  text-align: center;
}

.footer-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.footer-venture {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.5rem;
}

.footer-venture a {
  color: var(--accent);
  font-weight: 600;
  transition: opacity var(--ease);
}

.footer-venture a:hover {
  opacity: 0.8;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 1rem 0;
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  transition: color var(--ease);
}

.footer-links a:hover {
  color: #fff;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .device-showcase {
    min-height: 450px;
  }

  .device-macbook {
    width: 60%;
  }

  .device-ipad {
    width: 35%;
    left: 5%;
    transform: translateY(-50%) rotate(-1deg);
  }

  .device-iphone {
    width: 20%;
    right: 8%;
    transform: translateY(-50%) rotate(2deg);
  }

  .device-watch {
    width: 16%;
    right: 2%;
    transform: rotate(-4deg);
  }

  .carousel-slide {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 3.5rem 0 3rem;
  }

  .hero-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }

  .features {
    padding: 3.5rem 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .cta-section {
    padding: 3.5rem 0;
  }

  .footer {
    padding: 2rem 0;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .device-showcase {
    min-height: 350px;
  }

  .device-macbook {
    width: 70%;
  }

  .device-ipad {
    width: 40%;
    left: 3%;
    top: 55%;
    transform: translateY(-50%) rotate(-1deg);
  }

  .device-iphone {
    width: 24%;
    right: 5%;
    transform: translateY(-50%) rotate(2deg);
  }

  .device-watch {
    width: 18%;
    right: 0%;
    bottom: 5%;
    transform: rotate(-4deg);
  }

  .carousel-slide {
    width: 200px;
  }

  .carousel-track {
    gap: 1rem;
    padding: 0 1rem;
  }
}

@media (max-width: 640px) {
  .nav {
    height: 56px;
  }

  .nav-brand img {
    width: 32px;
    height: 32px;
  }

  .nav-brand span {
    font-size: 0.95rem;
  }

  .nav-back {
    font-size: 0.8rem;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .screenshots-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .device-showcase {
    min-height: 280px;
  }

  /* Hide secondary devices on mobile, show only main screenshot */
  .device-ipad,
  .device-watch {
    display: none;
  }

  .device-macbook {
    width: 85%;
  }

  .device-iphone {
    width: 30%;
    right: 0%;
    transform: translateY(-50%) rotate(2deg);
  }

  .carousel-slide {
    width: 180px;
  }

  .carousel-dots {
    gap: 0.5rem;
  }

  .carousel-dot {
    width: 6px;
    height: 6px;
  }

  .carousel-dot.active {
    width: 20px;
  }
}
