/* ==========================================================================
   Avó Minorca — Public Landing Page Visual Design System
   Palette: Burgundy · Parchment · Brass
   Typography: Cormorant Garamond (Serif) & Inter (Sans)
   ========================================================================== */

:root {
  /* Brand Palette */
  --wine: #6b1d33;
  --wine-deep: #2e0a15;
  --wine-mid: #4a1323;
  --wine-soft: #8e2f4a;
  --blush: #f4e6e9;
  --cream: #f6f1e9;
  --parchment: #f4ecdf;
  --paper: #fffdf9;
  --ink: #24181b;
  --ink-light: #48353a;
  --mute: #7c6a6f;
  --mute-light: #9a888e;
  --line: #e6dcd0;
  --line-subtle: #f0e8dc;
  --line-dark: #d8ccbe;
  --brass: #b08a4a;
  --brass-light: #d7bd8a;
  --brass-pale: #f7f2e8;
  --gold: #a8823f;
  --gold-light: #e9dcc2;

  /* Typography */
  --font-serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Layout & Spacing */
  --container-max: 68rem;
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  /* Shadows */
  --shadow-subtle: 0 1px 3px rgba(46, 10, 21, 0.04), 0 4px 12px rgba(46, 10, 21, 0.03);
  --shadow-card: 0 2px 8px rgba(46, 10, 21, 0.05), 0 12px 28px -6px rgba(46, 10, 21, 0.08);
  --shadow-dropdown: 0 12px 36px -4px rgba(46, 10, 21, 0.16);

  /* Transitions */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --transition: all 0.2s var(--ease);
  --header-h: 4.25rem;
}

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--cream);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(176, 138, 74, 0.07), transparent 60%),
    radial-gradient(1000px 500px at -10% 100%, rgba(107, 29, 51, 0.05), transparent 60%);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  overflow-x: clip;
}

::selection {
  background: rgba(107, 29, 51, 0.18);
  color: var(--wine-deep);
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

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

a {
  color: var(--wine);
  text-decoration-color: rgba(107, 29, 51, 0.35);
  text-underline-offset: 3px;
  transition: var(--transition);
}

a:hover {
  color: var(--wine-deep);
  text-decoration-color: var(--wine-deep);
}

button, input, textarea {
  font: inherit;
  color: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 233, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(176, 138, 74, 0.3);
  box-shadow: 0 1px 4px rgba(46, 10, 21, 0.03);
  transition: box-shadow 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
  position: relative;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 600;
  color: var(--wine-deep);
  text-decoration: none;
  letter-spacing: 0.015em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
}

.wordmark:hover {
  color: var(--wine);
}

.site-nav {
  transition: var(--transition);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  color: var(--ink-light);
  text-decoration: none;
  padding: 0.35rem 0.2rem;
  position: relative;
  transition: var(--transition);
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--brass);
  transition: width 0.25s var(--ease);
}

.nav-list a:hover {
  color: var(--wine-deep);
}

.nav-list a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  flex-shrink: 0;
}

/* Language Switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(244, 236, 223, 0.8);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-xs);
  padding: 2px 4px;
}

.lang-btn {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--mute);
  padding: 0.2rem 0.4rem;
  border-radius: 2px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.lang-btn:hover {
  color: var(--wine-deep);
}

.lang-btn[aria-pressed="true"] {
  background: var(--wine);
  color: var(--cream);
}

.lang-sep {
  font-size: 0.7rem;
  color: var(--brass-light);
  user-select: none;
  padding-inline: 1px;
}

/* Discreet "Entrar" Link (Small text link, not primary button) */
.backoffice-link {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.backoffice-link:hover {
  color: var(--wine-deep);
  background: rgba(107, 29, 51, 0.06);
  border-color: rgba(107, 29, 51, 0.15);
}

/* Mobile Menu Toggle Button */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-xs);
  padding: 0.35rem 0.55rem;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--ink);
  transition: var(--transition);
}

.menu-toggle:hover {
  border-color: var(--brass);
  background: rgba(176, 138, 74, 0.08);
}

.menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 12px;
}

.menu-line {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--wine-deep);
  border-radius: 1px;
  transition: var(--transition);
}

.menu-text {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
  transform: translateY(5.25px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
  transform: translateY(-5.25px) rotate(-45deg);
}

/* ==========================================================================
   Sections Layout & Rhythm
   ========================================================================== */
.section {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line);
}

.section-inner {
  max-width: 52rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.5vw, 2.85rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--wine-deep);
  margin-top: 0;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 2.25rem;
  height: 2px;
  background: var(--brass-light);
  margin-top: 0.75rem;
}

.subsection-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--wine-deep);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   2. Hero Section
   "Hero should feel like a quiet estate page (generous type, warm background),
   not a flashy marketing site."
   ========================================================================== */
.section-hero {
  padding-block: clamp(4.5rem, 11vw, 8rem);
  text-align: center;
  background:
    radial-gradient(ellipse 900px 450px at 50% 40%, rgba(244, 236, 223, 0.9) 0%, rgba(246, 241, 233, 0.45) 80%);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 44rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.hero-kicker {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.9rem, 8vw, 5.25rem);
  font-weight: 400;
  color: var(--wine-deep);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
}

.hero-variety {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 2.25rem);
  font-style: italic;
  font-weight: 400;
  color: var(--wine);
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.hero-origin {
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 1.8vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0;
}

.section-hero::after {
  content: '';
  display: block;
  width: 3.5rem;
  height: 1px;
  background: var(--brass-light);
  margin: 2.25rem auto 0;
}

/* ==========================================================================
   Lead Paragraphs
   ========================================================================== */
.vinho-lead,
.parcelas-intro,
.enologo-lead {
  font-size: clamp(1.05rem, 2vw, 1.18rem);
  line-height: 1.7;
  color: var(--ink-light);
  margin-top: 0;
  margin-bottom: 1.5rem;
  max-width: 44rem;
}

/* ==========================================================================
   Placeholders & Photo Slots
   "Placeholders (.placeholder-copy and .photo-slot) must stay obviously
   unfinished so Rafa can fill them in, but look tasteful (e.g. soft italic,
   a gentle dashed brass rule) — not ugly debug boxes."
   ========================================================================== */
.placeholder-copy {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--mute);
  background: rgba(176, 138, 74, 0.05);
  border: 1px dashed rgba(176, 138, 74, 0.45);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.65rem;
  display: inline-block;
  line-height: 1.5;
  transition: var(--transition);
}

p.placeholder-copy {
  display: block;
  padding: 0.85rem 1.2rem;
  margin-block: 1.25rem;
  background: rgba(244, 236, 223, 0.55);
  border: 1px dashed rgba(176, 138, 74, 0.4);
  max-width: 42rem;
}

.photo-slot {
  margin: 2rem 0;
  padding: clamp(2.5rem, 6vw, 3.75rem) 1.5rem;
  background: rgba(244, 236, 223, 0.4);
  border: 1.5px dashed rgba(176, 138, 74, 0.45);
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  position: relative;
  transition: var(--transition);
}

.photo-slot::before {
  content: '';
  display: block;
  width: 32px;
  height: 24px;
  margin-bottom: 0.75rem;
  opacity: 0.45;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b08a4a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
}

.photo-slot:hover {
  background: rgba(244, 236, 223, 0.7);
  border-color: rgba(176, 138, 74, 0.7);
}

.photo-slot figcaption.placeholder-copy {
  background: rgba(255, 253, 249, 0.85);
  border: 1px dashed rgba(176, 138, 74, 0.4);
  padding: 0.35rem 0.85rem;
  margin-top: 0;
}

/* ==========================================================================
   4. O Vinho Section
   ========================================================================== */
.section-vinho {
  background-color: var(--parchment);
}

.vinho-notes {
  margin-block: 1.5rem;
}

/* ==========================================================================
   5. As Parcelas Section & Grid
   ========================================================================== */
.parcelas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-block: 2rem;
}

.parcela-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--wine);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-top-color 0.2s var(--ease);
}

.parcela-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-top-color: var(--brass);
}

.parcela-name {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--wine-deep);
  margin: 0;
  line-height: 1.2;
}

.parcela-variety {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.5rem;
}

.parcela-card .placeholder-copy {
  margin-top: auto;
  font-size: 0.9rem;
}

/* ==========================================================================
   6. O Enólogo Section
   ========================================================================== */
.section-enologo {
  background-color: var(--parchment);
}

/* ==========================================================================
   7. Contacto Section & Form
   "Contact form: readable fields, clear 'not yet live' banner,
   and a visible thank-you / not-sent note when shown."
   ========================================================================== */
.section-contacto {
  background-color: var(--cream);
}

.form-status-banner {
  background: rgba(176, 138, 74, 0.09);
  border: 1px solid rgba(176, 138, 74, 0.45);
  border-left: 4px solid var(--brass);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #553c15;
  margin-bottom: 2rem;
  max-width: 34rem;
}

.contact-form {
  display: grid;
  gap: 1.25rem;
  max-width: 34rem;
}

.form-field {
  display: grid;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.015em;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.975rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(107, 29, 51, 0.12);
  background: #ffffff;
}

.form-field textarea {
  resize: vertical;
  min-height: 110px;
}

.form-actions {
  margin-top: 0.5rem;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--wine);
  color: var(--cream);
  border: 1px solid var(--wine-mid);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(46, 10, 21, 0.1);
  transition: var(--transition);
}

.submit-btn:hover {
  background: var(--wine-mid);
  color: #ffffff;
  box-shadow: var(--shadow-subtle);
  transform: translateY(-1px);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Notice shown upon submission */
.form-feedback {
  background: rgba(107, 29, 51, 0.06);
  border: 1px solid rgba(107, 29, 51, 0.25);
  border-left: 4px solid var(--wine);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--wine-deep);
  line-height: 1.55;
  margin-top: 1rem;
}

.form-feedback[hidden] {
  display: none !important;
}

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer {
  background: var(--wine-deep);
  color: var(--cream);
  border-top: 2px solid var(--brass);
  padding-block: 3.5rem 2.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  padding-block: 0;
}

@media (min-width: 680px) {
  .footer-inner {
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: start;
    gap: 2rem;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-wordmark {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 500;
  color: #ffffff;
  margin: 0;
  line-height: 1.15;
}

.footer-origin {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin: 0;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

.footer-contact .placeholder-copy {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(215, 189, 138, 0.35);
  color: var(--brass-light);
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.footer-legal-link {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: rgba(246, 241, 233, 0.65);
  text-decoration: none;
  background: transparent;
  border: 1px dashed rgba(215, 189, 138, 0.25);
  padding: 0.2rem 0.5rem;
}

.footer-legal-link:hover {
  color: var(--brass-light);
  border-color: rgba(215, 189, 138, 0.5);
}

.footer-links .backoffice-link {
  font-size: 0.8125rem;
  color: var(--brass-light);
  padding: 0;
  opacity: 0.85;
}

.footer-links .backoffice-link:hover {
  opacity: 1;
  color: #ffffff;
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
}

/* ==========================================================================
   Coming Soon Page Styles
   Used by public/coming-soon.html
   ========================================================================== */
.coming-soon-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.coming-soon-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem) 1rem;
}

.coming-soon-card {
  max-width: 36rem;
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brass);
  border-radius: var(--radius-md);
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-card);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.coming-soon-seal {
  width: 64px;
  height: 64px;
  margin-bottom: 1.5rem;
}

.coming-soon-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  background: var(--brass-pale);
  border: 1px solid var(--brass-light);
  border-radius: var(--radius-xs);
  padding: 0.3rem 0.75rem;
  margin-bottom: 1rem;
}

.coming-soon-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 2.6rem);
  font-weight: 400;
  color: var(--wine-deep);
  margin: 0 0 1rem;
  line-height: 1.15;
}

.coming-soon-desc {
  font-size: 1.025rem;
  line-height: 1.65;
  color: var(--ink-light);
  margin: 0 0 2rem;
}

.coming-soon-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--wine);
  color: var(--cream);
  border: 1px solid var(--wine-mid);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.6rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(46, 10, 21, 0.1);
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--wine-mid);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}

/* ==========================================================================
   Responsive Adaptations & Mobile Nav (<= 860px)
   Targeting standard phones down to 360-390px (e.g. 390×844)
   ========================================================================== */
@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 2px solid var(--brass);
    box-shadow: var(--shadow-dropdown);
    padding: 1.25rem 1.5rem 1.5rem;
    display: none;
    z-index: 99;
  }

  .site-nav.is-open {
    display: block;
    animation: navSlideDown 0.22s var(--ease);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav-list li {
    border-bottom: 1px solid var(--line);
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-list a {
    display: block;
    padding: 0.85rem 0.5rem;
    font-size: 1.05rem;
    font-family: var(--font-serif);
    font-weight: 500;
    color: var(--wine-deep);
  }

  .nav-list a::after {
    display: none;
  }

  .nav-list a:hover {
    color: var(--wine);
    padding-left: 0.75rem;
  }
}

@keyframes navSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile specific tuning for 390x844 and small viewports */
@media (max-width: 480px) {
  .header-inner {
    padding-block: 0.75rem;
  }

  .wordmark {
    font-size: 1.3rem;
  }

  .header-actions {
    gap: 0.45rem;
  }

  .backoffice-link {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
  }

  .lang-btn {
    font-size: 0.7rem;
    padding: 0.15rem 0.3rem;
  }

  .section {
    padding-block: 3.25rem;
  }

  .parcelas-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   Scroll-scrubbed hero (bottle opening flipbook)
   Phone-first: the frame fills the viewport (object-fit cover).
   From 860px up: the 4:5 frame is contained, with a deep-wine letterbox.
   ========================================================================== */
.hero-scrub {
  position: relative;
  padding: 0;
  margin: 0;
  background: var(--wine-deep);
}

.hero-scrub-track {
  --hero-frames: 27;
  --hero-vh: calc(100dvh - var(--header-h));
  height: calc(var(--hero-vh) + (var(--hero-frames) - 1) * 12vh);
  position: relative;
}

.hero-scrub-track.is-static {
  height: var(--hero-vh);
}

.hero-scrub-sticky {
  position: sticky;
  top: var(--header-h);
  height: var(--hero-vh);
  overflow: hidden;
}

.hero-stage {
  position: absolute;
  inset: 0;
  background: var(--wine-deep);
}

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

.hero-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  pointer-events: none;
  display: block;
}

#heroFrameA { z-index: 1; opacity: 1; }
#heroFrameB { z-index: 2; opacity: 0; }

.hero-copy {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: 0;
  bottom: auto;
  padding: 1.15rem 1.25rem 2.2rem;
  background: linear-gradient(
    to bottom,
    rgba(46, 10, 21, 0.78) 0%,
    rgba(46, 10, 21, 0.28) 65%,
    rgba(46, 10, 21, 0) 100%
  );
  text-align: center;
  color: var(--parchment);
  pointer-events: none;
}
.hero-copy .lang-switch,
.hero-copy a { pointer-events: auto; }

.hero-scrub .hero-kicker {
  color: var(--brass-light);
  margin-bottom: 0.65rem;
}

.hero-scrub .hero-title {
  color: var(--parchment);
  margin-bottom: 0.4rem;
  font-size: clamp(2.4rem, 10vw, 4.6rem);
}

.hero-scrub .hero-variety {
  color: var(--brass-light);
  margin-bottom: 0.35rem;
}

.hero-scrub .hero-origin {
  color: rgba(244, 236, 223, 0.86);
  margin-bottom: 0;
}

.hero-scroll-hint {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 1.35rem;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-light);
  text-align: center;
  pointer-events: none;
}

.hero-scroll-hint::after {
  content: "";
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  margin: 0.55rem auto 0;
  border-right: 1px solid var(--brass-light);
  border-bottom: 1px solid var(--brass-light);
  transform: rotate(45deg);
  opacity: 0.85;
}

.hero-scrub-track.is-static .hero-scroll-hint {
  display: none;
}

@media (min-width: 860px) {
  .hero-frame {
    object-fit: contain;
    object-position: center 40%;
  }
  .hero-copy {
    padding: 1.4rem 2rem 2.4rem;
  }
  .hero-scroll-hint {
    bottom: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scrub-track {
    height: var(--hero-vh);
  }
  .hero-scroll-hint {
    display: none;
  }
}
