/* Berg Skyddsrum och Byggledning AB — style.css */

:root {
  --gray-900: #2b3238;
  --gray-700: #4b545c;
  --gray-500: #6b7680;
  --gray-300: #b9c1c7;
  --gray-100: #f2f4f5;
  --blue-700: #395a78;
  --blue-500: #5b7ca0;
  --blue-100: #e7eef4;
  --accent: #c1682f;
  --accent-dark: #a2531f;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(43, 50, 56, 0.12);
  --radius: 14px;
  --maxw: 1120px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gray-300);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gray-900);
}

.brand svg { width: 38px; height: 38px; }

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  display: block;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--gray-700);
  transition: background .15s ease, color .15s ease;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  background: var(--blue-100);
  color: var(--blue-700);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-900);
  margin: 5px 0;
  transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-300);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  nav.main-nav.open { max-height: 300px; }
  nav.main-nav ul {
    flex-direction: column;
    padding: 8px 24px 20px;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-100) 0%, var(--white) 60%);
  padding: 84px 0 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
  margin: 0 0 20px;
  color: var(--gray-900);
}

.hero p {
  font-size: 1.08rem;
  color: var(--gray-700);
  margin: 0 0 18px;
  max-width: 54ch;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(193,104,47,0.35);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  border-color: var(--blue-700);
  color: var(--blue-700);
}
.btn-outline:hover { background: var(--blue-700); color: var(--white); transform: translateY(-2px); }

.hero-textcard {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow);
}
@media (max-width: 620px) { .hero-textcard { padding: 26px; } }

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-art svg { width: 100%; max-width: 380px; height: auto; }

.hero-logo-mark {
  width: 100%;
  max-width: 300px;
  height: auto;
  filter: drop-shadow(0 14px 20px rgba(28,51,71,0.22));
}

.hero-mosaic {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.hero-mosaic-node {
  position: absolute;
  border-radius: 20px;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 32%),
    linear-gradient(90deg, #1c3347 0%, #2c4f6c 38%, #4a7292 72%, #6a91b0 100%);
  box-shadow: 0 14px 34px rgba(28,51,71,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.hero-mosaic-node svg { width: 42%; height: 42%; }
.hero-mosaic-node.n1 { width: 62%; height: 62%; top: 0; left: 0; }
.hero-mosaic-node.n2 { width: 46%; height: 46%; top: 4%; right: 0; }
.hero-mosaic-node.n3 { width: 52%; height: 52%; bottom: 0; left: 16%; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
section.alt { background: var(--gray-100); }

.section-head {
  max-width: 640px;
  margin: 0 0 40px;
}
.section-head .eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 12px;
  color: var(--gray-900);
}
.section-head p { color: var(--gray-700); margin: 0; }

/* ---------- Fact cards (flip) ---------- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .fact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .fact-grid { grid-template-columns: 1fr; } }

.fact-card {
  perspective: 1200px;
  height: 190px;
  cursor: pointer;
}
.fact-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .6s cubic-bezier(.4,.2,.2,1);
  transform-style: preserve-3d;
}
.fact-card.flipped .fact-card-inner,
.fact-card:hover .fact-card-inner { transform: rotateY(180deg); }

.fact-face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  backface-visibility: hidden;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow);
}
.fact-front {
  background: var(--gray-900);
  color: var(--white);
  text-align: center;
  align-items: center;
}
.fact-front .fact-number {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--white);
}
.fact-front .fact-label {
  font-size: .92rem;
  color: var(--gray-300);
  margin-top: 6px;
}
.fact-front .fact-hint {
  margin-top: 14px;
  font-size: .74rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.fact-back {
  background: var(--blue-700);
  color: var(--white);
  transform: rotateY(180deg);
  font-size: .92rem;
}
.fact-back strong { display: block; margin-bottom: 6px; font-size: 1rem; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .services-grid { grid-template-columns: 1fr; } }

.services-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 620px) { .services-grid-2 { grid-template-columns: 1fr; } }

.service-card {
  position: relative;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 32%),
    linear-gradient(90deg, #1c3347 0%, #2c4f6c 38%, #4a7292 72%, #6a91b0 100%);
  border: none;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.service-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(28,51,71,0.28); }

.service-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  color: var(--accent);
}
.service-card h3 { margin: 0 0 8px; font-size: 1.12rem; color: var(--white); }

.service-teaser { color: rgba(255,255,255,0.88); margin: 0; }
.service-full {
  color: rgba(255,255,255,0.88);
  margin: 10px 0 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.service-card.open .service-full { max-height: 240px; }
.service-card.open .service-teaser { display: none; }
.service-card a { color: var(--accent); font-weight: 700; }
.service-card a:hover { color: var(--accent-dark); }

.service-toggle {
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-size: .88rem;
}

/* ---------- Map teaser (skyddsrumskarta) ---------- */
.map-teaser {
  position: relative;
  display: block;
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.map-teaser:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(28,51,71,0.28); }

.map-teaser-graphic {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 32%),
    linear-gradient(90deg, #1c3347 0%, #2c4f6c 38%, #4a7292 72%, #6a91b0 100%);
}
.map-teaser-graphic svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map-teaser-graphic svg line { stroke: rgba(255,255,255,0.16); stroke-width: 2; }

.map-pin {
  position: absolute;
  width: 13px; height: 13px;
  border-radius: 50% 50% 50% 0;
  background: rgba(255,255,255,0.6);
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.map-pin.accent { background: var(--accent); width: 18px; height: 18px; }

.map-teaser-overlay {
  position: relative;
  z-index: 1;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px;
  background: linear-gradient(180deg, rgba(15,26,36,0) 0%, rgba(15,26,36,0.6) 100%);
}
.map-teaser-overlay h3 {
  margin: 0 0 6px;
  color: var(--white);
  font-size: 1.12rem;
}
.map-teaser-overlay p {
  margin: 0;
  color: rgba(255,255,255,0.88);
  max-width: 46ch;
  font-size: .92rem;
}
.map-teaser-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: .9rem;
  padding: 11px 20px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .15s ease;
}
.map-teaser:hover .map-teaser-btn { background: var(--accent-dark); }

/* ---------- Tabs (Om oss) ---------- */
.tabs-head {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--gray-300);
}
.tab-btn {
  padding: 12px 18px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 700;
  color: var(--gray-500);
  cursor: pointer;
  font-size: .98rem;
}
.tab-btn.active { color: var(--blue-700); border-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadein .3s ease; }

@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tab-panel ul { margin: 0; padding-left: 20px; color: var(--gray-700); }
.tab-panel li { margin-bottom: 10px; }

.about-lead {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}
@media (max-width: 800px) { .about-lead { grid-template-columns: 1fr; } }
.about-lead img { border-radius: var(--radius); box-shadow: var(--shadow); }

.about-photo-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about-photo-frame img {
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about-photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(28,51,71,0.55) 0%, rgba(74,114,146,0.12) 55%, rgba(74,114,146,0) 100%);
  pointer-events: none;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--gray-900);
  color: var(--white);
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 6px; font-size: 1.5rem; }
.cta-band p { margin: 0; color: var(--gray-300); }

/* ---------- Contact ---------- */
.contact-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.contact-card img {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
}
@media (max-width: 560px) {
  .contact-card { grid-template-columns: 1fr; text-align: center; }
  .contact-card img { margin: 0 auto; }
}
.contact-list { list-style: none; padding: 0; margin: 14px 0 0; color: var(--gray-700); }
.contact-list li { margin-bottom: 6px; }
.contact-list strong { color: var(--gray-900); }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 36px 0;
  margin-top: 40px;
  font-size: .9rem;
}
footer.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer.site-footer a:hover { color: var(--white); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.in { opacity: 1; transform: none; }

.badge-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid rgba(185,193,199,0.6);
  border-radius: 999px;
  padding: 6px 18px 6px 6px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--gray-700);
  box-shadow: 0 6px 16px rgba(43,50,56,0.08);
  transition: transform .15s ease, box-shadow .15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(43,50,56,0.14); }
.badge-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--blue-100);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.badge-icon svg { width: 16px; height: 16px; color: var(--accent); }
