/* ============================================================
   DAVANTI CHILE — Design tokens
   Black #2E2D2C · Orange #EB5B1F · Grey #C6C6C6 · White #FFFFFF
   Display: Poppins (Gotham-equivalent, geometric bold)
   Body: Inter
   Data/mono: Space Mono (tyre size codes)
   ============================================================ */

:root {
  --black: #2E2D2C;
  --black-deep: #191817;
  --orange: #EB5B1F;
  --orange-dark: #C74B15;
  --grey: #C6C6C6;
  --grey-light: #E9E8E6;
  --offwhite: #F6F4F1;
  --white: #FFFFFF;

  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --container: 1180px;
  --radius: 2px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.06;
  color: var(--black);
}

h1 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: 0.02em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--orange);
}

p { color: #514F4D; }
.lead { font-size: 1.1rem; color: #514F4D; max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 15px 30px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--black-deep); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { border-color: var(--white); }
.btn-outline-dark { background: transparent; color: var(--black); border-color: var(--black); }
.btn-outline-dark:hover { background: var(--black); color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  border-bottom: 3px solid var(--orange);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.logo img { height: 26px; width: auto; }
.nav-links {
  display: flex;
  gap: 34px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--grey);
  position: relative;
  padding: 6px 0;
  transition: color .15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 3px;
  background: var(--orange);
}
.header-cta { display: flex; align-items: center; gap: 22px; }
.header-cta .btn { padding: 11px 22px; font-size: 0.78rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ---------- Tread groove divider ---------- */
.tread-divider {
  height: 14px;
  width: 100%;
  background: var(--black);
  background-image: repeating-linear-gradient(
    115deg,
    var(--orange) 0px, var(--orange) 3px,
    var(--black) 3px, var(--black) 26px
  );
}

/* ---------- Hero ---------- */
.hero {
  background: var(--black);
  background-image: linear-gradient(100deg, rgba(25,24,23,0.96) 28%, rgba(25,24,23,0.72) 58%, rgba(25,24,23,0.32) 100%), url('img/hero-bg.jpg');
  background-size: cover;
  background-position: center 35%;
  color: var(--white);
  padding: 110px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.hero h1 { color: var(--white); }
.hero h1 span { color: var(--orange); }
.hero .lead { color: var(--grey); margin: 22px 0 34px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--grey);
}
.hero-stats strong { color: var(--white); font-family: var(--font-display); font-weight: 700; }

.hero-flag {
  position: absolute;
  top: 0; right: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  writing-mode: vertical-rl;
  padding: 30px 24px 0 0;
}

/* ---------- Product modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(25,24,23,0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white);
  max-width: 980px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--orange); }
.modal-media {
  background: var(--offwhite);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.modal-media img { width: 100%; height: auto; object-fit: contain; }
.modal-media .thumb-pattern-modal {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--black);
  background-image: repeating-linear-gradient(115deg, var(--orange) 0px, var(--orange) 2px, var(--black) 2px, var(--black) 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
}
.modal-body { padding: 44px 40px; }
.modal-body .tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  display: block;
  margin-bottom: 12px;
}
.modal-body h2 { font-size: 1.7rem; margin-bottom: 16px; }
.modal-body p.desc { color: #514F4D; margin-bottom: 30px; }
.modal-sizes-label {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  display: block;
}
.modal-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.modal-sizes .chip {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border: 2px solid var(--black);
  padding: 8px 14px;
  color: var(--black);
}
.modal-sizes-note {
  font-size: 0.8rem;
  color: #8a8886;
  margin-bottom: 30px;
}
.modal-actions { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .modal-box { grid-template-columns: 1fr; }
  .modal-body { padding: 32px 24px; }
}

/* ---------- Union Jack watermark ---------- */
.flag-watermark {
  position: absolute;
  inset: 0;
  background-image: url('img/union-jack-watermark.svg');
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.flag-watermark.corner {
  inset: auto;
  top: 6%;
  right: 6%;
  width: 34%;
  aspect-ratio: 2 / 1;
  height: auto;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.85;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.flag-watermark.corner::before {
  content: "";
  position: absolute;
  inset: -14px;
  background: rgba(15,14,13,0.4);
  z-index: -1;
  border-radius: 8px;
}

/* ---------- British technology section ---------- */
.tech-section {
  background: var(--black);
  color: var(--white);
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}
.tech-section .wrap { position: relative; z-index: 1; }
.tech-section .eyebrow, .tech-section h2 { color: var(--white); }
.tech-section .eyebrow { color: var(--orange); }
.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.tech-copy .lead { color: var(--grey); }
.tech-facts { list-style: none; margin-top: 26px; display: grid; gap: 16px; }
.tech-facts li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--grey);
}
.tech-facts li::before {
  content: "";
  flex-shrink: 0;
  width: 8px; height: 8px;
  margin-top: 7px;
  background: var(--orange);
}
.tech-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tech-photos img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  filter: grayscale(15%);
}
.tech-photos .tp-tall { grid-row: span 2; aspect-ratio: 1/2.06; }
.tech-photos figure { margin: 0; position: relative; overflow: hidden; }
.tech-photos figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
}

/* ---------- Tyre size anatomy (signature element) ---------- */
.anatomy {
  background: var(--offwhite);
  padding: 90px 0;
}
.anatomy-head { max-width: 640px; margin: 0 auto 50px; text-align: center; }
.anatomy-head h2 { margin-bottom: 16px; }
.anatomy-head .lead { margin: 0 auto; }

.tyre-code {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 5vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 46px;
}
.tyre-code .seg {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background .15s ease, color .15s ease;
  color: var(--black);
}
.tyre-code .seg:hover,
.tyre-code .seg.active {
  background: var(--orange);
  color: var(--white);
}
.tyre-code .sep { color: var(--grey); }

.anatomy-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}
.anatomy-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-left: 4px solid var(--grey);
  padding: 20px 22px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.anatomy-card.active {
  border-left-color: var(--orange);
  box-shadow: 0 8px 24px rgba(46,45,44,0.08);
}
.anatomy-card .code {
  font-family: var(--font-mono);
  color: var(--orange);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 8px;
}
.anatomy-card h4 {
  font-size: 0.92rem;
  text-transform: none;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0;
}
.anatomy-card p { font-size: 0.87rem; margin: 0; }

/* ---------- Section generic ---------- */
.section { padding: 90px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 46px;
  flex-wrap: wrap;
}
.section-head .lead { margin: 14px 0 0; }

/* ---------- Category / product cards ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cat-card {
  background: var(--black);
  color: var(--white);
  padding: 30px 24px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--orange);
  transition: transform .15s ease;
  background-size: cover;
  background-position: center;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(46,45,44,0.15) 0%, rgba(25,24,23,0.94) 78%);
  z-index: 0;
}
.cat-card:hover { transform: translateY(-4px); }
.cat-card .num, .cat-card h3, .cat-card p { position: relative; z-index: 1; }
.cat-card .num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey);
  position: absolute;
  top: 22px; left: 24px;
  z-index: 1;
}
.cat-card h3 { color: var(--white); margin-bottom: 8px; }
.cat-card p { color: var(--grey); font-size: 0.87rem; margin: 0; }

.product-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.tab-btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 11px 20px;
  border: 2px solid var(--black);
  background: transparent;
  color: var(--black);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tab-btn.active, .tab-btn:hover { background: var(--black); color: var(--white); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card {
  border: 1px solid var(--grey-light);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.product-card:hover { box-shadow: 0 14px 34px rgba(46,45,44,0.12); border-color: var(--grey); transform: translateY(-3px); }
.product-card .thumb {
  aspect-ratio: 1 / 1;
  background: var(--offwhite);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform .25s ease;
}
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .thumb.thumb-pattern {
  background: var(--black);
  background-image: repeating-linear-gradient(
    115deg,
    var(--orange) 0px, var(--orange) 2px,
    var(--black) 2px, var(--black) 20px
  );
}
.product-card .thumb-pattern .thumb-letter {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.92);
  background: rgba(46,45,44,0.6);
  min-width: 56px;
  height: 56px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
}
.product-card .card-body { padding: 22px 24px; flex: 1; }
.product-card .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  display: block;
  margin-bottom: 12px;
}
.product-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.product-card p { font-size: 0.9rem; margin: 0; }
.product-card.hidden { display: none; }

/* ---------- Where to buy ---------- */
.buy-strip { background: var(--black); color: var(--white); padding: 90px 0; }
.buy-strip .section-head h2, .buy-strip .eyebrow { color: var(--white); }
.buy-strip .section-head .lead { color: var(--grey); }
.buy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.buy-card {
  background: var(--black-deep);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 34px;
}
.buy-card .count {
  font-family: var(--font-mono);
  color: var(--orange);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}
.buy-card h3 { color: var(--white); font-size: 1.4rem; margin-bottom: 10px; }
.buy-card p { color: var(--grey); margin-bottom: 22px; }

/* ---------- History / about timeline ---------- */
.timeline { border-left: 2px solid var(--grey-light); padding-left: 30px; }
.tl-item { position: relative; padding-bottom: 42px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -37px; top: 4px;
  width: 12px; height: 12px;
  background: var(--orange);
  border-radius: 50%;
}
.tl-item .yr {
  font-family: var(--font-mono);
  color: var(--orange);
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}
.tl-item h4 { font-size: 1rem; text-transform: none; letter-spacing: 0; margin-bottom: 6px; }
.tl-item p { font-size: 0.92rem; max-width: 56ch; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillar { padding: 30px; background: var(--offwhite); border-top: 4px solid var(--orange); }
.pillar h3 { font-size: 1rem; margin-bottom: 10px; }
.pillar p { font-size: 0.9rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.form-row input, .form-row textarea {
  width: 100%;
  border: 2px solid var(--grey-light);
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  transition: border-color .15s ease;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--orange);
}
.form-note {
  font-size: 0.82rem;
  color: #8a8886;
  margin-top: 18px;
}
.info-card {
  background: var(--offwhite);
  border-left: 4px solid var(--orange);
  padding: 24px 26px;
  margin-bottom: 18px;
}
.info-card h4 { font-size: 0.95rem; text-transform: none; letter-spacing: 0; margin-bottom: 8px; }
.info-card p { font-size: 0.9rem; margin: 0; }
.info-card a.link { color: var(--orange); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black-deep); color: var(--grey); padding: 60px 0 26px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-grid .logo img { height: 22px; margin-bottom: 16px; }
.footer-grid p { color: #98958F; font-size: 0.88rem; max-width: 34ch; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.footer-col a, .footer-col p { display: block; font-size: 0.88rem; color: #98958F; margin-bottom: 10px; }
.footer-col a:hover { color: var(--orange); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 0.78rem;
  color: #6f6c67;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links, .header-cta .btn-outline { display: none; }
  .nav-toggle { display: block; }
  .hero-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .buy-grid, .contact-grid, .pillars { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cat-grid, .product-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { padding: 60px 0 40px; }
}

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