/* =============================================
   Auto Serwis — styles.css
   Design: Precision Mono
   Aesthetic: Technical precision. Black & white
   with a single electric red accent. DM Mono
   for labels & data. Generous white space.
   Clean, modern European auto shop energy.
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;700;900&display=swap');

/* ---- DESIGN TOKENS ---- */
:root {
  --black:      #0a0a0a;
  --near-black: #111111;
  --dark:       #1c1c1c;
  --mid:        #6b6b6b;
  --light:      #c8c8c8;
  --off-white:  #f4f4f4;
  --white:      #ffffff;
  --red:        #e02020;
  --red-hover:  #c01a1a;
  --red-tint:   #fff0f0;

  --ff-display: 'DM Sans', 'Helvetica Neue', sans-serif;
  --ff-mono:    'DM Mono', 'Courier New', monospace;

  --max-w: 1200px;
  --pad:   1.5rem;

  /* Legacy aliases for prose page compatibility */
  --c-accent:       var(--red);
  --c-accent-hover: var(--red-hover);
  --c-text:         var(--black);
  --c-text-muted:   var(--mid);
  --c-bg:           var(--white);
  --c-bg-alt:       var(--off-white);
  --c-border:       var(--light);
  --r-sm: 0px;
  --r-md: 0px;
  --container-pad: var(--pad);
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-display);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

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

/* ---- CONTAINER ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---- TYPOGRAPHY HELPERS ---- */
.text-muted  { color: var(--mid); }
.text-sm     { font-size: 0.875rem; }
.section-intro { font-size: 1rem; color: var(--mid); margin-bottom: 3rem; }
.section-narrow { max-width: 700px; }

/* Section index label */
.section-index {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--mid);
  display: block;
  margin-bottom: 0.4rem;
}

/* ---- SECTION BACKGROUNDS ---- */
.section-light { background: var(--white); padding: 5.5rem 0; }
.section-alt   { background: var(--off-white); padding: 5.5rem 0; }

section h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
  color: var(--black);
}

section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--black);
}

section p { line-height: 1.7; margin-bottom: 1rem; color: var(--dark); }
section p:last-child { margin-bottom: 0; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 0;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--red);
  color: var(--white);
  padding: 0.65rem 1.4rem;
  font-size: 0.875rem;
  border: 2px solid var(--red);
  min-height: 44px;
}
.btn-primary:hover,
.btn-primary:focus-visible { background: var(--red-hover); border-color: var(--red-hover); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
  padding: 0.65rem 1.4rem;
  font-size: 0.875rem;
  min-height: 44px;
}
.btn-outline:hover,
.btn-outline:focus-visible { border-color: var(--white); background: rgba(255,255,255,0.08); }

.btn-dark {
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--black);
  padding: 0.65rem 1.4rem;
  font-size: 0.875rem;
  min-height: 44px;
}
.btn-dark:hover { background: var(--dark); border-color: var(--dark); }

.btn-lg { font-size: 1rem; padding: 0.9rem 2.25rem; min-height: 52px; }

.header-cta { font-size: 0.82rem; padding: 0.5rem 1.1rem; min-height: 40px; flex-shrink: 0; }

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--black);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* square mark */
.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { color: var(--white); }

.logo-text { display: flex; flex-direction: column; line-height: 1.15; }

.logo-main {
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 900;
  color: var(--black);
  letter-spacing: -0.01em;
}

.logo-sub {
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  color: var(--mid);
  letter-spacing: 0.08em;
}

/* Hamburger toggle */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--light);
  color: var(--dark);
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  transition: border-color 0.15s;
  order: 2;
}
.nav-toggle:hover { border-color: var(--black); }
.nav-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

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

/* Primary nav */
.primary-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 2px solid var(--black);
  flex-direction: column;
  z-index: 99;
}
.primary-nav.is-open { display: flex; }

.primary-nav a {
  font-family: var(--ff-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--dark);
  padding: 0.9rem var(--pad);
  border-bottom: 1px solid var(--off-white);
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background 0.12s, color 0.12s;
}
.primary-nav a:hover,
.primary-nav a:focus-visible { background: var(--black); color: var(--white); }

@media (min-width: 768px) {
  .primary-nav {
    display: flex;
    flex-direction: row;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    align-items: stretch;
    order: unset;
  }
  .primary-nav a {
    font-size: 0.78rem;
    padding: 0 0.85rem;
    border-bottom: none;
    border-right: 1px solid var(--off-white);
    display: flex;
    align-items: center;
    height: 64px;
    min-height: unset;
  }
  .primary-nav a:last-child { border-right: none; }
  .primary-nav a:hover,
  .primary-nav a:focus-visible { background: var(--black); color: var(--white); }
}

/* ---- HERO ---- */
.section-hero {
  background: var(--near-black);
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 4.5rem;
  color: var(--white);
}

/* technical grid lines */
.section-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* red accent vertical bar */
.hero-red-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 6px;
  background: var(--red);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 380px; }
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.hero-meta-tag {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--red);
  background: rgba(224,32,32,0.12);
  border: 1px solid rgba(224,32,32,0.25);
  padding: 0.25rem 0.6rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--light);
}

.star-icon { color: var(--red); }

.section-hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 1.5rem;
}

/* red underline on key phrase */
.hero-highlight {
  position: relative;
  display: inline;
}
.hero-highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--red);
}

.hero-lead {
  font-family: var(--ff-display);
  font-size: 1rem;
  color: var(--light);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-media { display: none; }

@media (min-width: 900px) {
  .hero-media {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
  }
}

.hero-img-frame {
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
}

.hero-img-frame::after {
  content: 'AUTO SERWIS';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.75);
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 0.5rem;
}

.hero-img {
  width: 100%;
  max-width: 380px;
  display: block;
  filter: grayscale(0.2) contrast(1.08);
}

/* ---- SERVICES GRID ---- */
.services-grid {
  display: grid;
  gap: 1px;
  background: var(--light);
  border: 1px solid var(--light);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  background: var(--white);
  padding: 1.75rem;
  position: relative;
  transition: background 0.15s;
}

.service-card:hover { background: var(--black); }
.service-card:hover h3 { color: var(--white); }
.service-card:hover p { color: var(--light); }
.service-card:hover .service-icon { color: var(--red); }
.service-card:hover .service-badge { color: var(--mid); border-color: rgba(255,255,255,0.2); background: transparent; }

/* mono number in corner */
.service-card::before {
  content: attr(data-num);
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  color: var(--light);
  transition: color 0.15s;
}
.service-card:hover::before { color: rgba(255,255,255,0.2); }

.service-card--optional { opacity: 0.65; }
.service-card--optional:hover { opacity: 1; }

.service-icon { color: var(--black); margin-bottom: 1rem; transition: color 0.15s; }

.service-badge {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--mid);
  border: 1px solid var(--light);
  padding: 0.15rem 0.5rem;
  transition: color 0.15s, border-color 0.15s;
  background: transparent;
  border-radius: 0;
}

/* ---- ABOUT ---- */
.about-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

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

.about-text p { font-size: 1.05rem; line-height: 1.85; }

/* stat block */
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--light);
  border: 1px solid var(--light);
}

.stat-item {
  background: var(--white);
  padding: 1.5rem 1.25rem;
  text-align: left;
}

.stat-num {
  font-family: var(--ff-display);
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--black);
  line-height: 1;
  display: block;
}

.stat-label {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--mid);
  display: block;
  margin-top: 0.4rem;
  text-transform: uppercase;
}

.stat-item.stat-accent { background: var(--red); }
.stat-item.stat-accent .stat-num { color: var(--white); }
.stat-item.stat-accent .stat-label { color: rgba(255,255,255,0.7); }

/* ---- WHY US ---- */
.why-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .why-grid { grid-template-columns: repeat(3, 1fr); } }

.why-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--light);
  border-left: 3px solid transparent;
  transition: border-left-color 0.2s, box-shadow 0.2s;
}
.why-item:hover { border-left-color: var(--red); box-shadow: 4px 0 0 0 var(--red) inset; }

.why-icon {
  flex-shrink: 0;
  color: var(--black);
  background: var(--off-white);
  padding: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-item h3 { font-size: 0.9rem; font-family: var(--ff-display); font-weight: 700; color: var(--black); margin-bottom: 0.2rem; }
.why-item p  { font-size: 0.85rem; color: var(--mid); margin: 0; }

/* ---- REVIEWS / OPINIE ---- */
.rating-outer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 600px) { .rating-outer { grid-template-columns: auto 1fr; align-items: center; } }

.rating-big-num {
  font-family: var(--ff-display);
  font-size: 7rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--black);
}

.rating-detail { display: flex; flex-direction: column; gap: 0.5rem; }
.rating-stars { font-size: 1.3rem; color: var(--red); }
.rating-count { font-family: var(--ff-mono); font-size: 0.75rem; color: var(--mid); letter-spacing: 0.06em; }
.reviews-note { margin-top: 2rem; font-size: 0.8rem; color: var(--mid); }

/* ---- GALLERY GRID ---- */
.gallery-grid {
  display: grid;
  gap: 2px;
  background: var(--black);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

.gallery-item { margin: 0; overflow: hidden; position: relative; }

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  filter: grayscale(0.15);
  transition: transform 0.5s ease, filter 0.5s ease;
  border-radius: 0;
}

@media (hover: hover) {
  .gallery-item:hover img {
    transform: scale(1.06);
    filter: grayscale(0);
  }
}

.gallery-caption { margin-top: 1rem; font-family: var(--ff-mono); font-size: 0.72rem; color: var(--mid); letter-spacing: 0.04em; }

/* ---- CONTACT ---- */
.contact-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

.contact-list { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 2rem; }

.contact-item dt {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.3rem;
}

.contact-item dd { font-size: 1rem; line-height: 1.65; color: var(--black); }
.contact-item dd a { color: var(--red); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.contact-item dd a:hover { color: var(--red-hover); }
.hours-row { display: block; }

.contact-map iframe { display: block; width: 100%; border-radius: 0 !important; }

/* ---- FAQ ---- */
.faq-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--light); }

.faq-item {
  background: var(--white);
  border-bottom: 1px solid var(--light);
  overflow: hidden;
  border-radius: 0;
}
.faq-item:last-child { border-bottom: none; }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  font-family: var(--ff-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  gap: 1rem;
  transition: background 0.12s;
  color: var(--black);
}
.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: '+';
  font-family: var(--ff-mono);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--red);
  flex-shrink: 0;
  line-height: 1;
  transition: transform 0.2s;
}

details[open] .faq-question { background: var(--black); color: var(--white); }
details[open] .faq-question::after { transform: rotate(45deg); color: var(--red); }
.faq-question:hover { background: var(--off-white); }
details[open] .faq-question:hover { background: var(--black); }

.faq-answer {
  padding: 1.25rem 1.5rem;
  font-size: 0.925rem;
  color: var(--mid);
  line-height: 1.75;
  background: var(--off-white);
  border-top: 1px solid var(--light);
}
.faq-answer p { margin: 0; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.5);
  padding-top: 4rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

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

.footer-brand .logo-main {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 0.4rem;
}
.footer-tagline { font-family: var(--ff-mono); font-size: 0.7rem; color: rgba(255,255,255,0.3); letter-spacing: 0.06em; }

.footer-nap { font-size: 0.875rem; line-height: 1.85; }
.footer-nap p { margin-bottom: 0.4rem; }
.footer-nap p:last-child { margin-bottom: 0; }
.footer-nap a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.footer-nap a:hover { color: #f04040; }

.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a {
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4);
  transition: color 0.15s;
}
.footer-nav a:hover { color: var(--white); }

.footer-bottom {
  padding: 1rem 0;
}
.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p { font-family: var(--ff-mono); font-size: 0.72rem; margin: 0; color: rgba(255,255,255,0.25); letter-spacing: 0.04em; }
.footer-note { font-style: italic; }

/* ---- ANIMATIONS ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-inner > * {
  animation: fadeIn 0.6s ease both;
}
.hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.18s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.32s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.46s; }

.hero-media { animation: fadeIn 0.8s 0.2s ease both; }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---- PROSE (polityka prywatnosci) ---- */
.prose {
  max-width: 720px;
  margin: 5rem auto;
  padding: 0 var(--pad);
  line-height: 1.7;
}

.prose h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
  color: var(--black);
}

.prose h2 {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 0.75rem;
  color: var(--black);
}

.prose p {
  margin-bottom: 1rem;
  color: var(--mid);
}

.prose a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--red-hover); }
