/* Euroavto Postojna d.o.o.
   Colours, the logo and the part photographs all come from docs/EURO.pdf
   (the company business card) - see tools/ for how the assets are derived.

   Roboto is bundled under the Apache License 2.0.
   https://github.com/googlefonts/roboto */

@font-face {
  font-family: Roboto;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/roboto-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Roboto;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/roboto-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --navy: #001233;
  --navy-soft: #011c4a;
  --blue: #00379d;
  --blue-dark: #002a7a;
  --yellow: #fcc209;
  --yellow-dark: #e0a900;

  --ink: #10182c;
  --body: #48505f;
  --line: #dfe4ee;
  --tint: #f3f6fc;
  --white: #fff;

  --wrap: 1180px;
  --radius: 14px;
  --shadow: 0 18px 45px -22px rgb(0 18 51 / 45%);
  --header-h: 78px;

  --step-1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1-up: clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(1.9rem, 1.5rem + 2vw, 3.1rem);
}

/* ---------- base ---------- */

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

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

body {
  margin: 0;
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  overflow-wrap: break-word;
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1-up); }

p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

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

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--lg { width: 1.7em; height: 1.7em; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }

.eyebrow {
  margin: 0 0 0.6rem;
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow--accent { color: var(--yellow); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.15rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}
.btn--lg { padding: 0.95rem 1.6rem; font-size: var(--step-0); }

.btn--accent {
  background: var(--yellow);
  color: var(--navy);
}
.btn--accent:hover {
  background: var(--yellow-dark);
  color: var(--navy);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgb(255 255 255 / 45%);
}
.btn--ghost:hover {
  background: rgb(255 255 255 / 12%);
  color: var(--white);
  border-color: var(--white);
}

/* ---------- header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blue);
  box-shadow: 0 2px 0 rgb(0 0 0 / 12%);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
  padding-block: 0.5rem;
}

.header__brand { display: block; flex: none; line-height: 0; }
.header__brand img {
  width: clamp(132px, 14vw, 172px);
  height: auto;
  transition: width 0.2s;
}
.header.is-stuck .header__brand img { width: clamp(118px, 11vw, 140px); }

.nav { margin-inline-start: auto; }

.nav__list {
  display: flex;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__list a {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: rgb(255 255 255 / 88%);
  font-weight: 500;
  font-size: var(--step-1);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.nav__list a:hover { background: rgb(255 255 255 / 12%); color: var(--white); }
.nav__list a[aria-current="true"] { color: var(--yellow); background: rgb(0 0 0 / 18%); }

.header__toggle {
  display: none;
  padding: 0.45rem;
  margin-inline-start: auto;
  background: transparent;
  border: 2px solid rgb(255 255 255 / 40%);
  border-radius: 10px;
  color: var(--white);
  cursor: pointer;
}
.header__toggle .icon { width: 1.6rem; height: 1.6rem; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  color: var(--white);
  background: var(--navy);
}

.hero__slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: clamp(440px, 62vw, 620px);
  overflow: hidden;
}

.hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero__slide.is-active { opacity: 1; z-index: 1; }
/* .hero__inner is a flex item here; without this it defaults to a
   content-based min-width and refuses to shrink to the .wrap width,
   pushing the CTAs past the viewport edge on narrow screens. */
.hero__slide > .hero__inner { min-width: 0; }

.hero__slide-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__text {
  max-width: 34rem;
  padding: 1.75rem 2rem;
  border-radius: 18px;
  /* A scrim panel behind the text, not a background gradient calibrated to
     this specific photo: the hero now cycles through client-supplied images
     with different compositions, and a panel keeps the text legible on any
     of them without re-tuning per image. */
  background: linear-gradient(100deg, rgb(0 15 45 / 88%) 0%, rgb(0 15 45 / 78%) 65%, transparent 100%);
}

.hero__eyebrow {
  margin: 0 0 0.9rem;
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
}

.hero__heading {
  margin: 0;
  color: var(--white);
  max-width: 15ch;
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1.1;
}

.hero__lead {
  max-width: 52ch;
  font-size: var(--step-1-up);
  color: rgb(255 255 255 / 88%);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.hero__controls {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  pointer-events: none;
}

.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgb(0 10 30 / 45%);
  color: var(--white);
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 0.15s;
}
.hero__arrow:hover { background: rgb(0 10 30 / 65%); }
.hero__arrow .icon { width: 1.4rem; height: 1.4rem; }
.hero__arrow--prev { left: 1rem; }
.hero__arrow--prev .icon { transform: scaleX(-1); }
.hero__arrow--next { right: 1rem; }

.hero__dots {
  display: flex;
  gap: 0.6rem;
  pointer-events: auto;
}
.hero__dot {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
.hero__dot::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgb(255 255 255 / 45%);
}
.hero__dot.is-active::before { background: var(--yellow); }

.hero__bar {
  border-top: 1px solid rgb(255 255 255 / 18%);
  background: rgb(0 0 0 / 22%);
}

.hero__facts {
  display: grid;
  gap: 0.35rem 2.5rem;
  padding-block: 1.1rem;
}
.hero__facts p { margin: 0; display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; }
.hero__facts strong { color: var(--yellow); }
.hero__facts span { color: rgb(255 255 255 / 78%); font-size: var(--step-1); }

/* ---------- sections ---------- */

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tint { background: var(--tint); }

.section__lead {
  max-width: 62ch;
  font-size: var(--step-1-up);
  margin-bottom: 2.5rem;
}

.section--dark {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 55%, var(--blue-dark) 100%);
  color: rgb(255 255 255 / 85%);
}
.section--dark h2 { color: var(--white); }
.section--dark a { color: var(--white); }
.section--dark a:hover { color: var(--yellow); }

/* ---------- long-form text (privacy page) ---------- */

.prose { max-width: 68ch; }
.prose h2 {
  margin-top: 2.2rem;
  font-size: var(--step-1-up);
}
.prose .section__lead { margin-bottom: 1.5rem; }

/* ---------- about ---------- */

.about {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: 1.5rem;
}

.about__text p:last-child { margin-bottom: 0; }
.about__text strong { color: var(--ink); }

.about__photo {
  margin: 0;
  align-self: start;
}
.about__photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.about__photo figcaption {
  margin-top: 0.7rem;
  font-size: var(--step-1);
  color: var(--body);
}

.about__points {
  display: grid;
  gap: 1rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  align-content: start;
}

.about__points li {
  display: flex;
  gap: 0.9rem;
  padding: 1.15rem 1.25rem;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.about__points .icon { color: var(--blue); }
.about__points strong { display: block; color: var(--ink); }
.about__points span { font-size: var(--step-1); }

/* ---------- category cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.6rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgb(0 55 157 / 30%);
  box-shadow: var(--shadow);
}

.card__icon {
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.9rem;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 { margin-bottom: 0.35rem; }
.card p { margin: 0; font-size: var(--step-1); }

/* ---------- TOMOS band ---------- */

.tomos {
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
  background: var(--navy);
  color: rgb(255 255 255 / 85%);
  border-block: 4px solid var(--yellow);
}

.tomos__inner {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}
.tomos h2 { color: var(--white); margin-bottom: 0.55rem; }
.tomos p { max-width: 62ch; margin: 0; }
.tomos__mark { color: var(--yellow); }

/* ---------- brands ---------- */

.brands {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 40vw, 175px), 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brands li {
  display: grid;
  place-items: center;
  padding: 1.15rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

/* ---------- contact ---------- */

.contact {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: 1.5rem;
}

.contact__list {
  display: grid;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.contact__list li { display: flex; gap: 1rem; }
.contact__list .icon { color: var(--yellow); margin-top: 0.15rem; }

.contact__label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 62%);
}

.contact__details a { font-weight: 500; text-decoration-color: rgb(255 255 255 / 35%); }

.status {
  display: inline-block;
  margin-inline-start: 0.5rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  vertical-align: 0.05em;
}
.status[data-open="true"] { background: #1f7a3d; color: #fff; }
.status[data-open="false"] { background: rgb(255 255 255 / 16%); color: rgb(255 255 255 / 82%); }

.hours { border-collapse: collapse; width: 100%; max-width: 24rem; }
.hours th,
.hours td { padding: 0.2rem 0; text-align: left; font-weight: 400; }
.hours th { padding-inline-end: 1.5rem; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours tr.is-today th,
.hours tr.is-today td { color: var(--yellow); font-weight: 700; }

.map { margin: 0; }
.map > a {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 22%);
}
.map img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }

.map__cta {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  font-size: var(--step-1);
}
.map > a:hover .map__cta { background: var(--white); }

.map figcaption {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: rgb(255 255 255 / 60%);
}
.map figcaption a { color: inherit; text-decoration-color: rgb(255 255 255 / 35%); }

/* ---------- footer ---------- */

.footer {
  background: var(--navy);
  color: rgb(255 255 255 / 72%);
  font-size: var(--step-1);
}

.footer__inner {
  display: grid;
  gap: 2rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.footer h2 {
  margin-bottom: 0.6rem;
  color: var(--white);
  font-size: var(--step-1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* 1.95 keeps stacked phone/e-mail links at least 24px apart (WCAG 2.5.8). */
.footer p { margin: 0; line-height: 1.95; }
.footer a { color: rgb(255 255 255 / 82%); text-decoration: none; }
.footer a:hover { color: var(--yellow); text-decoration: underline; }
.footer__brand img { width: 165px; margin-bottom: 1rem; }

.footer__bottom {
  padding-block: 1.1rem;
  border-top: 1px solid rgb(255 255 255 / 14%);
  font-size: 0.82rem;
  color: rgb(255 255 255 / 55%);
}
.footer__bottom p { margin: 0; }
/* Underlined because these sit inline in a sentence, where colour alone
   would not distinguish them (WCAG 1.4.1). */
.footer__bottom a { text-decoration: underline; color: rgb(255 255 255 / 85%); }

/* ---------- floating call button (mobile) ---------- */

.call-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 45;
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 30px -8px rgb(0 0 0 / 55%);
}

/* ---------- responsive ---------- */

@media (max-width: 979px) {
  .hero__text { max-width: 100%; }
  /* The fixed aspect-ratio box is too short once the lead paragraph wraps to
     several lines on a narrow phone - it would collide with the dots/arrows. */
  .hero__slides { min-height: clamp(560px, 78vw, 640px); }
}

@media (max-width: 900px) {
  .nav {
    position: absolute;
    inset: var(--header-h) 0 auto;
    display: none;
    padding: 0.6rem 1.25rem 1.1rem;
    background: var(--blue-dark);
    box-shadow: 0 20px 30px -18px rgb(0 0 0 / 60%);
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; gap: 0.15rem; }
  .nav__list a { padding: 0.75rem 0.9rem; font-size: var(--step-0); }

  .header__cta { display: none; }
  .header__toggle { display: block; }

  .call-fab { display: inline-flex; }
  body { padding-bottom: 4.5rem; }
}

@media (min-width: 700px) {
  .hero__facts { grid-template-columns: repeat(3, 1fr); }
  .hero__facts p { flex-direction: column; gap: 0; }
  .tomos__inner { grid-template-columns: 1fr auto; }
}

@media (min-width: 700px) {
  .about__points { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 760px) {
  .about { grid-template-columns: 1.05fr 1fr; align-items: center; }
  .contact { grid-template-columns: minmax(280px, 0.85fr) 1.15fr; align-items: start; }
  .footer__inner { grid-template-columns: 1.4fr 1fr 1fr 1.1fr; }
}


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .header, .call-fab, .map__cta, .skip-link { display: none !important; }
  body { color: #000; }
  .hero, .section--dark, .tomos, .footer { background: none !important; color: #000 !important; }
  .hero__heading, .section--dark h2, .tomos h2, .footer h2 { color: #000 !important; }
  .hero__slide { position: static; opacity: 1; }
  .hero__slide:not(.is-active), .hero__controls, .hero__slide-bg { display: none !important; }
}
