/* ==========================================================================
   Cuca Libre Orlando — main stylesheet
   Tokens + base + components. Direction: festivo tropical / dark editorial.
   ========================================================================== */

:root {
  /* Brand palette */
  --cl-green: #1B7A3D;
  --cl-green-deep: #0F4D27;
  --cl-red: #D6232A;
  --cl-red-deep: #A8151B;
  --cl-yellow: #F4B82E;
  --cl-yellow-bright: #FFD23F;
  --cl-ink: #0E0E0E;
  --cl-charcoal: #1A1A1A;
  --cl-cream: #F4F0E6;
  --cl-white: #FFFFFF;

  /* Semantic */
  --bg: var(--cl-ink);
  --surface: var(--cl-charcoal);
  --text: var(--cl-white);
  --text-muted: rgba(255, 255, 255, 0.68);
  --on-cream: #1A1A1A;
  --on-cream-muted: rgba(20, 20, 20, 0.7);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Type */
  --font-display: "Amarante", Georgia, serif;
  --font-body: "Open Sans", system-ui, -apple-system, sans-serif;

  /* Spacing scale (8pt) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;

  /* Radius / shadow */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.45);

  /* Layout */
  --maxw: 1180px;
  --maxw-narrow: 820px;
  --header-h: 76px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 150ms;
  --t-mid: 260ms;

  /* z-index scale */
  --z-header: 100;
  --z-menu: 200;
  --z-skip: 300;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ----- A11y helpers ----- */
.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; left: 12px; top: -60px; z-index: var(--z-skip);
  background: var(--cl-yellow); color: var(--cl-ink); padding: 10px 16px;
  border-radius: var(--r-sm); font-weight: 600; transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; }

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

/* ----- Layout ----- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); }
.section { padding-block: clamp(48px, 9vw, 104px); }
.section--tight { padding-block: clamp(36px, 6vw, 64px); }
.center { text-align: center; }
.narrow { max-width: var(--maxw-narrow); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cl-yellow);
}
.section-title { font-size: clamp(2rem, 5.5vw, 3.4rem); margin-block: var(--sp-2) var(--sp-4); }
.lede { color: var(--text-muted); font-size: 1.05rem; max-width: 60ch; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 48px; padding: 0.8rem 1.6rem;
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase;
  border: 2px solid transparent; border-radius: 999px;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--cl-red); color: #fff; }
.btn--primary:hover { background: var(--cl-red-deep); }
.btn--secondary { background: var(--cl-yellow); color: var(--cl-ink); }
.btn--secondary:hover { background: var(--cl-yellow-bright); }
.btn--green { background: var(--cl-green); color: #fff; }
.btn--green:hover { background: var(--cl-green-deep); }
.btn--outline { background: transparent; color: #fff; border-color: var(--border-strong); }
.btn--outline:hover { border-color: var(--cl-yellow); color: var(--cl-yellow); }
.btn--on-cream.btn--outline { color: var(--on-cream); border-color: rgba(20,20,20,0.25); }
.btn--on-cream.btn--outline:hover { border-color: var(--cl-red); color: var(--cl-red); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-mid), box-shadow var(--t-mid);
}
.site-header.is-scrolled { background: rgba(14, 14, 14, 0.97); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: var(--sp-6); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 48px; width: auto; }

.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; gap: clamp(14px, 2vw, 30px); align-items: center; }
.primary-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; font-size: 0.86rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.82); transition: color var(--t-fast);
}
.primary-nav a:hover { color: var(--cl-yellow); }
.primary-nav a[aria-current="page"] { color: var(--cl-yellow); }
.primary-nav a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; background: var(--cl-yellow);
  width: 100%; margin-top: 2px;
}
.header-cta { flex: none; }

.lang-switch a { border: 1px solid var(--border-strong); border-radius: 999px; padding-inline: 12px; letter-spacing: 0.08em; }
.lang-switch a:hover { border-color: var(--cl-yellow); }
@media (max-width: 860px) { .lang-switch a { border: 0; } }

.nav-toggle {
  display: none; flex: none;
  width: 48px; height: 48px; margin-left: auto;
  background: transparent; border: 0; color: #fff;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex; align-items: flex-end;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1200ms var(--ease-out);
}
.hero__media img.is-active { opacity: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(14,14,14,0.25) 0%, rgba(14,14,14,0.55) 55%, rgba(14,14,14,0.92) 100%);
}
.hero__content { padding-block: clamp(40px, 8vw, 96px); max-width: 720px; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 5.5rem); margin-block: var(--sp-3) var(--sp-4); }
.hero h1 .accent { color: var(--cl-yellow); }
.hero p { color: rgba(255,255,255,0.9); font-size: 1.1rem; max-width: 46ch; margin-bottom: var(--sp-6); }

/* ----- Page header (interior pages) ----- */
.page-header {
  position: relative; isolation: isolate;
  padding-block: clamp(80px, 14vw, 160px);
  display: flex; align-items: center;
}
.page-header__media { position: absolute; inset: 0; z-index: -2; }
.page-header__media img { width: 100%; height: 100%; object-fit: cover; }
.page-header::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(14,14,14,0.55), rgba(14,14,14,0.8));
}
.page-header.no-media { background: var(--cl-green-deep); padding-block: clamp(64px, 10vw, 120px); }
.page-header h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); }
.page-header p { color: var(--text-muted); margin-top: var(--sp-3); max-width: 56ch; }

/* ==========================================================================
   Panels (section backgrounds)
   ========================================================================== */
.panel--cream { background: var(--cl-cream); color: var(--on-cream); }
.panel--cream .lede, .panel--cream p { color: var(--on-cream-muted); }
.panel--cream .eyebrow { color: var(--cl-red); }
.panel--green { background: var(--cl-green-deep); }
.panel--red { background: var(--cl-red); }
.panel--red .eyebrow { color: var(--cl-yellow); }
.panel--surface { background: var(--surface); }

/* Split (image + text) */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(24px, 5vw, 64px); }
.split--media-right { direction: ltr; }
.split__media { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.split__media img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split__body h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: var(--sp-4); }

/* ==========================================================================
   Dish cards
   ========================================================================== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(18px, 3vw, 28px); }
.dish {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform var(--t-mid) var(--ease-out), border-color var(--t-mid);
}
.dish:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.dish__media { aspect-ratio: 4 / 3; overflow: hidden; }
.dish__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.dish:hover .dish__media img { transform: scale(1.05); }
.dish__body { padding: var(--sp-6); }
.dish__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.dish__head h3 { font-size: 1.4rem; }
.dish__price { font-family: var(--font-display); color: var(--cl-yellow); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.dish__body p { font-size: 0.92rem; color: var(--text-muted); margin-top: var(--sp-2); }
.tag {
  display: inline-block; margin-top: var(--sp-3);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--cl-green); color: #fff; padding: 4px 10px; border-radius: 999px;
}
.tag--red { background: var(--cl-red); }
.tag--yellow { background: var(--cl-yellow); color: var(--cl-ink); }

/* ==========================================================================
   Menu list
   ========================================================================== */
.menu-cat { margin-bottom: clamp(36px, 6vw, 64px); }
.menu-cat__head { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.menu-cat__head img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--cl-yellow); }
.menu-cat__head h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.menu-cat__head .note { font-size: 0.85rem; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.menu-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--sp-3) clamp(24px, 5vw, 56px); }
.menu-item { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: var(--sp-3); padding-block: var(--sp-3); border-bottom: 1px solid var(--border); }
.menu-item__name { font-weight: 600; }
.menu-item__desc { display: block; font-weight: 400; font-size: 0.86rem; color: var(--text-muted); margin-top: 2px; }
.menu-item__price { font-family: var(--font-display); color: var(--cl-yellow); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 1.5vw, 14px); }
.gallery a { border-radius: var(--r-md); overflow: hidden; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 600ms var(--ease-out), opacity var(--t-mid); }
.gallery a:hover img { transform: scale(1.06); }
.gallery a.tall { grid-row: span 2; }
.gallery a.tall img { aspect-ratio: 1 / 2; }

/* ==========================================================================
   Events
   ========================================================================== */
.event-card { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.event-card + .event-card { margin-top: var(--sp-6); }
.event-card:nth-child(even) { direction: rtl; }
.event-card:nth-child(even) > * { direction: ltr; }
.event-card__media img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; }
.event-card__body { padding: clamp(24px, 4vw, 44px); align-self: center; }
.event-card__body .when { color: var(--cl-yellow); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.8rem; }
.event-card__body h3 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-block: var(--sp-2) var(--sp-3); }
.event-card__body p { color: var(--text-muted); }

/* ==========================================================================
   Info (hours + location)
   ========================================================================== */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 36px); }
.info-card { background: var(--cl-green-deep); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); }
.info-card h3 { font-size: 1.7rem; margin-block: var(--sp-2) var(--sp-4); }
.hours-row { display: flex; justify-content: space-between; gap: var(--sp-4); padding-block: var(--sp-3); border-bottom: 1px dashed var(--border-strong); font-size: 0.98rem; }
.hours-row:last-child { border-bottom: 0; }
.map-embed { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); }
.map-embed iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form { display: grid; gap: var(--sp-4); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.field label .req { color: var(--cl-red); }
.field .help { font-size: 0.78rem; color: var(--text-muted); }
.input, .select, .textarea {
  font: inherit; color: #fff; width: 100%; min-height: 48px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); padding: 0.7rem 0.9rem;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cl-yellow); background: rgba(255,255,255,0.08); }
.input::placeholder, .textarea::placeholder { color: rgba(255,255,255,0.4); }
.field[data-invalid="true"] .input, .field[data-invalid="true"] .select, .field[data-invalid="true"] .textarea { border-color: var(--cl-red); }
.field__error { font-size: 0.78rem; color: #ff8a8f; min-height: 1em; }
.form-status { font-weight: 600; }
.form-status[data-state="ok"] { color: var(--cl-yellow); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--cl-ink); border-top: 1px solid var(--border); padding-block: clamp(40px, 7vw, 72px) var(--sp-8); }
.footer-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: clamp(28px, 5vw, 56px); }
.site-footer .brand-crest { width: 120px; margin-bottom: var(--sp-4); }
.site-footer h4 { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; color: var(--cl-yellow); margin-bottom: var(--sp-3); }
.site-footer a, .site-footer p { color: var(--text-muted); font-size: 0.92rem; }
.site-footer li a { display: inline-flex; min-height: 36px; align-items: center; }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; margin-top: var(--sp-12); padding-top: var(--sp-6); border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--text-muted); }

/* Mobile-only CTA inside the nav dropdown */
.only-mobile { display: none; }
@media (max-width: 860px) {
  .primary-nav .only-mobile { display: block; padding: var(--sp-4) clamp(18px, 5vw, 40px) 0; }
  .primary-nav .only-mobile .btn { width: 100%; }
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Ajustes 2026-06 (light panels, form claro, home events, logo no Sobre)
   ========================================================================== */
/* Painel cinza bem leve (diferenciar seções claras vizinhas) */
.panel--mist { background: #F3F1EA; color: var(--on-cream); }
.panel--mist .lede, .panel--mist p { color: var(--on-cream-muted); }
.panel--mist .eyebrow { color: var(--cl-red); }

/* Formulário/inputs sobre fundo claro (cream/mist) */
.panel--cream .input, .panel--cream .select, .panel--cream .textarea,
.panel--mist .input, .panel--mist .select, .panel--mist .textarea {
  color: var(--on-cream); background: #fff; border-color: rgba(20, 20, 20, 0.18);
}
.panel--cream .input::placeholder, .panel--cream .textarea::placeholder,
.panel--mist .input::placeholder, .panel--mist .textarea::placeholder { color: rgba(20, 20, 20, 0.45); }
.panel--cream .field label, .panel--cream .field .help,
.panel--mist .field label, .panel--mist .field .help { color: var(--on-cream-muted); }
.panel--cream .input:focus, .panel--cream .select:focus, .panel--cream .textarea:focus,
.panel--mist .input:focus, .panel--mist .select:focus, .panel--mist .textarea:focus {
  border-color: var(--cl-red); background: #fff;
}
.panel--cream .form-status[data-state="ok"],
.panel--mist .form-status[data-state="ok"] { color: var(--cl-green-deep); }

/* Homepage — seção "Tem programa no Cuca": fundo claro + blocos quadrados (~30% mais baixos) */
.home-events .events-2up { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 3vw, 28px); margin-top: clamp(28px, 5vw, 44px); }
.home-events .event-card { grid-template-columns: 1fr; }
.home-events .event-card:nth-child(even) { direction: ltr; }
.home-events .event-card + .event-card { margin-top: 0; }
.home-events .event-card__media img { min-height: 0; aspect-ratio: 16 / 11; }
.home-events .event-card__body { padding: clamp(18px, 3vw, 28px); }
.home-events .event-card__body h3 { color: var(--cl-white); }
@media (max-width: 760px) { .home-events .events-2up { grid-template-columns: 1fr; } }

/* Página Sobre — marca completa no lugar da foto */
.split__media--logo { background: transparent; box-shadow: none; display: grid; place-items: center; padding: clamp(16px, 4vw, 40px); }
.split__media--logo img { aspect-ratio: auto; object-fit: contain; width: auto; max-width: min(100%, 360px); height: auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: var(--z-menu);
    background: rgba(14, 14, 14, 0.98); border-bottom: 1px solid var(--border);
    transform: translateY(-130%); transition: transform var(--t-mid) var(--ease-out);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .primary-nav.is-open { transform: translateY(0); }
  .primary-nav ul { flex-direction: column; align-items: stretch; padding: var(--sp-4) clamp(18px, 5vw, 40px) var(--sp-8); gap: 0; }
  .primary-nav li { border-bottom: 1px solid var(--border); }
  .primary-nav a { min-height: 56px; width: 100%; font-size: 1rem; }
  .primary-nav a[aria-current="page"]::after { display: none; }
  .header-cta { display: none; }
  .split { grid-template-columns: 1fr; }
  .split__body { order: 2; }
  .info-grid { grid-template-columns: 1fr; }
  .event-card, .event-card:nth-child(even) { grid-template-columns: 1fr; direction: ltr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery a.tall { grid-row: span 1; }
  .gallery a.tall img { aspect-ratio: 1 / 1; }
  .footer-cols { grid-template-columns: 1fr; }
  .menu-list { grid-template-columns: 1fr; }
}

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