/* ============================================================
   BIKO ALMOND — Design System (base.css)
   ============================================================ */

:root {
  --cream: #F7F0E4;
  --ivory: #FFFDF7;
  --paper: #EFE4D3;
  --almond: #D9C4A6;
  --taupe: #57453A;
  --coffee: #3B2A1E;
  --sage: #5F7358;
  --gold: #B98F47;
  --gold-light: #D9BE8F;
  --bronze: #8F6F2E;
  --bronze-deep: #775C24;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "EB Garamond", Georgia, serif;

  --shadow-sm: 0 1px 3px rgba(62, 43, 34, 0.08);
  --shadow-md: 0 4px 16px rgba(62, 43, 34, 0.10);
  --shadow-lg: 0 10px 40px rgba(62, 43, 34, 0.14);

  --radius: 14px;
  --radius-lg: 24px;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 48px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.5s;
}

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

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

body {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.05vw, 19px);
  line-height: 1.7;
  color: var(--coffee);
  background-color: var(--cream);
  background-image: radial-gradient(circle, rgba(185, 143, 71, 0.10) 0.5px, transparent 0.7px);
  background-size: 9mm 9mm;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

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

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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: -60px; left: 16px;
  z-index: 2000;
  background: var(--coffee);
  color: var(--cream);
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--coffee);
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }

.script {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--bronze);
}

.sc {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--taupe);
}
.eyebrow::before {
  content: "";
  width: 42px; height: 1px;
  background: var(--gold);
  flex: none;
}

.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section--ivory { background: var(--ivory); }

.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .eyebrow::after {
  content: "";
  width: 42px; height: 1px;
  background: var(--gold);
}
.section-head h2 { margin-top: 16px; }
.section-head p { margin-top: 18px; color: var(--taupe); }

.gold-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border: 0;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: none;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--coffee);
  background: transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn:hover {
  background: var(--gold);
  color: var(--ivory);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn:active { transform: translateY(0); }

.btn--solid {
  background: var(--gold);
  color: var(--ivory);
}
.btn--solid:hover {
  background: var(--bronze-deep);
  border-color: var(--bronze-deep);
}

.btn--ghost {
  border-color: rgba(255, 253, 247, 0.55);
  color: var(--ivory);
  backdrop-filter: blur(4px);
  background: rgba(59, 42, 30, 0.18);
}
.btn--ghost:hover {
  background: var(--ivory);
  color: var(--coffee);
  border-color: var(--ivory);
}

.btn--light {
  border-color: rgba(255, 253, 247, 0.6);
  color: var(--ivory);
}
.btn--light:hover {
  background: var(--ivory);
  color: var(--coffee);
}

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  color: var(--coffee);
}
.wordmark__row {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18em;
}
.wordmark__name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.wordmark__accent {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--gold);
  text-transform: lowercase;
}
.wordmark__sub {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-top: 0.35em;
}
.wordmark--lg .wordmark__name { font-size: 2.6rem; }
.wordmark--lg .wordmark__accent { font-size: 2.2rem; }
.wordmark--lg .wordmark__sub { font-size: 0.72rem; }
.wordmark--md .wordmark__name { font-size: 1.45rem; }
.wordmark--md .wordmark__accent { font-size: 1.3rem; }
.wordmark--md .wordmark__sub { display: none; }
.wordmark--light { color: var(--ivory); }
.wordmark--light .wordmark__accent { color: var(--gold-light); }
.wordmark--light .wordmark__sub { color: rgba(255, 253, 247, 0.75); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              backdrop-filter var(--dur) var(--ease);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  max-width: var(--container);
  margin-inline: auto;
  transition: padding var(--dur) var(--ease);
}

.site-header.is-scrolled {
  background: rgba(247, 240, 228, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.site-header.is-scrolled .site-header__inner { padding-block: 14px; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav__link {
  position: relative;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--coffee);
  padding: 6px 0;
  transition: color 0.3s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav__link:hover { color: var(--bronze-deep); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__link.is-active { color: var(--bronze-deep); }
.nav__link.is-active::after { transform: scaleX(1); }

.header-cta { display: inline-flex; }
.header-cta .btn { padding: 10px 24px; font-size: 0.95rem; }

/* Header sobre hero oscuro */
.site-header--over .site-header__inner .wordmark { color: var(--ivory); }
.site-header--over .site-header__inner .wordmark__accent { color: var(--gold-light); }
.site-header--over .nav__link { color: rgba(255, 253, 247, 0.92); }
.site-header--over .nav__link:hover,
.site-header--over .nav__link.is-active { color: var(--gold-light); }
.site-header--over .header-cta .btn { color: var(--ivory); border-color: rgba(255,253,247,0.6); }
.site-header--over .header-cta .btn:hover { background: var(--ivory); color: var(--coffee); }
.site-header--over.is-scrolled .site-header__inner .wordmark,
.site-header--over.is-scrolled .nav__link { color: var(--coffee); }
.site-header--over.is-scrolled .wordmark__accent { color: var(--gold); }
.site-header--over.is-scrolled .header-cta .btn { color: var(--coffee); border-color: var(--gold); }
.site-header--over.is-scrolled .header-cta .btn:hover { background: var(--gold); color: var(--ivory); }

/* Burger */
.burger {
  display: none;
  width: 44px; height: 44px;
  position: relative;
  z-index: 1100;
  border-radius: 50%;
}
.burger span {
  position: absolute;
  left: 11px;
  width: 22px; height: 1.6px;
  background: var(--coffee);
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease), background 0.3s;
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 28px; }
.site-header--over:not(.is-scrolled) .burger span { background: var(--ivory); }
.burger.is-open span { background: var(--coffee); }
.burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Menú móvil */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: var(--cream);
  background-image: radial-gradient(circle, rgba(185, 143, 71, 0.10) 0.5px, transparent 0.7px);
  background-size: 9mm 9mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  color: var(--coffee);
  padding: 10px 20px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.3s;
}
.mobile-nav.is-open a { opacity: 1; transform: translateY(0); }
.mobile-nav.is-open a:nth-child(1) { transition-delay: 0.10s; }
.mobile-nav.is-open a:nth-child(2) { transition-delay: 0.17s; }
.mobile-nav.is-open a:nth-child(3) { transition-delay: 0.24s; }
.mobile-nav.is-open a:nth-child(4) { transition-delay: 0.31s; }
.mobile-nav a:hover { color: var(--gold); }
.mobile-nav .btn { margin-top: 26px; }

@media (max-width: 900px) {
  .nav, .header-cta { display: none; }
  .burger { display: block; }
}

/* ---------- Selector de idioma ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--coffee);
  flex: none;
}
.lang-switch__btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: inherit;
  opacity: 0.55;
  padding: 4px 2px;
  transition: opacity 0.3s;
}
.lang-switch__btn:hover { opacity: 1; }
.lang-switch__btn.is-active { opacity: 1; }
.lang-switch__sep { opacity: 0.5; }

.site-header--over .lang-switch { color: rgba(255, 253, 247, 0.9); }
.site-header--over.is-scrolled .lang-switch { color: var(--coffee); }
@media (max-width: 900px) {
  .lang-switch { order: 3; margin-right: 2px; }
}
@media (min-width: 901px) {
  .lang-switch { margin-right: 6px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--coffee);
  color: rgba(255, 253, 247, 0.82);
  padding: clamp(56px, 7vw, 88px) 0 32px;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(80%, 420px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(28px, 4vw, 56px);
}
.footer-brand p {
  margin-top: 18px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 253, 247, 0.68);
  max-width: 34ch;
}
.footer-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 18px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 0.98rem;
  color: rgba(255, 253, 247, 0.78);
  transition: color 0.3s, padding-left 0.3s var(--ease);
}
.footer-links a:hover { color: var(--gold-light); padding-left: 6px; }
.footer-contact li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: rgba(255, 253, 247, 0.78);
  line-height: 1.55;
}
.footer-contact svg { flex: none; margin-top: 4px; color: var(--gold-light); }
.footer-contact a:hover { color: var(--gold-light); }

.footer-bottom {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 253, 247, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  color: rgba(255, 253, 247, 0.55);
  font-family: var(--font-body);
  letter-spacing: 0.06em;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Animaciones de entrada ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
