/* ============================================================
   Lugina Versicherungen — Design tokens
   Palette: the site's own brand blue (#3e5cde, sampled from the
   live logo/hero), white and soft blue-tinted neutrals.
   Type: Fraunces (display) / Inter (body & UI)
   ============================================================ */

:root {
  --blue-900: #1f2d6b;
  --blue-800: #2c419b;
  --blue-700: #3e5cde;
  --blue-600: #5773e6;
  --blue-tint-1: #e2e7fa;
  --blue-tint-2: #f1f4fd;
  --ivory: #fbfbfd;
  --paper: #ffffff;
  --ink: #1c2436;
  --ink-soft: #5a6377;
  --line: rgba(28, 36, 54, 0.1);
  --line-on-dark: rgba(255, 255, 255, 0.16);

  --serif: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 1180px;
  --radius: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  color: var(--blue-900);
}

p { margin: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--blue-700);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1.5px;
  background: var(--blue-700);
  display: inline-block;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 8px 30px rgba(20, 30, 70, 0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--blue-900);
}

.brand img { height: 40px; width: auto; }

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

nav.primary-nav a {
  font-size: 0.95rem;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}

nav.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--blue-700);
  transition: width 0.25s var(--ease);
}

nav.primary-nav a:hover::after,
nav.primary-nav a.active::after {
  width: 100%;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 24px;
  background: var(--blue-700);
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.header-cta:hover {
  background: var(--blue-800);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(62, 92, 222, 0.28);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blue-900);
  margin: 5px 0;
  transition: 0.25s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(150deg, var(--blue-700) 0%, var(--blue-800) 100%);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.hero::before {
  width: 460px; height: 460px;
  background: rgba(255,255,255,0.10);
  top: -180px; right: -120px;
}
.hero::after {
  width: 340px; height: 340px;
  background: rgba(255,255,255,0.08);
  bottom: -160px; left: 8%;
}

.hero .wrap {
  padding-top: 100px;
  padding-bottom: 60px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: end;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow::before {
  content: "";
  width: 20px;
  height: 1.5px;
  background: rgba(255,255,255,0.6);
  display: inline-block;
}

.hero h1 {
  color: var(--paper);
  font-size: clamp(2.3rem, 4.4vw, 3.7rem);
  max-width: 13ch;
  letter-spacing: -0.01em;
}

.hero-lede {
  margin-top: 24px;
  max-width: 48ch;
  font-size: 1.06rem;
  color: rgba(255,255,255,0.85);
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  color: var(--blue-800);
  font-weight: 600;
  padding: 15px 30px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(10,20,60,0.22); }
.btn-primary svg { transition: transform 0.25s var(--ease); }
.btn-primary:hover svg { transform: translateX(4px); }

.hero-trust {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}
.hero-trust span { display: flex; align-items: center; gap: 8px; }
.hero-trust svg { width: 14px; height: 14px; }

.hero-figure {
  position: relative;
  align-self: end;
  display: flex;
  justify-content: center;
}
.hero-figure::before {
  content: "";
  position: absolute;
  width: 92%;
  height: 88%;
  bottom: -14px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,0.18), transparent 72%);
  filter: blur(6px);
  z-index: 0;
}

.hero-figure img {
  width: 100%;
  max-width: 480px;
  object-fit: contain;
  filter: drop-shadow(0 30px 50px rgba(10, 20, 60, 0.35));
  position: relative;
  z-index: 1;
  animation: floaty 6s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Stat strip ---------- */

.stat-strip {
  background: var(--blue-900);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.stat-strip .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 44px 32px;
}
.stat-strip .stat {
  text-align: center;
  border-right: 1px solid var(--line-on-dark);
  padding: 0 20px;
}
.stat-strip .stat:last-child { border-right: none; }
.stat-strip .num {
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.stat-strip .lbl { margin-top: 6px; font-size: 0.85rem; color: rgba(255,255,255,0.65); }

/* ---------- Section shell ---------- */

.section { padding: 100px 0; position: relative; }
.section-ivory { background: var(--ivory); }
.section-paper { background: var(--paper); }
.section-tint {
  background: var(--blue-tint-2);
  background-image: radial-gradient(circle at 1px 1px, rgba(62,92,222,0.14) 1px, transparent 0);
  background-size: 28px 28px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 60px;
}
.section-head h2 {
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  margin-top: 12px;
}
.section-head p {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ---------- Process (genuine sequence) ---------- */

.process-list { display: flex; flex-direction: column; }
.process-row {
  display: grid;
  grid-template-columns: 90px 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 42px 0;
  border-top: 1px solid var(--line);
}
.process-row:last-child { border-bottom: 1px solid var(--line); }
.process-num {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--blue-700);
}
.process-copy h3 { font-size: 1.25rem; margin-bottom: 12px; }
.process-copy p { color: var(--ink-soft); max-width: 46ch; }
.process-figure {
  overflow: hidden;
  border-radius: var(--radius);
}
.process-figure img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.process-row:hover .process-figure img { transform: scale(1.06); }

/* ---------- Services ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card {
  background: var(--paper);
  padding: 38px 32px;
  transition: background 0.3s ease, transform 0.3s var(--ease);
  position: relative;
}
.service-card:hover {
  background: var(--blue-tint-2);
  transform: translateY(-4px);
}
.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blue-tint-1);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  transition: background 0.3s ease, transform 0.3s var(--ease);
}
.service-card:hover .service-icon {
  background: var(--blue-700);
  transform: scale(1.08) rotate(-6deg);
}
.service-icon svg { width: 20px; height: 20px; color: var(--blue-700); transition: color 0.3s ease; }
.service-card:hover .service-icon svg { color: var(--paper); }
.service-card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.service-card p { color: var(--ink-soft); font-size: 0.93rem; }

/* ---------- Testimonials ---------- */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.testimonial-card {
  background: var(--blue-tint-2);
  border: 1px solid var(--line);
  padding: 34px 30px;
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 34px rgba(20, 30, 70, 0.12);
  border-color: transparent;
}
.testimonial-card .quote-mark {
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--blue-700);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.testimonial-card p.body {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.testimonial-card .who {
  margin-top: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue-900);
}

/* ---------- Contact ---------- */

.contact-shell {
  background: var(--blue-900);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.contact-shell::before {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: rgba(62,92,222,0.35);
  filter: blur(90px);
  top: -140px; right: -80px;
  pointer-events: none;
}
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
  position: relative;
  z-index: 1;
}
.contact-intro .eyebrow { color: rgba(255,255,255,0.7); }
.contact-intro .eyebrow::before { background: rgba(255,255,255,0.5); }
.contact-intro h2 { color: var(--paper); margin-top: 14px; font-size: clamp(1.85rem, 3vw, 2.4rem); }
.contact-intro p { margin-top: 18px; color: rgba(255,255,255,0.72); max-width: 42ch; }

.contact-photo {
  margin-top: 32px;
  border-radius: var(--radius);
  overflow: hidden;
}
.contact-photo img { aspect-ratio: 4/3; object-fit: cover; transition: transform 0.6s var(--ease); }
.contact-photo:hover img { transform: scale(1.05); }

.contact-address {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.95rem;
}
.contact-address .row { display: flex; gap: 12px; align-items: flex-start; }
.contact-address svg { width: 16px; height: 16px; color: rgba(255,255,255,0.7); margin-top: 4px; flex-shrink: 0; }

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.82rem; color: rgba(255,255,255,0.65); }
.field input, .field select, .field textarea {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line-on-dark);
  color: var(--paper);
  padding: 13px 16px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.4); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--paper);
  background: rgba(255,255,255,0.14);
}
.field select option { color: var(--ink); }
.contact-form .field.full .btn-primary { margin-top: 6px; }
.form-note { grid-column: 1/-1; font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-top: -6px; }

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--blue-900);
  color: rgba(255,255,255,0.75);
  padding: 60px 0 30px;
  border-top: 1px solid var(--line-on-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-on-dark);
}
.footer-brand .brand { color: var(--paper); }
.footer-brand p { margin-top: 16px; font-size: 0.9rem; max-width: 32ch; color: rgba(255,255,255,0.55); }
.footer-col h4 {
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a, .footer-col li { font-size: 0.9rem; color: rgba(255,255,255,0.65); }
.footer-col a { transition: color 0.2s ease; }
.footer-col a:hover { color: var(--paper); }
.footer-social { display: flex; gap: 12px; margin-top: 4px; }
.footer-social a {
  width: 34px; height: 34px;
  border: 1px solid var(--line-on-dark);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.footer-social a:hover { background: var(--blue-700); transform: translateY(-3px); }
.footer-social svg { width: 14px; height: 14px; }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,0.6); transition: color 0.2s ease; }
.footer-bottom a:hover { color: var(--paper); }

/* ---------- Legal pages ---------- */

.legal-hero {
  background: linear-gradient(150deg, var(--blue-700) 0%, var(--blue-800) 100%);
  color: var(--paper);
  padding: 90px 0 60px;
}
.legal-hero .eyebrow { color: rgba(255,255,255,0.75); }
.legal-hero .eyebrow::before { background: rgba(255,255,255,0.5); }
.legal-hero h1 { color: var(--paper); font-size: clamp(2rem, 4vw, 2.7rem); margin-top: 14px; }

.legal-body {
  padding: 70px 0 120px;
  max-width: 760px;
  margin: 0 auto;
}
.legal-body h2 {
  font-size: 1.25rem;
  margin-top: 46px;
  margin-bottom: 16px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 14px; }
.legal-body ul { padding-left: 20px; }
.legal-card {
  background: var(--blue-tint-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 10px;
}
.legal-card p { margin-bottom: 6px; color: var(--ink); }
.legal-card p.label { color: var(--ink-soft); font-size: 0.82rem; margin-top: 14px; margin-bottom: 2px; }

/* ---------- Scroll-triggered reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-reveal-group].in-view > * {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-group].in-view > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-group].in-view > *:nth-child(2) { transition-delay: 0.15s; }
[data-reveal-group].in-view > *:nth-child(3) { transition-delay: 0.25s; }
[data-reveal-group].in-view > *:nth-child(4) { transition-delay: 0.35s; }
[data-reveal-group].in-view > *:nth-child(5) { transition-delay: 0.45s; }
[data-reveal-group].in-view > *:nth-child(6) { transition-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-group] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-figure img { animation: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(44, 65, 155, 0) 30%, rgba(44, 65, 155, 0.7) 48%, var(--blue-800) 60%),
      url("assets/img/hero-family.webp") top 24px center / min(400px, 86%) auto no-repeat,
      linear-gradient(150deg, var(--blue-700) 0%, var(--blue-800) 100%);
  }
  .hero::before, .hero::after { display: none; }
  .hero-figure { display: none; }
  .hero .wrap {
    grid-template-columns: 1fr;
    padding-top: clamp(250px, 74vw, 330px);
    padding-bottom: 52px;
  }
  .service-grid, .testimonial-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 46px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .process-row { grid-template-columns: 1fr; gap: 16px; }
  .section { padding: 80px 0; }
}

@media (max-width: 720px) {
  nav.primary-nav, .header-cta { display: none; }
  nav.primary-nav.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 24px 32px;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px rgba(20,30,70,0.08);
  }
  .nav-toggle { display: block; }
  .wrap { padding: 0 20px; }
  .section { padding: 60px 0; }
  .section-head { margin-bottom: 40px; }
  .stat-strip .wrap { grid-template-columns: 1fr; gap: 24px; padding: 36px 20px; }
  .stat-strip .stat { border-right: none; border-bottom: 1px solid var(--line-on-dark); padding-bottom: 20px; }
  .stat-strip .stat:last-child { border-bottom: none; }
  .service-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .contact-form { grid-template-columns: 1fr; }
  .hero-actions { gap: 18px; }
  .hero-trust { gap: 14px 18px; }
}

@media (max-width: 480px) {
  .site-header .wrap { height: 68px; }
  .brand img { height: 32px; }
  .brand { font-size: 1rem; gap: 8px; }
  .hero .wrap { padding-bottom: 40px; gap: 28px; }
  .hero h1 { font-size: 2rem; max-width: 100%; }
  .hero-lede { font-size: 0.98rem; }
  .btn-primary { width: 100%; justify-content: center; padding: 14px 22px; }
  .hero-actions { flex-direction: column; align-items: flex-start; width: 100%; }
  .hero-figure { max-width: 240px; }
  .stat-strip .num { font-size: 2rem; }
  .section-head h2 { font-size: 1.6rem; }
  .service-card, .testimonial-card { padding: 28px 22px; }
  .process-row { padding: 30px 0; }
  .legal-body { padding: 50px 0 80px; }
  .legal-card { padding: 22px 20px; }
}
