/* FerreYa! 2026. Tokens y reglas en DESIGN.md (tema solo claro, pedido por la marca) */

:root {
  color-scheme: light;

  --bg: #eeeeec;
  --surface: #ffffff;
  --ink: #151515;
  --ink-2: #4a4a48;
  --line: #d4d4d0;
  --yellow: #f2d200;
  --yellow-hover: #ffe11a;

  --font-display: "Archivo", "Arial Black", sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 8px;
  --border: 2px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 2px 2px 0 var(--ink);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-press: cubic-bezier(0.2, 0.8, 0.2, 1);

  --z-header: 10;
  --z-mobile-bar: 11;
  --z-skip: 20;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 1.5rem; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: var(--z-skip); padding: 0.75rem 1rem; background: var(--ink); color: #fff; font-weight: 700; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }

.section-title { font-size: clamp(2rem, 4.2vw, 3.25rem); margin-bottom: 1.5rem; }
.section-intro { max-width: 60ch; color: var(--ink-2); font-size: 1.125rem; margin: -0.5rem 0 2.5rem; }

/* Botones con sombra de cartel */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 1.5rem;
  border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  font: 800 1.0625rem/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 140ms var(--ease-press), box-shadow 140ms var(--ease-press), background-color 140ms var(--ease-press);
}
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-ghost { background: var(--surface); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 1.125rem; font-size: 1rem; box-shadow: var(--shadow-sm); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
@media (hover: hover) {
  .btn-primary:hover { background: var(--yellow-hover); }
  .btn-ghost:hover { background: #fafaf8; }
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: inline-flex; align-items: center; min-height: 44px; }
.logo img { height: 54px; width: auto; }
.nav-list { display: flex; align-items: center; gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; color: var(--ink-2); transition: color 140ms var(--ease-press); }
@media (hover: hover) { .nav-link:hover { color: var(--ink); } }

/* Estado abierto/cerrado (lo calcula main.js con la hora de Córdoba) */
.status { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #b3261e; box-shadow: 0 0 0 2px var(--ink); }
.status.is-open::before { background: #1f9d55; }

/* Hero */
.hero { padding-block: 3rem 4rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: center; }
.hero-copy .status { margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(2.25rem, 4.4vw, 3.4rem); font-stretch: 100%; }
.hero-sub { margin-top: 1.5rem; max-width: 42ch; color: var(--ink-2); font-size: 1.1875rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.875rem; margin-top: 2rem; }
.hero-media { margin: 0; }
.hero-media img { width: 100%; border: var(--border); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--yellow), 8px 8px 0 2px var(--ink); }

/* Banda amarilla del lema */
.lema { background: var(--yellow); border-block: var(--border); }
.lema-inner { padding-block: 3rem; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.5rem 3rem; align-items: center; }
.lema h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
.lema p { font-size: 1.1875rem; font-weight: 600; }

/* Datos */
.facts-list { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-bottom: 1px solid var(--line); }
.facts-list > div { padding: 1.75rem 1.5rem 1.75rem 0; }
.facts-list > div + div { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.facts dt { font-family: var(--font-display); font-weight: 800; font-stretch: 112%; font-size: 1.25rem; text-transform: uppercase; }
.facts dd { margin: 0.25rem 0 0; color: var(--ink-2); }

/* Rubros: bento con fotos reales */
.rubros { padding-block: 5rem; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: var(--border); }
.card-body { padding: 1.25rem 1.375rem 1.5rem; }
.card h3 { font-size: 1.375rem; }
.card p { margin-top: 0.5rem; color: var(--ink-2); }
.card-herramientas { grid-column: span 7; }
.card-herramientas img { aspect-ratio: 16 / 9; }
.card-herramientas h3 { font-size: 1.875rem; }
.card-electricidad { grid-column: span 5; }
.card-electricidad img { aspect-ratio: auto; flex: 1; min-height: 220px; }
.card-led, .card-pinturas, .card-sanitarios { grid-column: span 4; }
.card-pinturas { background: var(--yellow); }
.card-pinturas p { color: var(--ink); }
.card-pinturas img { object-position: center 40%; }
.card-bulones, .card-hogar { grid-column: span 6; }

/* Marcas */
.marcas { padding-block: 0 4.5rem; }
.marcas-title { font-size: 1rem; letter-spacing: 0.06em; color: var(--ink-2); margin-bottom: 1rem; }
.marcas-list { display: flex; flex-wrap: wrap; gap: 0.625rem; margin: 0; padding: 0; list-style: none; }
.marcas-list li { padding: 0.5rem 1rem; background: var(--surface); border: var(--border); border-radius: var(--radius); font-family: var(--font-display); font-weight: 800; font-stretch: 112%; font-size: 1.0625rem; text-transform: uppercase; }

/* Opiniones */
.opiniones { padding-block: 5rem; border-top: var(--border); background: var(--surface); }
.rating { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0.25rem 2rem; margin-bottom: 2rem; }
.rating .section-title { grid-row: span 3; margin-bottom: 0; }
.rating-score, .rating-count, .rating-link { justify-self: end; text-align: right; }
.rating-score { display: flex; align-items: baseline; gap: 0.75rem; }
.rating-number { font-family: var(--font-display); font-weight: 800; font-stretch: 112%; font-size: 4.5rem; line-height: 1; }
.stars { color: #c9a800; font-size: 1.5rem; letter-spacing: 0.08em; -webkit-text-stroke: 0.5px var(--ink); }
.rating-count { color: var(--ink-2); }
.rating-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; text-underline-offset: 0.3em; text-decoration-thickness: 2px; text-decoration-color: var(--yellow); }
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.review { padding: 1.5rem; background: var(--bg); border: var(--border); border-radius: var(--radius); }
.review-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 0.75rem; }
.review-name { font-weight: 800; }
.review-stars { color: #c9a800; letter-spacing: 0.06em; -webkit-text-stroke: 0.4px var(--ink); white-space: nowrap; }
.review blockquote { margin: 0; color: var(--ink-2); font-size: 1.0625rem; }

/* Visitanos */
.visitanos { position: relative; min-height: 540px; display: flex; align-items: center; border-top: var(--border); }
.map { position: absolute; inset: 0; }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.6) contrast(0.95); }
.visitanos .container { position: relative; pointer-events: none; }
.visit-card { pointer-events: auto; width: min(100%, 25rem); padding: 2rem; background: var(--surface); border: var(--border); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--ink); }
.visit-card .section-title { font-size: 2.5rem; margin-bottom: 0.75rem; }
.visit-lead { color: var(--ink-2); margin-bottom: 0.75rem; }
.visit-card address { font-size: 1.1875rem; font-weight: 700; }
.visit-card .status { margin-top: 1rem; }
.hours { display: grid; gap: 0.5rem; margin: 1.25rem 0 1.75rem; }
.hours dt { font-weight: 800; }
.hours dd { margin: 0; color: var(--ink-2); }

/* Contacto */
.contacto { padding-block: 5.5rem; border-top: var(--border); }
.contacto-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3.5rem; align-items: start; }
.contacto-lead { color: var(--ink-2); font-size: 1.125rem; max-width: 50ch; }
.contacto-redes { margin-top: 1rem; }
.cta-panel { display: grid; gap: 1rem; }
.cta-big {
  display: grid; gap: 0.25rem; padding: 1.5rem 1.75rem;
  background: var(--yellow); color: var(--ink); text-decoration: none;
  border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 140ms var(--ease-press), box-shadow 140ms var(--ease-press), background-color 140ms var(--ease-press);
}
.cta-big-ghost { background: var(--surface); }
.cta-big:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
@media (hover: hover) { .cta-big:hover { background: var(--yellow-hover); } .cta-big-ghost:hover { background: #fafaf8; } }
.cta-label { font-family: var(--font-display); font-weight: 800; font-stretch: 112%; font-size: clamp(1.875rem, 3.4vw, 2.5rem); text-transform: uppercase; line-height: 1; }
.cta-detail { font-weight: 700; }
.channels { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0 0; }
.channels dt { color: var(--ink-2); font-size: 0.9375rem; }
.channels dd { margin: 0.125rem 0 0; font-weight: 700; }
.channels a { text-underline-offset: 0.25em; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: var(--border); background: var(--ink); color: #d9d9d6; padding-block: 3rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-logo { height: 64px; width: auto; background: var(--bg); padding: 8px 12px; border-radius: var(--radius); }
.footer-tag { margin-top: 1rem; }
.footer-col a { color: #fff; text-decoration: none; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 36px; }
@media (hover: hover) { .footer-col a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 0.25em; } }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #333; font-size: 0.9375rem; }
.footer-bottom a { color: #d9d9d6; }

.mobile-bar { display: none; }

/* Responsive */
@media (max-width: 960px) {
  .nav-hide-md { display: none; }
  .hero-grid, .lema-inner, .contacto-grid { grid-template-columns: 1fr; gap: 2rem; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-herramientas { grid-column: span 2; }
  .card-electricidad, .card-led, .card-pinturas, .card-sanitarios, .card-bulones, .card-hogar { grid-column: span 1; }
  .card-electricidad img { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .reviews { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: span 2; }
}

@media (max-width: 767px) {
  .container { padding-inline: 1rem; }
  .header-inner { height: 64px; }
  .logo img { height: 44px; }
  .nav-list .btn { display: none; }
  .hero { padding-block: 1.75rem 3rem; }
  .hero-sub { font-size: 1.0625rem; }
  .hero-media img { box-shadow: 5px 5px 0 var(--yellow), 5px 5px 0 2px var(--ink); }
  .lema-inner { padding-block: 2.25rem; }
  .facts-list { grid-template-columns: 1fr; }
  .facts-list > div, .facts-list > div + div { padding: 1.125rem 0; border-left: 0; }
  .facts-list > div + div { border-top: 1px solid var(--line); }
  .rubros, .opiniones, .contacto { padding-block: 3.5rem; }
  .bento { grid-template-columns: 1fr; }
  .card-herramientas, .card-electricidad, .card-led, .card-pinturas, .card-sanitarios, .card-bulones, .card-hogar { grid-column: auto; }
  .card-herramientas h3 { font-size: 1.5rem; }
  .rating { grid-template-columns: 1fr; }
  .rating .section-title { grid-row: auto; margin-bottom: 0.5rem; }
  .rating-score, .rating-count, .rating-link { justify-self: start; text-align: left; }
  .visitanos { flex-direction: column; align-items: stretch; min-height: 0; }
  .map { position: relative; height: 280px; }
  .visitanos .container { margin-top: -3rem; padding-bottom: 1rem; }
  .visit-card { width: 100%; padding: 1.5rem; }
  .channels { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
  .site-footer { padding-bottom: 6.5rem; }

  .mobile-bar {
    position: fixed; inset: auto 0 0 0; z-index: var(--z-mobile-bar);
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem;
    padding: 0.75rem 1rem calc(0.875rem + env(safe-area-inset-bottom));
    background: var(--bg); border-top: var(--border);
  }
  .mobile-bar .btn { min-height: 52px; padding: 0 0.75rem; font-size: 1.0625rem; }
  .js-bar .mobile-bar:not(.is-visible) { transform: translateY(110%); visibility: hidden; }
}

/* Movimiento: solo si el usuario no pidió reducirlo */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .hero-media { animation: rise-in 600ms var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: 60ms; }
  .hero-copy > :nth-child(3) { animation-delay: 120ms; }
  .hero-copy > :nth-child(4) { animation-delay: 180ms; }
  .hero-media { animation-delay: 100ms; }

  .motion-ready .reveal {
    opacity: 0; transform: translateY(16px);
    transition: opacity 550ms var(--ease-out), transform 550ms var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .motion-ready .reveal.is-in { opacity: 1; transform: none; }

  .mobile-bar { transition: transform 280ms var(--ease-out), visibility 0s linear 0s; }
  .js-bar .mobile-bar:not(.is-visible) { transition: transform 200ms ease-in, visibility 0s linear 200ms; }
}
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
