/* AM Vélvirki minn 24/7. Brand red on charcoal, from the company's own van and cover graphics.
   Shape rule: buttons and tags are pills, panels are 14px, inputs are 10px. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-var.woff2") format("woff2");
}

:root {
  --bg: #f3f3f1;
  --surface: #e9e9e6;
  --surface-raised: #fbfbfa;
  --field: #fefefd;
  --ink: #121316;
  --ink-2: #4b4e53;
  --line: #d5d6d2;
  --line-strong: #121316;
  --accent: #d42a22;
  --accent-hover: #b8231c;
  --on-accent: #fffdfc;
  --alt-bg: #16181b;
  --alt-fg: #f2f1ee;
  --alt-fg-2: #b4b6ba;
  --road: #16181b;
  --danger: #b3261e;
  --success: #1f7a4a;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --radius-panel: 14px;
  --radius-input: 10px;
  --header-h: 64px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f11;
    --surface: #15171a;
    --surface-raised: #1b1e22;
    --field: #111316;
    --ink: #f2f1ee;
    --ink-2: #a7aaae;
    --line: #2a2d32;
    --line-strong: #f2f1ee;
    --accent: #dc2f27;
    --accent-hover: #ef4038;
    --alt-bg: #202328;
    --road: #1d2024;
    --danger: #ff8a80;
    --success: #7fd6a4;
  }
}

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

[hidden] { display: none !important; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

img, svg, iframe { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.icon--sm { width: 1em; height: 1em; }
.icon--lg { width: 1.75rem; height: 1.75rem; }
.icon--xl { width: 3rem; height: 3rem; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 30;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 700 1.0625rem/1.1 var(--font);
  font-stretch: 105%;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 120ms var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.99); }

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

.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--line-strong); }

.btn--compact { min-height: 42px; padding: 0 1rem; font-size: 1rem; }
.btn--xl { min-height: 68px; padding: 0 1.75rem; font-size: 1.1875rem; }
.btn--block { width: 100%; }
.btn[aria-disabled="true"] { opacity: 0.7; cursor: progress; }

.btn__stack { display: grid; justify-items: start; gap: 2px; }
.btn__number { font-size: 1.375rem; font-weight: 900; font-stretch: 115%; letter-spacing: 0.01em; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto 0 0;
  text-decoration: none;
}
.brand__badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.9375rem;
  font-weight: 900;
  font-stretch: 115%;
  line-height: 1.2;
}
.brand__name {
  font-size: 1.125rem;
  font-weight: 800;
  font-stretch: 105%;
  letter-spacing: -0.005em;
  line-height: 1;
}

.site-nav { display: none; gap: 28px; }
.site-nav a {
  padding-block: 6px;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: border-color 160ms var(--ease-out);
}
.site-nav a:hover { border-bottom-color: var(--accent); }

.site-header__actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  min-height: 42px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 0.9375rem/1 var(--font);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  cursor: pointer;
}
.lang-toggle:hover { text-decoration-thickness: 2px; }

.header-call { display: none; }

@media (min-width: 768px) {
  .header-call { display: inline-flex; }
}
@media (min-width: 960px) {
  .site-nav { display: flex; }
}

/* Hero */

.hero { position: relative; }

.hero__inner { padding-block: 40px 56px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
}
.status__dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  /* A live "on call" signal. */
  .status__dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.8s var(--ease-out) infinite;
  }
}
@keyframes pulse {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(2.8); opacity: 0; }
}

.hero__title { display: grid; }
.hero__247 {
  color: var(--accent);
  font-size: clamp(6.5rem, 2.2rem + 18vw, 15.5rem);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.8;
  letter-spacing: -0.03em;
  margin-left: -0.04em;
}
.hero__rest {
  margin-top: 0.3em;
  font-size: clamp(2rem, 1rem + 4vw, 4.5rem);
  font-weight: 800;
  font-stretch: 100%;
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero__lead {
  margin-top: 22px;
  max-width: 42ch;
  color: var(--ink-2);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.45;
}

.hero__actions {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

@media (min-width: 560px) {
  .hero__actions { display: flex; flex-wrap: wrap; }
}

@media (min-width: 960px) {
  .hero__inner { padding-block: 64px 88px; }
  .hero__lead { max-width: 48ch; }
}

.road {
  height: 14px;
  overflow: hidden;
  background: var(--road);
  display: flex;
  align-items: center;
}
.road__dashes {
  display: block;
  width: calc(100% + 80px);
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 40px, transparent 40px 80px);
}
@media (prefers-reduced-motion: no-preference) {
  /* Lane markings sliding past: we drive to you. */
  .road__dashes { animation: drive 900ms linear infinite; }
}
@keyframes drive { to { transform: translateX(-80px); } }

/* Proof strip */

.proof { border-bottom: 1px solid var(--line); }
.proof__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
}
.proof__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 18px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}
.proof__item .icon { color: var(--accent); width: 1.5rem; height: 1.5rem; }

@media (min-width: 960px) {
  .proof__list { grid-template-columns: repeat(4, 1fr); }
  .proof__item { padding-block: 24px; }
}

/* Sections */

.section { padding-block: clamp(64px, 9vw, 112px); }

.section-title {
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3.5rem);
  font-weight: 800;
  font-stretch: 110%;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-lead {
  margin-top: 14px;
  max-width: 52ch;
  color: var(--ink-2);
  font-size: 1.1875rem;
  line-height: 1.5;
}

/* Services bento */

.bento {
  display: grid;
  gap: 14px;
  margin-top: 40px;
}

.tile {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}
.tile__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* Icelandic compounds run long: a child must be allowed to shrink inside the grid
   track, or it blows the track out and the tile's overflow clips it. */
.tile > * { min-width: 0; }
.tile__head .icon { color: var(--accent); }
.tile__title {
  overflow-wrap: break-word;
  font-size: 1.375rem;
  font-weight: 800;
  font-stretch: 108%;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.tile__body { max-width: 40ch; color: var(--ink-2); }

.tile--feature { padding: clamp(26px, 3.5vw, 40px); gap: 18px; }
.tile--feature .tile__title { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
/* "Rafmagnsviðgerðir" at the clamp floor does not fit a 360px phone. */
@media (max-width: 420px) { .tile--feature .tile__title { font-size: 1.5rem; } }
@media (max-width: 340px) { .tile--feature .tile__title { font-size: 1.375rem; } }

.tile--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tile--accent .tile__head .icon,
.tile--accent .checks .icon { color: var(--on-accent); }
.tile--accent .tile__body { color: color-mix(in srgb, var(--on-accent) 88%, transparent); }

.tile--ink { background: var(--alt-bg); border-color: var(--alt-bg); color: var(--alt-fg); }
.tile--ink .tile__body { color: var(--alt-fg-2); }

.tile__watermark {
  position: absolute;
  right: -28px;
  bottom: -36px;
  width: 220px;
  height: 220px;
  fill: currentColor;
  opacity: 0.1;
  pointer-events: none;
}

.checks { display: grid; gap: 10px; }
.checks li { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; line-height: 1.35; min-width: 0; overflow-wrap: break-word; }
.checks .icon { color: var(--accent); width: 1.125rem; height: 1.125rem; margin-top: 2px; }
.tile--feature .checks li { font-size: 1.0625rem; }

@media (min-width: 700px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile--feature { grid-column: span 2; }
  .bento .tile:last-child { grid-column: span 2; }
}
@media (min-width: 1000px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .tile--feature { grid-column: span 3; }
  .bento .tile:not(.tile--feature),
  .bento .tile:last-child { grid-column: span 2; }
}

/* Vehicles */

.vehicles { background: var(--surface); border-block: 1px solid var(--line); }

.vehicle-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 36px;
  border-top: 2px solid var(--line-strong);
}
.vehicle {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 24px 12px 24px 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
}
.vehicle:nth-child(n + 3) { border-top: 1px solid var(--line); }
.vehicle__icon { width: 56px; height: 56px; fill: var(--ink); }

.vehicles__note { margin-top: 20px; color: var(--ink-2); max-width: 60ch; }

@media (min-width: 768px) {
  .vehicle-list { grid-template-columns: repeat(4, 1fr); }
  .vehicle { padding: 32px 20px; }
  .vehicle:first-child { padding-left: 0; }
  .vehicle:nth-child(n + 3) { border-top: 0; }
  .vehicle + .vehicle { border-left: 1px solid var(--line); }
  .vehicle__icon { width: 64px; height: 64px; }
}

/* How it works */

.how__steps {
  position: relative;
  display: grid;
  gap: 28px;
  margin-top: 40px;
}
.how-step { position: relative; display: grid; gap: 10px; align-content: start; }
.how-step__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}
.how-step__title { font-size: 1.375rem; font-weight: 800; font-stretch: 105%; line-height: 1.2; }
.how-step__body { color: var(--ink-2); max-width: 34ch; }

@media (min-width: 768px) {
  .how__steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  /* Dashed route joining the three steps. */
  .how__steps::before {
    content: "";
    position: absolute;
    top: 29px;
    left: 60px;
    right: 12%;
    border-top: 2px dashed var(--line);
  }
  .how-step__icon { position: relative; box-shadow: 0 0 0 8px var(--bg); }
}

/* Service area */

.area { border-top: 1px solid var(--line); }

.towns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.town {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
}
.town--main { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.town--more { border-style: dashed; color: var(--ink-2); }

.map {
  margin-top: 28px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--surface);
}
.map__facade {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  height: 100%;
  padding: 24px;
  text-align: center;
}
.map__facade > .icon { color: var(--accent); }
.map__facade .btn { background: var(--bg); }
.map__note { font-size: 0.875rem; color: var(--ink-2); }
.map__frame { width: 100%; height: 100%; border: 0; }
.map__open { margin-top: 12px; font-size: 0.9375rem; }

@media (min-width: 768px) {
  .map { aspect-ratio: 21 / 9; }
}

/* Contact */

.contact { background: var(--surface); border-top: 1px solid var(--line); }

.contact__grid { display: grid; gap: 44px; }

.info-list { display: grid; gap: 26px; margin-top: 34px; }
.info-item dt { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.info-item dd { margin-top: 4px; }

.phone-big {
  display: inline-block;
  font-size: clamp(2.5rem, 1.7rem + 3.4vw, 4rem);
  font-weight: 900;
  font-stretch: 118%;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.phone-big:hover { color: var(--accent); }
.info-note { display: block; margin-top: 6px; font-size: 0.9375rem; color: var(--ink-2); }

.form-panel {
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-raised);
}
.form-panel__title {
  margin-bottom: 22px;
  font-size: 1.625rem;
  font-weight: 800;
  font-stretch: 108%;
  line-height: 1.1;
}

.contact-form { display: grid; gap: 18px; }

.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: 0.9375rem; font-weight: 600; }
.field__optional { font-weight: 400; color: var(--ink-2); }

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 40%, var(--bg));
  border-radius: var(--radius-input);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--ink);
}
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }

.field__error { font-size: 0.875rem; font-weight: 600; color: var(--danger); }
.field__error:empty { display: none; }

.field-row { display: grid; gap: 18px; }
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

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

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--danger);
  border-left-width: 4px;
  border-radius: var(--radius-input);
  font-size: 0.9375rem;
}
.form-alert .icon { color: var(--danger); margin-top: 2px; }
.form-alert--static { display: block; margin: 0; }

.form-privacy { font-size: 0.875rem; color: var(--ink-2); }

.form-success { display: grid; justify-items: start; gap: 12px; padding-block: 24px; }
.form-success:focus { outline: none; }
.form-success .icon { color: var(--success); }
.form-success__title { font-size: 2rem; font-weight: 800; font-stretch: 108%; line-height: 1.05; }
.form-success .btn { margin-top: 12px; }

@media (min-width: 960px) {
  .contact__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }
  .contact__info { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* Footer */

.site-footer { border-top: 1px solid var(--line); padding-block: 36px 44px; font-size: 0.9375rem; }
.site-footer__inner { display: grid; gap: 16px; }
.site-footer__meta { color: var(--ink-2); line-height: 1.6; }
.site-footer__meta .text-link { color: var(--ink); }

@media (min-width: 768px) {
  .site-footer__inner { grid-template-columns: auto 1fr auto auto; align-items: center; gap: 40px; }
  .site-footer__copy { text-align: right; }
}

/* Mobile call bar: the phone number is always one tap away. */

.call-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
}
.call-bar--tucked { transform: translateY(110%); visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .call-bar { transition: transform 280ms var(--ease-out), visibility 0s linear 0s; }
  .call-bar--tucked { transition: transform 220ms var(--ease-out), visibility 0s linear 220ms; }
}
.call-bar__call { flex: 1; min-width: 0; min-height: 56px; font-size: 1.125rem; }
.call-bar__number { font-weight: 900; font-stretch: 112%; }
.call-bar__message { flex: none; width: 56px; min-height: 56px; padding: 0; }

body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }

@media (max-width: 400px) {
  .call-bar__number { display: none; }
}

@media (min-width: 768px) {
  .call-bar { display: none; }
  body { padding-bottom: 0; }
}

/* Scroll reveal: main.js only marks elements that start below the fold, so nothing visible ever blinks. */

@media (prefers-reduced-motion: no-preference) {
  [data-reveal].is-pending { opacity: 0; transform: translateY(18px); }
  [data-reveal].is-shown {
    opacity: 1;
    transform: none;
    transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
  }
}
