/* ==========================================================================
   GLUT - Plantilla PREMIUM 03 (MySaaSLux · profesionales)
   Restaurante al fuego. Sistema: carbón + brasa terracota + crema tostada.
   Fraunces (display) + DM Sans (texto). Mobile-first. Sin estilos inline.
   ========================================================================== */

/* ---------- Fuentes autohospedadas ---------- */
@font-face { font-family:"Fraunces"; font-style:normal; font-weight:400; font-display:swap; src:url("../fonts/fraunces-400.woff2") format("woff2"); }
@font-face { font-family:"Fraunces"; font-style:italic; font-weight:300; font-display:swap; src:url("../fonts/fraunces-300italic.woff2") format("woff2"); }
@font-face { font-family:"Fraunces"; font-style:normal; font-weight:700; font-display:swap; src:url("../fonts/fraunces-700.woff2") format("woff2"); }
@font-face { font-family:"Fraunces"; font-style:italic; font-weight:700; font-display:swap; src:url("../fonts/fraunces-700italic.woff2") format("woff2"); }
@font-face { font-family:"Fraunces"; font-style:normal; font-weight:900; font-display:swap; src:url("../fonts/fraunces-900.woff2") format("woff2"); }
@font-face { font-family:"DM Sans"; font-style:normal; font-weight:400; font-display:swap; src:url("../fonts/dm-sans-400.woff2") format("woff2"); }
@font-face { font-family:"DM Sans"; font-style:normal; font-weight:500; font-display:swap; src:url("../fonts/dm-sans-500.woff2") format("woff2"); }
@font-face { font-family:"DM Sans"; font-style:normal; font-weight:600; font-display:swap; src:url("../fonts/dm-sans-600.woff2") format("woff2"); }
@font-face { font-family:"DM Sans"; font-style:normal; font-weight:700; font-display:swap; src:url("../fonts/dm-sans-700.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --night: #17110d;
  --night-2: #211812;
  --ink: #241a12;
  --cream: #f4ece1;
  --cream-2: #ebe0d0;
  --paper: #faf4ea;
  --body: #4c4034;
  --muted: #8b7d6d;
  --border: #e4d8c5;
  --ember: #d9541f;
  --ember-soft: #e8804a;
  --ember-deep: #b23f13;
  --gold: #d9a441;

  --on-dark: #f3e9dc;
  --on-dark-muted: rgba(243, 233, 220, 0.64);
  --on-dark-border: rgba(243, 233, 220, 0.16);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1320px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --sec-y: clamp(5rem, 12vw, 10rem);
  --radius: 3px;
  --radius-lg: 6px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --z-ambient: 0; --z-header: 100; --z-progress: 120; --z-preview: 60;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans); font-size: clamp(1rem, 0.96rem + 0.25vw, 1.075rem);
  line-height: 1.65; color: var(--body); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
dl, dd { margin: 0; }
button { font: inherit; }
::selection { background: var(--ember); color: var(--paper); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { 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; left: 1rem; top: -3rem; z-index: 200; background: var(--night); color: var(--on-dark); padding: 0.6rem 1rem; border-radius: var(--radius); font-weight: 600; font-size: 0.9rem; transition: top 0.2s var(--ease-out); }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }

/* ---------- Lenis ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Progreso ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: var(--z-progress); pointer-events: none; }
.scroll-progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--ember), var(--ember-soft)); transform: scaleX(0); transform-origin: left; will-change: transform; }

/* ---------- Ambiente ---------- */
.ambient { position: fixed; inset: 0; z-index: var(--z-ambient); pointer-events: none; overflow: hidden; }
.ambient-glow { position: absolute; top: -15%; left: 50%; width: 120vmax; height: 120vmax; transform: translate(-50%, 0); background: radial-gradient(closest-side, rgba(217,84,31,0.10), rgba(217,84,31,0) 70%); opacity: 0.7; filter: blur(10px); will-change: transform; }
.ambient-grain { position: absolute; inset: -50%; opacity: 0.04; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-family: var(--font-sans); font-weight: 600; font-size: 0.9rem; line-height: 1; letter-spacing: 0.02em; padding: 1.05rem 1.9rem; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: transform 0.16s var(--ease-out), background-color 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ember); color: #fff; position: relative; overflow: hidden; box-shadow: 0 0 0 rgba(217,84,31,0); }
.btn-primary::before {
  content: ""; position: absolute; top: 0; left: -50%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.32), transparent);
  transform: translateX(0) skewX(-16deg); pointer-events: none;
}
.btn-ghost-light { background: transparent; color: var(--on-dark); border-color: rgba(243,233,220,0.4); }
.btn-nav { padding: 0.72rem 1.35rem; font-size: 0.85rem; background: var(--ember); color: #fff; letter-spacing: 0.06em; text-transform: uppercase; position: relative; overflow: hidden; }
.btn-block { width: 100%; padding-block: 1.15rem; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary { transition: transform 0.2s var(--ease-out), background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out); }
  .btn-primary::before { transition: transform 0.7s var(--ease-out); }
  .btn-primary:hover { background: var(--ember-deep); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(178,63,19,0.4); }
  .btn-primary:hover::before { transform: translateX(360%) skewX(-16deg); }
  .btn-primary:active { transform: translateY(0) scale(0.98); }
  .btn-ghost-light:hover { border-color: var(--on-dark); background: rgba(243,233,220,0.08); }
}

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: var(--z-header); transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out); border-bottom: 1px solid transparent; }
.site-header[data-scrolled="true"] { background: color-mix(in srgb, var(--night) 90%, transparent); -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); border-bottom-color: var(--on-dark-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 78px; }
.brand { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; letter-spacing: 0.02em; color: var(--on-dark); display: inline-flex; align-items: center; gap: 0.5rem; text-transform: uppercase; }
.brand-mark { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ember); box-shadow: 0 0 12px 1px rgba(217,84,31,0.8); }
.brand-lg { font-size: 1.9rem; }
.site-nav ul { display: flex; gap: clamp(1.5rem, 2.6vw, 2.6rem); }
.site-nav a { font-size: 0.86rem; font-weight: 500; color: var(--on-dark-muted); position: relative; padding-block: 0.3rem; letter-spacing: 0.04em; transition: color 0.25s var(--ease-out); }
.site-nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--ember); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .site-nav a:hover { color: var(--on-dark); } .site-nav a:hover::after { transform: scaleX(1); } }
@media (max-width: 900px) { .site-nav { display: none; } }

/* ---------- HERO ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(3.5rem, 8vh, 7rem); padding-top: 78px; color: var(--on-dark); isolation: isolate; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--night); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); will-change: transform; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(23,17,13,0.9) 4%, rgba(23,17,13,0.3) 44%, rgba(23,17,13,0.55) 100%), radial-gradient(120% 90% at 15% 100%, rgba(217,84,31,0.28), transparent 55%); }
.hero-inner { position: relative; max-width: 46rem; }
.hero-kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ember-soft); margin-bottom: 1.6rem; }
.hero-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(3.4rem, 1.5rem + 11vw, 8.5rem); line-height: 0.94; letter-spacing: -0.03em; color: var(--on-dark); text-wrap: balance; margin-bottom: 1.9rem; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero-title .line-inner { display: block; }
.hero-title .ember { display: inline-block; width: 0.32em; height: 0.32em; margin-left: 0.14em; border-radius: 50%; background: var(--ember); box-shadow: 0 0 26px 4px rgba(217,84,31,0.7); vertical-align: 0.05em; will-change: transform; animation: emberbreath 3.4s var(--ease-out) infinite; }
@keyframes emberbreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.16); } }
.hero-lead { font-size: clamp(1.08rem, 1rem + 0.5vw, 1.35rem); color: var(--on-dark-muted); max-width: 34rem; margin-bottom: 2.4rem; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.hero-scroll { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); display: inline-flex; flex-direction: column; align-items: center; gap: 0.7rem; color: var(--on-dark-muted); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; }
.hero-scroll-line { width: 1px; height: 3rem; background: linear-gradient(var(--ember-soft), transparent); position: relative; overflow: hidden; }
.hero-scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--ember); animation: scrollcue 2.4s var(--ease-out) infinite; }
@keyframes scrollcue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
@media (max-width: 640px) { .hero-scroll-word { display: none; } }

/* ---------- Section labels / titles ---------- */
.sec-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ember-deep); margin-bottom: 1.1rem; display: flex; align-items: center; gap: 0.7rem; }
.sec-label::before { content: ""; width: 1.7rem; height: 2px; background: var(--ember); flex: none; }
.sec-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem, 1.3rem + 3.4vw, 3.7rem); line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; max-width: 20ch; }
.sec-title-light { color: var(--on-dark); }
.sec-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* ---------- AUFTAKT ---------- */
.auftakt { padding-block: clamp(6rem, 14vw, 12rem); background: var(--paper); position: relative; }
.statement { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 1rem + 3.6vw, 3.6rem); line-height: 1.22; letter-spacing: -0.01em; color: var(--ink); max-width: 24ch; text-wrap: balance; }
.statement .word, .statement .word-inner { display: inline-block; }

/* ---------- MENÜ ---------- */
.menue { padding-block: var(--sec-y); background: var(--cream); position: relative; }
.dish-list { border-top: 1px solid var(--border); }
.dish-row { border-bottom: 1px solid var(--border); position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "course price" "name price"; gap: 0.15rem 1rem; align-items: baseline; padding-block: clamp(1.4rem, 3vw, 2.3rem); transition: padding-left 0.4s var(--ease-out); }
.dish-course { grid-area: course; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ember-deep); font-weight: 600; }
.dish-name { grid-area: name; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.25rem, 0.9rem + 1.8vw, 2.1rem); line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); max-width: 24ch; transition: color 0.3s var(--ease-out); }
.dish-price { grid-area: price; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.3rem, 1rem + 1.4vw, 2rem); color: var(--ember-deep); align-self: center; font-variant-numeric: tabular-nums; }
.dish-row::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 58%;
  background: var(--ember); border-radius: 2px;
  transform: translateY(-50%) scaleY(0); transform-origin: center;
  transition: transform 0.4s var(--ease-out);
}
.dish-price::before { content: "€ "; font-family: var(--font-sans); font-size: 0.7em; color: var(--muted); }
.dish-thumb { display: none; }
.menue-note { margin-top: clamp(2rem, 4vw, 3rem); font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(1.1rem, 1rem + 0.6vw, 1.45rem); color: var(--body); max-width: 40ch; }

.dish-preview { position: fixed; top: 0; left: 0; z-index: var(--z-preview); width: 22rem; height: 16rem; border-radius: var(--radius); overflow: hidden; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(0.94); box-shadow: 0 26px 60px rgba(23,17,13,0.4); background: var(--cream-2); will-change: transform, opacity; display: none; }
.dish-preview img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .dish-list:hover .dish-row { opacity: 0.45; transition: opacity 0.3s var(--ease-out), padding-left 0.4s var(--ease-out), color 0.3s var(--ease-out); }
  .dish-list .dish-row:hover { opacity: 1; padding-left: clamp(0.9rem, 2.2vw, 2rem); }
  .dish-row:hover .dish-name { color: var(--ember-deep); }
  .dish-row:hover::before { transform: translateY(-50%) scaleY(1); }
  .dish-preview { display: block; }
}

/* ---------- AMBIENTE ---------- */
.ambiente { padding-top: var(--sec-y); padding-bottom: clamp(3.5rem, 8vw, 7rem); background: var(--night); color: var(--on-dark); overflow: hidden; }
.ambiente-intro { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.gal-row { overflow: hidden; width: 100%; }
.gal-track { display: flex; gap: clamp(0.75rem, 1.6vw, 1.4rem); width: max-content; will-change: transform; }
.gal-track img { width: clamp(13rem, 24vw, 20rem); height: clamp(16rem, 30vw, 24rem); object-fit: cover; border-radius: var(--radius); background: var(--night-2); }

/* ---------- CHEF ---------- */
.chef { padding-block: var(--sec-y); background: var(--paper); }
.chef-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
.chef-media-mask { overflow: hidden; border-radius: var(--radius); background: var(--cream-2); max-width: 34rem; }
.chef-media img { width: 100%; height: auto; object-fit: cover; transform: scale(1.06); will-change: transform; }
.chef-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.9rem, 1.3rem + 3vw, 3.4rem); line-height: 1.06; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; margin-block: 0.6rem 1.4rem; }
.chef-text { font-size: clamp(1.02rem, 1rem + 0.4vw, 1.2rem); color: var(--body); max-width: 44ch; line-height: 1.7; }
.chef-sign { margin-top: 1.6rem; font-family: var(--font-display); font-style: italic; font-weight: 700; color: var(--ember-deep); font-size: 1.05rem; }
@media (min-width: 900px) { .chef-grid { grid-template-columns: 0.85fr 1.15fr; gap: clamp(3rem, 6vw, 6rem); } }

/* ---------- ZAHLEN ---------- */
.zahlen { background: var(--night-2); color: var(--on-dark); padding-block: clamp(4rem, 9vw, 7rem); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); }
.fact-num { font-family: var(--font-display); font-weight: 900; line-height: 1; font-size: clamp(3rem, 2rem + 5vw, 5.25rem); letter-spacing: -0.02em; color: var(--ember-soft); font-variant-numeric: tabular-nums; }
.fact-label { font-size: 0.95rem; color: var(--on-dark-muted); margin-top: 0.7rem; letter-spacing: 0.02em; }

/* ---------- RESERVIERUNG + ZEITEN ---------- */
.reservierung { padding-block: var(--sec-y); background: var(--night); color: var(--on-dark); position: relative; isolation: isolate; }
.reservierung-inner { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem); align-items: start; }
.reservierung-copy { max-width: 36rem; }
.reservierung-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.3rem, 1.5rem + 4vw, 4.25rem); line-height: 1.02; letter-spacing: -0.02em; color: var(--on-dark); text-wrap: balance; margin-bottom: 1.4rem; }
.reservierung-lead { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem); color: var(--on-dark-muted); max-width: 38ch; }
.zeiten { margin-top: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--on-dark-border); padding-top: clamp(1.5rem, 3vw, 2.2rem); }
.zeiten-title { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; color: var(--on-dark); margin-bottom: 1rem; }
.zeiten-list li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.55rem; border-bottom: 1px solid var(--on-dark-border); font-size: 0.98rem; }
.zeiten-list li span:first-child { color: var(--on-dark-muted); }
.zeiten-list li span:last-child { color: var(--on-dark); font-variant-numeric: tabular-nums; }

.book { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; background: var(--night-2); border: 1px solid var(--on-dark-border); padding: clamp(1.5rem, 3vw, 2.2rem); border-radius: var(--radius-lg); }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field:nth-child(3) { grid-column: 1 / -1; }
.field label { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-muted); font-weight: 600; }
.field input, .field select { font-family: var(--font-sans); font-size: 0.98rem; color: var(--on-dark); background: rgba(243,233,220,0.04); border: 1px solid var(--on-dark-border); border-radius: var(--radius); padding: 0.85rem 0.9rem; width: 100%; transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out); color-scheme: dark; }
.field input:focus, .field select:focus { outline: none; border-color: var(--ember); background: rgba(217,84,31,0.06); }
.book .btn-block { grid-column: 1 / -1; margin-top: 0.4rem; }
@media (min-width: 900px) { .reservierung-inner { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 6rem); } }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--night-2); color: var(--on-dark); padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.footer-brand .brand { color: var(--on-dark); }
.footer-brand p { color: var(--on-dark-muted); margin-top: 1rem; line-height: 1.5; }
.footer-nav { display: flex; gap: clamp(2rem, 6vw, 5rem); }
.footer-nav ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-nav a { color: var(--on-dark-muted); font-size: 0.95rem; transition: color 0.2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .footer-nav a:hover { color: var(--ember-soft); } }
.footer-legal { color: var(--on-dark-muted); font-size: 0.82rem; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.5fr 1fr; grid-template-areas: "brand nav" "legal legal"; align-items: start; } .footer-brand { grid-area: brand; } .footer-nav { grid-area: nav; justify-self: end; } .footer-legal { grid-area: legal; } }

/* ==========================================================================
   MOTION - estados iniciales SOLO con JS (html.js). Sin JS: todo visible.
   ========================================================================== */
.js [data-reveal] { opacity: 0; }
.js [data-reveal-lines] { overflow: hidden; }
.js [data-reveal-lines] .rl-inner { display: block; opacity: 0; }
.js .hero-title .line-inner { opacity: 0; }
.js [data-hero-el] { opacity: 0; }
.js [data-count] { opacity: 0; }
.js .statement .word-inner { opacity: 0.14; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-reveal-lines] .rl-inner, .js .hero-title .line-inner,
  .js [data-hero-el], .js [data-count], .js .statement .word-inner { opacity: 1 !important; transform: none !important; }
  .hero-media img, .chef-media img { transform: none !important; }
  .gal-track { transform: none !important; }
  .hero-scroll-line::after { animation: none; }
  .hero-title .ember { animation: none; }
}
