/* ============================================================
   AVINZ BYGG AB — Design System
   Customize: Search for "CUSTOMIZE" to find easy edit points
   ============================================================ */

/* ── CUSTOMIZE: Brand colors ─────────────────────────────── */
:root {
  --blue-900: #0a1628;
  --blue-800: #0f2040;
  --blue-700: #163058;
  --blue-600: #1e4278;
  --blue-500: #2558a0;
  --blue-400: #3a72c4;
  --blue-300: #6096d8;
  --blue-100: #dce8f7;
  --blue-50:  #f0f5fc;

  --accent:        #2558a0;   /* CUSTOMIZE: Primary accent */
  --accent-hover:  #1e4278;
  --accent-light:  #dce8f7;

  --gold:          #c9a84c;   /* CUSTOMIZE: Secondary accent (trust/quality cue) */
  --gold-light:    #f5e9c8;

  --neutral-900:   #111518;
  --neutral-800:   #1c2228;
  --neutral-700:   #2e3740;
  --neutral-600:   #4a5568;
  --neutral-400:   #8a97a8;
  --neutral-200:   #d4dbe4;
  --neutral-100:   #edf1f5;
  --neutral-50:    #f7f9fb;
  --white:         #ffffff;

  /* ── Typography ─────────────────────────────────────────── */
  /* CUSTOMIZE: Font families — loaded in components.js head inject */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;

  /* ── Spacing ─────────────────────────────────────────────── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ── Layout ──────────────────────────────────────────────── */
  --max-width:      1200px;
  --max-width-text: 720px;
  --section-py:     var(--space-24);

  /* ── UI ──────────────────────────────────────────────────── */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.08);
  --shadow-xl:  0 24px 60px rgba(0,0,0,.18);

  --transition: 200ms ease;
  --transition-slow: 400ms ease;
}

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

/* ── Utilities ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.section { padding-block: var(--section-py); }
.section--dark  { background: var(--blue-900); color: var(--white); }
.section--grey  { background: var(--neutral-50); }
.section--blue  { background: var(--blue-800); color: var(--white); }

.text-center { text-align: center; }
.text-sm { font-size: var(--text-sm); }
.text-muted { color: var(--neutral-400); }

/* ── Section headers ─────────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}
.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold);
}
.section--dark .section-label,
.section--blue .section-label { color: var(--blue-300); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, var(--text-5xl));
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--neutral-900);
  margin-bottom: var(--space-5);
}
.section--dark .section-title,
.section--blue .section-title { color: var(--white); }

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--neutral-600);
  max-width: 600px;
  line-height: 1.65;
}
.section--dark .section-subtitle,
.section--blue .section-subtitle { color: var(--blue-300); }

.section-header { margin-bottom: var(--space-16); }
.section-header.centered { text-align: center; }
.section-header.centered .section-subtitle { margin-inline: auto; }
.section-header.centered .section-label { margin-inline: auto; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(37,88,160,.35);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(37,88,160,.5);
  transform: translateY(-1px);
}
.btn-outline {
  border: 2px solid currentColor;
  color: var(--white);
}
.btn-outline:hover {
  background: rgba(255,255,255,.1);
  transform: translateY(-1px);
}
.btn-gold {
  background: var(--gold);
  color: var(--neutral-900);
}
.btn-gold:hover {
  background: #b8932e;
  transform: translateY(-1px);
}
.btn-ghost {
  color: var(--accent);
  padding-inline: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
.btn-ghost:hover { border-color: var(--accent); }

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.card-body { padding: var(--space-8); }

/* ── Grids ───────────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

/* ── Image placeholders ──────────────────────────────────── */
/* CUSTOMIZE: Replace .img-placeholder with actual <img> tags */
.img-placeholder {
  background: linear-gradient(135deg, var(--neutral-200) 0%, var(--neutral-100) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--neutral-400);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  text-align: center;
  padding: var(--space-4);
}
.img-placeholder svg { opacity: .4; }
.img-placeholder span { font-size: var(--text-xs); opacity: .7; }

/* ── Navbar ──────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--transition-slow), box-shadow var(--transition-slow),
              padding var(--transition-slow);
  padding-block: var(--space-5);
}
#navbar.scrolled {
  background: var(--blue-900);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
  padding-block: var(--space-3);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.nav-logo .logo-main {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--white);
}
.nav-logo .logo-sub {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav-links a {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-6);
  background: var(--gold);
  color: var(--neutral-900);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-cta:hover {
  background: #b8932e;
  transform: translateY(-1px);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
  border-radius: 2px;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--blue-900);
  padding: var(--space-4) 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: color var(--transition), background var(--transition);
}
.nav-mobile a:hover { color: var(--white); background: rgba(255,255,255,.05); }
.nav-mobile a.active {
  color: var(--white);
  background: rgba(255,255,255,.08);
  border-left: 3px solid var(--gold);
  padding-left: calc(var(--space-6) - 3px);
}
.nav-mobile a.nav-cta-mobile {
  margin: var(--space-4) var(--space-6) var(--space-2);
  background: var(--gold);
  color: var(--neutral-900);
  border-radius: var(--radius-sm);
  text-align: center;
  border: none;
}

/* ── Footer ──────────────────────────────────────────────── */
#footer {
  background: var(--blue-900);
  color: var(--white);
  padding-top: var(--space-20);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .logo-main { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 700; }
.footer-brand .logo-sub  { font-family: var(--font-display); font-size: var(--text-xs); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: var(--space-4); }
.footer-brand p { color: rgba(255,255,255,.55); line-height: 1.7; font-size: var(--text-sm); max-width: 280px; margin-top: var(--space-4); }

.footer-col h4 {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-5);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col li a {
  color: rgba(255,255,255,.55);
  font-size: var(--text-sm);
  transition: color var(--transition);
}
.footer-col li a:hover { color: var(--white); }
.footer-col p { color: rgba(255,255,255,.55); font-size: var(--text-sm); line-height: 1.7; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-6);
}
.footer-bottom p { color: rgba(255,255,255,.3); font-size: var(--text-xs); }

/* ── Star rating ─────────────────────────────────────────── */
.stars {
  display: flex;
  gap: 2px;
  color: var(--gold);
  font-size: var(--text-lg);
}

/* ── Review cards ────────────────────────────────────────── */
.review-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  border-top: 3px solid var(--gold);
}
.review-card .review-text {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--neutral-700);
  margin-block: var(--space-4);
  font-style: italic;
}
.review-card .review-author {
  font-weight: 600;
  color: var(--neutral-900);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: .02em;
}
.review-card .review-meta {
  font-size: var(--text-xs);
  color: var(--neutral-400);
  margin-top: var(--space-1);
}

/* Dark variant reviews */
.section--dark .review-card {
  background: rgba(255,255,255,.06);
  box-shadow: none;
  border-top-color: var(--gold);
}
.section--dark .review-card .review-text { color: rgba(255,255,255,.75); }
.section--dark .review-card .review-author { color: var(--white); }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid var(--neutral-200);
}
.section--dark .faq-item { border-color: rgba(255,255,255,.1); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-6);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--neutral-900);
  gap: var(--space-4);
  transition: color var(--transition);
}
.section--dark .faq-question { color: var(--white); }
.faq-question:hover { color: var(--accent); }
.section--dark .faq-question:hover { color: var(--blue-300); }

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  font-size: var(--text-xl);
  line-height: 1;
}
.faq-item.open .faq-icon {
  background: var(--accent);
  color: var(--white);
  transform: rotate(45deg);
}
.section--dark .faq-icon { background: rgba(255,255,255,.12); color: var(--white); }
.section--dark .faq-item.open .faq-icon { background: var(--gold); color: var(--neutral-900); }

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 350ms ease;
}
.faq-answer-inner {
  padding-bottom: var(--space-6);
  color: var(--neutral-600);
  line-height: 1.75;
  max-width: 680px;
}
.section--dark .faq-answer-inner { color: rgba(255,255,255,.6); }

/* ── Contact section ─────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-group label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--neutral-600);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: var(--space-4) var(--space-5);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--neutral-900);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,88,160,.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group select { appearance: none; cursor: pointer; }

.form-success {
  display: none;
  text-align: center;
  padding: var(--space-12);
  color: var(--neutral-700);
}
.form-success svg { color: #22c55e; margin-inline: auto; margin-bottom: var(--space-4); }
.form-success h3 { font-family: var(--font-display); font-size: var(--text-2xl); margin-bottom: var(--space-2); }

/* ── Stat bar ─────────────────────────────────────────────── */
.stat-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-16);
  padding-block: var(--space-10);
  border-block: 1px solid rgba(255,255,255,.1);
}
.stat-bar .stat { text-align: center; }
.stat-bar .stat-num {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.stat-bar .stat-num span { color: var(--gold); }
.stat-bar .stat-label { font-size: var(--text-sm); color: rgba(255,255,255,.5); margin-top: var(--space-1); }

.stat-divider {
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,.12);
}

/* ── Trust badge ─────────────────────────────────────────── */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: rgba(255,255,255,.8);
}
.trust-badge svg { color: var(--gold); width: 14px; height: 14px; }

/* ── Service icon box ─────────────────────────────────────── */
.service-icon {
  width: 56px;
  height: 56px;
  background: var(--blue-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: var(--space-5);
  transition: background var(--transition);
}
.card:hover .service-icon {
  background: var(--accent);
  color: var(--white);
}

/* ── Scroll animations ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}

@media (max-width: 768px) {
  :root { --section-py: var(--space-16); }

  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stat-bar { flex-wrap: wrap; gap: var(--space-8); }
  .stat-divider { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
}

@media (max-width: 480px) {
  .container { padding-inline: var(--space-4); }
}
