/* ==========================================================================
   GD avtoservis
   ========================================================================== */

/* Fonts (self-hosted, Archivo variable) ------------------------------------ */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext-wght-normal.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;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/archivo-latin-wght-normal.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: "Archivo";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext-wght-italic.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;
}
@font-face {
  font-family: "Archivo";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/archivo-latin-wght-italic.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;
}

/* Tokens ------------------------------------------------------------------- */
:root {
  --bg: #0b0f17;
  --surface: #121926;
  --surface-2: #192234;
  --line: #243049;
  --blue: #2f6bff;
  --blue-hover: #4f84ff;
  --blue-soft: rgba(47, 107, 255, 0.14);
  --white: #ffffff;
  --text: #ffffff;
  --muted: #a7b1c4;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1160px;
  --radius: 4px;
  --skew: -10deg;
  --header-h: 72px;
}

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

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

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

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
img, svg, iframe { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--blue-hover);
  outline-offset: 3px;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--bg);
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

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

/* Headings ----------------------------------------------------------------- */
.kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--blue-hover);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nowrap { white-space: nowrap; }

.section-title {
  font-size: clamp(34px, 5vw, 52px);
  font-style: italic;
  font-weight: 900;
  line-height: 1.02;
  text-transform: uppercase;
}
.section-title span { color: var(--blue); }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head p {
  margin-top: 16px;
  color: var(--muted);
}

/* Buttons (slanted) -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 18px;
  font-style: italic;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transform: skewX(var(--skew));
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
/* Keep the text upright-italic, not double-skewed */
.btn > * { transform: skewX(calc(var(--skew) * -1)); }

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-hover); }

.btn-light { background: var(--white); color: var(--bg); }
.btn-light:hover { background: #dfe7ff; }

.btn-sm { padding: 10px 20px; font-size: 16px; }

/* Header ------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(11, 15, 23, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

/* Logo (SVG, source files in /brand) */
.logo {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.logo img {
  width: auto;
  height: 34px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-weight: 600;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }

/* Hero --------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 10vw, 120px) 0;
  background:
    radial-gradient(ellipse 60% 70% at 85% 30%, rgba(47, 107, 255, 0.18), transparent 70%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 56px 56px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 56px;
}
.hero h1 {
  margin-bottom: 22px;
  font-size: clamp(44px, 7vw, 84px);
  font-style: italic;
  font-weight: 900;
  line-height: 0.98;
  text-transform: uppercase;
}
.hero h1 span { color: var(--blue); }
/* 404 page: hero fills the screen so the footer sits at the bottom */
.page-404 { display: flex; flex-direction: column; min-height: 100vh; }
.page-404 main { display: flex; flex: 1; }
.hero-404 { display: flex; flex: 1; align-items: center; }
.hero-404 .container { grid-template-columns: 1fr; }
.hero-lead {
  max-width: 540px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 19px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  /* compensate for skew so the left edge lines up visually */
  padding-left: 6px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 15px;
}
.hero-meta li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-meta .icon { color: var(--blue-hover); }

/* Hero photo: slanted frame, photo itself counter-skewed so it isn't distorted */
.hero-visual {
  position: relative;
  transform: skewX(-4deg);
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 3px solid var(--blue);
}
.hero-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  transform: skewX(4deg) scale(1.08);
}

/* Sections ----------------------------------------------------------------- */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-alt { background: var(--surface); }

/* Services ----------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.service {
  position: relative;
  padding: 28px 24px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  transition: transform 0.2s, border-color 0.2s;
}
.service:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
}
.service-num {
  display: block;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 30px;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
}
.service h3 {
  margin-bottom: 10px;
  font-size: 21px;
  font-style: italic;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}
.service p {
  color: var(--muted);
  font-size: 15px;
}

.service-cta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  background: var(--blue);
  border-color: var(--blue);
}
.service-cta:hover { border-color: var(--blue); }
.service-cta h3 { font-size: 22px; }
.service-cta p { color: var(--white); }
.service-cta .btn { align-self: flex-start; margin-left: 4px; }

/* Why us ------------------------------------------------------------------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}
.why-item .icon-box {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  background: var(--blue-soft);
  color: var(--blue-hover);
  transform: skewX(var(--skew));
}
.why-item .icon-box .icon {
  width: 24px;
  height: 24px;
  transform: skewX(calc(var(--skew) * -1));
}
.why-item h3 {
  margin-bottom: 8px;
  font-size: 20px;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
}
.why-item p {
  color: var(--muted);
  font-size: 15px;
}

/* Contact ------------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 32px;
  align-items: stretch;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 36px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
}
.contact-row {
  display: flex;
  gap: 16px;
}
.contact-row .icon {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  color: var(--blue-hover);
}
.contact-row h3 {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.contact-row p,
.contact-row a {
  font-size: 18px;
  font-weight: 600;
}
.contact-row > div { min-width: 0; } /* let long text shrink inside the flex row */
.contact-row a { text-decoration: none; }
.contact-row a:hover { color: var(--blue-hover); }
.contact-row .address-link {
  display: inline-block;
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.contact-row .email-link { overflow-wrap: anywhere; }
.contact-row .phone-big {
  font-size: 26px;
  font-style: italic;
  font-weight: 900;
}
.hours {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  gap: 2px 24px;
  font-size: 17px;
}
.hours dt,
.hours dd { white-space: nowrap; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; font-weight: 600; }
.contact-card .btn { align-self: flex-start; margin-top: auto; margin-left: 4px; }

/* Map */
.map {
  position: relative;
  min-height: 420px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--surface-2);
  border: 1px solid var(--line);
}
.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer ------------------------------------------------------------------- */
.site-footer {
  padding: 48px 0 40px;
  background: #070a10;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.footer-top .logo img { height: 30px; }
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
.footer-contact a { text-decoration: none; }
.footer-contact a:hover { color: var(--white); }
.legal { line-height: 1.8; }
.legal strong { color: var(--white); font-weight: 700; }

/* Safety net if iOS still auto-links numbers */
a[x-apple-data-detectors] {
  color: inherit !important;
  font: inherit !important;
  text-decoration: none !important;
}

/* Animations --------------------------------------------------------------- */
/* Hero: plays once on page load */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes photo-in {
  from { opacity: 0; transform: skewX(-4deg) translateX(48px); }
  to { opacity: 1; transform: skewX(-4deg); }
}
.hero-copy > * { animation: fade-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.hero-copy > :nth-child(5) { animation-delay: 0.32s; }
.hero-visual { animation: photo-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both; }

/* Sections: reveal on scroll. Hidden only when JS is running (html.js);
   main.js adds .is-visible, then removes data-reveal so hover effects work again. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Responsive --------------------------------------------------------------- */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; gap: 64px; }
  .hero-visual { max-width: 560px; margin-right: 18px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .nav-links { display: none; }
  .nav .btn-sm .btn-label { display: none; }
  .logo img { height: 28px; }
  .kicker { letter-spacing: 0.1em; }
  .hero-actions .btn { flex: 1 1 auto; }
  .contact-card { padding: 28px 22px; }
  .map { min-height: 340px; }
}

@media (max-width: 520px) {
  .services-grid,
  .why-grid { grid-template-columns: 1fr; }
}

/* Narrow phones (and phones with enlarged text/display size): stack the hours,
   smaller email. In em so it also reacts to a larger default font size. */
@media (max-width: 25em) {
  .hours { grid-template-columns: auto; gap: 0; }
  .hours dd { margin-bottom: 8px; }
  .hours dd:last-child { margin-bottom: 0; }
  .contact-row .email-link { font-size: 16px; }
  .site-header .logo img { height: 24px; }
}

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