/* ==========================================================================
   Afroze Motors - style.css
   1. Tokens   2. Base   3. Layout   4. Buttons   5. Header   6. Hero
   7. Forms    8. Cards  9. Sections 10. Inner pages  11. Footer
   12. Floating buttons  13. Motion  14. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --ink: #111111;
  --ink-2: #1f1f1f;
  --accent: #c89b3c;
  --accent-hover: #d9ae52;
  --accent-text: #8a6510;      /* darker gold, readable on white */
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --text: #222222;
  --muted: #6b6b6b;
  --line: #e2e2e2;
  --error: #b3261e;
  --header-h: 72px;
  --radius: 6px;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-head: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 .5em;
  letter-spacing: .005em;
}
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
main:focus, h1:focus { outline: none; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--accent); color: #111; padding: 10px 16px; border-radius: 4px;
}
.skip-link:focus { left: 8px; }

/* 3. Layout ---------------------------------------------------------------- */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 640px; margin-bottom: 40px; }
.section__head p { color: var(--muted); }
.muted { color: var(--muted); }
.grid { display: grid; gap: 24px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.split__media { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.note {
  font-size: .9rem; color: var(--muted);
  border-left: 3px solid var(--accent); padding-left: 10px;
}

/* 4. Buttons & links -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 14px 26px;
  border: 1.5px solid transparent; border-radius: 3px;
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn--gold { background: var(--accent); color: #111; }
.btn--gold:hover { background: var(--accent-hover); }
.btn--ghost { background: transparent; border-color: currentColor; color: #fff; }
.btn--ghost:hover { background: #fff; border-color: #fff; color: #111; }
.btn--outline { background: transparent; border-color: var(--text); color: var(--text); }
.btn--outline:hover { background: var(--text); color: #fff; }
.btn--sm { min-height: 42px; padding: 11px 18px; font-size: .95rem; }
.btn--block { width: 100%; }
.link {
  color: var(--accent-text); font-weight: 600;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px;
}
.link:hover { text-decoration-thickness: 3px; }

/* 5. Header ---------------------------------------------------------------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--ink); color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: background .3s, border-color .3s;
}
.header.is-clear { background: transparent; border-color: transparent; }
.header__row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo {
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  text-decoration: none; font-family: var(--font-head); font-weight: 700;
  font-size: 1.55rem; letter-spacing: .14em;
}
.logo svg { width: 30px; height: 30px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { position: relative; padding: 10px 14px; text-decoration: none; font-weight: 500; opacity: .86; transition: opacity .2s; }
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav__cta { display: none; }
.header__cta { margin-left: 8px; }
.burger {
  display: none; margin-left: auto; width: 48px; height: 48px;
  background: none; border: 0; color: #fff; cursor: pointer; border-radius: 4px;
}
.burger span { display: block; width: 24px; height: 2px; margin: 5px auto; background: currentColor; transition: transform .25s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 6. Hero ------------------------------------------------------------------ */
.hero {
  position: relative; display: flex; align-items: center; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--header-h) + 32px) 0 150px;
  background: var(--ink); color: #fff;
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 10, 10, .93) 18%, rgba(10, 10, 10, .4) 70%, rgba(10, 10, 10, .15)); }
.hero__content { position: relative; max-width: 640px; }
.hero__tag { margin-bottom: 14px; font-family: var(--font-head); font-size: 1.3rem; font-weight: 500; letter-spacing: .04em; color: var(--accent); }
.hero h1 { margin-bottom: .3em; }
.hero__lead { max-width: 520px; font-size: 1.2rem; color: #d8d8d8; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__content > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero__content > *:nth-child(2) { animation-delay: .08s; }
.hero__content > *:nth-child(3) { animation-delay: .16s; }
.hero__content > *:nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.quick { position: absolute; left: 0; right: 0; bottom: 28px; }
.quick__form {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; max-width: 760px; padding: 14px;
  background: rgba(255, 255, 255, .96); color: #222; border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.quick__form label { display: block; margin-bottom: 4px; font-size: .85rem; color: #555; }
.quick__form .btn { align-self: end; }

/* 7. Forms ----------------------------------------------------------------- */
input, select, textarea {
  width: 100%; min-height: 46px; padding: 11px 12px;
  font: inherit; color: #222; background: #fff;
  border: 1.5px solid #c9c9c9; border-radius: 4px;
}
textarea { min-height: 130px; resize: vertical; }
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .98rem; }
.field__error { display: none; margin-top: 4px; font-size: .9rem; color: var(--error); }
.field.invalid .field__error { display: block; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--error); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-status { margin-top: 14px; padding: 14px 16px; border-left: 4px solid var(--accent); background: var(--bg-alt); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 8. Cards ----------------------------------------------------------------- */
.vcard {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow .25s, border-color .25s;
}
.vcard:hover { border-color: var(--accent); box-shadow: 0 14px 34px rgba(0, 0, 0, .14); }
.vcard__img { aspect-ratio: 5 / 3; overflow: hidden; background: #1a1a1a; }
.vcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.vcard:hover .vcard__img img { transform: scale(1.06); }
.vcard__body { display: flex; flex: 1; flex-direction: column; padding: 18px 20px 22px; }
.vcard__title { margin-bottom: 4px; font-size: 1.5rem; }
.vcard__meta { margin-bottom: 14px; font-size: .95rem; color: var(--muted); }
.vcard__price { margin-top: auto; padding-bottom: 14px; font-family: var(--font-head); font-size: 1.65rem; font-weight: 700; }
.card {
  padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card p { color: var(--muted); }
.icon { width: 44px; height: 44px; margin-bottom: 16px; color: var(--accent-text); }
.feature p { color: var(--muted); }
.feature .icon { margin-bottom: 12px; }

/* 9. Sections -------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 28px 0 12px; }
.stat b { display: block; font-family: var(--font-head); font-size: 3rem; font-weight: 700; line-height: 1; }
.stat span { font-size: .95rem; color: var(--muted); }
.cta { padding: clamp(56px, 8vw, 96px) 0; background: var(--ink); color: #fff; text-align: center; }
.cta p { font-size: 1.15rem; color: #cfcfcf; }
.cta .hero__actions { justify-content: center; }

/* 10. Inner pages ---------------------------------------------------------- */
.page-head { padding: calc(var(--header-h) + 44px) 0 48px; background: var(--ink); color: #fff; }
.page-head h1 { margin-bottom: .25em; }
.page-head p { max-width: 620px; margin: 0; font-size: 1.1rem; color: #cfcfcf; }
.page-head .crumb { margin-bottom: 12px; font-size: .98rem; color: #cfcfcf; }
.crumb a { color: var(--accent); }

.listing { display: grid; grid-template-columns: 290px 1fr; gap: 32px; align-items: start; }
.filters {
  position: sticky; top: calc(var(--header-h) + 16px);
  padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.filters h2 { font-size: 1.5rem; }
.filters .field { margin-bottom: 12px; }
.range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.toolbar select { width: auto; min-width: 200px; }
.empty { grid-column: 1 / -1; padding: 48px 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

.detail { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: start; }
.gallery__main { aspect-ratio: 5 / 3; overflow: hidden; border-radius: var(--radius); background: #1a1a1a; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.thumb { aspect-ratio: 5 / 3; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 4px; background: #1a1a1a; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-pressed="true"] { border-color: var(--accent); }
.detail__price { margin: .1em 0 .1em; font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; }
.detail__tax { margin-bottom: 8px; font-size: .92rem; color: var(--muted); }
.specs { width: 100%; margin: 8px 0 24px; border-collapse: collapse; }
.specs th, .specs td { padding: 11px 0; text-align: left; font-weight: 400; border-bottom: 1px solid var(--line); }
.specs th { width: 42%; color: var(--muted); }
.specs td { font-weight: 600; }
.detail__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.calc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.panel { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.result { padding: 30px; background: var(--ink); color: #fff; border-radius: var(--radius); }
.result__label { margin-bottom: 4px; color: #cfcfcf; }
.result__value { font-family: var(--font-head); font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 700; line-height: 1.05; color: var(--accent); }
.result dl { display: grid; gap: 10px; margin: 22px 0 0; }
.result dl div { display: flex; justify-content: space-between; gap: 16px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .14); }
.result dt { color: #cfcfcf; }
.result dd { margin: 0; font-weight: 600; }
.result__warn { margin: 16px 0 0; color: #ffb4a9; }

.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.info-list { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.info-list li { display: flex; align-items: flex-start; gap: 14px; }
.info-list .icon { flex: none; width: 28px; height: 28px; margin: 0; }
.info-list b { display: block; }
.legal { max-width: 780px; }

/* 11. Footer --------------------------------------------------------------- */
.footer { padding: 64px 0 28px; background: var(--ink); color: #d0d0d0; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.footer h3 { font-size: 1.25rem; letter-spacing: .03em; color: #fff; }
.footer ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); text-decoration: underline; }
.footer__demo { margin-top: 14px; font-size: .88rem; color: #a9a9a9; }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .95rem;
}
.footer__bottom nav { display: flex; gap: 20px; }

/* 12. Floating buttons ----------------------------------------------------- */
.wa {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); transition: transform .2s;
}
.wa:hover { transform: scale(1.07); }
.wa svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.to-top {
  position: fixed; left: 16px; bottom: 16px; z-index: 90;
  display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--ink); color: #fff; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 22px; height: 22px; }

/* 13. Motion (scroll reveal is progressive enhancement) --------------------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* 14. Responsive ----------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid--4, .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .listing { grid-template-columns: 1fr; }
  .filters { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .split, .detail, .calc, .contact { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 1000px) {
  .burger { display: block; }
  .header__cta { display: none; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0; padding: 8px 20px 20px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid rgba(255, 255, 255, .1);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: transform .28s, opacity .28s, visibility .28s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 16px 4px; font-size: 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav a::after { display: none; }
  .nav .nav__cta { display: inline-flex; margin-top: 16px; padding: 12px 22px; border: 0; opacity: 1; }
}
@media (max-width: 640px) {
  .grid--4, .grid--3 { grid-template-columns: 1fr; }
  .form-row, .quick__form, .detail__actions { grid-template-columns: 1fr; }
  .hero { padding-bottom: 300px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .stats { gap: 10px; }
  .stat b { font-size: 2.2rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .logo { font-size: 1.3rem; letter-spacing: .1em; }
}
