/* ==========================================================================
   Rice.ad — hoja de estilos estática
   Réplica fiel de la paleta/tipografía/patrones definidos en el proyecto
   Next.js origen (web/src/app/globals.css + clases Tailwind de los
   componentes). Sin frameworks: CSS puro con variables + clases utilitarias
   mínimas + clases de componente.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300..700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --color-cream: #fbf7ee;
  --color-cream-dark: #f2e9d8;
  --color-forest: #1f4a3d;
  --color-forest-light: #2f6650;
  --color-sage: #7c9a82;
  --color-terracotta: #c1683c;
  --color-terracotta-text: #a8532c;
  --color-ink: #21201b;

  --font-heading: "Fraunces", serif;
  --font-sans: "Manrope", sans-serif;

  --ease-out-quint: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-cream);
  color: var(--color-ink);
  font-family: var(--font-sans);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 1 auto;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  margin: 0;
  line-height: 1.15;
}

p {
  margin: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

.text-balance {
  text-wrap: balance;
}

/* ============ Layout ============ */
.container {
  width: 100%;
  max-width: 72rem; /* max-w-6xl */
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 2rem;
  }
}

.container--narrow {
  max-width: 48rem; /* max-w-3xl */
}

.grid-2 {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.order-first-lg {
  order: 0;
}
.order-last-lg {
  order: 0;
}

@media (min-width: 1024px) {
  .order-first-lg {
    order: 1;
  }
  .order-last-lg {
    order: 2;
  }
}

/* ============ Section heading ============ */
.section-heading {
  text-align: left;
}
.section-heading.is-center {
  text-align: center;
}

.section-heading .kicker {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-terracotta-text);
}

.section-heading.is-light .kicker {
  color: rgba(251, 247, 238, 0.8);
}

.section-heading h2 {
  margin-top: 0.75rem;
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--color-forest);
}

.section-heading.is-light h2 {
  color: var(--color-cream);
}

@media (min-width: 640px) {
  .section-heading h2 {
    font-size: 2.25rem;
  }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 300ms ease-out;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -8px rgba(33, 32, 27, 0.3);
}

.btn-primary {
  background: var(--color-terracotta-text);
  color: var(--color-cream);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.btn-primary:hover {
  background: var(--color-terracotta);
}

.btn-secondary {
  border: 2px solid var(--color-cream);
  background: rgba(251, 247, 238, 0.1);
  color: var(--color-cream);
  backdrop-filter: blur(4px);
}
.btn-secondary:hover {
  background: rgba(251, 247, 238, 0.25);
}

.btn-outline {
  border: 1px solid var(--color-forest);
  color: var(--color-forest);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-forest);
  color: var(--color-cream);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.6;
}

/* ============ Header / Nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-cream-dark);
  background: rgba(251, 247, 238, 0.9);
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo-link img {
  height: 1.5rem;
  width: auto;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .main-nav {
    display: flex;
  }
}

.main-nav a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(33, 32, 27, 0.8);
  padding-bottom: 4px;
  transition: color 200ms ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1.5px;
  width: 100%;
  background: var(--color-forest);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms ease-out;
}

.main-nav a:hover {
  color: var(--color-forest);
}
.main-nav a:hover::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(33, 32, 27, 0.6);
}

.lang-switch a.active {
  color: var(--color-forest);
}
.lang-switch a:hover {
  color: var(--color-forest);
}

.header-cta {
  display: none;
}

@media (min-width: 1024px) {
  .header-cta {
    display: inline-flex;
  }
}

/* ============ Mobile menu ============ */
.mobile-menu-btn {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  color: var(--color-forest);
  background: none;
  border: none;
}

@media (min-width: 1024px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu-btn .icon-close {
  display: none;
}
.mobile-menu-btn.is-open .icon-open {
  display: none;
}
.mobile-menu-btn.is-open .icon-close {
  display: block;
}

.mobile-menu {
  display: none;
  position: absolute;
  inset-inline: 0;
  top: 4rem;
  border-bottom: 1px solid var(--color-cream-dark);
  background: var(--color-cream);
  box-shadow: 0 10px 25px -8px rgba(33, 32, 27, 0.2);
}

.mobile-menu.is-open {
  display: block;
}

@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.5rem;
}

.mobile-menu nav a {
  border-radius: 0.5rem;
  padding: 0.75rem 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(33, 32, 27, 0.8);
}
.mobile-menu nav a:hover {
  background: var(--color-cream-dark);
  color: var(--color-forest);
}

.mobile-menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-cream-dark);
  padding: 1rem 1.5rem;
}

/* ============ Scroll progress ============ */
#scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  height: 2px;
  width: 100%;
  background: var(--color-terracotta-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 150ms ease-out;
}

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 900ms var(--ease-out-quint),
    transform 900ms var(--ease-out-quint);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ken-burns {
    animation: none !important;
  }
}

/* ============ Image carousel ============ */
.carousel {
  position: absolute;
  inset: 0;
}

.carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1000ms ease-in-out;
}

.carousel img.is-active {
  opacity: 1;
}

@keyframes ken-burns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

.ken-burns.is-active {
  animation: ken-burns 6000ms ease-out forwards;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(31, 74, 61, 0.9),
    rgba(31, 74, 61, 0.7) 55%,
    rgba(31, 74, 61, 0.3)
  );
}

.hero .container {
  position: relative;
  display: flex;
  min-height: 85vh;
  align-items: center;
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.hero-content {
  max-width: 42rem;
}

.hero-content .kicker {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(251, 247, 238, 0.8);
}

.hero-content h1 {
  margin-top: 1rem;
  font-size: 2.25rem;
  font-weight: 500;
  color: var(--color-cream);
}

@media (min-width: 640px) {
  .hero-content h1 {
    font-size: 3rem;
  }
}
@media (min-width: 1024px) {
  .hero-content h1 {
    font-size: 3.75rem;
  }
}

.hero-content .subtitle {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: 1.125rem;
  color: rgba(251, 247, 238, 0.85);
}

.hero-ctas {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============ Generic section spacing ============ */
.section {
  padding: 3.5rem 0;
}
@media (min-width: 640px) {
  .section {
    padding: 5rem 0;
  }
}

.section-lg {
  padding: 5rem 0;
}
@media (min-width: 640px) {
  .section-lg {
    padding: 7rem 0;
  }
}

.bg-cream-dark {
  background: var(--color-cream-dark);
}

.scroll-anchor {
  scroll-margin-top: 6rem;
}

/* ============ What is Rice.ad ============ */
.what-is-flow {
  margin-top: 2.5rem;
  display: flex;
  max-width: 24rem;
  align-items: center;
  gap: 0.75rem;
}

.what-is-flow .flow-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.what-is-flow .flow-line {
  height: 1px;
  flex: 1 1 auto;
  background: var(--color-cream-dark);
}

.flow-icon {
  display: flex;
  height: 3rem;
  width: 3rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--color-cream-dark);
  color: var(--color-forest);
}

.flow-icon svg {
  height: 1.25rem;
  width: 1.25rem;
}

.flow-icon.is-accent {
  background: var(--color-forest);
  color: var(--color-cream);
}

.flow-item .flow-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(33, 32, 27, 0.6);
}

.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  aspect-ratio: 4 / 3;
}

.media-frame.is-tall {
  aspect-ratio: 4 / 5;
}

.media-frame.is-square {
  aspect-ratio: 1 / 1;
}

@media (min-width: 1024px) {
  .media-frame.fill-lg {
    aspect-ratio: auto;
    height: 100%;
  }
}

/* ============ How it works ============ */
.how-grid {
  margin-top: 3.5rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .how-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.how-video {
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
}
.how-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .steps-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.step-card {
  display: flex;
  flex-direction: column;
  border-radius: 1.5rem;
  background: var(--color-cream);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 500ms var(--ease-out-quint);
}

.step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px -15px rgba(33, 32, 27, 0.25);
}

.step-badge {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: var(--color-cream);
  transition: transform 500ms var(--ease-out-quint);
}

.step-card:hover .step-badge {
  transform: scale(1.1);
}

.step-badge.badge-0 {
  background: var(--color-forest);
}
.step-badge.badge-1 {
  background: var(--color-terracotta);
}
.step-badge.badge-2 {
  background: var(--color-sage);
}
.step-badge.badge-3 {
  background: var(--color-forest-light);
}

.step-card h3 {
  margin-top: 1rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-forest);
}

.step-card p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(33, 32, 27, 0.7);
}

.disclaimer {
  margin-top: 2.5rem;
  font-size: 0.875rem;
  color: rgba(33, 32, 27, 0.5);
}

/* ============ Mission ============ */
.mission-card {
  border-radius: 0.75rem;
  border: 1px solid var(--color-cream-dark);
  background: rgba(242, 233, 216, 0.6);
  padding: 1.5rem;
}

.mission-card h3 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-forest);
}

.mission-card p {
  margin-top: 0.5rem;
  color: rgba(33, 32, 27, 0.75);
}

.mission-cards {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ============ Impact ============ */
.impact-section {
  position: relative;
  overflow: hidden;
}

.impact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(31, 74, 61, 0.85);
}

.impact-section .container {
  position: relative;
}

.impact-body {
  margin: 1.5rem auto 0;
  max-width: 48rem;
  text-align: center;
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(251, 247, 238, 0.9);
}

.impact-grid {
  margin-top: 3.5rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .impact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.impact-card {
  border-radius: 1rem;
  border: 1px solid rgba(251, 247, 238, 0.2);
  background: rgba(251, 247, 238, 0.1);
  padding: 1.5rem;
  backdrop-filter: blur(4px);
  transition: all 500ms var(--ease-out-quint);
}

.impact-card:hover {
  transform: translateY(-6px);
  background: rgba(251, 247, 238, 0.2);
  box-shadow: 0 20px 35px -15px rgba(0, 0, 0, 0.3);
}

.impact-card h3 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-cream);
}

.impact-card p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: rgba(251, 247, 238, 0.75);
}

/* ============ Bullet cards (Advertisers / Publishers) ============ */
.bullets-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .bullets-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.bullet-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 1rem;
  background: rgba(242, 233, 216, 0.6);
  padding: 1rem;
  transition: all 500ms var(--ease-out-quint);
}

.bullet-card:hover {
  transform: translateY(-4px);
  background: var(--color-cream-dark);
  box-shadow: 0 10px 20px -10px rgba(33, 32, 27, 0.3);
}

.bullet-icon {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--color-forest);
  color: var(--color-cream);
  transition: transform 500ms var(--ease-out-quint);
}

.bullet-card:hover .bullet-icon {
  transform: scale(1.1);
}

.bullet-icon svg {
  height: 1rem;
  width: 1rem;
}

.bullet-card span.label {
  padding-top: 0.3rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(33, 32, 27, 0.8);
}

/* Publishers variant: bordered list with accent color */
.bullet-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 0.75rem;
  border-left: 4px solid var(--color-forest);
  background: var(--color-cream);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 500ms var(--ease-out-quint);
}

.bullet-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 25px -12px rgba(33, 32, 27, 0.3);
}

.bullet-row.accent-0 {
  border-color: var(--color-forest);
}
.bullet-row.accent-1 {
  border-color: var(--color-terracotta);
}
.bullet-row.accent-2 {
  border-color: var(--color-sage);
}
.bullet-row.accent-3 {
  border-color: var(--color-forest-light);
}

.bullet-row .row-icon {
  height: 1.5rem;
  width: 1.5rem;
  flex-shrink: 0;
  transition: transform 500ms var(--ease-out-quint);
}

.bullet-row:hover .row-icon {
  transform: scale(1.1);
}

.bullet-row.accent-0 .row-icon {
  color: var(--color-forest);
}
.bullet-row.accent-1 .row-icon {
  color: var(--color-terracotta-text);
}
.bullet-row.accent-2 .row-icon {
  color: var(--color-sage);
}
.bullet-row.accent-3 .row-icon {
  color: var(--color-forest-light);
}

.bullet-row span {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(33, 32, 27, 0.8);
}

.publishers-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .publishers-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============ Contact ============ */
.contact-section {
  position: relative;
  overflow: hidden;
}

.contact-section .bg-image {
  position: absolute;
  inset: 0;
}

.contact-section .bg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(31, 74, 61, 0.9);
}

.contact-section .container {
  position: relative;
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .contact-section .container {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-intro {
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .contact-intro {
    justify-content: center;
  }
}

.contact-intro .impact-note {
  margin-top: 1rem;
  max-width: 28rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-cream);
}

.contact-intro .subtitle {
  margin-top: 1.5rem;
  max-width: 28rem;
  font-size: 1.125rem;
  color: rgba(251, 247, 238, 0.8);
}

.contact-form-card {
  border-radius: 1rem;
  border: 1px solid var(--color-cream-dark);
  background: var(--color-cream);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (min-width: 640px) {
  .contact-form-card {
    padding: 2rem;
  }
}

.form-row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .form-row.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(33, 32, 27, 0.8);
}

.field input,
.field select,
.field textarea {
  margin-top: 0.25rem;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--color-cream-dark);
  background: var(--color-cream);
  padding: 0.625rem 1rem;
  color: var(--color-ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-forest);
  box-shadow: 0 0 0 3px rgba(31, 74, 61, 0.2);
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  padding-right: 2.5rem;
}

.select-wrap svg {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  height: 1rem;
  width: 1rem;
  color: rgba(33, 32, 27, 0.5);
  pointer-events: none;
}

/* honeypot field, hidden from real users */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  font-size: 0.875rem;
  color: var(--color-terracotta-text);
  margin-bottom: 1rem;
}

.form-success {
  border-radius: 1rem;
  border: 1px solid rgba(31, 74, 61, 0.2);
  background: rgba(31, 74, 61, 0.05);
  padding: 2rem;
  text-align: center;
}

.form-success p {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-forest);
}

/* ============ Footer ============ */
.site-footer {
  position: relative;
  background: var(--color-cream-dark);
  color: var(--color-ink);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 640px) {
  .site-footer .container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.footer-brand p.tagline {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-forest);
}

.footer-brand p.rights {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: rgba(33, 32, 27, 0.6);
}

.footer-links-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .footer-links-wrap {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
  }
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: rgba(33, 32, 27, 0.7);
}

.footer-nav a:hover {
  color: var(--color-forest);
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: rgba(33, 32, 27, 0.5);
}

.footer-legal a:hover {
  color: var(--color-forest);
}

/* ============ Cookie consent ============ */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  max-width: 40rem;
  margin: 0 auto;
  border-radius: 1.25rem;
  background: var(--color-cream);
  border: 1px solid var(--color-cream-dark);
  box-shadow: 0 20px 40px -15px rgba(33, 32, 27, 0.35);
  padding: 1.5rem;
  transform: translateY(calc(100% + 1.5rem));
  opacity: 0;
  transition: transform 400ms var(--ease-out-quint), opacity 400ms var(--ease-out-quint);
  pointer-events: none;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(33, 32, 27, 0.85);
}

.cookie-banner a {
  color: var(--color-forest);
  font-weight: 600;
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.cookie-banner-actions .btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.8125rem;
}

.cookie-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(33, 32, 27, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease-out;
}

.cookie-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.cookie-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 220;
  width: min(34rem, calc(100vw - 2rem));
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  visibility: hidden;
  transition: transform 250ms var(--ease-out-quint), opacity 250ms var(--ease-out-quint), visibility 250ms;
  background: var(--color-cream);
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(33, 32, 27, 0.45);
  padding: 2rem;
}

.cookie-modal.is-visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

.cookie-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--color-forest);
}

.cookie-modal-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: var(--color-cream-dark);
  color: var(--color-ink);
  cursor: pointer;
  border: none;
}
.cookie-modal-close:hover {
  background: var(--color-sage);
  color: var(--color-cream);
}

.cookie-modal-intro {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(33, 32, 27, 0.75);
}
.cookie-modal-intro a {
  color: var(--color-forest);
  font-weight: 600;
  text-decoration: underline;
}

.cookie-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-cream-dark);
}

.cookie-category-text h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-ink);
}

.cookie-category-text p {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(33, 32, 27, 0.7);
}

.cookie-toggle {
  position: relative;
  flex-shrink: 0;
  display: inline-block;
  width: 2.75rem;
  height: 1.625rem;
}

.cookie-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.cookie-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--color-sage);
  transition: background 200ms ease-out;
}

.cookie-toggle-track::before {
  content: "";
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--color-cream);
  transition: transform 200ms ease-out;
}

.cookie-toggle input:checked + .cookie-toggle-track {
  background: var(--color-forest);
}
.cookie-toggle input:checked + .cookie-toggle-track::before {
  transform: translateX(1.125rem);
}

.cookie-toggle input:disabled + .cookie-toggle-track {
  background: var(--color-forest-light);
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-toggle input:focus-visible + .cookie-toggle-track {
  box-shadow: 0 0 0 3px rgba(31, 74, 61, 0.3);
}

.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.cookie-modal-actions .btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.8125rem;
}

.footer-legal-btn {
  font: inherit;
  font-size: 0.875rem;
  color: rgba(33, 32, 27, 0.5);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.footer-legal-btn:hover {
  color: var(--color-forest);
}

/* Tabla de la política de cookies */
.legal-sections table {
  margin-top: 0.75rem;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.legal-sections th,
.legal-sections td {
  text-align: left;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--color-cream-dark);
  color: rgba(33, 32, 27, 0.8);
  vertical-align: top;
}

.legal-sections th {
  color: var(--color-forest);
  font-weight: 600;
}

.legal-table-wrap {
  overflow-x: auto;
}

/* ============ Legal / Privacy pages ============ */
.legal-main {
  padding: 4rem 0;
}

@media (min-width: 640px) {
  .legal-main {
    padding: 6rem 0;
  }
}

.legal-back {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-forest);
}
.legal-back:hover {
  color: var(--color-forest-light);
}

.legal-main h1 {
  margin-top: 1.5rem;
  font-size: 1.875rem;
  font-weight: 500;
  color: var(--color-forest);
}

@media (min-width: 640px) {
  .legal-main h1 {
    font-size: 2.25rem;
  }
}

.legal-updated {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: rgba(33, 32, 27, 0.5);
}

.legal-pending {
  margin-top: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(168, 83, 44, 0.2);
  background: rgba(242, 233, 216, 0.6);
  padding: 1.25rem;
  font-size: 0.875rem;
  color: rgba(33, 32, 27, 0.7);
}

.legal-sections {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.legal-sections h2 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-forest);
}

.legal-sections p {
  margin-top: 0.5rem;
  line-height: 1.7;
  color: rgba(33, 32, 27, 0.8);
}
