/* =====================================================================
   Auto-Service Lundström – utseende
   Färger och textstorlekar finns som variabler här uppe.
   Färgerna kommer från logon: rött (--accent) och gult (--field),
   båda sätts från config.js.
   ===================================================================== */

:root {
  --bg: #ecedea;          /* ljus grund */
  --surface: #e0e2de;     /* ett tonsteg mörkare */
  --ink: #1d1e1e;         /* text, kol snarare än svart */
  --muted: #4b4f4e;       /* sekundär text */
  --accent: #d7181e;      /* logons röda, skrivs över från config.js */
  --field: #ffe838;       /* logons gula */
  --plate-blue: #1f4fa8;

  --font: "Switzer", "Helvetica Neue", Arial, sans-serif;

  /* Fem storlekar gör jobbet */
  --step-small: 15px;
  --step-body: clamp(17px, 1rem + 0.2vw, 19px);
  --step-lead: clamp(20px, 1.1rem + 0.9vw, 32px);
  --step-head: clamp(34px, 1.3rem + 3vw, 64px);
  --step-display: clamp(44px, 7.3vw, 120px);

  --margin: clamp(16px, 2.2vw, 32px);
  --gap: clamp(120px, 14vw, 220px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-body)/1.5 var(--font);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol { margin: 0; padding: 0; }
ol { list-style: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--field); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 var(--margin); }

h2 {
  font-size: var(--step-head); font-weight: 600; line-height: 1;
  letter-spacing: -0.04em; text-wrap: balance; max-width: 16ch;
}
h3 { font-size: var(--step-body); font-weight: 600; line-height: 1.3; }

.link {
  font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.2em;
  transition: text-decoration-color .2s, color .2s;
}
@media (hover: hover) and (pointer: fine) { .link:hover { color: var(--accent); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 28px;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: var(--step-body); text-decoration: none; white-space: nowrap;
  border: 0; border-radius: 0; cursor: pointer;
  transition: transform .12s var(--ease), background-color .2s, color .2s;
}
.btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--ink); color: var(--bg); } }

/* ---------- Sidhuvud ---------- */
.header { position: absolute; inset: 0 0 auto; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; font-size: var(--step-small); }
.brand { display: block; flex: none; }
.brand img { height: 48px; width: auto; }
.nav { display: flex; justify-content: space-between; margin-left: auto; width: min(44%, 560px); }
.nav a { text-decoration: none; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }
.lang { display: flex; gap: 2px; margin-left: 24px; }
.lang button { background: none; border: 0; padding: 10px 6px; cursor: pointer; color: var(--muted); font-size: var(--step-small); }
.lang button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero-inner {
  min-height: 100svh; display: grid; grid-template-rows: 1fr auto 1fr; grid-template-columns: minmax(0, 1fr);
  padding-top: 72px; padding-bottom: clamp(24px, 3vw, 40px);
}
.hero-name {
  grid-row: 2;
  display: flex; align-items: baseline; justify-content: center; gap: 0.18em;
  font-size: var(--step-display); font-weight: 600; line-height: .95; letter-spacing: -0.045em;
  white-space: nowrap;
}
.hero-word { white-space: nowrap; }
.hero-word:first-child { color: var(--accent); }
.hero-shot {
  display: inline-block; width: 1.7em; height: 0.72em; overflow: hidden;
  align-self: baseline; transform: translateY(0.02em);
}
.hero-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 60%; }
.hero-foot {
  grid-row: 3; align-self: end;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end;
}
.hero-lead { grid-column: 1 / span 5; font-size: var(--step-body); max-width: 44ch; }
.status { display: block; margin-top: 12px; font-weight: 500; }
.status::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--muted); margin-right: 10px; vertical-align: 0.05em;
}
.status.is-open::before { background: #1f9d55; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.4); opacity: .55; } }

.plate-form { grid-column: 7 / -1; justify-self: end; display: grid; gap: 10px; width: min(100%, 600px); }
.plate-label { font-size: var(--step-small); font-weight: 500; }
.plate-row { display: flex; gap: 12px; }
.plate {
  flex: 1; display: flex; min-width: 0; height: 56px;
  background: #fff; border: 3px solid var(--ink); border-radius: 6px; overflow: hidden;
  transition: transform .25s var(--ease);
}
.plate:focus-within { transform: rotate(-1.2deg); }
.plate-eu {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 36px; background: var(--plate-blue); color: #fff; font-size: 11px; font-weight: 600; line-height: 1;
}
.plate-input {
  flex: 1; width: 100%; min-width: 0; border: 0; background: none; padding: 0 12px;
  font-size: 30px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-align: center;
}
.plate-input::placeholder { color: #b9bcbb; }
.plate-input:focus { outline: none; }

/* ---------- Tjänster ---------- */
.services { padding: var(--gap) 0 0; }
.statement {
  margin-top: 40px; max-width: 30em;
  font-size: clamp(24px, 1rem + 1.4vw, 36px); font-weight: 500; line-height: 1.22; letter-spacing: -0.02em;
}
.slot {
  display: inline-block; width: 1.9em; height: 1em; overflow: hidden;
  vertical-align: -0.14em; margin: 0 0.06em;
}
.slot img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.statement:hover .slot img { transform: scale(1.12); }
.service-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 40px;
  margin-top: clamp(72px, 8vw, 120px);
}
.service dt { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.service dd { margin-top: 10px; max-width: 36ch; }

/* ---------- Om oss ---------- */
.about { padding: var(--gap) 0 clamp(96px, 9vw, 140px); }
.about-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.facts { grid-column: 1 / span 3; display: grid; gap: 28px; align-content: start; padding-top: 8px; font-size: var(--step-small); }
.facts h3 { font-size: var(--step-small); }
.facts p { color: var(--muted); max-width: 26ch; }
.facts .link { justify-self: start; }
.about-body { grid-column: 5 / -1; }
.about-p1, .about-p2 {
  font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.015em; max-width: 34em;
}
.about-p1 { margin-top: 40px; }
.about-p2 { margin-top: 1.3em; color: var(--muted); }
.dropcap {
  float: left; width: 3.9em; height: 3.9em; margin: 0.2em 0.6em 0 0; overflow: hidden;
}
.dropcap img { width: 100%; height: 100%; object-fit: cover; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: clamp(64px, 7vw, 104px); }
.stat dt { font-size: var(--step-display); font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat dd { margin-top: 8px; font-size: var(--step-small); max-width: 18ch; }

/* ---------- Process: ett verb i taget ---------- */
.process { background: var(--ink); color: var(--bg); }
.process-head {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end;
  padding-top: clamp(96px, 9vw, 140px); padding-bottom: clamp(64px, 7vw, 104px);
}
.process-head h2 { grid-column: 1 / span 6; }
.process-head p { grid-column: 8 / -1; font-size: var(--step-lead); line-height: 1.3; max-width: 26ch; }
.panel { position: relative; height: 100svh; overflow: clip; color: #fff; }
.panel-img { position: absolute; inset: -8% 0; }
.panel-img img { width: 100%; height: 100%; object-fit: cover; }
.panel::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(20, 21, 21, .42); }
.panel-verb {
  position: absolute; z-index: 2; inset: 50% 0 auto; transform: translateY(-50%);
  font-size: clamp(80px, 17vw, 300px); font-weight: 600; line-height: 1; letter-spacing: -0.05em;
  text-align: center;
}
.panel-text {
  position: absolute; z-index: 2; left: var(--margin); bottom: clamp(24px, 4vw, 48px);
  max-width: 34ch; font-weight: 500;
}
.panel-text strong { display: block; font-size: var(--step-lead); letter-spacing: -0.02em; margin-bottom: 4px; }

/* ---------- Kontakt ---------- */
.contact { background: var(--ink); color: var(--bg); }
.contact-inner {
  display: grid; gap: clamp(72px, 8vw, 120px);
  padding-top: clamp(96px, 9vw, 140px); padding-bottom: clamp(32px, 4vw, 56px);
}
.contact-top { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end; }
.contact-top h2 { grid-column: 1 / span 6; }
.contact-top p { grid-column: 8 / -1; font-size: var(--step-lead); line-height: 1.3; max-width: 26ch; }
.contact-mail {
  display: block; width: fit-content; text-decoration: none;
  font-size: var(--step-display); font-weight: 500; line-height: 1; letter-spacing: -0.045em;
  transition: color .25s;
}
.contact-mail span { display: block; }
@media (hover: hover) and (pointer: fine) { .contact-mail:hover { color: var(--accent); } }
.contact-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; font-size: var(--step-small); }
.contact-foot h3 { font-size: var(--step-small); color: #a9adab; font-weight: 500; margin-bottom: 6px; }
.contact-foot .link { display: inline-block; margin-top: 4px; }
.contact-foot .link + .link { display: block; margin-top: 10px; width: fit-content; }
.hours div { display: flex; gap: 16px; justify-content: space-between; max-width: 280px; }
.hours dd { font-variant-numeric: tabular-nums; }

/* ---------- Sidfot ---------- */
.footer { background: var(--field); color: var(--ink); }
.footer-inner {
  min-height: 80svh; display: grid; grid-template-rows: auto 1fr auto; gap: 48px;
  padding-top: 40px; padding-bottom: 32px;
}
.footer-top { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; font-size: var(--step-small); }
.footer-logo { grid-column: 1 / span 4; width: min(100%, 340px); height: auto; margin-top: -6px; }
.footer-top p:nth-of-type(1) { grid-column: 6 / span 3; }
.footer-top p:nth-of-type(2) { grid-column: 9 / span 3; }
.footer-top .link { grid-column: 12; justify-self: end; align-self: start; }
.footer-call { align-self: end; }
.footer-label { font-size: var(--step-lead); letter-spacing: -0.02em; max-width: none; }
.footer-phone {
  display: block; margin-top: 12px; margin-left: -0.04em; text-decoration: none; white-space: nowrap;
  font-size: var(--step-display); font-weight: 600; line-height: .95; letter-spacing: -0.05em;
  transition: color .25s;
}
@media (hover: hover) and (pointer: fine) { .footer-phone:hover { color: var(--accent); } }
.footer-meta { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; font-size: var(--step-small); }
.credits { max-width: 75ch; justify-self: end; }
.credits a { text-underline-offset: 0.15em; }

/* ---------- Demorad (tas bort när sidan går live) ---------- */
.demo-bar {
  position: fixed; inset: auto 0 0; z-index: 40;
  padding: 10px var(--margin); background: var(--ink); color: var(--field);
  font-size: var(--step-small); font-weight: 600; line-height: 1.35; text-align: center;
}
body:has(.demo-bar) { padding-bottom: 64px; }

/* ---------- Rörelse ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
  .js body.loaded .rise { opacity: 1; transform: none; }
  .js .shutter { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease-in-out) .35s; }
  .js .shutter img { transform: scale(1.12); transition: transform 1.5s var(--ease) .35s; }
  .js body.loaded .shutter { clip-path: inset(0); }
  .js body.loaded .shutter img { transform: none; }
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
  .js .reveal.in { opacity: 1; transform: none; }
  .panel-img { will-change: transform; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status.is-open::before { animation: none; }
}

/* ---------- Mindre skärmar ---------- */
@media (max-width: 1000px) {
  .hero-inner { min-height: 0; padding-top: 84px; grid-template-rows: auto auto; gap: 0; }
  .hero-name {
    grid-row: 1; flex-direction: column; align-items: center; gap: 16px;
    font-size: 14.2vw; white-space: normal; line-height: .9; gap: 12px;
  }
  .hero-shot { width: 100%; height: auto; aspect-ratio: 2 / 1; transform: none; }
  .hero-foot { grid-row: 2; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; }
  .hero-lead, .plate-form { grid-column: 1; justify-self: stretch; }
  .plate-row { flex-direction: column; }
  .plate { flex: none; }
  .plate-form { width: min(100%, 600px); justify-self: start; }
  .service-list { grid-template-columns: 1fr 1fr; }
  .facts { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 1fr 1fr; padding-top: 56px; }
  .about-body { grid-column: 1 / -1; }
  .stats { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 64px 0 auto; width: auto; margin: 0; z-index: 30;
    flex-direction: column; gap: 8px; padding: 16px var(--margin) 32px; background: var(--bg);
    font-size: var(--step-head); font-weight: 600; letter-spacing: -0.03em;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .25s var(--ease), visibility .2s;
  }
  .nav.open { visibility: visible; opacity: 1; transform: none; }
  .header-inner { height: 64px; }
  .brand img { height: 40px; }
  .lang { margin-left: auto; }
  .menu-toggle { display: block; background: none; border: 0; padding: 10px 0; font-size: var(--step-small); font-weight: 600; cursor: pointer; }


  .slot { width: 1.5em; }
  .service-list { grid-template-columns: 1fr; gap: 36px; }
  .facts { grid-template-columns: 1fr; gap: 20px; }
  .about-p1, .about-p2 { font-size: var(--step-body); line-height: 1.5; letter-spacing: -0.005em; }
  .dropcap { width: 6em; height: 6em; margin-top: 0.3em; }

  .process-head, .contact-top { grid-template-columns: 1fr; }
  .process-head h2, .process-head p, .contact-top h2, .contact-top p { grid-column: 1; }
  .panel-verb { font-size: 18vw; }
  .panel-text { right: var(--margin); }

  .contact-inner { min-height: 86svh; }
  .contact-mail { font-size: 7.6vw; letter-spacing: -0.035em; }
  .contact-foot { grid-template-columns: 1fr; gap: 20px; }

  .footer-top, .footer-meta { grid-template-columns: 1fr; gap: 16px; }
  .footer-logo, .footer-top p:nth-of-type(1), .footer-top p:nth-of-type(2), .footer-top .link { grid-column: 1; justify-self: start; }
  .footer-logo { width: min(100%, 300px); }
  .footer-phone { font-size: 12.4vw; }
  .credits { justify-self: start; }
}
