/* S2 Bygg AS — stilark. Fonter er selv-hostet (latin-subsett): Inter Tight til titler, Manrope til tekst. */
@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight-latin.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #00a0e8;        /* lyseblå fra logoen */
  --blue-deep: #006e9b;   /* mørkeblå fra logoen */
  --blue-ink: #0b3a4f;
  --navy: #0a1b26;        /* mørke flater */
  --navy-2: #0f2633;
  --ink: #14202a;
  --text: #2e3a44;
  --muted: #65717c;
  --line: #e1e6eb;
  --bg: #fff;
  --bg-soft: #f3f6f8;
  --grey-logo: #505050;
  --radius: 14px;
  --radius-sm: 10px;
  --container: 76rem;
  --gutter: 1.25rem;
  --head: "Inter Tight", "Manrope", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --shadow: 0 1px 2px rgba(10, 27, 38, 0.06), 0 12px 32px -12px rgba(10, 27, 38, 0.18);
}
@media (min-width: 48em) { :root { --gutter: 2rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: clamp(1.875rem, 3.8vw, 2.75rem); line-height: 1.08; letter-spacing: -0.03em; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.015em; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.lead { font-size: 1.1875rem; line-height: 1.55; }
.measure { max-width: 40rem; }
.prose { max-width: 42rem; }
.prose ul { padding-left: 1.2rem; list-style: disc; margin-bottom: 1em; }
.prose li { margin-bottom: 0.3em; }
.muted { color: var(--muted); }
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font: 600 0.8125rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--blue-deep); margin: 0 0 1rem;
}
.eyebrow::before { content: ""; width: 1.5rem; height: 2px; background: var(--blue); }
.dark .eyebrow { color: #8fd8ff; }

/* Knapper */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 1.4rem; border-radius: var(--radius-sm);
  font: 600 0.9375rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-deep); color: #fff; }
.btn-primary:hover { background: var(--blue-ink); }
.btn-secondary { background: transparent; color: var(--ink); border-color: #c9d1d8; }
.btn-secondary:hover { border-color: var(--ink); }
.dark .btn-primary { background: var(--blue); color: var(--navy); }
.dark .btn-primary:hover { background: #33b5ee; }
.dark .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.dark .btn-secondary:hover { border-color: #fff; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* Topp */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { width: 2.75rem; height: auto; }
.brand span { font: 800 1.375rem/1 var(--head); letter-spacing: -0.02em; color: var(--grey-logo); }
.brand span b { font-weight: 800; }
.nav ul { display: flex; gap: 1.75rem; }
.nav a { text-decoration: none; font-weight: 600; font-size: 0.9375rem; color: var(--ink); padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.menu-btn { display: none; }
@media (max-width: 59.99em) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .nav a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
  .nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--blue-deep); }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 1px solid #c9d1d8; border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem; font: 600 0.9375rem var(--body); color: var(--ink); cursor: pointer;
  }
  .btn-call .num { display: none; }
  .btn-call { padding-inline: 1rem; }
}

/* Seksjoner */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.band { background: var(--bg-soft); }
.dark { background: var(--navy); color: #c7d3dc; }
.dark h1, .dark h2, .dark h3 { color: #fff; }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { font-size: 1.125rem; color: var(--muted); }
.dark .section-head p { color: #a9b8c4; }
.section-head.split { max-width: none; display: grid; gap: 1rem 3rem; align-items: end; }
.section-head.split h2 { margin-bottom: 0; }
.section-head.split > p { max-width: 30rem; margin: 0; }
@media (min-width: 60em) { .section-head.split { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } .section-head.split > p { justify-self: end; padding-bottom: 0.35rem; } }

/* Hero */
.hero {
  position: relative; isolation: isolate; color: #fff; overflow: hidden;
  min-height: clamp(34rem, 82vh, 50rem); display: flex; align-items: flex-end;
}
.hero-img { position: absolute; inset: 0; z-index: -2; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 27, 38, 0.25) 0%, rgba(10, 27, 38, 0.1) 40%, rgba(10, 27, 38, 0.85) 100%),
    linear-gradient(90deg, rgba(10, 27, 38, 0.8) 0%, rgba(10, 27, 38, 0.45) 55%, rgba(10, 27, 38, 0.1) 100%);
}
.hero-inner { padding-block: clamp(4rem, 10vw, 7rem) clamp(3rem, 7vw, 5rem); width: 100%; }
.hero h1 { color: #fff; max-width: 13ch; }
.hero .eyebrow { color: #8fd8ff; }
.hero .lead { max-width: 36rem; color: rgba(255, 255, 255, 0.9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero .btn-primary { background: var(--blue); color: var(--navy); }
.hero .btn-primary:hover { background: #33b5ee; }
.hero .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.hero .btn-secondary:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

/* Tillitsstripe */
.trust { border-bottom: 1px solid var(--line); }
.trust ul { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 60em) { .trust ul { grid-template-columns: repeat(4, 1fr); } }
.trust li { padding: 1.25rem 0; border-right: 1px solid var(--line); padding-inline: 1.25rem; }
.trust li:first-child { padding-left: 0; }
.trust li:last-child { border-right: 0; }
@media (max-width: 59.99em) {
  .trust li:nth-child(2) { border-right: 0; }
  .trust li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .trust li:nth-child(3) { padding-left: 0; }
}
.trust small { display: block; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 0.2rem; }
.trust strong { font-family: var(--head); font-weight: 600; font-size: 1.0625rem; color: var(--ink); letter-spacing: -0.01em; }

/* Tjenestekort */
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 48em) { .cards { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
@media (min-width: 64em) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card { display: block; text-decoration: none; color: inherit; }
.card .thumb { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-soft); margin-bottom: 0.9rem; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover img { transform: scale(1.04); }
.card h3 { margin-bottom: 0.25rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 1.125rem; }
.card h3::after { content: "→"; color: var(--blue); font-weight: 500; transition: transform 0.2s ease; }
.card:hover h3 { color: var(--blue-deep); }
.card:hover h3::after { transform: translateX(3px); }
.card p { color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
@media (max-width: 47.99em) { .card p { display: none; } }

/* Delt oppsett (bilde + tekst) */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 60em) { .split { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 6rem); } .split.flip > :first-child { order: 2; } }
.figure { position: relative; border-radius: var(--radius); overflow: hidden; }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure.tall { aspect-ratio: 4 / 3; }
@media (min-width: 60em) { .figure.tall { aspect-ratio: 4 / 4.4; } }
.figure-note {
  position: absolute; left: 1rem; bottom: 1rem; right: 1rem;
  background: rgba(255, 255, 255, 0.94); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem;
  display: flex; align-items: center; gap: 0.9rem; box-shadow: var(--shadow);
}
.figure-note img { width: 3rem; height: 3rem; object-fit: contain; }
.figure-note strong { display: block; font-family: var(--head); font-weight: 600; color: var(--ink); font-size: 1rem; }
.figure-note span { font-size: 0.875rem; color: var(--muted); }

/* Steg */
.steps { counter-reset: steg; }
.steps li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); counter-increment: steg; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(steg, decimal-leading-zero); grid-row: 1 / span 2; font: 600 0.875rem/2.1 var(--head); color: var(--blue-deep); letter-spacing: 0.02em; }
.steps h3, .steps p { grid-column: 2; }
.steps h3 { font-size: 1.125rem; margin-bottom: 0.2rem; }
.steps p { color: var(--muted); font-size: 0.9875rem; }

/* Punkter i rutenett (hvem vi jobber for, fakta) */
.grid-3, .grid-4 { display: grid; gap: 1.5rem; }
@media (min-width: 40em) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.fact { padding-top: 1.1rem; border-top: 2px solid var(--ink); }
.dark .fact { border-top-color: rgba(255, 255, 255, 0.25); }
.fact h3 { font-size: 1.125rem; margin-bottom: 0.3rem; }
.fact p { color: var(--muted); font-size: 0.9875rem; }
.dark .fact p { color: #a9b8c4; }

/* Laget */
.team { display: grid; gap: 1rem; }
@media (min-width: 40em) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .team { grid-template-columns: repeat(5, 1fr); } }
.person { padding: 1.5rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.person .initials {
  width: 3.25rem; height: 3.25rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue-deep); color: #fff; font: 700 1rem var(--head); letter-spacing: 0.02em; margin-bottom: 1rem;
}
.person h3 { font-size: 1.0625rem; margin-bottom: 0.15rem; }
.person .role { color: var(--blue-deep); font-weight: 600; font-size: 0.875rem; margin-bottom: 0.4rem; }
.person p { color: var(--muted); font-size: 0.9375rem; }

/* Lister med hake */
.checks li { position: relative; padding-left: 1.75rem; margin-bottom: 0.55rem; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='%230a1b26' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.75rem no-repeat;
}
.dark .checks li::before { background-color: var(--blue); }

/* Merker (mester, sentralt godkjent) */
.badges { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; }
.badges li { display: flex; align-items: center; gap: 0.8rem; }
.badges img { width: 3.5rem; height: 3.5rem; object-fit: contain; border-radius: 6px; }
.badges strong { display: block; font-family: var(--head); font-weight: 600; color: var(--ink); font-size: 0.9875rem; }
.badges span { font-size: 0.875rem; color: var(--muted); }
.dark .badges strong { color: #fff; }
.dark .badges span { color: #a9b8c4; }

/* CTA-bånd */
.cta-band { background: var(--navy); color: #c7d3dc; }
.cta-inner { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 60em) { .cta-inner { grid-template-columns: 1.4fr 1fr; } .cta-actions { justify-self: end; } }
.cta-band h2 { color: #fff; margin-bottom: 0.4rem; }
.cta-band p { color: #a9b8c4; font-size: 1.0625rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Sidetopp for undersider */
.page-head { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); max-width: 16ch; }
.page-head .lead { color: var(--muted); max-width: 40rem; }

/* Tjenester: en seksjon per tjeneste */
.service { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 0; }
.service .figure { aspect-ratio: 4 / 3; }
.service h2 { font-size: clamp(1.625rem, 3vw, 2.125rem); }
.service .checks { margin-top: 1.25rem; font-size: 0.9875rem; }
.service-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.service-nav a { text-decoration: none; font-size: 0.875rem; font-weight: 600; padding: 0.5rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: #fff; }
.service-nav a:hover { border-color: var(--blue-deep); color: var(--blue-deep); }

/* Galleri */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 48em) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.gallery figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 3 / 2; background: var(--bg-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { position: absolute; left: -9999px; }
.notice { display: flex; gap: 0.75rem; align-items: flex-start; background: #eef8fe; border: 1px solid #bfe6fa; color: var(--blue-ink); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; font-size: 0.9375rem; max-width: 44rem; }
.notice::before { content: "i"; flex: none; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--blue-deep); color: #fff; font: 700 0.8rem/1.35rem var(--head); text-align: center; margin-top: 0.1rem; }

/* Kontakt */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 60em) { .contact-grid { grid-template-columns: 1fr 1.1fr; gap: clamp(3rem, 6vw, 6rem); align-items: start; } }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2rem); }
.contact-card dl { margin: 0; display: grid; gap: 1rem; }
.contact-card dt { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 0.15rem; }
.contact-card dd { margin: 0; font-family: var(--head); font-weight: 600; font-size: 1.125rem; color: var(--ink); }
.contact-card dd a { text-decoration: none; }
.contact-card dd a:hover { color: var(--blue-deep); }
.contact-card dd small { display: block; font-family: var(--body); font-weight: 500; font-size: 0.875rem; color: var(--muted); }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--bg-soft); margin-top: 1.5rem; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

.form { display: grid; gap: 1rem; }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 40em) { .form-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 0.35rem; color: var(--ink); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1px solid #c9d1d8; border-radius: var(--radius-sm); padding: 0.8rem 0.95rem;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-deep); box-shadow: 0 0 0 3px rgba(0, 160, 232, 0.2); }
.field textarea { min-height: 9rem; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.form-foot { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.form-foot small { color: var(--muted); font-size: 0.8125rem; }
.alert { border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; font-size: 0.9375rem; margin-bottom: 1.25rem; }
.alert-ok { background: #eaf7ee; border: 1px solid #bfe3c9; color: #1d5a31; }
.alert-err { background: #fdf0ee; border: 1px solid #f3c4bd; color: #8a2b1f; }

/* Bunn */
.site-footer { background: #061320; color: #a9b8c4; padding-block: clamp(3rem, 6vw, 4.5rem) 1.5rem; }
.footer-grid { display: grid; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem 3rem; } }
.site-footer .brand span { color: #fff; }
.site-footer .brand { margin-bottom: 1rem; }
.site-footer p { font-size: 0.9375rem; max-width: 26rem; }
.footer-h { font: 600 0.75rem var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.site-footer li { margin-bottom: 0.5rem; font-size: 0.9375rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer address { font-style: normal; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 1.5rem; font-size: 0.8125rem; color: #7f8e9a; }
.footer-badges { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; }
.footer-badges img { width: 2.75rem; height: 2.75rem; object-fit: contain; border-radius: 5px; background: #fff; padding: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card img, .gallery img, .btn, .card h3::after { transition: none; }
}
