/* ==========================================================
   Gebestams Bil & Plåt AB – Swiss-Industrial
   ========================================================== */

/* ---------- Tokens ---------- */
:root {
  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-text: #1E293B;
  --color-text-muted: #475569;
  --color-line: rgba(30, 41, 59, 0.22);
  --color-line-strong: #1E293B;
  --color-accent: #EA580C;
  --color-accent-hover: #C2410C;

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

  --radius: 0px;
  --border: 1px solid var(--color-line);
  --border-strong: 1px solid var(--color-line-strong);

  --container: 1200px;
  --gutter: 16px;
  --section-pad: clamp(4rem, 9vw, 7.5rem);
  --header-h: 72px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: var(--radius);
}

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

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

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

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--color-text);
  color: var(--color-bg);
  text-decoration: none;
}
.skip-link:focus { top: 0.5rem; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.125rem, 5.2vw, 3rem); }
h2 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.375rem; letter-spacing: -0.01em; }

.text-link {
  display: inline-block;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0.875rem 1.75rem;
  border: 2px solid transparent;
  font-family: var(--font-sans);
  /* 19px bold = "large text" i WCAG – ger godkänd kontrast vit på orange */
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-line-strong);
  color: var(--color-text);
}
.btn-outline:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
  border-bottom: var(--border-strong);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}
.logo-mark {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.logo-sub {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: -8px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* Mobilmeny */
.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  background: var(--color-bg);
  border-bottom: var(--border-strong);
}
.site-nav.is-open { display: block; }

.site-nav ul { border-top: var(--border); }
.site-nav li { border-bottom: var(--border); }
.site-nav a {
  display: block;
  padding: 1rem var(--gutter);
  font-weight: 600;
  text-decoration: none;
}
.site-nav ul a:hover { background: var(--color-surface); }
.site-nav a[aria-current="page"] { color: var(--color-accent-hover); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    background: none;
    border: 0;
  }
  .site-nav ul {
    display: flex;
    gap: 2.25rem;
    border: 0;
  }
  .site-nav li { border: 0; }
  .site-nav a {
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
  }
  .site-nav ul a:hover {
    background: none;
    border-bottom-color: var(--color-text);
  }
  .site-nav a[aria-current="page"] {
    color: inherit;
    border-bottom-color: var(--color-accent);
  }
}

/* ---------- Hero ---------- */
.hero {
  border-bottom: var(--border-strong);
}

.hero-media {
  width: 100%;
  height: clamp(280px, 52vw, 720px);
  overflow: hidden;
  background: #CBD5E1;
  border-bottom: var(--border-strong);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  padding: 2.5rem 0 3rem;
}

.hero-lead {
  max-width: 40rem;
  margin-top: 1.25rem;
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (min-width: 560px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (min-width: 900px) {
  .hero-media { border-bottom: 0; }

  /* Textpanelen ligger förankrad över bildens nederkant */
  .hero-content {
    position: relative;
    max-width: 52rem;
    margin-top: -11rem;
    padding: 3rem 3rem 3.25rem;
    background: var(--color-bg);
    border: var(--border-strong);
    border-bottom: 0;
  }
}

/* ---------- Faktarad ---------- */
.facts {
  background: var(--color-text);
  color: var(--color-bg);
}

.facts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
  font-weight: 600;
}

@media (min-width: 900px) {
  .facts-list { justify-content: space-between; }
}

/* ---------- Sektioner ---------- */
.section {
  padding-block: var(--section-pad);
  border-bottom: var(--border-strong);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-intro {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

/* ---------- Tjänster ---------- */
.services {
  display: grid;
  grid-template-columns: 1fr;
  border-top: var(--border-strong);
}

.service {
  display: flex;
  flex-direction: column;
  padding: 2rem 0 2.5rem;
  border-bottom: var(--border);
}
.service > p {
  margin-top: 1rem;
  color: var(--color-text-muted);
}

.service-list {
  margin-top: auto;
  padding-top: 1.75rem;
}
.service-list li {
  padding: 0.75rem 0;
  border-top: var(--border);
  font-weight: 600;
}

@media (min-width: 900px) {
  .services {
    grid-template-columns: repeat(3, 1fr);
    border-bottom: var(--border-strong);
  }
  .service {
    padding: 2.5rem 2rem 2rem;
    border-bottom: 0;
    border-left: var(--border);
  }
  .service:first-child { padding-left: 0; border-left: 0; }
  .service:last-child { padding-right: 0; }
}

/* ---------- Försäkring ---------- */
.section-trust { background: var(--color-surface); }

.trust-actions { margin-top: 2rem; }

.trust-lead {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.trust-list { border-top: var(--border-strong); }

.trust-item {
  padding: 1.5rem 0;
  border-bottom: var(--border);
}
.trust-item h3 { font-size: 1.1875rem; }
.trust-item p {
  margin-top: 0.375rem;
  color: var(--color-text-muted);
}

@media (min-width: 900px) {
  .trust-grid {
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: 5rem;
    align-items: start;
  }
  .trust-head { margin-bottom: 0; }
}

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: var(--border-strong);
  border-bottom: var(--border-strong);
}

.contact-cell {
  padding: 2rem 0;
  border-bottom: var(--border);
}
.contact-cell:last-child { border-bottom: 0; }
.contact-cell .contact-big { margin-top: 0.75rem; }
.contact-cell address {
  margin-top: 0.5rem;
  color: var(--color-text-muted);
}

.contact-big {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.contact-big a { text-decoration: none; }
.contact-big a:hover { text-decoration: underline; text-underline-offset: 6px; }

.hours {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
}
.hours th,
.hours td {
  padding: 0.625rem 0;
  border-bottom: var(--border);
  text-align: left;
  font-weight: 500;
}
.hours td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.hours tr.is-today th,
.hours tr.is-today td { font-weight: 700; }

.open-status {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}
.open-status.is-open { color: #15803D; font-weight: 600; }

.contact-more { margin-top: 2rem; }

.contact-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.75rem;
}

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-cell {
    padding: 2.5rem 2rem;
    border-bottom: 0;
    border-left: var(--border);
  }
  .contact-cell:first-child { padding-left: 0; border-left: 0; }
  .contact-cell:last-child { padding-right: 0; }

  .contact-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-top: 3.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-text {
  max-width: 28rem;
  margin-top: 1rem;
  color: var(--color-text-muted);
}

.footer-sites {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  line-height: 1.55;
}
.footer-sites a { text-decoration: none; }
.footer-sites a:hover { text-decoration: underline; }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-block: 1.25rem;
  border-top: var(--border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

@media (min-width: 900px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ---------- Våra verkstäder ---------- */
.page-head {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem);
}

/* ---------- 404 ---------- */
.not-found {
  padding-bottom: var(--section-pad);
  border-bottom: var(--border-strong);
}

.error-code {
  margin-bottom: 1rem;
  font-size: clamp(4.5rem, 16vw, 9rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--color-accent);
}

.site-block {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-top: var(--border-strong);
}

.site-grid {
  display: grid;
  gap: 2rem;
}

.site-photo { margin: 0; }
.site-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: var(--border-strong);
}

.site-role {
  margin-top: 0.375rem;
  font-weight: 600;
  color: var(--color-accent-hover);
}

.site-address {
  margin-top: 1.25rem;
  font-size: 1.125rem;
}

.site-info .contact-big { margin-top: 0.75rem; }
.site-info .hours { margin-top: 1.5rem; }

.site-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

@media (min-width: 560px) {
  .site-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (min-width: 900px) {
  .site-grid {
    grid-template-columns: 7fr 5fr;
    gap: 4rem;
    align-items: start;
  }
}

/* ---------- Skadeanmälan ---------- */
/* Sista sektionen före footern, avgränsas som .section på övriga sidor */
.claim-section { border-bottom: var(--border-strong); }

.claim-grid {
  display: grid;
  gap: 3rem;
}

.claim-form {
  display: grid;
  gap: 1.5rem;
}

.field-row {
  display: grid;
  gap: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
}
.field label {
  font-weight: 600;
}
.field-hint {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 56px;
  margin-top: 0.5rem;
  padding: 0.875rem 1rem;
  background: var(--color-surface);
  border: var(--border-strong);
  font: inherit;
  color: var(--color-text);
}
.field textarea {
  resize: vertical;
  min-height: 10rem;
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline-offset: 0;
}
.field [aria-invalid="true"] {
  border-color: #B91C1C;
  box-shadow: inset 0 0 0 1px #B91C1C;
}

.input-plate {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Honeypot – utanför skärmen men inte display:none, så bottar fyller i det */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.form-actions .btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.form-status:empty { display: none; }
.form-status {
  width: 100%;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--color-text);
  background: var(--color-surface);
  font-weight: 600;
}
.form-status.is-success { border-left-color: #15803D; color: #15803D; }
.form-status.is-error { border-left-color: #B91C1C; color: #B91C1C; }

.claim-aside {
  padding-top: 2rem;
  border-top: var(--border-strong);
}
.claim-aside-title { font-size: 1.375rem; }

.claim-steps {
  margin-top: 1.25rem;
  counter-reset: step;
}
.claim-steps li {
  position: relative;
  padding: 1.25rem 0 1.25rem 3rem;
  border-bottom: var(--border);
  counter-increment: step;
}
.claim-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1.25rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--color-text);
  color: var(--color-bg);
  font-weight: 800;
}
.claim-steps h3 { font-size: 1.1875rem; }
.claim-steps p {
  margin-top: 0.375rem;
  color: var(--color-text-muted);
}

.claim-aside-call {
  margin-top: 1.5rem;
  font-weight: 600;
}
.claim-aside-call a { white-space: nowrap; }

@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .form-actions {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 900px) {
  .claim-grid {
    grid-template-columns: 7fr 4fr;
    gap: 5rem;
    align-items: start;
  }
  .claim-aside {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    padding-top: 0;
    padding-left: 2.5rem;
    border-top: 0;
    border-left: var(--border-strong);
  }
}

/* Bilder i formulär */
.field-label { font-weight: 600; }
.field-optional {
  font-weight: 400;
  color: var(--color-text-muted);
}

.file-drop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
  padding: 1rem;
  border: 1px dashed var(--color-line-strong);
  background: var(--color-surface);
  cursor: pointer;
}
.file-drop:hover .btn-outline {
  background: var(--color-text);
  color: var(--color-bg);
}
.file-drop:focus-within {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}
.file-drop-text {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.file-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.75rem;
}
.file-previews:not(:empty) { margin-top: 0.75rem; }
.file-preview {
  position: relative;
  border: var(--border-strong);
  background: var(--color-surface);
}
.file-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.file-preview-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: var(--color-text);
  color: var(--color-bg);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.file-preview-remove:hover { background: #B91C1C; }
