/* =============================================================
   La Casa de la Almendra — Tejeda, Gran Canaria
   Archetype: Editorial Dark Warm — atardecer + madera.
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
@property --mesh-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --mesh-x { syntax: "<percentage>"; inherits: false; initial-value: 30%; }
@property --mesh-y { syntax: "<percentage>"; inherits: false; initial-value: 40%; }

:root {
  --bg:        #16110c;   /* warm-tinted near-black, wood-shadow */
  --bg-2:      #1d160f;
  --bg-3:      #241b13;   /* card */
  --cream:     #f3ead9;   /* text on dark */
  --cream-2:   #ddccb0;
  --cream-3:   #8f7d61;   /* metadata / muted */

  --accent:    #e2792f;   /* atardecer — burnt amber/orange */
  --accent-2:  #b8491f;   /* deeper terracotta */
  --accent-ink:#2a1204;
  --gold:      #c9974f;   /* madera / brass */
  --wood:      #6b4226;   /* wood brown */
  --wood-dark: #3a2314;

  --line:      rgba(243, 234, 217, 0.14);
  --line-soft: rgba(243, 234, 217, 0.08);

  --serif: "Fraunces", "Georgia", serif;
  --sans:  "Inter", -apple-system, sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --nav-h: 84px;
  --container: 1200px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--bg);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--cream-2);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><g fill='rgb(201,151,79)' fill-opacity='0.12'><path transform='rotate(-20 40 50)' d='M24 50 Q40 42 56 50 Q40 58 24 50 Z'/><path transform='rotate(10 120 120)' d='M102 120 Q120 111 138 120 Q120 129 102 120 Z'/><path transform='rotate(60 60 210)' d='M45 210 Q60 202.5 75 210 Q60 217.5 45 210 Z'/></g><g fill='none' stroke='rgb(243,234,217)' stroke-width='1.4' stroke-opacity='0.22'><path transform='rotate(35 190 30)' d='M176 30 Q190 23 204 30 Q190 37 176 30 Z'/><path transform='rotate(-10 180 230)' d='M163 230 Q180 221.5 197 230 Q180 238.5 163 230 Z'/></g><g fill='none' stroke='rgb(184,73,31)' stroke-width='1.4' stroke-opacity='0.2'><path transform='rotate(-45 230 150)' d='M217 150 Q230 143.5 243 150 Q230 156.5 217 150 Z'/></g></svg>");
  background-repeat: repeat;
  background-size: 260px 260px;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; color: var(--cream); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .7rem 1.1rem; background: var(--accent); color: var(--accent-ink);
  border-radius: 8px; font-weight: 600; transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.4rem; }
@media (min-width: 540px)  { .container { padding-inline: 2rem; } }
@media (min-width: 720px)  { .container { padding-inline: 2.4rem; } }
@media (min-width: 1600px) { .container { max-width: 1320px; } }

.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--sans); font-weight: 600;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
}
.kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(226, 121, 47, 0.18);
}

.section-head { max-width: 46rem; margin-bottom: 3rem; }
.section-head h2 { margin-top: .9rem; font-size: clamp(2rem, 4.2vw, 3rem); }
.section-head p:not(.kicker) { margin-top: 1.1rem; font-size: 1.05rem; color: var(--cream-3); max-width: 38rem; }

em { font-style: italic; color: var(--accent); font-family: var(--serif); }

/* =============================================================
   4. Typography
   ============================================================= */
h1 { font-family: var(--serif); font-weight: 500; }
h2 { font-family: var(--serif); font-weight: 500; }
h3 { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; color: var(--cream); }

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: 1rem 1.7rem; border-radius: 999px;
  font-weight: 700; font-size: .95rem;
  isolation: isolate;
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff5e9;
  box-shadow: 0 14px 34px -10px rgba(226, 121, 47, 0.55);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 46px -10px rgba(226, 121, 47, 0.65); }
.btn-primary:active { transform: translateY(-1px); transition-duration: .12s; }
.btn-ghost { border: 1px solid var(--line); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold); transform: translateY(-3px); }
.btn svg { width: 18px; height: 18px; }

.has-magnetic { display: inline-flex; position: relative; isolation: isolate; }
.magnetic-inner { display: inline-flex; align-items: center; justify-content: center; gap: inherit; will-change: transform; transition: transform .8s var(--ease-soft); }

/* --- Nav --- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 200; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background-color .4s var(--ease-out), backdrop-filter .4s var(--ease-out), border-color .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(22, 17, 12, 0.86); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: inline-flex; align-items: baseline; gap: .3rem; font-family: var(--serif); font-weight: 500; font-size: 1.2rem; color: var(--cream); }
.brand em { font-style: italic; color: var(--gold); }
.nav-links { display: none; align-items: center; gap: 2.1rem; }
@media (min-width: 1020px) { .nav-links { display: flex; } }
.nav-link { position: relative; padding: .3rem 0; font-size: .9rem; font-weight: 600; color: var(--cream-2); }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.nav-link:hover { color: var(--cream); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; }
@media (min-width: 1020px) { .nav-cta { display: inline-flex; padding: .7rem 1.3rem; font-size: .84rem; } }

.nav-burger { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; }
@media (min-width: 1020px) { .nav-burger { display: none; } }
.nav-burger span, .nav-burger::before, .nav-burger::after {
  content: ""; display: block; width: 20px; height: 1.5px; background: var(--cream); position: relative;
  transition: transform .35s var(--ease-soft), opacity .3s;
}
.nav-burger::before { position: absolute; transform: translateY(-6px); }
.nav-burger::after { position: absolute; transform: translateY(6px); }
.nav-burger.is-open span { opacity: 0; }
.nav-burger.is-open::before { transform: rotate(45deg); }
.nav-burger.is-open::after { transform: rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 190; background: rgba(22, 17, 12, 0.98);
  display: grid; place-items: center; clip-path: inset(0 0 100% 0); transition: clip-path .65s var(--ease-soft);
}
.nav-mobile[data-open="true"] { clip-path: inset(0); }
.nav-mobile-links { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.nav-mobile-links a { font-family: var(--serif); font-size: 1.7rem; font-style: italic; color: var(--cream); }

/* --- Cards (tilt + halo) --- */
.has-tilt { --rx: 0deg; --ry: 0deg; transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .55s var(--ease-soft); }
.has-tilt:hover { transition-duration: .15s; }
.has-halo { position: relative; isolation: isolate; }
.has-halo::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(226, 121, 47, .22), transparent 65%);
  opacity: 0; transition: opacity .4s;
}
.has-halo:hover::before { opacity: 1; }

.card { position: relative; background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line); border-radius: 20px; padding: 2rem; transition: border-color .4s, box-shadow .4s; }
.card:hover { border-color: rgba(201, 151, 79, 0.4); box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6); }

/* =============================================================
   6. Sections
   ============================================================= */
.section { position: relative; padding-block: clamp(4.5rem, 9vw, 8rem); }
.section-alt { background: var(--bg-2); }

/* --- Hero --- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding-top: calc(var(--nav-h) + 2rem); padding-bottom: 4rem; overflow: clip; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg-tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,17,12,.55), rgba(22,17,12,.72) 55%, rgba(22,17,12,.94)); }
.hero-mesh {
  position: absolute; inset: -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(45% 40% at var(--mesh-x) var(--mesh-y), rgba(226,121,47,.4), transparent 65%),
    conic-gradient(from var(--mesh-angle), rgba(201,151,79,.22), rgba(184,73,31,.14), rgba(226,121,47,.22), rgba(201,151,79,.22));
  filter: blur(80px) saturate(120%); opacity: .8; mix-blend-mode: screen;
  animation: meshShift 26s linear infinite;
}
@keyframes meshShift {
  0%   { --mesh-angle: 0deg;   --mesh-x: 25%; --mesh-y: 30%; }
  50%  { --mesh-angle: 180deg; --mesh-x: 72%; --mesh-y: 55%; }
  100% { --mesh-angle: 360deg; --mesh-x: 25%; --mesh-y: 30%; }
}
.hero-grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}
.hero-inner { text-align: center; margin-inline: auto; max-width: 52rem; }
.hero-kicker { justify-content: center; margin-bottom: 1.4rem; }
.hero-title { font-size: clamp(2.6rem, 6.4vw, 5rem); text-wrap: balance; max-width: 18ch; margin-inline: auto; }
.hero-sub { margin-top: 1.6rem; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--cream-2); max-width: 44ch; margin-inline: auto; }
.hero-actions { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero-badges { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .9rem;
  border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; color: var(--cream-3);
  background: rgba(243,234,217,0.03);
}
.chip svg { width: 14px; height: 14px; color: var(--gold); }

/* --- Intro --- */
.intro { text-align: center; }
.intro-inner { max-width: 44rem; margin-inline: auto; }
.intro-lede { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-style: italic; line-height: 1.5; color: var(--cream); }
.intro p:not(.intro-lede) { margin-top: 1.4rem; color: var(--cream-3); font-size: 1.02rem; }

/* --- Highlights --- */
.highlights-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 720px)  { .highlights-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .highlights-grid { grid-template-columns: repeat(4, 1fr); } }
.highlight-card { text-align: center; }
.highlight-icon {
  width: 60px; height: 60px; margin-inline: auto; margin-bottom: 1.2rem;
  border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(155deg, rgba(226,121,47,.2), rgba(201,151,79,.16));
  border: 1px solid var(--line);
}
.highlight-icon svg { width: 26px; height: 26px; color: var(--gold); }
.highlight-card p { color: var(--cream-3); font-size: .95rem; margin-top: .5rem; }

/* --- Carta (menu accordion) --- */
.carta-legend {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.2rem;
  padding: .6rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  font-size: .85rem; color: var(--cream-3);
}
.carta-legend svg { width: 15px; height: 15px; color: #4caf50; flex-shrink: 0; }

.carta-jump { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; margin-bottom: 3rem; }
.carta-jump a {
  padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line);
  font-size: .85rem; font-weight: 600; color: var(--cream-2); transition: border-color .3s, color .3s, background .3s;
}
.carta-jump a:hover { border-color: var(--accent); color: var(--cream); background: rgba(226,121,47,.08); }

.menu-group { border: 1px solid var(--line); border-radius: 20px; overflow: clip; margin-bottom: 1.1rem; background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); scroll-margin-top: calc(var(--nav-h) + 1rem); }
.menu-group summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.5rem 1.8rem; font-family: var(--serif); font-size: 1.4rem; font-style: italic; color: var(--cream);
}
.menu-group summary::-webkit-details-marker { display: none; }
.menu-group summary .menu-count { font-family: var(--sans); font-style: normal; font-size: .8rem; font-weight: 600; color: var(--cream-3); margin-right: auto; margin-left: 1rem; white-space: nowrap; }
.menu-chevron { flex-shrink: 0; width: 22px; height: 22px; color: var(--gold); transition: transform .4s var(--ease-soft); }
.menu-group[open] .menu-chevron { transform: rotate(180deg); }
.menu-group-body { padding: 0 1.8rem 1.8rem; }
.menu-list { display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .menu-list { grid-template-columns: repeat(2, 1fr); } }
.menu-item {
  display: flex; align-items: baseline; gap: .6rem; padding: .85rem 0;
  border-top: 1px solid var(--line-soft); font-size: 1rem; color: var(--cream-2);
}
.menu-list > .menu-item:nth-child(1), .menu-list > .menu-item:nth-child(2) { border-top: none; }
@media (min-width: 760px) { .menu-list > .menu-item:nth-child(2) { border-top: 1px solid var(--line-soft); } }
.menu-item .leaf { flex-shrink: 0; width: 15px; height: 15px; color: #4caf50; margin-top: .18rem; }
.menu-item-note { display: block; font-size: .8rem; color: var(--cream-3); font-style: italic; }
.menu-item-name { flex: 1; }
.menu-item-price { flex-shrink: 0; margin-left: .6rem; font-weight: 700; color: var(--cream); font-variant-numeric: tabular-nums; }

.menu-subhead {
  font-family: var(--sans); font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); margin: 1.6rem 0 .6rem;
}
.menu-group-body > .menu-subhead:first-child { margin-top: 0; }

/* --- Horario --- */
.horario-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .horario-grid { grid-template-columns: 1fr 1fr; } }
.horario-card h3 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.5rem; margin-bottom: 1.2rem; }
.horario-row { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line-soft); font-size: .95rem; }
.horario-row:first-of-type { border-top: none; }
.horario-row span:first-child { color: var(--cream-3); }
.horario-row span:last-child { font-weight: 600; color: var(--cream); }
.horario-note {
  margin-top: 1.6rem; padding: 1.2rem 1.4rem; border-radius: 16px;
  background: linear-gradient(135deg, rgba(226,121,47,.14), rgba(201,151,79,.08));
  border: 1px solid var(--line); font-size: .92rem; color: var(--cream-2);
}
.horario-note strong { color: var(--gold); }

/* --- CTA final --- */
.cta-final { position: relative; z-index: 0; border-radius: 28px; margin-inline: 1.2rem; padding: clamp(3rem, 8vw, 6rem) clamp(1.6rem, 6vw, 4rem); overflow: clip; text-align: center; border: 1px solid var(--line); }
@media (min-width: 720px) { .cta-final { margin-inline: 2.4rem; } }
.cta-final-gradient {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(rgba(22,17,12,.4), rgba(22,17,12,.62)),
    linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 45%, var(--wood) 80%, var(--wood-dark) 100%);
  background-size: 100% 100%, 135% 135%;
  animation: ctaDrift 20s ease-in-out infinite;
}
@keyframes ctaDrift { 0%, 100% { background-position: 0 0, 0% 0%; } 50% { background-position: 0 0, 100% 45%; } }
.cta-final .kicker { justify-content: center; }
.cta-final h2 { max-width: 24ch; margin-inline: auto; }
.cta-final p:not(.kicker) { margin-top: 1.2rem; color: var(--cream-2); max-width: 36ch; margin-inline: auto; }
.cta-final .hero-actions { margin-top: 2.2rem; }

/* --- Contacto --- */
.contact-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.contact-list { margin-top: 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.contact-row {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem;
  border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .3s, transform .3s var(--ease-soft);
}
.contact-row:hover { border-color: rgba(201,151,79,.4); transform: translateX(4px); }
.contact-row-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: rgba(226,121,47,.14); }
.contact-row-icon svg { width: 19px; height: 19px; color: var(--gold); }
.contact-row-label { font-size: .78rem; color: var(--cream-3); text-transform: uppercase; letter-spacing: .08em; }
.contact-row-value { font-weight: 700; color: var(--cream); font-size: 1rem; }

.footer { border-top: 1px solid var(--line); padding-block: 2.4rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer p { font-size: .82rem; color: var(--cream-3); }
.footer-brand { font-family: var(--serif); font-style: italic; color: var(--cream-2); }

/* =============================================================
   7. Effects (reveal)
   ============================================================= */
[data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft); }
[data-reveal].is-revealed { opacity: 1; transform: none; }
[data-reveal-stagger="1"] { transition-delay: .06s; }
[data-reveal-stagger="2"] { transition-delay: .12s; }
[data-reveal-stagger="3"] { transition-delay: .18s; }
[data-reveal-stagger="4"] { transition-delay: .24s; }
[data-reveal-stagger="5"] { transition-delay: .3s; }

/* =============================================================
   8. Reduced-motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh, .cta-final-gradient { animation: none; }
}
