/* ==========================================
   Meridiano Re — Shared Stylesheet
   Used by all pages across /es and /en
   ========================================== */

:root {
  --ink: #0A0E14;
  --ink-soft: #2E3540;
  --ink-mute: #5C6573;
  --ink-faint: #8A9099;
  --paper: #FAF7F2;
  --paper-warm: #F2EDE4;
  --paper-card: #FFFFFF;
  --rule: rgba(10, 14, 20, 0.12);
  --rule-soft: rgba(10, 14, 20, 0.06);
  --accent: #0C447C;
  --accent-deep: #042C53;
  --accent-tint: #E6EEF7;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Söhne", "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; transition: opacity 0.2s ease; }
a:hover { opacity: 0.65; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.serif { font-family: var(--serif); font-weight: 400; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 40px; }

/* ========== TOP RIBBON ========== */
.ribbon { background: var(--ink); color: var(--paper-warm); font-size: 12px; letter-spacing: 0.04em; padding: 8px 0; }
.ribbon .container { display: flex; justify-content: space-between; align-items: center; }
.ribbon-left { display: flex; gap: 24px; }
.ribbon-left span { color: rgba(250, 247, 242, 0.7); }
.ribbon-right { display: flex; gap: 16px; }
.ribbon-right a { color: var(--paper-warm); }
.ribbon-right .lang-active { color: rgba(250, 247, 242, 0.5); }

/* ========== HEADER ========== */
header.site-header {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(250, 247, 242, 0.92);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 32px; height: 32px; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: 0.02em; color: var(--ink); line-height: 1; }
.brand-locale { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); }

nav.primary ul { list-style: none; display: flex; gap: 36px; }
nav.primary a { font-size: 13px; font-weight: 500; letter-spacing: 0.04em; color: var(--ink-soft); position: relative; padding-bottom: 4px; }
nav.primary a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
nav.primary a:hover { opacity: 1; }
nav.primary a:hover::after, nav.primary a.active::after { transform: scaleX(1); }

/* ========== PAGE HEADER (inner pages) ========== */
.page-head {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.breadcrumb {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 32px;
  letter-spacing: 0.04em;
}
.breadcrumb a:hover { color: var(--accent); opacity: 1; }
.breadcrumb-sep { color: var(--ink-faint); }
.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 820px;
  margin-bottom: 24px;
}
.page-head h1 em { font-style: italic; color: var(--accent); }
.page-head-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 620px;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 24px;
  border-radius: 2px;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); opacity: 1; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); opacity: 1; }
.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ========== FORMS ========== */
.form-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--rule);
}
.form-section.warm { background: var(--paper-warm); }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
}
.form-section-head .eyebrow { display: block; margin-bottom: 16px; }
.form-section-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 16px;
}
.form-section-help {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-mute);
  max-width: 320px;
}
.form-fields { display: grid; gap: 24px; }
.form-fields.cols-2 { grid-template-columns: 1fr 1fr; }
.form-fields.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.field label .req { color: var(--accent); margin-left: 4px; }
.field input,
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 12px 14px;
  transition: border-color 0.2s ease;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.55; font-family: var(--sans); }
.field-hint {
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.5;
}
.checkbox-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.checkbox-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  font-weight: 400;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"],
.checkbox-row input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.form-divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 48px 0 0;
  grid-column: 1 / -1;
}
.form-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  grid-column: 1 / -1;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.form-actions-note {
  font-size: 12px;
  color: var(--ink-faint);
  margin-left: auto;
  line-height: 1.5;
  max-width: 320px;
}

/* Conditional sections (per product line) */
.product-section {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 32px;
  margin-top: 24px;
  grid-column: 1 / -1;
  display: none;
}
.product-section.active { display: block; animation: slideDown 0.4s ease-out; }
.product-section h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 6px;
}
.product-section .eyebrow { margin-bottom: 24px; display: block; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== FOOTER ========== */
footer { background: var(--ink); color: rgba(250, 247, 242, 0.72); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 56px; margin-bottom: 56px; }
.footer-brand .brand-name { color: var(--paper); }
.footer-brand .brand-locale { color: rgba(250, 247, 242, 0.5); }
.footer-tagline { font-family: var(--serif); font-size: 16px; line-height: 1.5; color: rgba(250, 247, 242, 0.85); max-width: 320px; margin-top: 24px; font-style: italic; }
.footer-col h4 { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(250, 247, 242, 0.5); margin-bottom: 20px; font-weight: 500; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 13px; color: rgba(250, 247, 242, 0.78); }
.footer-base { border-top: 1px solid rgba(250, 247, 242, 0.12); padding-top: 28px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: 0.04em; color: rgba(250, 247, 242, 0.45); }

/* ========== RESPONSIVE ========== */
@media (max-width: 980px) {
  .container { padding: 0 24px; }
  .page-head { padding: 56px 0 48px; }
  .form-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-fields.cols-2, .form-fields.cols-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  nav.primary ul { display: none; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-base { flex-direction: column; gap: 12px; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions-note { margin-left: 0; }
  .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
