/* =====================================================
   MotorGlänta Digital — style.css
   Aesthetic: soft_pastel (pastel colors, gentle, airy)
   Brand: Navy primary, soft orange CTA, light accent
   Layout: MOBILE-FIRST, FLEXBOX ONLY (no grid/columns)
   ===================================================== */

/* -----------------------------
   RESET / NORMALIZE (safe reset)
   ----------------------------- */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }
html, body { margin: 0; padding: 0; height: 100%; }
img { max-width: 100%; height: auto; display: inline-block; }
a { text-decoration: none; color: inherit; }
ul, ol { margin: 0; padding-left: 1.2rem; }
button, input, select, textarea { font: inherit; color: inherit; }

/* -----------------------------
   THEME TOKENS (with fallbacks)
   ----------------------------- */
:root {
  /* Brand core */
  --brand-ink: #0B2A3C;         /* deep navy */
  --brand-cta: #FF7A1A;         /* energetic soft orange */
  --brand-accent: #F4F8FC;      /* airy light blue */

  /* Soft pastel palette (tints that fit brand) */
  --pastel-blue: #EAF4FB;       /* ultra light sky */
  --pastel-mint: #E9F7F2;       /* mint tint */
  --pastel-rose: #FDECEF;       /* rose tint */
  --pastel-lavender: #F4EFFB;   /* lavender tint */
  --pastel-peach: #FFF1E7;      /* peach tint */
  --ink-900: #0B2A3C;           /* fallback dark */
  --ink-700: #173F54;           /* headings */
  --ink-600: #315466;           /* body strong */
  --ink-500: #476A7C;           /* muted */
  --ink-300: #A5BDCA;           /* lines */
  --surface: #FFFFFF;
  --surface-soft: #FAFCFE;
  --line: #E6EEF4;

  /* Effects */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(11,42,60,0.06);
  --shadow-md: 0 6px 20px rgba(11,42,60,0.08);
  --shadow-lg: 0 12px 32px rgba(11,42,60,0.10);

  /* Spacing scale */
  --sp-4: 4px; --sp-6: 6px; --sp-8: 8px; --sp-10: 10px;
  --sp-12: 12px; --sp-14: 14px; --sp-16: 16px; --sp-18: 18px;
  --sp-20: 20px; --sp-24: 24px; --sp-28: 28px; --sp-32: 32px;
  --sp-36: 36px; --sp-40: 40px; --sp-48: 48px; --sp-60: 60px;
}

/* -----------------------------
   TYPOGRAPHY
   ----------------------------- */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: var(--ink-700, #173F54);
  background: var(--surface-soft, #FAFCFE);
  line-height: 1.6;
  font-size: 16px;
}
h1, h2, h3, h4, h5, h6 {
  font-family: "Trebuchet MS", Verdana, Geneva, Tahoma, sans-serif;
  color: var(--ink-900, #0B2A3C);
  margin: 0 0 var(--sp-16);
}
h1 { font-size: 36px; line-height: 1.2; }
h2 { font-size: 28px; line-height: 1.25; }
h3 { font-size: 20px; line-height: 1.3; }
p { margin: 0 0 var(--sp-12); color: var(--ink-600, #315466); }
small, .small { font-size: 14px; }
.subheadline { font-size: 18px; color: var(--ink-600); max-width: 60ch; }
strong { color: var(--ink-700); }

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px dashed var(--brand-cta);
  outline-offset: 2px;
}

/* -----------------------------
   GLOBAL LAYOUT FLEX SYSTEM
   ----------------------------- */
/* CRITICAL: Only flexbox is used for all layouts. */
section, .section { margin-bottom: 60px; padding: 40px 20px; }
section, .section { display: flex; flex-direction: column; gap: 20px; }

.container {
  display: flex; /* layout container */
  flex-direction: row; /* container centers inner content */
  justify-content: center;
  width: 100%;
  padding: 0 16px;
}
.content-wrapper {
  display: flex; /* layout container */
  flex-direction: column;
  gap: 24px; /* mandated spacing */
  width: 100%;
  max-width: 1160px;
}

/* Mandatory spacing patterns */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; gap: 14px; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* -----------------------------
   HEADER & NAVIGATION
   ----------------------------- */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
header .container { padding: 10px 16px; }
header .content-wrapper {
  flex-direction: row; /* horizontal in header */
  align-items: center; justify-content: space-between;
  gap: 16px;
}
.logo img { height: 36px; }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a {
  color: var(--ink-600);
  padding: 10px 12px; border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.main-nav a:hover { background: var(--pastel-blue); color: var(--ink-900); }

/* Header CTA matches brand with pastel softness */
.button.cta { display: none; }

/* Mobile burger */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--pastel-peach); color: var(--ink-900);
  cursor: pointer; transition: transform 0.2s ease, background 0.2s ease;
}
.mobile-menu-toggle:hover { background: #FFE9D8; transform: translateY(-1px); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  background: var(--surface);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  padding: 20px;
  box-shadow: var(--shadow-lg);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end; width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--pastel-rose);
  cursor: pointer; color: var(--ink-900);
}
.mobile-nav { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.mobile-nav a {
  display: flex; align-items: center; min-height: 44px;
  padding: 12px 10px; border-radius: 12px; color: var(--ink-700);
  background: var(--pastel-blue);
}
.mobile-nav a:hover { background: #DDEEF9; color: var(--ink-900); }

/* -----------------------------
   HERO SECTION
   ----------------------------- */
.hero {
  background: var(--pastel-blue);
  border-bottom: 1px solid var(--line);
}
.hero .content-wrapper { align-items: flex-start; }
.hero h1 { font-size: 34px; }
.hero .subheadline { color: var(--ink-600); }

/* Trust badges */
.trust-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-badges span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink-600);
}
.trust-badges img { width: 18px; height: 18px; }

/* Supporting bullets */
.supporting-bullets { display: flex; flex-direction: column; gap: 8px; color: var(--ink-600); }
.supporting-bullets li { margin-left: 18px; }

/* -----------------------------
   BUTTONS & LINKS
   ----------------------------- */
.button, a.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 18px; border-radius: 14px; border: 1px solid transparent;
  font-weight: bold; line-height: 1; cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.button.primary { background: var(--brand-cta); color: #1C1107; }
.button.primary:hover { background: #FF8C3D; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.button.secondary { background: var(--surface); color: var(--ink-900); border-color: var(--ink-300); }
.button.secondary:hover { background: var(--pastel-mint); border-color: #B8E7D9; }
.button.cta { background: var(--brand-cta); color: #1C1107; }
.button.cta:hover { background: #FF8C3D; box-shadow: var(--shadow-md); }

a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* CTA groups */
.cta-group { display: flex; flex-direction: column; gap: 12px; }

/* -----------------------------
   CARDS / TEXT SECTIONS / FEATURES
   ----------------------------- */
.text-section {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 18px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.text-section:hover { box-shadow: var(--shadow-md); }

/* Generic cards if used */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

/* Feature/service layouts */
.feature-grid, .service-cards, .kpis, .benefit-list, .footer-nav, .legal-links, .cta-row {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start;
}
.feature-grid .text-section,
.service-cards .text-section,
.kpis .text-section {
  flex: 1 1 260px; /* responsive columns via flex */
}
.kpis .text-section h3 { font-size: 28px; color: var(--brand-ink); }

.cta-row { justify-content: flex-start; }

.benefit-list { flex-direction: column; gap: 10px; }
.benefit-list li { margin-left: 18px; color: var(--ink-600); }

/* Tool stack inline content */
.tool-stack { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; align-items: center; }
.tool-stack img { width: 18px; height: 18px; }

/* Stepper */
.stepper { display: flex; flex-direction: column; gap: 12px; padding-left: 18px; }
.stepper li { background: var(--pastel-lavender); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--ink-700); }

/* Testimonials — high readability (dark on light) */
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-cta);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.testimonial-card p { margin: 0; color: var(--ink-700); }

/* Text + image sections (if used later) */
.text-image-section { justify-content: space-between; }
.text-image-section > * { flex: 1 1 280px; }

/* -----------------------------
   FOOTER
   ----------------------------- */
footer {
  background: var(--brand-ink);
  color: #E9F3FA;
  padding-top: 16px; padding-bottom: 16px;
}
footer .content-wrapper { gap: 16px; }
.footer-nav, .legal-links { gap: 12px; }
.footer-nav a, .legal-links a { color: #E9F3FA; opacity: 0.9; padding: 6px 8px; border-radius: 8px; }
.footer-nav a:hover, .legal-links a:hover { background: rgba(255,255,255,0.08); opacity: 1; text-decoration: none; }

/* -----------------------------
   COOKIE CONSENT (banner + modal)
   ----------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100;
  display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(11,42,60,0.06);
  padding: 14px 16px;
}
.cookie-banner.hidden { display: none; }
.cookie-content { display: flex; flex: 1 1 260px; flex-direction: column; gap: 6px; max-width: 900px; }
.cookie-actions { display: flex; gap: 10px; align-items: center; }
.cookie-actions .button { padding: 10px 14px; }
.cookie-actions .accept { background: var(--brand-cta); color: #1C1107; }
.cookie-actions .reject { background: var(--pastel-rose); color: var(--ink-900); border-color: #F7D6DE; }
.cookie-actions .settings { background: var(--surface); color: var(--ink-900); border-color: var(--ink-300); }
.cookie-actions .button:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* Cookie modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 1200; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(11,42,60,0.35);
}
.cookie-modal.open { display: flex; }
.cookie-modal-content {
  display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 720px;
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  padding: 20px;
}
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--pastel-blue); }
.cookie-row.essential { background: var(--pastel-mint); }
.cookie-row .label { display: flex; flex-direction: column; gap: 4px; }

/* Toggle (CSS-only visual — JS should sync state) */
.toggle { position: relative; display: inline-flex; align-items: center; width: 46px; height: 26px; border-radius: 999px; background: #CBD9E2; border: 1px solid #BFD0DA; transition: background 0.2s ease; }
.toggle::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; box-shadow: var(--shadow-sm); transform: translateX(3px); transition: transform 0.2s ease; }
.toggle.on { background: #7FD6B3; border-color: #71C8A6; }
.toggle.on::after { transform: translateX(21px); }

.cookie-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* -----------------------------
   UTILITIES
   ----------------------------- */
.center { display: flex; align-items: center; justify-content: center; }
.muted { color: var(--ink-500); }
.hidden { display: none !important; }

/* -----------------------------
   RESPONSIVE BEHAVIOR (mobile-first)
   ----------------------------- */
@media (min-width: 480px) {
  h1 { font-size: 38px; }
  .cta-group { flex-direction: row; }
}

@media (min-width: 768px) {
  h1 { font-size: 44px; }
  h2 { font-size: 32px; }

  /* Show desktop nav */
  .main-nav { display: flex; }
  .button.cta { display: inline-flex; }
  .mobile-menu-toggle { display: none; }

  /* text-image sections become row */
  .text-image-section { flex-direction: row; }

  /* Feature/service/kpis denser layout via flex-basis */
  .feature-grid .text-section,
  .service-cards .text-section,
  .kpis .text-section { flex: 1 1 320px; }

  .hero .content-wrapper { padding: 10px 0; }
}

@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  .feature-grid .text-section,
  .service-cards .text-section,
  .kpis .text-section { flex: 1 1 30%; }

  .content-wrapper { gap: 28px; }
}

/* -----------------------------
   PAGE-SPECIFIC LIGHT TOUCHES
   ----------------------------- */
/* Subtle alternating section surfaces for dreamy, pastel rhythm */
main section:nth-of-type(2n) { background: var(--pastel-peach); border: 1px solid var(--line); border-left: none; border-right: none; }
main section:nth-of-type(2n+1) { background: var(--surface-soft); }
.hero { background: var(--pastel-blue); }

/* Links inside content paragraphs */
.content-wrapper p a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.content-wrapper p a:hover { color: var(--brand-cta); }

/* KPI emphasis */
.kpis .text-section h3 { font-size: 32px; letter-spacing: 0.5px; }

/* Footer fine print sizing */
footer p, footer a { font-size: 14px; }

/* -----------------------------
   FORMS / INPUTS (if added later)
   ----------------------------- */
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-700);
}
input:focus, textarea:focus, select:focus { border-color: var(--brand-cta); box-shadow: 0 0 0 3px rgba(255,122,26,0.15); outline: none; }

/* -----------------------------
   ENSURE MINIMUM GAPS BETWEEN COMPONENTS
   ----------------------------- */
.content-wrapper > * { margin: 0; }
.content-wrapper > * + * { /* guarantee spacing between siblings */ }

/* -----------------------------
   MANDATORY RULE REMINDERS (kept as comments)
   - Using ONLY flexbox for layouts (no grid/columns)
   - Adequate gaps and spacing ensured via gap and padding
   - No absolute positioning for content cards (only relative)
   ----------------------------- */

/* -----------------------------
   PRINT FRIENDLY (optional soft handling)
   ----------------------------- */
@media print {
  .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}
