/*
 * Parts Plus landing page, served at autopart.ge.
 *
 * The brand is Parts Plus (ფართს პლიუსი); the domain is only the address. Every
 * name on the page says Parts Plus so that buying partsplus.ge later is a change
 * of address rather than a change of identity.
 *
 * One stylesheet, no build step, no framework. The page is a handful of static
 * sections that will change a few times a year, so a toolchain would cost more
 * than it saves.
 *
 * Deliberately NO stock counts and NO model-year range anywhere: Luka's call.
 * Anything numeric here would drift as parts sell and quietly become a lie.
 */

:root {
  --ink: #12161b;
  --ink-soft: #59636f;
  --line: #e2e6ea;
  --bg: #ffffff;
  --bg-alt: #f5f7f9;
  --dark: #10151c;
  --dark-soft: #1a212b;
  /* Sampled from the logo file itself, not picked by eye: the mark averages
     #E31E26 across its 338k red pixels and #2B2A28 across its black. */
  --accent: #e31e26;
  --accent-dark: #b8161d;
  --wa: #25d366;
  --radius: 12px;
  --font: "Noto Sans Georgian", system-ui, sans-serif;
}

/*
 * Mtavruli, the Georgian capital forms.
 *
 * ★★★ Georgian has no CSS uppercase. `text-transform: uppercase` is a NO-OP on
 * Mkhedruli, so caps come from a font whose glyphs are the capital forms, not
 * from a style rule. Same approach Lerno, lvlup and CarImporter all use, and
 * this is a copy of lvlup's file.
 *
 * ⚠️ Declared HERE and not in fonts.css, which is generated by the Parts Plus
 * repo's scripts/fetch-fonts.ts and says not to edit it by hand.
 *
 * ★★ The unicode-range is Georgian ONLY, deliberately. This file maps a-z to
 * A-Z, so giving it a Latin range would silently uppercase any lowercase Latin
 * that happened to sit in a caps container.
 */
@font-face {
  font-family: 'Noto Sans Georgian Caps';
  src: url(fonts/noto-sans-georgian-caps.woff2) format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
}

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

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

img, svg { max-width: 100%; }
svg { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #04310f; }
.btn-wa:hover { filter: brightness(0.95); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); padding: 0.5rem 0.9rem; }
.btn-ghost:hover { background: var(--bg-alt); }

/* --- Header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
/* Served at 180px and drawn at 34 so it stays sharp on a phone screen. */
.brand-mark { width: 2.125rem; height: 2.125rem; display: block; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }

/* The number is the whole point of the header on a phone, so it never hides. */
.header-call { white-space: nowrap; }

/* --- Hero --------------------------------------------------------------- */

.hero {
  background: var(--dark);
  color: #fff;
  padding: 4.5rem 0 5rem;
  background-image: radial-gradient(circle at 20% -10%, #23303f 0%, transparent 55%);
}
/* Text and logo sit side by side once there is room; below that the logo drops
   under the call buttons, which is why it comes second in the markup. */
.hero-inner { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 60rem) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; }
}
.hero-logo {
  width: min(20rem, 100%);
  height: auto;
  justify-self: center;
}
@media (min-width: 60rem) { .hero-logo { width: 22rem; } }

.eyebrow {
  margin: 0 0 0.75rem;
  color: #93a1b1;
  font-size: 0.95rem;
  font-weight: 500;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.lead {
  margin: 1.25rem 0 0;
  max-width: 38rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: #c6cfd8;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* --- Sections ----------------------------------------------------------- */

.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.01em;
}
.section-lead { margin: 0 0 2rem; max-width: 42rem; color: var(--ink-soft); }

/* --- Lookup ------------------------------------------------------------- */

.lookup {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  align-items: end;
  max-width: 46rem;
}
@media (min-width: 44rem) {
  .lookup { grid-template-columns: 1fr 1fr auto; }
}
/* `relative` so the suggestion list can hang under its own input. */
.lookup-field { display: grid; gap: 0.35rem; min-width: 0; position: relative; }
.lookup-field label { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
.lookup-field input {
  font: inherit;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  min-width: 0;
}
/* `outline-offset: 0` on purpose: the default 1px leaves a white gap between
   the field's own border and the focus ring, which reads as a drawing mistake
   once both are the same red. Flush, they are one 3px edge. */
.lookup-field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}
/* Full height of the row on wide screens so it lines up with the inputs. */
.lookup-go { white-space: nowrap; }

.combo-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0.25rem 0 0;
  padding: 0.25rem;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgb(16 21 28 / 0.13);
  max-height: 16rem;
  overflow-y: auto;
}
.combo-list[hidden] { display: none; }
.combo-option {
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.combo-option:hover, .combo-option.is-active { background: var(--bg-alt); }
/* Not an option: no hover, no pointer, and it never highlights. */
.combo-more {
  padding: 0.5rem 0.6rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
  margin-top: 0.25rem;
}

.lookup-result { margin-top: 1.5rem; max-width: 46rem; }
.lookup-busy { margin: 0; color: var(--ink-soft); }
.lookup-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 1.5rem;
}
.lookup-hit { border-color: var(--accent); }
.lookup-head { margin: 0 0 0.5rem; font-size: 1.15rem; }
.lookup-msg { margin: 0 0 1.1rem; color: var(--ink-soft); }
.lookup-note { margin: 0 0 0.75rem; color: var(--ink-soft); font-size: 0.95rem; }
.lookup-list { margin: 0 0 1.1rem; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.lookup-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  align-items: baseline;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.lookup-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.lookup-name { font-weight: 600; }
.lookup-car { color: var(--ink-soft); font-size: 0.95rem; }

/* --- Makes -------------------------------------------------------------- */

/* Fixed columns rather than auto-fill: there are exactly eight tiles, and
   auto-fill kept landing on seven per row, which stranded the last one alone.
   2x4 and 4x2 both divide evenly. */
.makes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 34rem) { .makes { grid-template-columns: repeat(4, 1fr); } }
.make {
  display: grid;
  place-items: center;
  padding: 1.25rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-weight: 600;
  text-align: center;
  min-height: 7rem;
}
/* The logos arrive at wildly different aspect ratios, so a fixed box with
   `contain` is what keeps them optically level. Colours are left alone: these
   are the marks people recognise from the road. */
.make img {
  width: 100%;
  max-width: 8.5rem;
  height: 4rem;
  object-fit: contain;
}
.make-more { color: var(--ink-soft); font-weight: 500; border-style: dashed; }

/* --- Steps -------------------------------------------------------------- */

.steps {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: 1fr;
}
@media (min-width: 44rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.step-num {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.steps h3 { margin: 0.9rem 0 0.4rem; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--ink-soft); }

/* --- Contact ------------------------------------------------------------ */

.contact-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card h3 { margin: 0 0 0.6rem; font-size: 0.95rem; color: var(--ink-soft); font-weight: 600; }
.card p { margin: 0.5rem 0 0; }
.big-link {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.big-link:hover { color: var(--accent); }
.card a { color: var(--accent); }

.address, .hours { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.hours strong { font-weight: 700; }

/* --- Footer ------------------------------------------------------------- */

/*
 * The whole footer is set in caps, which takes BOTH mechanisms at once:
 * `text-transform` capitalises the Latin, and the Mtavruli family capitalises
 * the Georgian. Applying the Caps family to the whole container is safe even
 * though the container also holds Latin like "© 2026" and "autopart.ge",
 * because that @font-face declares a Georgian-only unicode-range and Latin
 * falls through to the family listed after it.
 */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--ink-soft);
  font-family: 'Noto Sans Georgian Caps', var(--font);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; }
.site-footer a { color: inherit; }
.footer-legal { color: var(--ink-soft); }

.footer-credit { display: inline-flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
/* Reads as plain text until the pointer finds it. */
.footer-credit a { text-decoration: none; }
.footer-credit a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
/* Overrides the global 1.15em svg sizing: this artwork is 91% of its box
   because of the outline padding, so 1em is what keeps it optically level with
   the text beside it. */
.footer-heart {
  width: 1em;
  height: 1em;
  filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 0.35));
}

/* --- Motion ------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
