/* ==========================================================================
   Pantera Pallets SRL — draft design system
   Mobile-first. No frameworks. Spanish B2B site.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand black and the logo gold. #E0A526 on white is about 2.2:1,
     so text and small links on light surfaces use --color-gold-text
     (#7A5000, about 7:1 on white). Gold fills keep near-black text. */
  --color-ink: #111111;
  --color-ink-soft: #3a342c;
  --color-muted: #5c564c;
  --color-gold: #e0a526;
  --color-gold-hover: #c9921c;
  --color-gold-text: #7a5000;
  --color-gold-text-hover: #5c3c00;
  --color-gold-tint: #f8efd4;

  --color-white: #ffffff;
  --color-paper: #f6f3ec;
  --color-paper-deep: #efeae0;
  --color-line: #e3dccf;
  --color-line-strong: #cfc6b6;

  --color-danger: #8e1b2a;
  --color-danger-bg: #fdf2f3;
  --color-whatsapp: #075e54;
  --color-whatsapp-hover: #054c44;
  --color-focus: #111111;
  --color-focus-on-dark: #ffffff;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", sans-serif;
  --font-size: 1rem;
  --line-height: 1.6;

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-4xl: 6.5rem;

  --container: 72rem;
  --header-height: 4.5rem;
  --radius: 0.5rem;
  --radius-sm: 0.375rem;
  --shadow-soft: 0 10px 30px rgba(17, 17, 17, 0.08);
  --shadow-fab: 0 8px 24px rgba(17, 17, 17, 0.22);
  --header-z: 40;
  --overlay-z: 45;
  --fab-z: 50;

  --hero-overlay: linear-gradient(
    180deg,
    rgba(17, 17, 17, 0.45) 0%,
    rgba(17, 17, 17, 0.62) 42%,
    rgba(17, 17, 17, 0.82) 100%
  );
}

/* --------------------------------------------------------------------------
   Reset and base
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--color-ink);
  background: var(--color-white);
}

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

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

ul,
ol {
  padding-left: 1.25rem;
}

a {
  color: var(--color-gold-text);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-gold-text-hover);
}

::selection {
  background: var(--color-gold);
  color: var(--color-ink);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-3xl);
}

.section-alt {
  background: var(--color-paper);
}

.section-head {
  max-width: 40rem;
  margin-bottom: var(--space-xl);
}

.section-head h2,
.page-header h1 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.lede,
.section-head p,
.page-header p {
  margin-top: var(--space-sm);
  max-width: 40rem;
  color: var(--color-muted);
  font-size: 1.0625rem;
}

.stack > * + * {
  margin-top: var(--space-md);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-ink);
}

.btn-primary:hover {
  background: var(--color-gold-hover);
  border-color: var(--color-gold-hover);
  color: var(--color-ink);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-ink);
  color: var(--color-ink);
}

.btn-outline:hover {
  background: var(--color-ink);
  color: var(--color-white);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* --------------------------------------------------------------------------
   Header and navigation
   One row on wide screens: logo, links, Cotizar.
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--header-z);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--color-line);
  backdrop-filter: blur(10px);
}

.site-header > .container,
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--header-height);
}

.site-header > .container {
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  color: var(--color-ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--color-ink);
}

.brand img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: auto;
  border-radius: var(--radius-sm);
  color: var(--color-ink);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  content: "";
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav {
  display: none;
}

.site-nav.is-open {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: absolute;
  z-index: var(--overlay-z);
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100dvh - var(--header-height));
  overflow: auto;
  padding: var(--space-sm) var(--space-md) var(--space-lg);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
  box-shadow: var(--shadow-soft);
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.7rem 0.35rem;
  color: var(--color-ink);
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.site-nav a:hover {
  color: var(--color-gold-text);
  background: var(--color-paper);
}

.site-nav a[aria-current="page"] {
  color: var(--color-gold-text);
  box-shadow: inset 3px 0 0 var(--color-gold);
}

.site-nav .btn {
  width: 100%;
  margin-top: var(--space-sm);
}

/* --------------------------------------------------------------------------
   Hero (home) and compact interior page header
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: min(88vh, 46rem);
  padding-block: var(--space-3xl) var(--space-2xl);
  color: var(--color-white);
  background: var(--color-ink) center / cover no-repeat;
  /* Optional: style="--hero-image: url('...')" on .hero */
  background-image: var(--hero-image, none);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-overlay);
}

.hero h1 {
  max-width: 24ch;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero p {
  max-width: 38rem;
  margin-top: var(--space-md);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.92);
}

.hero .btn-row {
  margin-top: var(--space-xl);
}

.hero .btn-outline {
  border-color: var(--color-white);
  color: var(--color-white);
}

.hero .btn-outline:hover {
  background: var(--color-white);
  color: var(--color-ink);
}

.page-header {
  padding-block: var(--space-xl) var(--space-lg);
  background: var(--color-ink);
  color: var(--color-white);
}

.page-header p {
  color: rgba(255, 255, 255, 0.86);
}

.page-header a {
  color: var(--color-gold);
}

.page-header a:hover {
  color: #f0c85a;
}

/* Buttons inside the dark page header (404): keep button colours. */
.page-header a.btn-primary,
.page-header a.btn-primary:hover {
  color: var(--color-ink);
}

.page-header a.btn-outline {
  border-color: var(--color-white);
  color: var(--color-white);
}

.page-header a.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-ink);
}

.page-header .btn-row {
  margin-top: var(--space-lg);
}

/* --------------------------------------------------------------------------
   Trust strip — three short proof points
   -------------------------------------------------------------------------- */

.trust-strip {
  background: var(--color-paper);
  border-block: 1px solid var(--color-line);
  padding-block: var(--space-lg);
}

.trust-strip ul {
  display: grid;
  gap: var(--space-md) var(--space-xl);
  list-style: none;
  margin: 0;
  padding: 0;
}

.trust-strip li,
.trust-item {
  padding-left: 0.9rem;
  border-left: 3px solid var(--color-gold);
  font-weight: 600;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Feature columns and image + text split
   -------------------------------------------------------------------------- */

.features {
  display: grid;
  gap: var(--space-lg);
}

.feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}

.feature img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-paper-deep);
}

.feature h3 {
  font-size: 1.2rem;
}

.feature p {
  color: var(--color-ink-soft);
}

.split {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

.split img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-paper-deep);
}

.split h2 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
}

.split h2 + p {
  margin-top: var(--space-sm);
}

.split p + p,
.split ul {
  margin-top: var(--space-md);
}

.split li + li {
  margin-top: 0.35rem;
}

/* --------------------------------------------------------------------------
   Product grid and cards
   1 column → 2 (tablet) → 3 (desktop). Image is 16:9.
   -------------------------------------------------------------------------- */

.product-grid {
  display: grid;
  gap: var(--space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.03);
}

.product-card img,
.product-card .product-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-paper-deep);
}

.product-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  padding: var(--space-md);
}

.badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--color-gold-tint);
  color: var(--color-gold-text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.product-card h2,
.product-card h3 {
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.product-card p {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.product-card .btn {
  width: 100%;
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   Map embed
   -------------------------------------------------------------------------- */

.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-paper-deep);
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

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

.contact-form {
  display: grid;
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.contact-form label {
  font-size: 0.9375rem;
  font-weight: 700;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-ink);
}

.contact-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.contact-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-ink) 50%),
    linear-gradient(135deg, var(--color-ink) 50%, transparent 50%);
  background-position: calc(100% - 1.05rem) 50%, calc(100% - 0.7rem) 50%;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.contact-form input:hover,
.contact-form select:hover,
.contact-form textarea:hover {
  border-color: #b3a892;
}

.form-field.is-invalid input,
.form-field.is-invalid select,
.form-field.is-invalid textarea,
.contact-form input[aria-invalid="true"],
.contact-form select[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: var(--color-danger);
  background-color: var(--color-danger-bg);
}

.form-error {
  color: var(--color-danger);
  font-size: 0.875rem;
  font-weight: 600;
}

.form-notice {
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius-sm);
  background: var(--color-gold-tint);
  color: var(--color-ink);
}

.form-notice[hidden] {
  display: none;
}

.form-actions .btn,
.contact-form > .btn {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Closing call to action
   -------------------------------------------------------------------------- */

.cta-band {
  padding-block: var(--space-3xl);
  background: var(--color-ink);
  color: var(--color-white);
}

.cta-band h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.cta-band p {
  max-width: 36rem;
  margin-top: var(--space-sm);
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.0625rem;
}

.cta-band .btn-row,
.cta-band .btn {
  margin-top: var(--space-lg);
}

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

.site-footer {
  padding-block: var(--space-2xl) 5.5rem;
  background: #0c0c0c;
  color: #f4f1ea;
}

.site-footer a {
  color: #f4f1ea;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-gold);
}

.footer-grid {
  display: grid;
  gap: var(--space-xl);
}

.site-footer .brand {
  color: var(--color-white);
}

.site-footer .brand-name {
  color: var(--color-white);
}

.footer-blurb {
  margin-top: var(--space-sm);
  max-width: 28rem;
  color: rgba(244, 241, 234, 0.82);
}

.site-footer h2,
.site-footer h3 {
  margin-bottom: var(--space-sm);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.4rem;
}

.footer-meta {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(244, 241, 234, 0.7);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   WhatsApp button and draft badge
   -------------------------------------------------------------------------- */

.whatsapp-fab {
  position: fixed;
  z-index: var(--fab-z);
  right: calc(1rem + env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: var(--color-whatsapp);
  color: var(--color-white);
  box-shadow: var(--shadow-fab);
  text-decoration: none;
}

.whatsapp-fab:hover {
  background: var(--color-whatsapp-hover);
  color: var(--color-white);
}

.whatsapp-fab svg {
  width: 1.7rem;
  height: 1.7rem;
  fill: currentColor;
}

.placeholder-tag {
  display: inline-block;
  padding: 0.12rem 0.35rem;
  border-radius: 0.2rem;
  background: var(--color-ink);
  color: var(--color-gold);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  vertical-align: middle;
}

.whatsapp-fab .placeholder-tag {
  position: absolute;
  top: -0.45rem;
  right: -0.35rem;
  max-width: 6.5rem;
  text-align: center;
}

.draft-badge {
  position: fixed;
  z-index: var(--fab-z);
  left: calc(0.75rem + env(safe-area-inset-left));
  bottom: calc(0.85rem + env(safe-area-inset-bottom));
  padding: 0.28rem 0.55rem;
  border-radius: 0.25rem;
  background: var(--color-gold);
  color: var(--color-ink);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
  box-shadow: var(--shadow-soft);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Focus
   -------------------------------------------------------------------------- */

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.hero :focus-visible,
.page-header :focus-visible,
.cta-band :focus-visible,
.site-footer :focus-visible,
.whatsapp-fab:focus-visible {
  outline-color: var(--color-focus-on-dark);
}

.btn-primary:focus-visible {
  outline-color: var(--color-ink);
}

/* --------------------------------------------------------------------------
   Wider screens
   -------------------------------------------------------------------------- */

@media (min-width: 40rem) {
  .container {
    width: min(var(--container), calc(100% - 3rem));
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-form {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-md);
  }

  .form-field:has(textarea),
  .form-field--full,
  .form-actions,
  .form-notice,
  .contact-form > .btn {
    grid-column: 1 / -1;
  }

  .form-actions .btn,
  .contact-form > .btn {
    width: auto;
    min-width: 12rem;
  }
}

@media (min-width: 48rem) {
  .trust-strip ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

@media (min-width: 52rem) {
  .split {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-2xl);
  }

  .split.reverse {
    grid-template-columns: 0.95fr 1.05fr;
  }

  .split.reverse img {
    order: 2;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    align-items: start;
  }
}

@media (min-width: 64rem) {
  .section {
    padding-block: var(--space-4xl);
  }

  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-xl);
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cta-band {
    padding-block: var(--space-4xl);
  }
}

/* Six Spanish links plus Cotizar stay on one row only when there is room. */
@media (min-width: 68.75rem) {
  .nav-toggle {
    display: none;
  }

  .site-nav,
  .site-nav.is-open {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 0.1rem;
  }

  .site-nav a {
    padding: 0.4rem 0.5rem;
    font-size: 0.9rem;
    background: transparent;
    white-space: nowrap;
  }

  .site-nav a:hover {
    background: transparent;
  }

  .site-nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--color-gold);
    background: transparent;
  }

  .site-nav .btn {
    width: auto;
    margin-top: 0;
    margin-left: 0.35rem;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion and print
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header {
    position: static;
  }

  .nav-toggle,
  .whatsapp-fab,
  .draft-badge {
    display: none !important;
  }

  .hero {
    min-height: 0;
    color: var(--color-ink);
    background: none;
  }

  .hero::before {
    display: none;
  }

  a {
    text-decoration: underline;
  }
}

/* --------------------------------------------------------------------------
   Quiénes somos — four short service cards
   -------------------------------------------------------------------------- */

.service-grid {
  display: grid;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-card {
  margin: 0;
  padding: var(--space-lg);
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}

.service-card h3 {
  font-size: 1.05rem;
  line-height: 1.4;
}

@media (min-width: 40rem) {
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 64rem) {
  .service-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Ubicación — address beside the map
   -------------------------------------------------------------------------- */

.visit {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}

.address-block address {
  margin-top: var(--space-sm);
  font-style: normal;
  font-size: 1.125rem;
  line-height: 1.55;
}

.address-block .hours {
  margin-top: var(--space-lg);
  color: var(--color-muted);
}

.address-block .hours strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-ink);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.address-block .btn {
  margin-top: var(--space-lg);
}

@media (min-width: 52rem) {
  .visit {
    grid-template-columns: minmax(16rem, 0.72fr) 1.28fr;
    gap: var(--space-2xl);
    align-items: center;
  }
}

/* --------------------------------------------------------------------------
   Contacto — form beside plant details
   -------------------------------------------------------------------------- */

.contact-layout {
  display: grid;
  gap: var(--space-2xl);
  align-items: start;
}

.form-demo-note {
  margin-bottom: var(--space-md);
  max-width: 36rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.contact-layout .address-block p {
  margin-top: var(--space-sm);
}

@media (min-width: 52rem) {
  .contact-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(14rem, 0.7fr);
    gap: var(--space-2xl);
  }
}

/* Skip link (hidden until focused) — added in post-build QA */
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 1000; padding: .6rem 1rem; background: #111; color: #fff; border-radius: 6px; text-decoration: none; }
.skip-link:focus, .skip-link:focus-visible { top: 1rem; }

/* --------------------------------------------------------------------------
   Loop 1 fixes (ENG-20260926-01) — keep at the end of the file
   -------------------------------------------------------------------------- */

/* Header "Cotizar": beat .site-nav a (display:block, padding, transparent bg). */
.site-nav a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.15rem;
}

.site-nav a.btn-primary,
.site-nav a.btn-primary[aria-current="page"] {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-ink);
  box-shadow: none;
}

.site-nav a.btn-primary:hover {
  background: var(--color-gold-hover);
  border-color: var(--color-gold-hover);
  color: var(--color-ink);
}

/* BORRADOR badge never covers content.
   Phones: a static strip at the very end of the page.
   40rem and up: a thin vertical tab inside the left page margin. */
@media (max-width: 39.99rem) {
  .draft-badge {
    position: static;
    display: block;
    padding: 0.4rem 1rem 0.5rem;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
  }
}

@media (min-width: 40rem) {
  .draft-badge {
    left: 0;
    top: 50%;
    bottom: auto;
    padding: 0.55rem 0.2rem;
    border-radius: 0 0.25rem 0.25rem 0;
    font-size: 0.625rem;
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
  }
}

/* Contact form helpers (new form markup in contacto/index.html) */
.form-optional {
  color: var(--color-muted);
  font-weight: 400;
}

.form-notice--error {
  border-left-color: var(--color-danger);
  background: var(--color-danger-bg);
}

.form-notice a {
  color: var(--color-gold-text);
  font-weight: 700;
}

.form-notice p + p {
  margin-top: 0.35rem;
}

/* --------------------------------------------------------------------------
   Loop 2 (ENG-20260926-01) — keep at the end of the file
   Quote checklist, grade guide table, Recursos pages, mobile action bar.
   -------------------------------------------------------------------------- */

/* "Qué necesitamos para cotizarle": compact numbered chips on dark bands */
.quote-needs {
  max-width: 52rem;
  margin-top: var(--space-md);
}

.quote-needs__title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.cta-band .quote-needs__title,
.page-header .quote-needs__title {
  max-width: none;
  margin-top: 0;
  color: var(--color-gold);
  font-size: 0.8125rem;
}

.quote-needs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: need;
}

.quote-needs__list li {
  counter-increment: need;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem 0.3rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--color-white);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.quote-needs__list li::before {
  content: counter(need);
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 800;
}

/* Grade guide (Productos) and article tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-white);
}

.grade-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.45;
}

.grade-table th,
.grade-table td,
.data-table th,
.data-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

.grade-table thead th,
.data-table thead th {
  background: var(--color-paper-deep);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.grade-table tbody tr:last-child > *,
.data-table tbody tr:last-child > * {
  border-bottom: 0;
}

.grade-table tbody th {
  min-width: 10rem;
  font-weight: 700;
}

.grade-table tbody th span {
  display: block;
  margin-top: 0.15rem;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.grade-table td {
  color: var(--color-ink-soft);
}

.grade-note {
  max-width: 48rem;
  margin-top: var(--space-md);
  color: var(--color-ink-soft);
}

@media (max-width: 39.99rem) {
  .grade-table thead {
    display: none;
  }

  .grade-table,
  .grade-table tbody,
  .grade-table tr,
  .grade-table th,
  .grade-table td {
    display: block;
  }

  .grade-table tr {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--color-line);
  }

  .grade-table tbody tr:last-child {
    border-bottom: 0;
  }

  .grade-table th,
  .grade-table td,
  .grade-table tbody tr:last-child > * {
    padding: 0.35rem 0.9rem;
    border-bottom: 0;
  }

  .grade-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--color-gold-text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}

/* Recursos: index cards and article body */
.resource-list {
  display: grid;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}

.resource-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg);
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-top: 4px solid var(--color-gold);
  border-radius: var(--radius);
}

.resource-card h2 {
  font-size: 1.15rem;
  line-height: 1.3;
}

.resource-card h2 a {
  color: var(--color-ink);
  text-decoration: none;
}

.resource-card h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.resource-card:hover {
  border-color: var(--color-line-strong);
  border-top-color: var(--color-gold);
  box-shadow: var(--shadow-soft);
}

.resource-card p {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.resource-card .resource-more {
  margin-top: auto;
  color: var(--color-gold-text);
  font-weight: 700;
}

@media (min-width: 52rem) {
  .resource-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.breadcrumb {
  font-size: 0.875rem;
  font-weight: 600;
}

.page-header .breadcrumb {
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.page-header .article-meta {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.prose {
  max-width: 46rem;
}

.prose > * + * {
  margin-top: var(--space-md);
}

.prose h2 {
  margin-top: var(--space-2xl);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
}

.prose h2 + * {
  margin-top: var(--space-sm);
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose .checklist {
  padding-left: 0;
  list-style: none;
}

.prose .checklist li {
  position: relative;
  padding-left: 1.9rem;
}

.prose .checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--color-gold-text);
  border-radius: 0.2rem;
}

.prose .table-wrap {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.article-sources {
  max-width: 46rem;
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 0.9rem;
}

.article-sources h2,
.article-related h2 {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink);
}

.article-sources ul,
.article-related ul {
  margin-top: var(--space-sm);
}

.article-sources li + li,
.article-related li + li {
  margin-top: 0.4rem;
}

.article-sources a {
  word-break: break-word;
}

.article-related {
  max-width: 46rem;
  margin-top: var(--space-xl);
}

.article-related a {
  font-weight: 700;
}

.cta-band p a {
  color: var(--color-gold);
  font-weight: 700;
}

.cta-band p a:hover {
  color: #f0c85a;
}

.nowrap {
  white-space: nowrap;
}

#contact-form {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

/* Mobile action bar (under 48rem / 768px): Cotizar · WhatsApp · Llamar.
   Replaces the floating WhatsApp button on phones only; desktop keeps the button. */
.mobile-actions {
  display: none;
}

@media (max-width: 47.99rem) {
  body {
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom));
  }

  .whatsapp-fab {
    display: none;
  }

  .mobile-actions {
    position: fixed;
    z-index: var(--fab-z);
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--color-ink);
    box-shadow: 0 -6px 18px rgba(17, 17, 17, 0.18);
  }

  .mobile-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 3.5rem;
    padding: 0 0.5rem;
    color: var(--color-white);
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-actions a + a {
    border-left: 1px solid rgba(255, 255, 255, 0.14);
  }

  .mobile-actions .mobile-actions__quote {
    background: var(--color-gold);
    color: var(--color-ink);
  }

  .mobile-actions .mobile-actions__wa {
    background: var(--color-whatsapp);
  }

  .mobile-actions__wa::before,
  .mobile-actions__call::before {
    content: "";
    width: 1.15rem;
    height: 1.15rem;
    background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
  }

  .mobile-actions__wa {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.52 3.48A11.86 11.86 0 0 0 12.06 0C5.5 0 .16 5.33.16 11.89c0 2.1.55 4.14 1.59 5.95L0 24l6.3-1.65a11.9 11.9 0 0 0 5.76 1.47h.01c6.56 0 11.9-5.34 11.9-11.9 0-3.18-1.24-6.16-3.45-8.44zM12.07 21.8h-.01a9.9 9.9 0 0 1-5.04-1.38l-.36-.21-3.74.98 1-3.64-.24-.37a9.86 9.86 0 0 1-1.51-5.26c0-5.45 4.44-9.89 9.9-9.89 2.64 0 5.12 1.03 6.99 2.9a9.82 9.82 0 0 1 2.89 6.98c0 5.45-4.44 9.89-9.88 9.89zm5.42-7.4c-.3-.15-1.76-.87-2.03-.97-.27-.1-.47-.15-.67.15-.2.3-.77.96-.94 1.16-.17.2-.35.22-.64.07-.3-.15-1.25-.46-2.38-1.47-.88-.78-1.47-1.75-1.64-2.05-.17-.3-.02-.46.13-.61.13-.13.3-.35.45-.52.15-.17.2-.3.3-.5.1-.2.05-.37-.02-.52-.08-.15-.67-1.61-.92-2.21-.24-.58-.49-.5-.67-.51h-.57c-.2 0-.52.07-.79.37-.27.3-1.04 1.02-1.04 2.48s1.06 2.88 1.21 3.08c.15.2 2.1 3.2 5.08 4.49.71.31 1.26.49 1.69.62.71.23 1.36.2 1.87.12.57-.09 1.76-.72 2.01-1.41.25-.7.25-1.29.17-1.41-.07-.13-.27-.2-.57-.35z'/%3E%3C/svg%3E");
  }

  .mobile-actions__call {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E");
  }

  .mobile-actions a:focus-visible {
    outline-color: var(--color-focus-on-dark);
    outline-offset: -4px;
  }

  .mobile-actions .mobile-actions__quote:focus-visible {
    outline-color: var(--color-ink);
  }
}

@media print {
  .mobile-actions {
    display: none !important;
  }
}
