/* ============================================================
   ÂMBAR · Cozinha de Autor
   Escuro · minimalista · intimista · dourado champanhe
   Nested CSS
   ============================================================ */

:root {
  --noir:   #0e0e10;   /* fundo quase preto */
  --panel:  #16161a;   /* superfície */
  --smoke:  #1d1d22;   /* superfície elevada */
  --gold:   #c9a86a;   /* dourado champanhe */
  --gold-lt:#e3cfa0;
  --text:   #ece7dd;   /* branco quente */
  --muted:  #8f887c;   /* texto secundário */
  --hair:   rgba(201,168,106,0.22);
  --wine:   #7b3340;   /* apontamento vínico, romântico */

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-ui:    "Jost", system-ui, sans-serif;

  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 300;
  color: var(--text);
  background: var(--noir);
  line-height: 1.7;
  overflow-x: hidden;
  letter-spacing: 0.01em;

  &.is-loading { overflow: hidden; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.08; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
::selection { background: var(--gold); color: var(--noir); }

/* ---------- Reveal (slow, with soft blur) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease);
  &.is-visible { opacity: 1; transform: none; filter: none; }
}

/* small label style reused across sections */
.deg__kicker {
  font-family: var(--font-ui);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  color: var(--gold);
  margin: 0 0 1rem;
  padding-left: 0.42em;
}

/* ============================================================
   Intro — a single gold line expands, name fades in
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: var(--noir);
  transition: opacity 1s ease, visibility 1s;

  &.is-done { opacity: 0; visibility: hidden; }

  & .intro__inner { text-align: center; }

  & .intro__line {
    display: block;
    height: 1px;
    width: 0;
    margin: 0 auto 1.6rem;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    animation: lineGrow 1.3s var(--ease) 0.2s forwards;
  }

  & .intro__name {
    display: block;
    font-family: var(--font-ui);
    font-weight: 300;
    font-size: clamp(2rem, 8vw, 3.4rem);
    letter-spacing: 0.55em;
    padding-left: 0.55em;
    color: var(--text);
    opacity: 0;
    animation: fade 1.1s ease 0.7s forwards;
  }

  & .intro__sub {
    display: block;
    margin-top: 0.8rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--gold);
    opacity: 0;
    animation: fade 1.1s ease 1.1s forwards;
  }
}

@keyframes lineGrow { to { width: min(260px, 60vw); } }
@keyframes fade { to { opacity: 1; } }

/* ============================================================
   Header
   ============================================================ */
.head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem clamp(1rem, 5vw, 3rem);
  transition: background 0.6s var(--ease), padding 0.6s var(--ease), border-color 0.6s;
  border-bottom: 1px solid transparent;

  &.is-scrolled {
    background: color-mix(in srgb, var(--noir) 82%, transparent);
    backdrop-filter: blur(14px);
    border-bottom-color: var(--hair);
    padding-block: 0.9rem;
  }

  & .mark {
    font-family: var(--font-ui);
    font-weight: 400;
    font-size: 1.15rem;
    letter-spacing: 0.4em;
    padding-left: 0.4em;
    color: var(--text);
  }

  & .nav {
    display: flex;
    gap: clamp(1.2rem, 3vw, 2.4rem);
    & a {
      font-size: 0.82rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--muted);
      transition: color 0.4s;
      &:hover { color: var(--gold); }
    }
  }

  & .reserve {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.6rem 1.3rem;
    border: 1px solid var(--hair);
    border-radius: 999px;
    color: var(--gold-lt);
    transition: background 0.4s var(--ease), border-color 0.4s, color 0.4s;
    &:hover { background: var(--gold); border-color: var(--gold); color: var(--noir); }
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8rem 1.5rem 5rem;
  overflow: hidden;

  /* candle-like glow, slow breathing */
  & .hero__glow {
    position: absolute;
    top: 42%; left: 50%;
    width: 70vmax; height: 70vmax;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(201,168,106,0.16), rgba(201,168,106,0.05) 30%, transparent 60%);
    animation: breathe 8s ease-in-out infinite;
    pointer-events: none;
  }

  & .hero__inner { position: relative; z-index: 2; max-width: 720px; }

  & .hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-size: 0.72rem;
    color: var(--gold);
    margin: 0 0 1.6rem;
    padding-left: 0.4em;
  }

  & .hero__title {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(3rem, 11vw, 6.5rem);
    line-height: 1;
    letter-spacing: 0.01em;
    & em { font-style: italic; color: var(--gold); }
  }

  & .hero__lede {
    max-width: 30rem;
    margin: 2rem auto 2.6rem;
    color: var(--muted);
    font-size: 1.05rem;
  }

  & .hero__scroll {
    position: absolute;
    bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--muted);
    &::after {
      content: "";
      display: block;
      width: 1px; height: 34px;
      margin: 0.7rem auto 0;
      background: linear-gradient(var(--gold), transparent);
      animation: pulseLine 2.4s ease-in-out infinite;
    }
  }
}

@keyframes breathe {
  0%, 100% { opacity: 0.75; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.06); }
}
@keyframes pulseLine {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50%      { opacity: 1;   transform: scaleY(1); }
}

/* ---------- Button ---------- */
.btn {
  display: inline-block;
  padding: 0.95rem 2.2rem;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-lt);
  border: 1px solid var(--gold);
  border-radius: 999px;
  transition: background 0.5s var(--ease), color 0.5s var(--ease), letter-spacing 0.5s var(--ease);
  &:hover { background: var(--gold); color: var(--noir); letter-spacing: 0.24em; }
}

/* ============================================================
   Creed / philosophy strip
   ============================================================ */
.creed {
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(4rem, 12vh, 8rem) 1.5rem;
  text-align: center;

  & .creed__text {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 300;
    line-height: 1.4;
    color: var(--text);
    & span { display: block; color: var(--muted); font-style: italic; margin-top: 0.6rem; }
  }
}

/* ============================================================
   Degustação — spine timeline with growing gold line
   ============================================================ */
.degustacao {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.4rem, 6vw, 3rem) clamp(4rem, 8vw, 7rem);

  & .deg__head {
    text-align: center;
    margin-bottom: clamp(3rem, 7vw, 5rem);
    & .deg__title { font-family: var(--font-serif); font-size: clamp(2.4rem, 7vw, 4rem); }
    & .deg__meta { margin-top: 0.8rem; color: var(--muted); font-size: 0.9rem; letter-spacing: 0.05em; }
  }
}

.spine {
  position: relative;
  max-width: 620px;
  margin-inline: auto;
  padding-left: clamp(3rem, 8vw, 4.5rem);

  /* faint full-height rail */
  &::before {
    content: "";
    position: absolute;
    top: 6px; bottom: 6px;
    left: clamp(1rem, 3vw, 1.4rem);
    width: 1px;
    background: var(--hair);
  }

  /* progress fill driven by scroll */
  & .spine__fill {
    position: absolute;
    top: 6px;
    left: clamp(1rem, 3vw, 1.4rem);
    width: 1px;
    height: 0;
    background: linear-gradient(var(--gold), var(--gold-lt));
    box-shadow: 0 0 10px rgba(201,168,106,0.5);
    transition: height 0.15s linear;
  }
}

.course {
  position: relative;
  padding-block: clamp(1.6rem, 4vw, 2.4rem);

  /* roman numeral node on the rail */
  & .course__num {
    position: absolute;
    left: clamp(-3rem, -8vw, -4.5rem);
    top: clamp(1.6rem, 4vw, 2.4rem);
    width: clamp(2rem, 5vw, 2.6rem);
    display: grid;
    place-items: center;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--muted);
    background: var(--noir);
    padding-block: 0.2rem;
    transition: color 0.6s var(--ease);

    &::before {
      content: "";
      position: absolute;
      left: 50%; top: 0.5rem;
      width: 9px; height: 9px;
      margin-left: -4.5px;
      border-radius: 50%;
      border: 1px solid var(--hair);
      background: var(--noir);
      transition: background 0.6s var(--ease), border-color 0.6s var(--ease), box-shadow 0.6s;
    }
  }

  &.is-visible .course__num { color: var(--gold); }
  &.is-visible .course__num::before {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(201,168,106,0.7);
  }

  & .course__card { padding-left: 0.4rem; }

  & .course__name {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    color: var(--text);
  }
  & .course__desc {
    margin: 0.4rem 0 0;
    color: var(--muted);
    font-size: 0.98rem;
    max-width: 34rem;
  }
  & .course__pair {
    margin: 0.7rem 0 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--gold);
    &::before { content: "❧ "; font-style: normal; }
  }
}

/* ============================================================
   Parallax quote divider
   ============================================================ */
.quote {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 60vh;
  padding: clamp(4rem, 10vw, 8rem) 1.5rem;
  text-align: center;
  background-image:
    linear-gradient(rgba(14,14,16,0.82), rgba(14,14,16,0.86)),
    url("https://images.unsplash.com/photo-1414235077428-338989a2e8c0?auto=format&fit=crop&w=1600&q=70");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;

  & .quote__body {
    max-width: 46rem;
    margin: 0;
    & p {
      font-family: var(--font-serif);
      font-style: italic;
      font-weight: 300;
      font-size: clamp(1.6rem, 4.5vw, 2.8rem);
      line-height: 1.35;
      color: var(--text);
      margin: 0;
      text-wrap: balance;
    }
    & cite {
      display: block;
      margin-top: 1.6rem;
      font-family: var(--font-ui);
      font-style: normal;
      font-size: 0.78rem;
      letter-spacing: 0.3em;
      text-transform: uppercase;
      color: var(--gold);
    }
  }
}

/* ============================================================
   Adega
   ============================================================ */
.adega {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(4rem, 8vw, 6rem) clamp(1.4rem, 6vw, 3rem);

  & .adega__head { text-align: center; margin-bottom: clamp(2.5rem, 6vw, 4rem);
    & .deg__title { font-family: var(--font-serif); font-size: clamp(2.2rem, 6vw, 3.4rem); }
  }

  & .adega__cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(2rem, 6vw, 5rem);
  }
}

.wine {
  & .wine__item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--hair);

    & .wine__name { font-family: var(--font-serif); font-size: 1.2rem; color: var(--text); }
    & .wine__price {
      font-family: var(--font-serif);
      font-size: 1.15rem;
      color: var(--gold);
      &::before { content: "€"; font-size: 0.7em; margin-right: 0.15em; color: var(--muted); }
    }
  }
}

/* ============================================================
   Reserva
   ============================================================ */
.reserva {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.4rem, 6vw, 3rem) clamp(5rem, 10vw, 8rem);

  & .reserva__card {
    background: linear-gradient(160deg, var(--panel), var(--noir));
    border: 1px solid var(--hair);
    border-radius: 4px;
    padding: clamp(3rem, 8vw, 5rem) clamp(1.5rem, 6vw, 4rem);
    text-align: center;

    & .reserva__title { font-family: var(--font-serif); font-size: clamp(2rem, 6vw, 3.2rem); margin-bottom: 1rem; }
    & .reserva__line { margin: 0.3rem 0; color: var(--muted); font-size: 0.95rem; }
    & .btn { margin-top: 2rem; }
  }
}

/* ============================================================
   Footer
   ============================================================ */
.foot {
  border-top: 1px solid var(--hair);
  text-align: center;
  padding: clamp(3rem, 6vw, 4.5rem) 1.5rem 3.5rem;

  & .foot__mark {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    letter-spacing: 0.5em;
    padding-left: 0.5em;
    color: var(--text);
    margin: 0 0 0.6rem;
  }
  & .foot__tag { font-family: var(--font-serif); font-style: italic; color: var(--gold); margin: 0; font-size: 1.1rem; }
  & .foot__meta { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.85rem; }
  & .foot__note { margin-top: 1.4rem; color: rgba(143,136,124,0.6); font-size: 0.78rem; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .head .nav { display: none; }
  .adega .adega__cols { grid-template-columns: 1fr; gap: 0; }
  .quote { background-attachment: scroll; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
  .intro__line { width: min(260px, 60vw); }
  .intro__name, .intro__sub { opacity: 1; }
  .spine__fill { height: 100% !important; }
}
