/* Loyed Brokage. Clean sans-serif system, blue palette, photography-led hero.
   Typeface: Schibsted Grotesk throughout. */

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --ink: #0b1f33;
  --muted: #4e6378;
  --line: #dde5ee;
  --blue: #1f5eeb;
  --blue-deep: #143fa8;
  --tint: #e9f0fd;
  --navy: #0b1f33;
  --radius: 12px;
  --radius-lg: 24px;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0325rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: min(1160px, calc(100% - 3rem));
  margin-inline: auto;
}

.narrow { max-width: 720px; }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0 0 0.55em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.012em; }

p { margin: 0 0 1em; }

a { color: inherit; }

.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.1rem;
}

.lede {
  font-size: 1.16rem;
  color: var(--muted);
  max-width: 36em;
}

.text-link {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}
.text-link:hover { color: var(--blue-deep); text-decoration: underline; }

/* Buttons */

.button {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.72rem 1.6rem;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.button-primary {
  background: var(--blue);
  color: #fff;
}
.button-primary:hover { background: var(--blue-deep); }

.button-light {
  background: #fff;
  color: var(--ink);
}
.button-light:hover { background: var(--tint); }

.button-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.button-ghost:hover { background: var(--ink); color: #fff; }

.button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.button[disabled] { opacity: 0.55; cursor: default; }

/* Header */

.site-header {
  background: var(--bg);
  position: relative;
  z-index: 10;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.05rem 0;
}

.brand { display: inline-flex; color: var(--ink); }
.brand .wordmark { height: 21px; width: auto; display: block; }

.site-nav { display: flex; align-items: center; }

.nav-toggle {
  display: none;
  font: inherit;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  color: var(--ink);
}

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

.nav-menu > li > a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
}
.nav-menu > li > a:hover { color: var(--blue); }

.nav-cta .button { padding: 0.5rem 1.3rem; }

/* Insurance dropdown, CSS only */

.has-menu { position: relative; }

.dropdown {
  position: absolute;
  top: 100%;
  left: -1.2rem;
  padding: 0.7rem 0;
  margin: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 45px rgba(11, 31, 51, 0.14);
  min-width: 255px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 130ms ease, transform 130ms ease, visibility 130ms;
}

.has-menu:hover .dropdown,
.has-menu:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 0.42rem 1.2rem;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
}
.dropdown a:hover { color: var(--blue); background: var(--tint); }

.dropdown-all { border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.5rem; }
.dropdown-all a { font-weight: 700; color: var(--blue); }

/* Photo hero (home) */

.hero { padding: 0.6rem 0 0; }

.hero-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  min-height: clamp(430px, 58vh, 620px);
  display: flex;
  align-items: flex-end;
  position: relative;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 14, 26, 0.42);
}

.hero-overlay {
  position: relative;
  width: 100%;
  padding: clamp(1.8rem, 4vw, 3.5rem);
  background: linear-gradient(to top, rgba(5, 14, 26, 0.92) 0%, rgba(5, 14, 26, 0.55) 55%, rgba(5, 14, 26, 0.05) 100%);
  color: #fff;
}

.hero-overlay h1 { max-width: 15em; color: #fff; }

.hero-lede {
  font-size: 1.14rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 36em;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1.8rem 0 0;
}

/* Bands */

.band { padding: clamp(2.8rem, 6vw, 5rem) 0; }

.band-tint { background: var(--tint); }

.band-photo { padding: 0.4rem 0; }

.photo-banner {
  display: block;
  width: 100%;
  height: clamp(240px, 36vh, 420px);
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.band-more { margin-top: 2.2rem; }

/* CTA panel */

.cta-panel {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2.4rem, 5vw, 4rem);
  text-align: center;
}
.cta-panel h2 { color: #fff; }
.cta-panel p { color: rgba(255, 255, 255, 0.82); max-width: 34em; margin-inline: auto; }
.cta-panel p:last-child { margin: 1.6rem auto 0; }

/* Photo split */

.photo-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.photo-split-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  max-height: 430px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.photo-split-copy p:last-child { margin-bottom: 0; }

/* Tile grid */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.2rem;
}

.tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 3rem;
  text-decoration: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.tile:hover {
  border-color: var(--blue);
  box-shadow: 0 14px 30px rgba(11, 31, 51, 0.08);
  transform: translateY(-2px);
}
.tile h3 { margin-bottom: 0.4em; }
.tile p { font-size: 0.92rem; color: var(--muted); margin: 0; }

.tile-arrow {
  position: absolute;
  left: 1.4rem;
  bottom: 1.1rem;
  color: var(--blue);
  font-weight: 700;
  transition: transform 140ms ease;
}
.tile:hover .tile-arrow { transform: translateX(5px); }

.tile-all { background: var(--tint); border-color: var(--tint); }
.tile-all h3 { color: var(--blue-deep); }

/* Insurance index */

.index-list { display: flex; flex-direction: column; gap: 0.85rem; }

.index-row {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 2fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1.35rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.index-row:hover {
  border-color: var(--blue);
  box-shadow: 0 14px 30px rgba(11, 31, 51, 0.08);
}
.index-row h2 { font-size: 1.28rem; margin: 0; letter-spacing: -0.012em; }
.index-row p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.index-row .tile-arrow { position: static; }

/* Page hero */

.page-hero { padding: clamp(2.6rem, 6vw, 4.6rem) 0 clamp(1.6rem, 3vw, 2.4rem); }
.page-hero h1 { max-width: 16em; }

/* Steps */

.steps {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.steps-3 { grid-template-columns: repeat(3, 1fr); }

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
}
.step-num {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--blue);
  display: block;
  margin-bottom: 1rem;
}
.step h3 { font-size: 1.12rem; margin-bottom: 0.4em; }
.step p { font-size: 0.93rem; color: var(--muted); margin: 0; }

.band-tint .step { border-color: transparent; }

/* Category pages */

.category-grid {
  display: grid;
  grid-template-columns: minmax(280px, 5fr) 7fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.category-intro p:first-child { font-size: 1.1rem; }
.intro-action { margin-top: 1.6rem; }

.category-details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 1.5rem;
}

.category-details details + details { border-top: 1px solid var(--line); }

summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  padding: 1.05rem 2.4rem 1.05rem 0;
  position: relative;
}
summary::-webkit-details-marker { display: none; }

summary::after {
  content: "";
  position: absolute;
  right: 0.3rem;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background:
    linear-gradient(var(--blue), var(--blue)) center/14px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) center/2px 14px no-repeat;
  transition: transform 160ms ease;
}
details[open] > summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.details-body { padding: 0 0 1.3rem; color: var(--muted); }
.details-body p:last-child { margin-bottom: 0; }
.details-body ul { margin: 0; padding-left: 1.2rem; }
.details-body li { margin-bottom: 0.45em; }

/* Prose and lists */

.prose p { max-width: 40em; }

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.plain-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1.3rem;
}

/* Forms */

.quote-form-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
.quote-form-section h2 { margin-bottom: 0.3em; }
.form-lede { color: var(--muted); margin-bottom: 2rem; max-width: 36em; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1.4rem;
}

.field { margin: 0 0 1.2rem; }
.field-grid .field { margin: 0; }

.field label,
.field-radio legend {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.85rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 94, 235, 0.16);
  background: #fff;
}

.field textarea { resize: vertical; }

.field-radio { border: none; margin: 0; padding: 0; }
.field-radio label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1rem;
  font-weight: 500;
  margin-right: 1.6rem;
  margin-bottom: 0;
}
.field-radio input { accent-color: var(--blue); }

.field-file input {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.9rem;
  width: 100%;
  background: var(--bg);
}
.field-file small { display: block; margin-top: 0.4rem; color: var(--muted); }

.field-grid + .field, .field-grid + .field-file { margin-top: 1.2rem; }

.form-privacy { font-size: 0.82rem; color: var(--muted); max-width: 42em; }
.form-privacy a { color: var(--muted); }

.form-status { min-height: 1.2em; color: var(--blue-deep); font-weight: 600; }
.form-status.is-error { color: #b03428; }

.form-actions { margin: 0.4rem 0 0; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-success {
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.6rem;
  background: var(--tint);
}
.form-success p:last-child { margin-bottom: 0; }

/* Footer */

.site-footer {
  background: var(--navy);
  color: #fff;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-brand .wordmark { height: 20px; width: auto; }
.footer-brand p { color: #9fb2c5; margin-top: 1.1rem; max-width: 22em; }

.footer-nav { display: flex; gap: 4rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 0.55rem; }
.footer-nav a { text-decoration: none; color: #fff; font-size: 0.95rem; font-weight: 500; }
.footer-nav a:hover { color: #8fb2ff; }

.footer-fine {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-fine p { color: #7e93a9; font-size: 0.82rem; max-width: 52em; margin: 0; }

/* Responsive */

@media (max-width: 960px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps-3 { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .photo-split { grid-template-columns: 1fr; }
  .photo-split-media img { min-height: 240px; }
  .index-row { grid-template-columns: 1fr auto; }
  .index-row p { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem 1.5rem 1.4rem;
    box-shadow: 0 20px 40px rgba(11, 31, 51, 0.1);
  }

  [data-nav-open] .nav-menu { display: flex; }

  .nav-menu > li { border-top: 1px solid var(--line); }
  .nav-menu > li > a { display: block; padding: 0.9rem 0; }
  .nav-cta { border-top: none; padding-top: 0.9rem; }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0.6rem 1rem;
    min-width: 0;
  }
  .dropdown a { padding: 0.3rem 0; color: var(--muted); }

  .hero-card { min-height: 500px; }
  .tile-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .footer-nav { gap: 2.2rem; }
}
