/* Buskerud Bil · stilark
   Lys side med helskjerms hero fra bilhallen. Logoens petrolblå er eneste aksentfarge og brukes også
   som den ene fargeflaten (kommisjon). Én skrift (Geist), 4 px hjørner overalt, ingen skygger,
   ingen ikoner, ingen gradienter utenom skyggen som gjør teksten i heroen lesbar. */

:root {
  --petrol: #044e63;
  --petrol-deep: #033b4b;
  --night: #0c1417;
  --ink: #0f1a1d;
  --muted: #56636a;
  --line: #dfe4e5;
  --tint: #f2f5f5;
  --paper: #fcfdfd;
  --white: #ffffff;
  --open: #2f9a63;
  --closed: #b9562f;

  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 72px;
  --radius: 4px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }

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

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
figure, dl, dd, blockquote { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.05; letter-spacing: -.03em; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; line-height: 1.3; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--petrol); color: var(--white); padding: 10px 16px; text-decoration: none; border-radius: var(--radius);
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }

/* Knapper og lenker */
.btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  min-height: 50px; padding: 0 26px; border-radius: var(--radius);
  font: 600 .98rem/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--petrol); border-color: var(--petrol); color: var(--white); }
.btn-solid:hover { background: var(--petrol-deep); border-color: var(--petrol-deep); }
.btn-white { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn-white:hover { background: #dbe9ec; border-color: #dbe9ec; }
.btn-block { width: 100%; }

.text-link {
  display: inline-flex; align-items: center; gap: .45em;
  font-weight: 600; text-decoration: none; color: var(--petrol);
}
.text-link::after { content: "→"; transition: transform .25s var(--ease); }
.text-link:hover::after { transform: translateX(4px); }
.text-link-light { color: var(--white); }
.text-link-sm { font-size: .92rem; margin-top: 4px; }

/* Header: gjennomsiktig over heroen, lys når siden er scrollet */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; color: var(--white);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid { background: var(--paper); color: var(--ink); border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 36px; height: var(--header-h); }

.brand { flex: none; display: grid; }
.brand img { grid-area: 1 / 1; width: clamp(168px, 16vw, 210px); transition: opacity .3s var(--ease); }
.logo-dark { opacity: 0; }
.site-header.is-solid .logo-light { opacity: 0; }
.site-header.is-solid .logo-dark { opacity: 1; }

.nav { margin-left: auto; }
.nav ul { display: flex; gap: clamp(20px, 2.4vw, 36px); list-style: none; margin: 0; padding: 0; }
.nav ul a { position: relative; white-space: nowrap; text-decoration: none; font-weight: 500; font-size: .98rem; padding: 6px 0; }
.nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav ul a:hover::after, .nav ul a.is-active::after { transform: scaleX(1); }
.nav-phone { display: none; }

.header-phone {
  flex: none; display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .55); border-radius: var(--radius);
  font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.header-phone:hover { background: rgba(255, 255, 255, .12); border-color: var(--white); }
.site-header.is-solid .header-phone { background: var(--petrol); border-color: var(--petrol); color: var(--white); }
.site-header.is-solid .header-phone:hover { background: var(--petrol-deep); }

.menu-btn {
  display: none; margin-left: auto; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer; position: relative; color: inherit;
}
.menu-btn-lines, .menu-btn-lines::before, .menu-btn-lines::after {
  position: absolute; left: 10px; width: 24px; height: 1.5px; background: currentColor; content: "";
  transition: transform .25s var(--ease), background-color .2s;
}
.menu-btn-lines { top: 21px; }
.menu-btn-lines::before { left: 0; top: -7px; }
.menu-btn-lines::after { left: 0; top: 7px; }
.menu-btn[aria-expanded="true"] .menu-btn-lines { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn-lines::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn-lines::after { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(640px, 100vh); min-height: max(640px, 100dvh);
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--night); color: var(--white);
}
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media { z-index: -2; }
.hero-media img { object-fit: cover; object-position: 50% 100%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(12, 20, 23, .55) 0%, rgba(12, 20, 23, 0) 20%),
    linear-gradient(0deg, rgba(12, 20, 23, .9) 0%, rgba(12, 20, 23, .62) 26%, rgba(12, 20, 23, 0) 52%);
}
.hero-content { padding-top: calc(var(--header-h) + 40px); padding-bottom: clamp(48px, 9vh, 96px); }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1; letter-spacing: -.04em; max-width: 13ch; margin-bottom: .35em; }
.hero-lead { font-size: clamp(1.05rem, 1.3vw, 1.2rem); color: rgba(255, 255, 255, .84); max-width: 40ch; margin-bottom: 1.8em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.hero-content > * { animation: rise .9s var(--ease) both; }
.hero-content > :nth-child(2) { animation-delay: .08s; }
.hero-content > :nth-child(3) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Infolinje rett under heroen */
.infostrip { border-bottom: 1px solid var(--line); background: var(--paper); }
.infostrip-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.infostrip-inner > div { padding: 24px 0 24px 28px; border-left: 1px solid var(--line); }
.infostrip-inner > div:first-child { padding-left: 0; border-left: 0; }
.infostrip dt { font-size: .85rem; color: var(--muted); margin-bottom: 2px; }
.infostrip dd { font-weight: 600; display: flex; align-items: center; gap: 9px; }
.infostrip a { text-decoration: none; }
.infostrip a:hover { color: var(--petrol); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.status.is-open .status-dot { background: var(--open); }
.status.is-closed .status-dot { background: var(--closed); }

/* Seksjoner */
.section { padding: clamp(88px, 10vw, 136px) 0; }
.section-tint { background: var(--tint); }
.section-petrol { background: var(--petrol); color: var(--white); }
.section-lead { color: var(--muted); max-width: 52ch; margin: .9em 0 0; font-size: 1.1rem; }

/* Biler: to biler i ulik størrelse */
.showcase { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 2.5vw, 32px); align-items: end; margin-top: clamp(40px, 5vw, 64px); }
.car-img { overflow: hidden; border-radius: var(--radius); background: var(--line); }
.car-img img { width: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.car-wide .car-img img { aspect-ratio: 4 / 3; }
.car-tall .car-img img { aspect-ratio: 4 / 5; }
.car:hover .car-img img { transform: scale(1.03); }
.car figcaption { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center; padding-top: 16px; }
.car-name { font-weight: 600; font-size: 1.2rem; letter-spacing: -.015em; }
.car-type { grid-row: 2; color: var(--muted); }
.car-status { grid-column: 2; grid-row: 1 / 3; font-weight: 600; color: var(--muted); }

.ask {
  display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap;
  margin-top: clamp(48px, 6vw, 72px); padding-top: 32px; border-top: 1px solid var(--line);
}
.ask-text { margin: 0; font-size: clamp(1.15rem, 1.6vw, 1.35rem); font-weight: 500; letter-spacing: -.01em; max-width: 44ch; }
.ask-actions { display: flex; align-items: center; gap: 16px 32px; flex-wrap: wrap; }

/* Kommisjon: den ene fargeflaten */
.consign { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.consign-intro p { color: rgba(255, 255, 255, .8); max-width: 36ch; margin: 1em 0 2em; font-size: 1.1rem; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 32px; padding: 26px 0; border-top: 1px solid rgba(255, 255, 255, .22); }
.steps li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .22); }
.steps p { margin: 0; color: rgba(255, 255, 255, .78); }
.consign-quote { margin-top: clamp(40px, 5vw, 56px); }
.consign-quote p { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 500; line-height: 1.4; letter-spacing: -.015em; max-width: 34ch; margin-bottom: .7em; }
.consign-quote footer { color: rgba(255, 255, 255, .66); font-size: .95rem; }

/* Om oss: bredt bilde med tekstpanel over nedre kant */
.about { padding-bottom: clamp(88px, 10vw, 136px); }
.about-photo img { width: 100%; height: clamp(320px, 42vw, 580px); object-fit: cover; object-position: 50% 30%; border-radius: var(--radius); }
.about-panel {
  position: relative; max-width: 620px; margin: clamp(-160px, -10vw, -96px) 0 0 clamp(24px, 5vw, 64px);
  background: var(--paper); padding: clamp(32px, 4vw, 52px); border-radius: var(--radius);
}
.about-panel h2 { margin-bottom: .55em; }
.about-panel p { color: var(--muted); max-width: 52ch; }
.about-panel .btn { margin-top: .8em; }

/* Omtaler: ett stort sitat og to små */
.reviews { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 112px); align-items: start; margin-top: clamp(40px, 5vw, 64px); }
.review-main p { font-size: clamp(1.6rem, 2.9vw, 2.45rem); font-weight: 500; line-height: 1.22; letter-spacing: -.025em; margin-bottom: .8em; }
.review-main footer, .review-side footer { color: var(--muted); font-size: .95rem; }
.score { margin: 0 0 8px; color: var(--muted); }
.score strong { display: block; font-size: clamp(2.2rem, 3.4vw, 2.8rem); font-weight: 600; letter-spacing: -.03em; color: var(--petrol); line-height: 1.1; }
.review-side blockquote { padding: 24px 0; border-top: 1px solid var(--line); }
.review-side blockquote:first-of-type { margin-top: 24px; }
.review-side blockquote p { font-size: 1.12rem; font-weight: 500; margin-bottom: .5em; }

/* Kontakt */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.phone-big {
  display: inline-block; margin: 32px 0 24px; text-decoration: none;
  font-size: clamp(2.2rem, 3.6vw, 3rem); font-weight: 600; letter-spacing: -.035em; color: var(--petrol);
}
.phone-big:hover { color: var(--petrol-deep); }
.contact-list > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-list dt { color: var(--muted); }
.contact-list a { text-decoration: none; }
.contact-list dd > a:first-child:hover { color: var(--petrol); }
.hours { width: 100%; max-width: 420px; border-collapse: collapse; margin-top: 40px; }
.hours caption { text-align: left; font-weight: 600; font-size: 1.15rem; margin-bottom: 10px; }
.hours th, .hours td { padding: 8px 0; text-align: left; font-weight: 400; border-bottom: 1px solid var(--line); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 600; color: var(--petrol); }

.form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); }
.form h3 { font-size: 1.4rem; letter-spacing: -.02em; margin-bottom: 24px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field label { font-size: .92rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1px solid #c9d1d3; border-radius: var(--radius);
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230f1a1d' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--petrol); box-shadow: 0 0 0 3px rgba(4, 78, 99, .16); }
.field .is-invalid { border-color: var(--closed); }
.field-help { margin: 0; font-size: .86rem; color: var(--muted); }
.form-error { color: var(--closed); font-size: .92rem; font-weight: 500; }
.form-note { margin: 14px 0 0; font-size: .86rem; color: var(--muted); }

.map { margin-top: clamp(56px, 7vw, 88px); }
.map iframe { display: block; width: 100%; height: clamp(300px, 34vw, 440px); border: 0; border-radius: var(--radius); }

/* Footer */
.site-footer { background: var(--night); color: rgba(255, 255, 255, .72); padding: clamp(56px, 7vw, 80px) 0 28px; font-size: .97rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-brand img { width: 200px; margin-bottom: 18px; }
.footer-brand p { max-width: 30ch; }
.site-footer h2 { font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--white); margin-bottom: 10px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .88rem; color: rgba(255, 255, 255, .55);
}
.footer-bottom p { margin: 0; }

/* Ringeknapp på mobil */
.call-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
  display: none; align-items: center; justify-content: center;
  min-height: 52px; border-radius: var(--radius); background: var(--petrol); color: var(--white);
  font-weight: 600; text-decoration: none;
  transform: translateY(140%); transition: transform .35s var(--ease);
}
.call-bar.is-visible { transform: none; }

/* Inntoning ved scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* 404 */
.notfound { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px var(--gutter); }
.notfound img { width: 220px; margin-bottom: 48px; }
.notfound h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: .5em; }
.notfound p { color: var(--muted); margin-bottom: 1.8em; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.notfound .btn-line { border-color: var(--petrol); color: var(--petrol); }

/* Brytepunkter */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .header-phone { display: none; }
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 49;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    background: var(--paper); color: var(--ink); border-top: 1px solid var(--line);
    padding: 8px var(--gutter) 40px;
    display: flex; flex-direction: column; gap: 28px; overflow-y: auto;
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transition: opacity .25s; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul li { border-bottom: 1px solid var(--line); }
  .nav ul a { display: block; padding: 16px 0; font-size: 1.4rem; font-weight: 600; letter-spacing: -.02em; }
  .nav ul a::after { display: none; }
  .nav-phone { display: inline-flex; min-height: 54px; }
  body.menu-open { overflow: hidden; }

  .infostrip-inner { grid-template-columns: 1fr 1fr; }
  .infostrip-inner > div { padding: 18px 0 18px 20px; }
  .infostrip-inner > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .infostrip-inner > div:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .showcase { grid-template-columns: 1fr; gap: 40px; }
  .car-tall .car-img img { aspect-ratio: 4 / 3; object-position: 50% 60%; }
  .consign, .reviews, .contact { grid-template-columns: 1fr; }
  .call-bar { display: flex; }
  .site-footer { padding-bottom: 92px; }

  /* Nettbrett og mobil: bildet øverst og teksten under, så overskriften ikke ligger oppå bilen */
  .hero { display: block; min-height: 0; }
  .hero-media { position: relative; display: block; height: auto; }
  .hero-media img { position: relative; height: auto; aspect-ratio: 4 / 3; object-position: 50% 60%; }
  .hero-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(12, 20, 23, .55) 0%, rgba(12, 20, 23, 0) 26%, rgba(12, 20, 23, 0) 64%, var(--night) 100%);
  }
  .hero::before { display: none; }
  .hero-content { position: relative; margin-top: -48px; padding-top: 0; padding-bottom: 40px; }
}

@media (max-width: 760px) {
  .hero-media img { aspect-ratio: 1 / 1.05; object-position: 50% 42%; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero h1 { font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .hero-actions .btn, .ask-actions .btn { flex: 1 1 100%; }
  .infostrip-inner > div { padding: 14px 0 14px 14px; }
  .infostrip-inner > div:nth-child(odd) { padding-left: 0; }
  .infostrip dt { font-size: .8rem; }
  .infostrip dd { font-size: .95rem; }
  .steps li { grid-template-columns: 1fr; }
  .about-panel { margin: -40px 12px 0; padding: 28px 24px; }
  .field-row { grid-template-columns: 1fr; }
  .contact-list > div { grid-template-columns: 1fr; gap: 2px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
