/* Martec — site styles. Loaded after Bootstrap 5.3 and overrides it where needed. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.de2f1fe81758.woff2") format("woff2-variations"),
       url("fonts/archivo-latin-wdth-normal.de2f1fe81758.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #B32D24;          /* from the logo */
  --red-dark: #92241D;
  --ink: #1C1C1A;          /* from the logo bar, softened for reading */
  --concrete: #E6E5E1;
  --concrete-line: #CFCDC7;
  --muted: #5E5E58;
  --green: #0F7B3E;        /* WhatsApp actions; white text passes WCAG AA */
  --green-dark: #0B6332;
  --paper: #FFFFFF;
  --radius: 8px;

  --bs-body-font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-link-color-rgb: 146, 36, 29;
  --bs-link-hover-color-rgb: 28, 28, 26;
}

html { scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name {
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-stretch: 105%; }

a { text-underline-offset: 0.18em; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: none !important;
}
.band-dark :focus-visible { outline-color: var(--paper); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 2000;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  --bs-btn-font-weight: 700;
  --bs-btn-border-radius: 6px;
  --bs-btn-border-radius-lg: 6px;
  --bs-btn-border-radius-sm: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-stretch: 105%;
}
.btn .icon { flex: none; }
.btn-whatsapp {
  --bs-btn-color: #fff; --bs-btn-bg: var(--green); --bs-btn-border-color: var(--green);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--green-dark); --bs-btn-hover-border-color: var(--green-dark);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--green-dark); --bs-btn-active-border-color: var(--green-dark);
}
.btn-brand {
  --bs-btn-color: #fff; --bs-btn-bg: var(--red); --bs-btn-border-color: var(--red);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--red-dark); --bs-btn-hover-border-color: var(--red-dark);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--red-dark); --bs-btn-active-border-color: var(--red-dark);
}
.btn-outline-dark { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: var(--ink); }

.link-strong { font-weight: 700; color: var(--red-dark); }

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--concrete-line);
  position: sticky; top: 0; z-index: 1020;
}
.navbar { padding-block: .65rem; }
.brand { display: flex; align-items: center; gap: .6rem; margin-right: 1rem; }
.brand img { display: block; }
.brand-name { font-size: 1.35rem; line-height: 1; }
.brand-sub { font-size: .85rem; color: var(--muted); font-weight: 500; line-height: 1; padding-top: .2rem; }
@media (max-width: 380px) { .brand-sub { display: none; } }
.navbar .nav-link { color: var(--ink); font-weight: 600; padding-inline: .75rem !important; }
.navbar .nav-link:hover { color: var(--red-dark); }
.navbar .nav-link[aria-current="page"] { color: var(--red-dark); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .45em; }
.navbar-toggler { border-color: var(--concrete-line); }

/* ---------- Sections ---------- */
.band { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.band-concrete { background: var(--concrete); }
.band-dark { background: var(--ink); color: #EDECE8; }
.band-dark h2 { color: var(--paper); }
.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; }
.lead-text { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.band-dark .lead-text { color: #CFCDC7; }
.rounded-photo { width: 100%; height: auto; border-radius: var(--radius); display: block; }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }

/* ---------- Home hero: the one loud thing on the site ---------- */
.hero { padding-block: clamp(2rem, 5vw, 4rem); }
.hero-title {
  font-size: clamp(2.25rem, 6.2vw, 4.1rem);
  font-weight: 850;
  font-stretch: 118%;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  max-width: 14ch;
}
@media (min-width: 992px) { .hero-title { font-stretch: 125%; } }
.hero-lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-photo { width: 100%; height: auto; border-radius: var(--radius); display: block; aspect-ratio: 1600 / 1040; object-fit: cover; }

/* ---------- Product tiles (home) ---------- */
.product-tile { display: block; color: var(--ink); text-decoration: none; font-weight: 700; font-stretch: 105%; }
.product-tile img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; margin-bottom: .55rem; background: var(--concrete-line); }
.product-tile:hover span { color: var(--red-dark); text-decoration: underline; }

/* ---------- Catalog ---------- */
.catalog-tools { display: grid; gap: 1rem; margin-bottom: 1rem; }
.catalog-tools .form-control { border-color: var(--concrete-line); border-width: 2px; }
.category-filter { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
.chip {
  flex: none; border: 2px solid var(--concrete-line); background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: .4rem 1rem; font-weight: 600; font-size: .95rem; white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.catalog-count { color: var(--muted); font-size: .95rem; min-height: 1.5em; }

.product-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--paper); border: 1px solid var(--concrete-line); border-radius: var(--radius); overflow: hidden;
}
.product-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--concrete); }
.product-body { display: flex; flex-direction: column; flex: 1; padding: 1rem 1.25rem 1.25rem; }
.product-name { font-size: 1.25rem; font-stretch: 108%; margin-bottom: .4rem; }
.product-desc { color: var(--muted); font-size: 1rem; margin-bottom: 1.1rem; }
.product-col:target .product-card { outline: 3px solid var(--red); outline-offset: 2px; }
.catalog-empty { padding: 2rem; border: 2px dashed var(--concrete-line); border-radius: var(--radius); text-align: center; }

/* ---------- Visit band ---------- */
.visit-address { font-size: 1.25rem; font-weight: 600; color: var(--paper); margin-bottom: .25rem; }
.visit-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (min-width: 992px) { .visit-actions { justify-content: flex-end; } }

/* ---------- About ---------- */
.values h3 { margin-bottom: .5rem; }
.quote { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; font-stretch: 110%; color: var(--paper); margin: 0; }

/* ---------- Contact ---------- */
.contact-panel { display: grid; gap: .75rem; padding: 1.5rem; background: var(--concrete); border-radius: var(--radius); }
.contact-list { margin: .75rem 0 0; }
.contact-list dt { font-weight: 700; margin-top: .9rem; }
.contact-list dd { margin: 0; }
.form-title { font-size: 1.5rem; }
.contact-form .form-label { font-weight: 600; margin-bottom: .3rem; }
.contact-form .form-control { border-width: 2px; border-color: var(--concrete-line); }
.contact-form .form-control:focus { border-color: var(--ink); }
.contact-form .form-control.is-invalid { border-color: var(--red); background-image: none; }
.field-error { color: var(--red-dark); font-weight: 600; font-size: .95rem; margin-top: .3rem; }
.form-result { padding: 1.25rem 1.5rem; border-radius: var(--radius); margin-bottom: 1.25rem; }
.form-result p:last-child { margin-bottom: 0; }
.form-result-ok { background: #E3F1E8; border: 2px solid var(--green); }
.form-result-ok h2 { font-size: 1.4rem; }
.form-result-error { background: #F8E6E4; border: 2px solid var(--red); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.map-section iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--concrete); padding: 3rem 0 6rem; font-size: .98rem; }
.footer-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-stretch: 110%; font-size: 1.1rem; }
.footer-title { font-size: 1rem; font-stretch: 105%; margin-bottom: .6rem; }
.footer-links li { margin-bottom: .35rem; }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--red-dark); }
.site-footer address { margin-bottom: .6rem; }
.footer-legal { margin: 2rem 0 0; color: var(--muted); font-size: .9rem; }

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-float {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 1030;
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--green); color: #fff; text-decoration: none; font-weight: 700;
  padding: .75rem 1.1rem .75rem .95rem; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(15, 123, 62, .35);
}
.whatsapp-float:hover { background: var(--green-dark); color: #fff; }
.whatsapp-float .icon { width: 24px; height: 24px; }

@media (max-width: 575.98px) {
  .hero-actions .btn { width: 100%; font-size: 1.1rem; }
  .visit-actions .btn { width: 100%; }
}
.form-result:focus { outline: none; }
