/* ============================================================
   Casa Linda Festas & Eventos
   "A Casa em Hora Dourada" — see DESIGN.md
   The page descends from 17h linen to 02h nightfall.
   ============================================================ */

:root {
  /* Light — the hour palette */
  --golden-hour: #c9a227;
  --deep-amber: #7a5c1e;
  --late-light: #e8c96a;
  --sunlit-linen: #faf8f5;
  --paper-white: #ffffff;
  --nightfall: #1a1a1a;

  /* Descent grounds: one step per chapter, 17h → 02h. The light drains
     out of the paper before the page ever goes dark. */
  --ground-17h: var(--sunlit-linen);
  --ground-18h: #f7f2e9;
  --ground-19h: #f2ebdd;
  --ground-20h: #ece2cf;
  --ground-21h: #2a2117;
  --ground-02h: #14110d;

  --ground-day: var(--ground-17h);
  --ground-dusk: var(--ground-20h);
  --ground-evening: var(--ground-21h);
  --ground-night: var(--ground-02h);

  /* Ink, warm at every step — never a cool grey */
  --ink: #1a1a1a;
  --ink-soft: rgba(26, 20, 10, 0.72);
  /* 0.66 is the floor that keeps captions ≥4.5:1 on the dusk ground too */
  --ink-faint: rgba(26, 20, 10, 0.66);
  --ink-rule: rgba(26, 20, 10, 0.14);

  --ink-on-dark: #f5efe4;
  --ink-on-dark-soft: rgba(245, 239, 228, 0.76);
  --ink-on-dark-faint: rgba(245, 239, 228, 0.58);
  --rule-on-dark: rgba(232, 201, 106, 0.26);

  --font-body: "Merienda", Georgia, serif;
  --font-display: "Ballet", "Merienda", cursive;

  /* Measure narrows as the promenade goes inward */
  --measure-wide: 62ch;
  --measure-mid: 56ch;
  --measure-close: 48ch;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --chapter-gap: clamp(5rem, 11vw, 10rem);

  --radius-sm: 6px;
  --radius: 14px;
  --radius-pill: 50px;

  --shadow-ambient: 0 8px 32px rgba(60, 44, 16, 0.1);
  --shadow-lifted: 0 18px 52px rgba(60, 44, 16, 0.2);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.45s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--ground-day);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--deep-amber);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

/* Gold fails contrast as text — hover goes darker, never lighter */
a:hover {
  color: var(--nightfall);
}

:focus-visible {
  outline: 2px solid var(--golden-hour);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  text-wrap: balance;
}

p {
  margin: 0 0 1.15em;
}

p:last-child {
  margin-bottom: 0;
}

/* Anchor targets clear the fixed masthead */
[id] {
  scroll-margin-top: 5.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--nightfall);
  color: var(--ink-on-dark);
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ============================================================
   Shared type
   ============================================================ */
.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--deep-amber);
  /* Ballet's ascenders reach into the line above; hold them apart */
  position: relative;
  z-index: 1;
}

.lede {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.55;
  color: var(--ink);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.btn svg {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
  flex-shrink: 0;
}

.btn--gold {
  background: var(--golden-hour);
  color: #241a05;
  border: 2px solid var(--golden-hour);
}

.btn--gold:hover {
  background: var(--late-light);
  border-color: var(--late-light);
  color: #241a05;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(201, 162, 39, 0.42);
}

.btn--ghost {
  border: 2px solid rgba(245, 239, 228, 0.5);
  color: var(--ink-on-dark);
}

.btn--ghost:hover {
  border-color: var(--late-light);
  color: var(--late-light);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 1.05rem 2.5rem;
  font-size: 1.05rem;
}

/* ============================================================
   Light clock — the descent, made visible
   ============================================================ */
.light-clock {
  position: fixed;
  right: clamp(1rem, 2.2vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}

.light-clock.is-visible {
  opacity: 1;
}

.light-clock__hour {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--deep-amber);
  font-variant-numeric: tabular-nums;
  transition: color var(--dur) var(--ease);
}

.light-clock__track {
  width: 2px;
  height: clamp(90px, 16vh, 150px);
  background: var(--ink-rule);
  border-radius: 2px;
  overflow: hidden;
  transition: background var(--dur) var(--ease);
}

.light-clock__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--golden-hour), var(--late-light));
  transform: scaleY(0);
  transform-origin: top;
  will-change: transform;
  transition: transform 0.2s linear;
}

.light-clock__label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  writing-mode: vertical-rl;
  transition: color var(--dur) var(--ease);
}

/* On dark chapters the clock inverts */
.light-clock.on-dark .light-clock__hour {
  color: var(--late-light);
}

.light-clock.on-dark .light-clock__track {
  background: var(--rule-on-dark);
}

.light-clock.on-dark .light-clock__label {
  color: var(--ink-on-dark-faint);
}

/* ============================================================
   Masthead
   ============================================================ */
.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 0.9rem var(--gutter);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    padding var(--dur) var(--ease);
}

/* Unscrolled, the bar floats over bright foliage. Its own gradient scrim
   keeps the links legible before .is-stuck supplies a solid ground. */
.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(12, 9, 5, 0.72), rgba(12, 9, 5, 0));
  opacity: 1;
  transition: opacity var(--dur) var(--ease);
}

.masthead.is-stuck::before {
  opacity: 0;
}

.masthead.is-stuck {
  background: rgba(20, 17, 13, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 28px rgba(0, 0, 0, 0.4);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.masthead__brand {
  flex-shrink: 0;
  line-height: 0;
}

.masthead__brand img {
  height: clamp(38px, 4.5vw, 52px);
  width: auto;
  transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}

.masthead.is-stuck .masthead__brand img {
  transform: scale(0.88);
}

.masthead__nav {
  margin-left: auto;
}

.masthead__nav ol {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.masthead__nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.42em;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: rgba(245, 239, 228, 0.86);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.masthead__nav .num {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--golden-hour);
  transition: color var(--dur) var(--ease);
}

.masthead__nav a:hover,
.masthead__nav a.is-active {
  background: rgba(245, 239, 228, 0.12);
  color: var(--late-light);
}

.masthead__nav a.is-active .num {
  color: var(--late-light);
}

.masthead__cta {
  flex-shrink: 0;
  padding: 0.55rem 1.25rem;
  border: 1.5px solid var(--golden-hour);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--late-light);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.masthead__cta:hover {
  background: var(--golden-hour);
  color: #241a05;
}

.masthead__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.masthead__toggle span {
  display: block;
  height: 1.5px;
  width: 22px;
  margin: 0 auto;
  background: var(--ink-on-dark);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.masthead__toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.masthead__toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* Mobile nav */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 17, 13, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.mobile-nav li + li {
  margin-top: 0.35rem;
}

.mobile-nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7em;
  padding: 0.5rem 1rem;
  font-size: 1.35rem;
  color: var(--ink-on-dark);
}

.mobile-nav .num {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--golden-hour);
  min-width: 1.5em;
  text-align: right;
}

/* ============================================================
   Opening
   ============================================================ */
.opening {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 8rem var(--gutter) clamp(3.5rem, 8vh, 6rem);
  overflow: hidden;
  background: var(--nightfall);
}

.opening__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  filter: saturate(1.08) contrast(1.03);
}

/* Golden hour is the premise: the photograph is graded warm, then a
   directional scrim carries the type. Multiply keeps the greens from
   going grey the way a flat black wash does. */
.opening__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      100deg,
      rgba(28, 18, 4, 0.9) 0%,
      rgba(34, 22, 5, 0.64) 42%,
      rgba(46, 30, 7, 0.24) 72%,
      rgba(120, 78, 16, 0.3) 100%
    ),
    linear-gradient(0deg, rgba(22, 14, 4, 0.88) 0%, rgba(22, 14, 4, 0) 58%);
}

.opening__scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 80% at 78% 26%,
    rgba(232, 201, 106, 0.26) 0%,
    rgba(201, 162, 39, 0.08) 38%,
    transparent 68%
  );
  mix-blend-mode: soft-light;
}

.opening__content {
  position: relative;
  max-width: var(--measure-wide);
  color: var(--ink-on-dark);
}

.opening .eyebrow {
  color: var(--late-light);
  /* Clear of the display swash below */
  margin-bottom: 1.1rem;
}

.opening__title {
  font-family: var(--font-display);
  /* One line at every width: Ballet's swash cannot wrap without the
     descender of line 1 crossing the ascender of line 2. */
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  line-height: 1;
  margin: 0 0 0.6rem;
  color: var(--paper-white);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

.opening__line {
  max-width: 34ch;
  margin-bottom: 2.1rem;
  font-size: clamp(1.05rem, 2.1vw, 1.3rem);
  line-height: 1.55;
  color: rgba(245, 239, 228, 0.94);
}

.opening__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.opening__hint {
  margin: 0 0 1.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 239, 228, 0.72);
}

.opening__hint span {
  position: relative;
  padding-left: 2.75rem;
}

.opening__hint span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2rem;
  height: 1px;
  background: var(--late-light);
  transform-origin: left;
  animation: hintPull 2.8s var(--ease) infinite;
}

@keyframes hintPull {
  0%,
  100% {
    transform: scaleX(0.35);
    opacity: 0.5;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .opening__hint span::before {
    animation: none;
    transform: scaleX(1);
  }
}

/* ============================================================
   Chapters — the promenade
   ============================================================ */
.chapter {
  position: relative;
  padding: var(--chapter-gap) var(--gutter);
  background: var(--ground-day);
  transition: background 0.8s var(--ease);
}

.chapter--dusk {
  background: var(--ground-dusk);
}

.chapter--evening {
  background: var(--ground-evening);
  color: var(--ink-on-dark);
}

.chapter--night {
  background: var(--ground-night);
  color: var(--ink-on-dark);
}

.chapter__head {
  display: flex;
  align-items: baseline;
  gap: clamp(0.85rem, 1.6vw, 1.4rem);
  margin: 0 0 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-rule);
}

/* Deep Amber, not Golden Hour: the numeral is a visible glyph, and gold
   measures 2.28:1 on linen and 1.88:1 on the 20h ground. */
.chapter__num {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  letter-spacing: 0.14em;
  color: var(--deep-amber);
  flex-shrink: 0;
  /* Aligns to the eyebrow's baseline, not the script's */
  transform: translateY(-0.15em);
}

.chapter--evening .chapter__num,
.chapter--night .chapter__num {
  color: var(--late-light);
}

.chapter__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  /* Ballet carries tall ascenders and deep descenders; 1.05 collides with
     the eyebrow above and the copy below. */
  line-height: 1.3;
  color: var(--ink);
}

/* One column owns the chapter; every child starts at the same left edge and
   the measure narrows from the right as the promenade goes inward. */
.chapter__inner {
  max-width: 1180px;
  margin-inline: auto;
}

.chapter__body {
  max-width: var(--measure-wide);
  margin: 0 0 3rem;
  padding-left: clamp(0rem, 1.6vw, 1.75rem);
}

.chapter__body .lede {
  margin-bottom: 1.35rem;
}

.chapter__body p:not(.lede) {
  color: var(--ink-soft);
}

/* One ground per hour, and the measure tightens at every threshold:
   the promenade gets closer and darker with each step inward. */
#chegada {
  background: var(--ground-17h);
}
#cerimonia {
  background: var(--ground-18h);
}
#arlivre {
  background: var(--ground-19h);
}

#chegada .chapter__body {
  max-width: var(--measure-wide);
}
#cerimonia .chapter__body {
  max-width: 58ch;
}
#arlivre .chapter__body,
#mesa .chapter__body {
  max-width: var(--measure-mid);
}
#salao .chapter__body {
  max-width: 52ch;
}
#noite .chapter__body {
  max-width: var(--measure-close);
}

/* Figures */
.chapter__figure {
  margin: 0;
}

.chapter__figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-ambient);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.chapter--evening .chapter__figure img,
.chapter--night .chapter__figure img {
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.5);
}

.chapter__figure figcaption {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.chapter__figure--wide img {
  aspect-ratio: 21 / 9;
}

.chapter__figure--hero img {
  aspect-ratio: 3 / 2;
  box-shadow: var(--shadow-lifted);
}

.chapter__figure--inset {
  max-width: 620px;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

.chapter__figure--inset img {
  aspect-ratio: 4 / 3;
}

.chapter__pair,
.chapter__trio {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.chapter__pair {
  grid-template-columns: repeat(2, 1fr);
}

.chapter__trio {
  grid-template-columns: repeat(3, 1fr);
}

.chapter__pair .chapter__figure img,
.chapter__trio .chapter__figure img {
  aspect-ratio: 4 / 3;
}

/* ------------------------------------------------------------
   Dark chapters re-tint every ink role from the same warm hue.
   Declared after the light rules so it wins on order as well as
   specificity — the caption rule below outranks .chapter__figure
   figcaption, which would otherwise leave dark ink on dark ground.
   ------------------------------------------------------------ */
.chapter--evening .eyebrow,
.chapter--night .eyebrow {
  color: var(--late-light);
}

.chapter--evening .lede,
.chapter--night .lede,
.chapter--evening .chapter__title,
.chapter--night .chapter__title {
  color: var(--ink-on-dark);
}

.chapter--evening .chapter__body p:not(.lede),
.chapter--night .chapter__body p:not(.lede) {
  color: var(--ink-on-dark-soft);
}

.chapter--evening .chapter__figure figcaption,
.chapter--night .chapter__figure figcaption {
  color: var(--ink-on-dark-faint);
}

.chapter--evening .chapter__head,
.chapter--night .chapter__head {
  border-top-color: var(--rule-on-dark);
}

/* Entrance: already visible by default, enhanced when JS confirms support */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   Close
   ============================================================ */
.close {
  padding: clamp(5rem, 11vw, 9rem) var(--gutter);
  background: var(--ground-night);
  color: var(--ink-on-dark);
  text-align: center;
}

.close .eyebrow {
  color: var(--late-light);
}

.close__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.28;
  margin-bottom: 0.9rem;
  color: var(--paper-white);
}

/* The one scannable block on the page: what actually happens here.
   Serves the organizer who has to forward facts to other people. */
.close__events {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  max-width: 46rem;
  margin: 1.4rem auto 2rem;
  padding: 0;
  list-style: none;
}

.close__events li {
  padding: 0.32rem 0.95rem;
  border: 1px solid var(--rule-on-dark);
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  color: var(--ink-on-dark-soft);
}

.close__line {
  max-width: 44ch;
  margin: 0 auto 2.4rem;
  color: var(--ink-on-dark-soft);
}

.close__alt {
  margin-top: 1.6rem;
  font-size: 0.92rem;
  color: var(--ink-on-dark-faint);
}

.close__alt a {
  color: var(--late-light);
  border-bottom: 1px solid rgba(232, 201, 106, 0.4);
}

.close__alt a:hover {
  color: var(--paper-white);
  border-bottom-color: var(--paper-white);
}

/* ============================================================
   Gallery
   ============================================================ */
.gallery-section {
  padding: clamp(4.5rem, 10vw, 8rem) var(--gutter);
  background: var(--ground-dusk);
}

.gallery-section__head {
  max-width: 1180px;
  margin: 0 auto 2.5rem;
}

.gallery-section__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.28;
}

.gallery {
  position: relative;
  max-width: 1180px;
  margin-inline: auto;
}

.gallery__viewport {
  border-radius: var(--radius);
  overflow: hidden;
  background: #100d08;
  box-shadow: var(--shadow-lifted);
}

.gallery__track {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: transform 0.75s var(--ease);
}

.gallery__slide {
  position: relative;
  flex: 0 0 100%;
  height: clamp(280px, 52vw, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* Each slide generates its own ambient surround from its own photograph */
.gallery__slide::before {
  content: "";
  position: absolute;
  inset: -24px;
  background: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.45) saturate(1.1);
}

.gallery__slide img,
.gallery__slide video {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(16, 13, 8, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--late-light);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.gallery__nav svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.gallery__nav:hover {
  background: var(--golden-hour);
  color: #241a05;
}

.gallery__nav--prev {
  left: 14px;
}

.gallery__nav--next {
  right: 14px;
}

.gallery__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.gallery__pause {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--ink-rule);
  border-radius: var(--radius-pill);
  background: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.gallery__pause:hover {
  border-color: var(--deep-amber);
  color: var(--ink);
}

.gallery__pause svg {
  width: 0.7em;
  height: 0.7em;
  fill: currentColor;
}

.gallery__pause .icon-play,
.gallery__pause[aria-pressed="true"] .icon-pause {
  display: none;
}

.gallery__pause[aria-pressed="true"] .icon-play {
  display: block;
}

.gallery__dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

/* 8px dot, 44px hit area — the target is the padding, not the mark */
.gallery__dot {
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.gallery__dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(26, 20, 10, 0.24);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.gallery__dot:hover::after {
  background: rgba(26, 20, 10, 0.45);
}

.gallery__dot.is-active::after {
  background: var(--golden-hour);
  transform: scale(1.35);
}

.gallery-section__follow {
  max-width: 1180px;
  margin: 1.75rem auto 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.gallery-section__follow a {
  border-bottom: 1px solid rgba(122, 92, 30, 0.35);
}

.gallery-section__follow a:hover {
  border-bottom-color: var(--nightfall);
}

/* ============================================================
   Address
   ============================================================ */
.address {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(4.5rem, 10vw, 8rem) var(--gutter);
}

.address__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.28;
  margin-bottom: 2rem;
}

.address__list {
  margin: 0;
}

.address__list > div {
  padding: 1rem 0;
  border-top: 1px solid var(--ink-rule);
}

.address__list > div:last-child {
  border-bottom: 1px solid var(--ink-rule);
}

.address__list dt {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.3rem;
}

.address__list dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.address__list dd a {
  border-bottom: 1px solid rgba(122, 92, 30, 0.3);
}

.address__list dd a:hover {
  border-bottom-color: var(--nightfall);
}

.address__map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
  aspect-ratio: 4 / 3;
}

.address__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding: clamp(3rem, 7vw, 5rem) var(--gutter) clamp(3rem, 7vw, 4.5rem);
  background: var(--ground-night);
  color: var(--ink-on-dark-faint);
  text-align: center;
}

.site-footer__mark {
  width: 46px;
  height: 46px;
  margin: 0 auto 1rem;
  opacity: 0.85;
}

.site-footer__name {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--ink-on-dark);
}

.site-footer__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.82rem;
}

.site-footer__meta a {
  color: var(--late-light);
}

.site-footer__meta a:hover {
  color: var(--paper-white);
}

/* ============================================================
   Mobile action bar
   ============================================================ */
.action-bar {
  display: none;
  position: fixed;
  inset: auto 0 0;
  z-index: 90;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(16, 13, 8, 0.94), rgba(16, 13, 8, 0.72));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.action-bar__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.action-bar__btn svg {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
}

.action-bar__btn:hover {
  opacity: 0.9;
  color: #fff;
}

.action-bar__btn:active {
  transform: scale(0.98);
}

/* Platform identity, deepened only as far as legibility requires: the
   Instagram gradient keeps its hue sweep under a scrim (weakest stop 4.76:1)
   and the green is WhatsApp's own dark tone (5.08:1). */
.action-bar__btn--instagram {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.action-bar__btn--whatsapp {
  background: #0f7f42;
}

/* ============================================================
   Responsive
   ============================================================ */
/* Below 1100px the vertical clock has no margin to live in, so the hour
   moves into the chapter head — the descent stays visible on the phone,
   which is where most of this audience reads. */
@media (max-width: 1100px) {
  .light-clock {
    display: none;
  }

  .chapter__head::after {
    content: attr(data-hour);
    margin-left: auto;
    align-self: flex-start;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--deep-amber);
    font-variant-numeric: tabular-nums;
  }

  .chapter--evening .chapter__head::after,
  .chapter--night .chapter__head::after {
    color: var(--late-light);
  }
}

@media (max-width: 960px) {
  .masthead__nav,
  .masthead__cta {
    display: none;
  }

  .masthead__toggle {
    display: flex;
  }

  .chapter__trio {
    grid-template-columns: repeat(2, 1fr);
  }

  .chapter__trio .chapter__figure:first-child {
    grid-column: 1 / -1;
  }

  .chapter__trio .chapter__figure:first-child img {
    aspect-ratio: 16 / 9;
  }

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

  .address__map {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 1rem;
    padding-bottom: 70px;
  }

  .action-bar {
    display: flex;
  }

  .chapter__head {
    gap: 0.9rem;
    margin-bottom: 1.85rem;
  }

  .chapter__body {
    padding-left: 0;
    margin-bottom: 2.25rem;
  }

  .chapter__pair,
  .chapter__trio {
    grid-template-columns: 1fr;
  }

  .chapter__trio .chapter__figure:first-child img {
    aspect-ratio: 4 / 3;
  }

  .chapter__figure--wide img {
    aspect-ratio: 4 / 3;
  }

  .chapter__figure--hero img {
    aspect-ratio: 4 / 3;
  }

  .opening {
    padding-top: 6.5rem;
  }

  .opening__actions .btn {
    flex: 1 1 100%;
  }

  .opening__hint {
    margin-bottom: 1.1rem;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }

  /* "Seis passos" alone on the phone; the full line needs two rows */
  .opening__hint-long {
    display: none;
  }

  .opening__hint span {
    padding-left: 2rem;
  }

  .opening__hint span::before {
    width: 1.4rem;
  }

  /* Deepen the lower scrim so the tagline never lands on a bright patch */
  .opening__scrim {
    background: linear-gradient(
        100deg,
        rgba(28, 18, 4, 0.78) 0%,
        rgba(34, 22, 5, 0.5) 55%,
        rgba(46, 30, 7, 0.34) 100%
      ),
      linear-gradient(0deg, rgba(22, 14, 4, 0.94) 0%, rgba(22, 14, 4, 0.55) 38%, rgba(22, 14, 4, 0) 68%);
  }

  .gallery__nav {
    width: 42px;
    height: 42px;
  }

  .gallery__nav--prev {
    left: 8px;
  }

  .gallery__nav--next {
    right: 8px;
  }
}

@media (min-width: 721px) {
  .action-bar {
    display: none !important;
  }
}

@media print {
  .masthead,
  .light-clock,
  .action-bar,
  .gallery__nav {
    display: none !important;
  }
}
