/* ==========================================================================
   iTagPro Product Landing Page - Core Stylesheet
   Modern, Dark-Mode Automotive Design System
   Targeting: Clean Component Layout, Above-the-Fold LCP, Zero CLS
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  --bg-main: #0b0f19;
  --bg-card: #131b2e;
  --bg-card-hover: #18233c;
  --bg-surface: #1a243a;
  --bg-header: rgba(11, 15, 25, 0.94);
  
  --color-text: #f0f4f8;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;
  
  --accent-cyan: #00d2ff;
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.2);
  --accent-orange: #f59e0b;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-focus: #00d2ff;
  
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(0, 210, 255, 0.15);
  
  --max-width: 1200px;
  --max-width-narrow: 840px;
  --header-height: 60px;
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--bg-main);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(0, 210, 255, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
}

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

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

/* Focus States for Accessibility */
:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Typography Hierarchy */
h1, h2, h3, h4 {
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  margin-bottom: 0.65rem;
}

h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  margin-bottom: 0.6rem;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

p.lead {
  font-size: 1.05rem;
  line-height: 1.45;
  color: #e2e8f0;
  margin-bottom: 1.25rem;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
  color: var(--color-text-muted);
}

li {
  margin-bottom: 0.4rem;
}

/* --- Layout Containers --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  width: 100%;
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.section-alt {
  background-color: rgba(19, 27, 46, 0.4);
}

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

.section-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.25);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

/* --- Navigation Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none !important;
}

.logo-badge {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: #ffffff;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  color: #ffffff;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-light);
  color: var(--color-text);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* --- Buttons & CTAs --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

/* --- Cards & Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: rgba(0, 210, 255, 0.3);
  transform: translateY(-2px);
}

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: rgba(0, 210, 255, 0.1);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: currentColor;
}

/* --- Hero Section (CSS Grid Areas for Desktop/Mobile Reorder) --- */
.section-hero {
  padding: 3rem 0 2.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.hero-container {
  max-width: 1140px;
}

/* Desktop: two-column layout — text+CTA left, image right */
.hero-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "intro  image"
    "action image";
  gap: 0 3rem;
  align-items: center;
}

.hero-intro {
  grid-area: intro;
  align-self: end;
}

.hero-image-wrap {
  grid-area: image;
  align-self: center;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.5);
  aspect-ratio: 16 / 9;
  width: 100%;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-action {
  grid-area: action;
  align-self: start;
  padding-top: 0.25rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-green);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-hero h1 {
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
  max-width: 380px;
}

.section-hero .lead {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin-bottom: 0;
  max-width: 400px;
}

.hero-cta {
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.hero-rating-link {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  padding: 0.15rem 0;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-bottom: 0.85rem;
  transition: color 0.2s ease;
}

.hero-rating-link:hover {
  color: #ffffff;
}

.hero-rating-link:hover .hero-rating-count {
  color: #e2e8f0;
  text-decoration: underline;
}

.hero-rating-score {
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.hero-rating-stars {
  display: inline-flex;
  gap: 0.125rem;
  align-items: center;
}

.hero-rating-stars svg {
  fill: #f59e0b;
  width: 13px;
  height: 13px;
}

.hero-rating-count {
  color: var(--color-text-muted);
  font-weight: 400;
  transition: color 0.2s ease;
}

.hero-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.hero-chip svg {
  color: var(--accent-green);
  flex-shrink: 0;
}

/* --- Customer Reviews Section --- */
.reviews-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.reviews-score-display {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.reviews-big-score {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.reviews-score-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.reviews-stars {
  display: flex;
  gap: 0.15rem;
}

.reviews-count {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.reviews-grid {
  margin-bottom: 1.5rem;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.review-stars {
  display: flex;
  gap: 0.1rem;
}

.review-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0;
}

.review-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 0;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}

.review-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: #ffffff;
}

.review-verified {
  font-size: 0.75rem;
  color: var(--accent-green);
  font-weight: 500;
}

.reviews-attribution {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-dim);
  margin-bottom: 0;
}

/* --- Feature Media Block --- */
.media-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3.5rem;
}

.media-block:last-child {
  margin-bottom: 0;
}

.media-block.reverse {
  direction: rtl;
}

.media-block.reverse > * {
  direction: ltr;
}

.media-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 3;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Step Cards (How It Works) --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.step-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.25rem;
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* --- Specifications Table --- */
.spec-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.spec-table th,
.spec-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table th {
  width: 38%;
  background: rgba(255, 255, 255, 0.02);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
}

.spec-table td {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* --- Accordion FAQs --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item.active {
  border-color: rgba(0, 210, 255, 0.4);
}

.faq-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  width: 1.2rem;
  height: 1.2rem;
  fill: var(--color-text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  fill: var(--accent-cyan);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1), padding 0.35s ease;
  padding: 0 1.25rem;
  color: var(--color-text-muted);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.25rem 1.1rem 1.25rem;
  transition: max-height 0.35s cubic-bezier(1, 0, 1, 0), padding 0.35s ease;
}

/* --- Final CTA Section --- */
.cta-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(0, 210, 255, 0.15) 100%);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-glow);
}

.cta-banner h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 0.75rem;
}

.cta-highlights {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1.5rem 0 1.75rem 0;
}

.cta-highlight-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--color-text);
}

/* --- Footer & Disclosures --- */
.site-footer {
  background-color: #060911;
  border-top: 1px solid var(--border-light);
  padding: 3rem 0 1.75rem 0;
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-title {
  color: #ffffff;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: var(--color-text-muted);
}

.footer-nav a:hover {
  color: #ffffff;
}

.affiliate-disclosure {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--color-text-dim);
}

.copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* --- Legal Page Content --- */
.legal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}

.legal-content h2 {
  margin-top: 1.75rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.4rem;
}

/* --- Responsive Layout for Single Hero Visual --- */
@media (max-width: 992px) {
  :root {
    --header-height: 54px;
  }

  .section-hero {
    padding: 2rem 0 2rem 0;
  }

  /* Mobile: single column — intro, then image, then CTA */
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "intro"
      "image"
      "action";
    gap: 1.25rem 0;
  }

  .hero-intro { align-self: auto; }
  .hero-action { align-self: auto; padding-top: 0; }

  .section-hero h1 {
    max-width: none;
  }

  .section-hero .lead {
    max-width: none;
  }

  .media-block,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .media-block.reverse {
    direction: ltr;
  }

  .grid-3,
  .grid-4,
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-card);
    flex-direction: column;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-light);
  }

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

  .mobile-menu-toggle {
    display: block;
  }

  .spec-table th,
  .spec-table td {
    padding: 0.75rem 0.85rem;
  }

  .spec-table th {
    width: 45%;
  }

  .cta-banner {
    padding: 2rem 1rem;
  }
}
