/* ==========================================================================
   Raíces del Mediterráneo — Design tokens
   Brand palette: mocha #967762 and cream #f2eadd
   ========================================================================== */

:root {
  /* Brand mocha: one warm hue built around the brand colour #967762.
     #967762 itself is used for icons, borders, rules and focus rings (3:1+ on cream);
     darker steps carry text and buttons so everything meets WCAG AA contrast. */
  --mocha-950: #2a1f18;
  --mocha-900: #3a2b21;
  --mocha-800: #4e3b2f;
  --mocha-700: #6b5242;
  --mocha-600: #7f634f;
  --mocha-500: #967762; /* brand colour */
  --mocha-300: #c4ae9d;
  --mocha-200: #dccbbd;
  --mocha-100: #dbcdbe; /* 25% brand mocha over brand cream: alternate section background */

  /* Neutrals: brand cream #f2eadd as the page background */
  --cream-50: #f2eadd; /* brand colour */
  --cream-100: #e8dccb;
  --cream-200: #dcccb6;
  --ink-900: #1e2420;
  --ink-700: #3c453e;

  /* Text colours (kept from the original design; backgrounds use the mocha/cream palette above) */
  --brown-700: #5f4224;
  --brown-300: #d9c3a2;
  --olive-700: #565f1e;
  --white: #ffffff;

  /* Semantic tokens */
  --color-bg: var(--cream-50);
  --color-bg-alt: var(--mocha-100);
  --color-bg-dark: var(--mocha-900);
  --color-text: var(--ink-900);
  --color-text-muted: var(--ink-700);
  --color-text-on-dark: var(--cream-50);
  --color-primary: var(--mocha-600);        /* buttons on cream: white text 5.5:1 */
  --color-primary-hover: var(--mocha-700);
  --color-accent: var(--mocha-500);
  --color-accent-hover: var(--mocha-700);
  --color-brand: var(--mocha-500);
  --color-border: var(--cream-200);
  --color-error: #b3261e;    /* 6.5:1 on white */
  --color-error-bg: #fdf1f0;
  --color-border-dark: rgba(242, 234, 221, 0.18);

  /* Typography */
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Layout */
  --container-w: 1200px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(42, 31, 24, 0.08);
  --shadow-md: 0 8px 24px rgba(42, 31, 24, 0.10);
  --shadow-lg: 0 20px 48px rgba(42, 31, 24, 0.16);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-med: 320ms;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  /* Only words longer than a whole line break; normal words never split */
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
/* The email address is one long "word": let it break anywhere so it never overflows narrow screens */
a[href^="mailto:"] { overflow-wrap: anywhere; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--space-4);
  color: var(--mocha-800);
}

p { margin: 0 0 var(--space-4); }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 1000;
  background: var(--mocha-800);
  color: var(--white);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus {
  top: var(--space-4);
}

:focus-visible {
  outline: 3px solid var(--mocha-500);
  outline-offset: 3px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-primary);
  color: var(--white);
  border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }

.btn-accent {
  background: var(--color-accent);
  color: var(--white);
  border-color: var(--color-accent);
}
.btn-accent:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--mocha-800);
  border-color: var(--mocha-800);
}
.btn-outline:hover { background: var(--mocha-800); color: var(--white); }

.btn-ghost-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.14); border-color: var(--white); }

.btn-sm { padding: 9px 16px; font-size: 0.875rem; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  /* Solid background on purpose: backdrop-filter here would establish a new
     containing block, trapping the position:fixed mobile nav inside the
     header's own (short) box instead of the viewport. */
  background: var(--cream-50);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark { height: 44px; width: auto; }
.brand-logo { height: 50px; width: auto; }
.header-actions .btn { white-space: nowrap; }
.footer-brand .brand-logo { height: 60px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--mocha-800);
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}
.brand-name-sub {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive-700);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.main-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-700);
  padding-block: var(--space-2);
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--mocha-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-out);
}
.main-nav a:hover { color: var(--mocha-800); }
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.lang-switch a,
.lang-switch .lang-current {
  display: inline-block;
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  line-height: 1;
}
.lang-switch a {
  color: var(--ink-700);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.lang-switch a:hover { background: var(--cream-100); color: var(--mocha-800); }
.lang-switch .lang-current { color: var(--mocha-800); background: var(--cream-100); }

.footer-bottom-inner .lang-switch a { color: rgba(250,247,241,0.85); }
.footer-bottom-inner .lang-switch a:hover { background: rgba(242, 234, 221,0.12); color: var(--white); }
.footer-bottom-inner .lang-switch .lang-current { color: var(--white); background: rgba(242, 234, 221,0.12); }

/* Header language menu: compact dropdown (native <details>), five languages don't fit inline on phones */
.lang-menu { position: relative; }
.lang-menu summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--mocha-800);
  background: var(--cream-100);
  border-radius: var(--radius-sm);
  cursor: pointer;
  list-style: none;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}
.lang-menu[open] summary::after { transform: translateY(1px) rotate(225deg); }
.lang-menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 650;
  min-width: 160px;
  padding: var(--space-2);
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.lang-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--ink-900);
  text-decoration: none;
}
.lang-menu a:hover { background: var(--cream-100); color: var(--mocha-800); }
.lang-menu a[aria-current="page"] { font-weight: 700; color: var(--mocha-800); background: var(--cream-100); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--mocha-800);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.nav-toggle-bars::before { transform: translateY(-6px); }
.nav-toggle-bars::after { transform: translateY(4px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(0) rotate(-45deg); }

/* ==========================================================================
   Generic section
   ========================================================================== */

.section { padding-block: var(--space-9); }
.section-alt { background: var(--color-bg-alt); }
.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown-700);
  margin: 0 0 var(--space-3);
}
.eyebrow-light { color: var(--brown-300); }

.section-title { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); max-width: 42ch; }
.section-title-light { color: var(--white); }
.section-lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 62ch;
  margin-bottom: var(--space-7);
}
.section-lead-light { color: rgba(250,247,241,0.82); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  color: var(--white);
  padding-top: clamp(80px, 14vw, 140px);
  padding-bottom: 0;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    /* Dark mocha tint over the hero photo */
    linear-gradient(180deg, rgba(42, 31, 24, 0.78) 0%, rgba(42, 31, 24, 0.62) 45%, rgba(42, 31, 24, 0.9) 100%);
}

.hero-inner {
  padding-bottom: var(--space-9);
  max-width: 760px;
}
.hero-title {
  color: var(--white);
  font-size: clamp(2.2rem, 1.6rem + 3vw, 3.6rem);
  margin-bottom: var(--space-5);
}
.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(250,247,241,0.88);
  max-width: 56ch;
  margin-bottom: var(--space-6);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}


/* ==========================================================================
   Product cards
   ========================================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}
.product-grid-3 { grid-template-columns: repeat(3, 1fr); }

.subsection-title {
  font-size: 1.3rem;
  margin-top: var(--space-8);
  margin-bottom: var(--space-5);
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.product-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.product-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}
.product-card:hover .product-card-media img { transform: scale(1.05); }
/* Per-photo crop focus (classes instead of inline styles, which the Content Security Policy blocks) */
.obj-pos-35 { object-position: center 35%; }
.obj-pos-40 { object-position: center 40%; }
.obj-pos-55 { object-position: center 55%; }

.product-card-media-split {
  aspect-ratio: 16 / 9.5;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--cream-100);
}
.product-card-media-split img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}
.product-card:hover .product-card-media-split img { transform: scale(1.05); }

.product-card-body { padding: var(--space-6); flex: 1; display: flex; flex-direction: column; }
.product-card-body h3 { font-size: 1.3rem; margin-bottom: var(--space-3); }
.product-card-body p { color: var(--color-text-muted); }

.product-specs {
  margin: var(--space-2) 0 var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 0.9rem;
}
.product-specs li { display: flex; justify-content: space-between; gap: var(--space-3); color: var(--ink-700); }
.product-specs span { color: var(--brown-700); font-weight: 600; text-align: right; }

.card-link {
  margin-top: auto;
  align-self: flex-start;
  text-decoration: none;
  font-weight: 700;
  color: var(--mocha-800);
  border-bottom: 2px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.card-link:hover { border-color: var(--color-brand); }

/* ==========================================================================
   About
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.about-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  height: auto;
}
.about-content .section-lead { margin-bottom: var(--space-4); font-size: 1rem; }

.check-list { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-6); }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-weight: 500;
  color: var(--ink-900);
}
.check-list svg {
  flex-shrink: 0;
  width: 22px; height: 22px;
  color: var(--olive-700);
  margin-top: 2px;
}

.check-list-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4) var(--space-5);
}

/* Product features: compact checklist grid under the spec table */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4) var(--space-6);
}
.feature-grid li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-weight: 500;
  color: var(--ink-900);
}
.feature-grid svg {
  flex-shrink: 0;
  width: 22px; height: 22px;
  color: var(--olive-700);
  margin-top: 2px;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.gallery-item {
  margin: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.gallery-item img {
  width: 100%;
  height: auto;
  /* Square frame: most gallery photos are square or portrait, so this keeps most of each shot */
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.gallery-item figcaption {
  padding: var(--space-3) var(--space-4);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-700);
}

/* ==========================================================================
   Certifications
   ========================================================================== */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.cert-grid-3 { grid-template-columns: repeat(3, 1fr); }
.cert-card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-5);
  text-align: left;
}
.cert-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--cream-100);
  color: var(--mocha-800);
  margin-bottom: var(--space-4);
}
.cert-icon svg { width: 26px; height: 26px; }
.cert-card h3 { font-size: 1rem; margin-bottom: var(--space-2); }
.cert-card p { font-size: 0.9rem; color: var(--color-text-muted); margin: 0; }


/* ==========================================================================
   Spec table
   ========================================================================== */

.spec-table-wrap { margin-bottom: var(--space-6); }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.spec-table th,
.spec-table td {
  text-align: left;
  padding: 14px 20px;
  font-size: 0.95rem;
}
.spec-table thead th {
  background: var(--mocha-800);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.spec-table tbody tr:nth-child(even) { background: var(--cream-100); }
.spec-table tbody td:first-child { font-weight: 700; color: var(--mocha-800); }
.spec-table-note {
  margin-top: var(--space-3);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Process
   ========================================================================== */

.process-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.process-steps {
  list-style: none;
  margin: var(--space-7) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.process-steps li {
  display: flex;
  gap: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border-dark);
}
.process-steps li:last-child { border-bottom: none; padding-bottom: 0; }
.process-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--brown-300);
  flex-shrink: 0;
  width: 2.5ch;
}
.process-steps h3 { color: var(--white); font-size: 1.1rem; margin-bottom: var(--space-2); }
.process-steps p { color: rgba(250,247,241,0.75); margin: 0; font-size: 0.95rem; }

.process-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list { max-width: 800px; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item h3 { margin: 0; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--mocha-800);
  padding: var(--space-5) var(--space-2);
  cursor: pointer;
}
.faq-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--brown-700);
  transition: transform var(--dur-fast) var(--ease-out);
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }

.faq-answer {
  padding: 0 var(--space-2) var(--space-5);
  color: var(--color-text-muted);
  max-width: 68ch;
}
.faq-answer p { margin: 0; }
.faq-answer a { color: var(--mocha-800); text-decoration: underline; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Column gap only: vertical spacing comes from .form-field's margin, so stacked rows stay even */
  column-gap: var(--space-5);
}

/* Grid items default to min-width:auto, which lets input fields push the form past narrow screens */
.contact-grid > *, .form-row > * { min-width: 0; }
.form-field { margin-bottom: var(--space-5); }
/* Spam trap: invisible to people, bots that tick every box get caught */
.form-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Validation: shown after a submit attempt with missing or invalid required fields */
.form-field.is-invalid input:not([type="checkbox"]),
.form-field.is-invalid textarea {
  border-color: var(--color-error);
  background: var(--color-error-bg);
}
.form-field.is-invalid input:focus,
.form-field.is-invalid textarea:focus { border-color: var(--color-error); }
.form-field-checkbox.is-invalid input[type="checkbox"] {
  outline: 2px solid var(--color-error);
  outline-offset: 2px;
}
.field-error {
  flex-basis: 100%;
  margin: var(--space-2) 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-error);
}
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-2);
  color: var(--ink-900);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--cream-50);
  color: var(--ink-900);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--mocha-700);
  outline: none;
}
.form-field textarea { resize: vertical; min-height: 110px; }

.form-field input[type="file"] {
  padding: 10px 14px;
  font-size: 0.9rem;
  cursor: pointer;
}

.form-field-checkbox {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3);
}
.form-field-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--mocha-700);
  cursor: pointer;
}
.form-field-checkbox label {
  font-weight: 500;
  font-size: 0.9rem;
  margin: 0;
  color: var(--ink-900);
}
.form-field-checkbox a { color: var(--mocha-800); text-decoration: underline; }

.form-note {
  font-size: 0.8rem;
  color: var(--ink-700);
  margin-bottom: var(--space-5);
}
.form-note em { color: var(--brown-700); font-style: normal; }

.form-status {
  margin: var(--space-3) 0 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--mocha-700);
  min-height: 1.2em;
}

.contact-info { display: flex; flex-direction: column; gap: var(--space-5); }
.contact-info-card {
  background: var(--color-bg-dark);
  color: var(--cream-50);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}
.contact-info-card h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: var(--space-5);
}
.contact-info-card ul { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-6); }
.contact-info-card li { display: flex; align-items: flex-start; gap: var(--space-3); font-size: 0.95rem; }
.contact-info-card svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--brown-300); }
.contact-info-card a { color: var(--cream-50); text-decoration: underline; text-underline-offset: 3px; }
.contact-info-card .btn-outline { border-color: var(--cream-50); color: var(--cream-50); }
.contact-info-card .btn-outline:hover { background: var(--cream-50); color: var(--mocha-900); }

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4 / 3;
}
.contact-map iframe { width: 100%; height: 100%; border: 0; }
.contact-map iframe[hidden] { display: none; }

/* Shown instead of the map until external content is accepted */
.consent-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-6);
  text-align: center;
  background: var(--cream-200);
  color: var(--ink-700);
  font-size: 0.95rem;
}
.consent-placeholder[hidden] { display: none; }
.consent-placeholder p { margin: 0; max-width: 32ch; }

/* ==========================================================================
   Cookie banner
   ========================================================================== */

.cookie-banner {
  position: fixed;
  left: var(--space-5);
  bottom: var(--space-5);
  z-index: 600;
  width: min(440px, calc(100% - 2 * var(--space-5)));
  background: var(--white);
  color: var(--ink-900);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner { padding: var(--space-5); }
.cookie-title { font-size: 1.15rem; margin-bottom: var(--space-2); }
.cookie-text { font-size: 0.9rem; color: var(--ink-700); margin-bottom: var(--space-4); }
.cookie-text a { color: var(--mocha-800); text-decoration: underline; text-underline-offset: 3px; }

.cookie-settings {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.cookie-settings[hidden] { display: none; }
.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--cream-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--ink-700);
  cursor: pointer;
}
.cookie-option:first-child { cursor: default; }
.cookie-option strong { display: block; font-size: 0.92rem; color: var(--ink-900); }
.cookie-always { flex-shrink: 0; font-weight: 600; color: var(--olive-700); }

.cookie-switch {
  flex-shrink: 0;
  appearance: none;
  width: 44px; height: 24px;
  margin: 0;
  border-radius: 999px;
  background: var(--color-border);
  position: relative;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.cookie-switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-out);
}
.cookie-switch:checked { background: var(--mocha-700); }
.cookie-switch:checked::after { transform: translateX(20px); }

/* Reject and Accept get equal weight and size, as the AEPD guidance requires */
.cookie-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
.cookie-actions .btn { padding-inline: var(--space-3); }
.cookie-actions .btn[hidden] { display: none; }

.footer-link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.footer-link-button:hover { text-decoration: underline; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-bg-dark);
  color: rgba(250,247,241,0.85);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--space-7);
  padding-block: var(--space-8);
}
.footer-brand .brand-name,
.footer-brand .brand { color: var(--white); }
.footer-brand .brand-name-sub { color: var(--brown-300); }
.footer-brand p { margin-top: var(--space-4); font-size: 0.9rem; max-width: 40ch; }
.footer-social { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.footer-social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(242, 234, 221,0.3);
  border-radius: 50%;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.footer-social svg { width: 18px; height: 18px; }
.footer-social a:hover { background: rgba(242, 234, 221,0.12); border-color: rgba(242, 234, 221,0.6); }

.footer-links h3 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}
.footer-links ul { display: flex; flex-direction: column; gap: var(--space-3); font-size: 0.9rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

.footer-bottom { border-top: 1px solid rgba(242, 234, 221,0.14); }
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-5);
  font-size: 0.82rem;
}
.footer-bottom-inner p { margin: 0; }
.footer-bottom-inner ul { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.footer-bottom-inner a { text-decoration: none; }
.footer-bottom-inner a:hover { text-decoration: underline; }

/* ==========================================================================
   WhatsApp FAB
   ========================================================================== */

.whatsapp-fab {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 400;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: #25d366;
  color: var(--white);
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur-fast) var(--ease-out);
}
.whatsapp-fab svg { width: 28px; height: 28px; }
.whatsapp-fab:hover { transform: scale(1.08); }

/* ==========================================================================
   Legal / prose pages
   ========================================================================== */

.legal-page-header {
  padding-block: var(--space-9) var(--space-7);
  background: var(--color-bg-alt);
}
.legal-page-header .eyebrow { margin-bottom: var(--space-3); }
.legal-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mocha-800);
  text-decoration: none;
  margin-bottom: var(--space-5);
}
.legal-back-link:hover { text-decoration: underline; }

.prose { max-width: 72ch; }
.prose h2 {
  font-size: 1.4rem;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin-top: var(--space-6); margin-bottom: var(--space-2); }
.prose p { color: var(--color-text-muted); margin-bottom: var(--space-4); }
.prose ul {
  list-style: disc;
  padding-left: 1.3em;
  margin: 0 0 var(--space-4);
  display: block;
  color: var(--color-text-muted);
}
.prose li { margin-bottom: var(--space-2); }
.prose strong { color: var(--ink-900); }
.prose em { color: var(--brown-700); font-style: normal; }
.prose a { color: var(--mocha-800); }
/* Translated legal pages: the Spanish text is the binding one */
.prose .translation-note {
  font-size: 0.9rem;
  color: var(--ink-700);
  background: var(--cream-100);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin: calc(-1 * var(--space-5)) 0 var(--space-7);
}
.prose .updated-note {
  font-size: 0.85rem;
  color: var(--ink-700);
  margin-bottom: var(--space-7);
}

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 850ms var(--ease-out), transform 850ms var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .cert-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { order: -1; }
  .process-grid { grid-template-columns: 1fr; }
  .process-media { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Mid widths: tighten the menu so longer labels (e.g. German) still fit on one line */
@media (max-width: 1280px) {
  .main-nav ul { gap: var(--space-4); }
  .header-inner { gap: var(--space-3); }
}

/* Menu drawer: the full navigation only fits next to the logo and quote button from 1100px up */
@media (max-width: 1100px) {
  .main-nav {
    position: fixed;
    inset: 0 0 0 30%;
    background: var(--cream-50);
    padding: 96px var(--space-6) var(--space-6);
    transform: translateX(100%);
    /* visibility keeps the closed drawer's links out of the keyboard tab order */
    visibility: hidden;
    transition: transform var(--dur-med) var(--ease-out), visibility 0s linear var(--dur-med);
    box-shadow: var(--shadow-lg);
  }
  .main-nav.is-open { transform: translateX(0); visibility: visible; transition-delay: 0s; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .main-nav a { font-size: 1.1rem; display: block; padding: var(--space-3) 0; }
  .nav-toggle { display: flex; }
}

@media (max-width: 860px) {
  .header-actions .btn-sm { display: none; }

  .product-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .main-nav { inset: 0; }
  .cert-grid { grid-template-columns: 1fr; }
  .feature-grid, .check-list-2col { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .contact-form { padding: var(--space-5); }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }

  /* Stack the spec table into cards on narrow phones instead of horizontal scroll */
  .spec-table thead { display: none; }
  .spec-table, .spec-table tbody, .spec-table tr, .spec-table td { display: block; width: 100%; }
  .spec-table tr {
    margin-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-2);
  }
  .spec-table tr:last-child { margin-bottom: 0; border-bottom: none; }
  .spec-table td {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 8px 20px;
    text-align: right;
  }
  .spec-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--ink-700);
    text-align: left;
  }
  .spec-table tbody tr:nth-child(even) { background: transparent; }
}

/* Very small phones (WCAG 1.4.10 reflow at 320px): fit the header without horizontal scrolling */
@media (max-width: 400px) {
  .container { padding-inline: var(--space-4); }
  .site-header .brand-name-sub { display: none; }
  .site-header .brand-logo { height: 40px; }
  .site-header .brand { gap: var(--space-2); }
  .header-inner, .header-actions { gap: var(--space-2); }
  .header-inner { flex-wrap: wrap; }
  .cookie-actions { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Hero button in the brand mocha #967762
   It sits on the dark hero, where a lighter button stands out. White on #967762
   is 4.1:1, which passes WCAG AA only as "large text" (19px bold).
   Other buttons use the deeper #7f634f (see --color-primary) at normal size.
   ========================================================================== */

.btn.btn-accent {
  font-size: 1.1875rem;
  font-weight: 700;
}



/* ==========================================================================
   PREVIEW ONLY: original green palette (from the first version of the site)
   ========================================================================== */
:root {
  /* the mocha scale now carries the original greens, browns and olives */
  --mocha-950: #0f231a;
  --mocha-900: #0f231a;   /* dark sections, footer, contact card (was green-900) */
  --mocha-800: #12342a;   /* headings, links, table header (was green-800) */
  --mocha-700: #1a483a;   /* hovers (was green-700) */
  --mocha-600: #5f4224;   /* small labels (was brown-700) */
  --mocha-500: #6e7a28;   /* icons, focus ring (was olive-600) */
  --mocha-300: #d9c3a2;   /* sand accents on dark (was brown-300) */
  --mocha-200: #ebe1cf;
  --mocha-100: #f3ede1;   /* alternate sections (was cream-100) */

  --cream-50: #faf7f1;
  --cream-100: #f3ede1;
  --cream-200: #ebe1cf;
  --ink-900: #1e2420;
  --ink-700: #3c453e;

  --color-bg: var(--cream-50);
  --color-bg-alt: var(--cream-100);
  --color-bg-dark: #0f231a;
  --color-primary: #12342a;
  --color-primary-hover: #1a483a;
  --color-accent: #5f4224;
  --color-accent-hover: #4a3319;
  --color-border: #e3dac8;
  --color-border-dark: rgba(250, 247, 241, 0.18);

  --shadow-sm: 0 1px 2px rgba(15, 35, 26, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 35, 26, 0.10);
  --shadow-lg: 0 20px 48px rgba(15, 35, 26, 0.16);
}
.hero-overlay {
  background: linear-gradient(180deg, rgba(15, 35, 26, 0.78) 0%, rgba(15, 35, 26, 0.62) 45%, rgba(15, 35, 26, 0.9) 100%);
}
/* original check icons were olive, original hero button label was regular size */
.check-list svg, .feature-grid svg { color: #565f1e; }
.btn.btn-accent { font-size: 1rem; font-weight: 600; }
