/* =============================================================
   MARGARIDO'S · style.css
   Brand identity: Aged Gold #B08770 · Coal #262624
   Typography (per brand manual, Março 2021):
     · Primary:   Wotfard
     · Secondary: Montserrat  (loaded from Google Fonts as fallback)
     · Display:   Cormorant Garamond  (pairing for italic headings)
   ============================================================= */

/* ── @font-face · Wotfard (primary, brand spec) ──────────────
   Drop the licensed files into Assets/fonts/ using these names
   (or update the URLs below to match your filenames):
     wotfard-light.woff2       (300)
     wotfard-regular.woff2     (400)
     wotfard-medium.woff2      (500)
     wotfard-semibold.woff2    (600)
     wotfard-bold.woff2        (700)
   font-display:swap keeps Montserrat visible until Wotfard loads,
   so the page never blanks or jumps. */
@font-face {
  font-family: 'Wotfard';
  font-style:  normal;
  font-weight: 300;
  font-display: swap;
  src: url('Assets/fonts/wotfard-light.woff2')      format('woff2'),
       url('Assets/fonts/wotfard-light.woff')       format('woff');
}
@font-face {
  font-family: 'Wotfard';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url('Assets/fonts/wotfard-regular.woff2')    format('woff2'),
       url('Assets/fonts/wotfard-regular.woff')     format('woff');
}
@font-face {
  font-family: 'Wotfard';
  font-style:  normal;
  font-weight: 500;
  font-display: swap;
  src: url('Assets/fonts/wotfard-medium.woff2')     format('woff2'),
       url('Assets/fonts/wotfard-medium.woff')      format('woff');
}
@font-face {
  font-family: 'Wotfard';
  font-style:  normal;
  font-weight: 600;
  font-display: swap;
  src: url('Assets/fonts/wotfard-semibold.woff2')   format('woff2'),
       url('Assets/fonts/wotfard-semibold.woff')    format('woff');
}
@font-face {
  font-family: 'Wotfard';
  font-style:  normal;
  font-weight: 700;
  font-display: swap;
  src: url('Assets/fonts/wotfard-bold.woff2')       format('woff2'),
       url('Assets/fonts/wotfard-bold.woff')        format('woff');
}

/* ── Custom Properties ──────────────────────────────────────────────
   Brand colours (Manual de Identidade da Marca, Março 2021):
     · Aged Gold  #B08770   PANTONE 876
     · Coal       #262624   PANTONE BLACK 3
   Plus pure white from the logo's "white-on-coal" usage.
   Every other value below is a derivative of one of these three.
   ────────────────────────────────────────────────────────────────── */
:root {
  /* Brand · Aged Gold */
  --gold:         #B08770;   /* primary brand colour */
  --gold-deep:    #8E6A56;   /* darker tint — hover/active states */
  --gold-soft:    #D4B49E;   /* lighter tint — secondary accents */
  --gold-pale:    #EAD9CC;   /* pale tint — hairline borders */

  /* Brand · Coal */
  --coal:         #262624;   /* primary brand colour */
  --coal-mid:     #3A3835;   /* slightly lifted coal */
  --coal-soft:    #5A5651;   /* lifted coal for inactive UI */

  /* Brand · White (logo-on-coal) & warm tinted surfaces */
  --white:        #FFFFFF;   /* pure brand white — text on coal */
  --cream:        #FAF6F1;   /* warm cream — page backgrounds */
  --cream-warm:   #F2EBE0;   /* slightly warmer cream — section bg */
  --paper:        #FFFFFF;   /* alias of --white for cards/surfaces */

  /* Text tokens (all derived from brand colours) */
  --text:         #262624;                   /* = Coal */
  --text-muted:   #6E6963;                   /* warm desaturated tint of coal */
  --text-light:   rgba(255, 255, 255, 0.72); /* white at 72% — body on coal */
  --text-light-2: rgba(255, 255, 255, 0.5);  /* white at 50% — captions */

  --serif:        'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sans:         'Wotfard', 'Montserrat', system-ui, -apple-system, sans-serif;

  --gap:          clamp(80px, 11vw, 160px);
  --pad:          clamp(24px, 5vw, 80px);
  --max:          1320px;

  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --dur:          0.6s;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family:   var(--sans);
  font-weight:   400;
  font-size:     1rem;
  line-height:   1.7;
  color:         var(--text);
  background:    var(--cream);
  overflow-x:    hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img        { display: block; max-width: 100%; height: auto; }
a          { text-decoration: none; color: inherit; transition: color 0.3s var(--ease); }
ul, ol     { list-style: none; }
button     { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
blockquote { font-style: normal; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width:  var(--max);
  margin:     0 auto;
  padding:    0 var(--pad);
}

/* ── Typography utilities ────────────────────────────────────── */
.eyebrow {
  font-family:    var(--sans);
  font-weight:    500;
  font-size:      0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color:          var(--gold);
  margin-bottom:  1.5rem;
  display:        block;
}
.eyebrow-light { color: var(--gold-soft); }
.eyebrow-gold  { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color:       var(--text);
  letter-spacing: -0.01em;
}

.section-header {
  text-align:    center;
  max-width:     760px;
  margin:        0 auto clamp(56px, 7vw, 96px);
}
.section-header h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size:   clamp(2.1rem, 4.2vw, 3.6rem);
  line-height: 1.12;
  color:       var(--text);
  font-style:  italic;
}
.section-header h2 em {
  font-style: normal;
  color: var(--gold);
}
.section-sub {
  font-size:   1.0625rem;
  line-height: 1.7;
  color:       var(--text-muted);
  margin-top:  1.5rem;
  font-weight: 300;
}
.section-header-light h2 { color: var(--white); }
.section-sub-light       { color: var(--text-light); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-outline, .btn-ghost, .btn-solid {
  display:        inline-flex;
  align-items:    center;
  justify-content:center;
  gap:            0.6em;
  padding:        0.95rem 2.2rem;
  font-family:    var(--sans);
  font-size:      0.74rem;
  font-weight:    600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition:     all 0.35s var(--ease);
  cursor:         pointer;
  border-radius:  0;
  white-space:    nowrap;
}
.btn-outline {
  color:        var(--white);
  border:       1px solid rgba(255,255,255,0.5);
  background:   transparent;
}
.btn-outline:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-ghost {
  color:        var(--coal);
  border:       1px solid var(--coal);
  background:   transparent;
}
.btn-ghost:hover {
  background: var(--coal);
  color: var(--cream);
}
.btn-solid {
  color:      var(--white);
  background: var(--gold);
  border:     1px solid var(--gold);
}
.btn-solid:hover {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
}

/* ── Scroll Reveal ──────────────────────────────────────────── */
.reveal {
  opacity:    0;
  transform:  translateY(28px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* =============================================================
   NAVIGATION
   ============================================================= */
#nav {
  position:   fixed;
  top:        0;
  left:       0;
  right:      0;
  z-index:    1000;
  padding:    18px 0;
  background: transparent;
  /* Só transiciona propriedades baratas — nunca o backdrop-filter, cuja
     animação (blur → none) ao abrir o menu causava estremecimento. */
  transition: background 0.45s var(--ease), padding 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
#nav.scrolled {
  background: rgba(38, 38, 36, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding:    12px 0;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.nav-inner {
  max-width:      var(--max);
  margin:         0 auto;
  padding:        0 var(--pad);
  display:        flex;
  align-items:    center;
  justify-content:space-between;
  gap:            24px;
  position:       relative;
  z-index:        2;
}
.nav-logo {
  display:     flex;
  align-items: center;
  gap:         14px;
  color:       var(--white);
  transition:  opacity 0.3s var(--ease);
}
.nav-logo:hover { opacity: 0.85; }
.nav-logo .nav-brand-mark {
  height: 50px;
  width:  auto;
  display: block;
  transition: height 0.35s var(--ease);
  filter:
    drop-shadow(0.3px 0 0 var(--gold))
    drop-shadow(-0.3px 0 0 var(--gold))
    drop-shadow(0 0.3px 0 var(--gold))
    drop-shadow(0 -0.3px 0 var(--gold));
}
.nav-logo .nav-wordmark-img {
  height: 38px;
  width:  auto;
  display: block;
  transition: height 0.35s var(--ease);
}
.nav-links {
  display: flex;
  gap:     2rem;
  align-items: center;
}
.nav-link {
  font-family:    var(--sans);
  font-size:      0.72rem;
  font-weight:    500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color:          var(--white);
  position:       relative;
  padding:        6px 0;
  white-space:    nowrap;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.4s var(--ease);
}
.nav-link:hover::after { width: 100%; }

#nav-cta {
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
  padding: 0.7rem 1.6rem;
  font-size: 0.7rem;
}
#nav-cta:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.nav-toggle {
  display: none;
  width:   30px;
  height:  24px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  position: relative;
}
.nav-toggle span {
  display: block;
  width:   100%;
  height:  1.5px;
  background: var(--white);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--coal);
  padding: 110px var(--pad) 40px;
  transform: translateY(-100%);
  transition: transform 0.45s var(--ease);
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-menu.open { transform: translateY(0); }

/* When the mobile menu is open, the nav becomes one continuous coal panel
   so the logo + close X read as the menu's header rather than a floating bar. */
#nav:has(.mobile-menu.open) {
  background: var(--coal);
  box-shadow: none;
  /* Sem backdrop-filter aqui: ele criaria um containing block que faria o
     .mobile-menu (position:fixed) colapsar para a altura do nav ao rolar. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Trava o scroll do fundo enquanto o menu mobile está aberto. */
body.menu-open { overflow: hidden; }
.mobile-menu::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url('Assets/brand-mark-margaridos.svg'),
    url('Assets/brand-mark-margaridos.svg');
  background-size: 90px 90px;
  background-position: 0 0, 45px 45px;
  background-repeat: repeat;
  opacity: 0.1;
  pointer-events: none;
}
.mobile-menu ul {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}
.mobile-menu a {
  display: block;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  padding: 1.1rem 0;
  transition: color 0.3s var(--ease);
}
.mobile-menu a:hover { color: var(--gold); }

/* CTA do menu mobile — botão (sobrepõe-se à regra .mobile-menu a). */
.mobile-menu .mobile-cta {
  position: relative;
  align-self: flex-start;
  margin-top: 2.4rem;
  display: inline-flex;
  align-items: center;
  padding: 0.95rem 2.4rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--white);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.mobile-menu .mobile-cta:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

/* =============================================================
   HERO
   ============================================================= */
#hero {
  position: relative;
  height:   100vh;
  min-height: 640px;
  display:  flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--coal);
}
.hero-bg, .hero-bg-fallback {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
  transform: scale(1.06);
}
#hero.loaded .hero-bg,
#hero.loaded .hero-bg-fallback {
  opacity: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 78% 62% at 50% 50%, rgba(38,38,36,0.5) 0%, rgba(38,38,36,0.32) 50%, rgba(38,38,36,0.16) 100%),
    linear-gradient(180deg, rgba(38,38,36,0.28) 0%, rgba(38,38,36,0.2) 35%, rgba(38,38,36,0.62) 100%);
  z-index: 1;
}
.hero-bg-fallback {
  object-position: center 35%;
}
.hero-content h1,
.hero-content .hero-sub,
.hero-content .eyebrow {
  text-shadow: 0 2px 24px rgba(38, 38, 36, 0.85), 0 1px 6px rgba(38, 38, 36, 0.55); /* coal-tinted halo */
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 var(--pad);
  color: var(--white);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s var(--ease-out) 0.3s, transform 1.2s var(--ease-out) 0.3s;
}
#hero.loaded .hero-content { opacity: 1; transform: translateY(0); }

.hero-content h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.8rem, 7.5vw, 6rem);
  line-height: 1.02;
  color: var(--white);
  margin-bottom: 1.6rem;
  white-space: pre-line;
  letter-spacing: -0.015em;
}
.hero-sub {
  font-size: clamp(0.95rem, 1.3vw, 1.125rem);
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255,255,255,0.78);
  max-width: 580px;
  margin: 0 auto 2.8rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.6s var(--ease) 1.5s;
}
#hero.loaded .scroll-indicator { opacity: 1; }
.scroll-line {
  width: 1px; height: 48px;
  background: rgba(255,255,255,0.4);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: 50%;
  background: var(--gold);
  animation: scrollDown 2.2s var(--ease) infinite;
}
@keyframes scrollDown {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}
.scroll-indicator span {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.hero-loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: var(--coal);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}
.hero-loader.done { opacity: 0; visibility: hidden; }
.hero-loader span {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(176,135,112,0.2);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================
   HISTÓRIA · Intro + Timeline
   ============================================================= */
#historia {
  padding: var(--gap) 0;
  background: var(--cream);
  position: relative;
}
.historia-intro {
  max-width: 780px;
  margin: 0 auto clamp(48px, 6vw, 80px);
  text-align: center;
}
.historia-intro blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.18;
  color: var(--coal);
  margin: 0.5rem 0 2rem;
  white-space: pre-line;
  letter-spacing: -0.01em;
}
.historia-body p {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-weight: 300;
}
.historia-closing {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--gold);
  margin-top: 2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.historia-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0 auto clamp(24px, 3vw, 48px);
  max-width: 920px;
}
.stat-item {
  position: relative;
  padding: 2.4rem 1.4rem;
  text-align: center;
}
/* Subtle short divider between columns — no outer frame, blends into the page. */
.stat-item + .stat-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 48%;
  background: var(--gold-pale);
  opacity: 0.7;
}
.stat-value {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  line-height: 1;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.stat-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Timeline · Linha do tempo editorial ─── */
.timeline-wrap {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 0 0;
}

/* ── Stage: line at centre; photo + info glide above/below it ──── */
.htl-stage {
  position: relative;
  height: clamp(450px, 50vw, 510px);
  /* Clip the oversized ghost year so it never triggers horizontal scroll. */
  overflow: hidden;
}

/* The timeline line, fixed at the vertical centre */
.htl-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--coal);
  opacity: 0.8;
  transform: translateY(-50%);
  pointer-events: none;
}
/* Gold fill that grows along the line up to the active year */
.htl-line-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 2px;
  width: 0;
  background: var(--gold);
  transform: translateY(-50%);
  transition: width 0.8s var(--ease-out);
  pointer-events: none;
  z-index: 1;
}

/* One dot per era; the marker travels and leaves a filled trail behind */
.htl-tdots {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 1;
  pointer-events: none;
}
.htl-tdot {
  position: absolute;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--gold-soft);
  transform: translate(-50%, -50%);
  transition: width 0.45s var(--ease), height 0.45s var(--ease),
              background 0.45s var(--ease), border-color 0.45s var(--ease),
              box-shadow 0.45s var(--ease);
}
.htl-tdot.is-past {
  background: var(--gold);
  border-color: var(--gold);
}
.htl-tdot.is-current {
  width: 15px;
  height: 15px;
  background: var(--coal);
  border-color: var(--coal);
  box-shadow: 0 0 0 5px var(--cream), 0 0 0 6px var(--coal);
}

/* ── Travelling photo — glides horizontally AND flips above/below ── */
.htl-traveler {
  position: absolute;
  left: var(--htl-x, 50%);     /* JS sets --htl-x to the active dot's % */
  top: 50%;                    /* origin sits on the line */
  transform: translateX(-50%);
  transition: left 0.8s var(--ease-out);
  pointer-events: none;
}
.htl-photo {
  position: absolute;
  left: 50%;
  top: 0;
  /* default (even eras): ABOVE the line, bottom 16px clear of it */
  transform: translate(-50%, calc(-100% - 16px));
  margin: 0;
  /* Adaptive card: fixed height, width follows each photo's aspect ratio
     (set by JS on load). Square fallback for empty eras / before load. */
  height: clamp(150px, 19vw, 220px);
  aspect-ratio: 1 / 1;
  width: auto;
  max-width: min(86vw, 340px);
  border-radius: clamp(16px, 2vw, 24px);
  overflow: hidden;
  background: var(--coal);
  box-shadow: 0 24px 52px -22px rgba(38,38,36,0.5);
  opacity: 0;
  visibility: hidden;
  z-index: 2;
  pointer-events: auto;
  transition: transform 0.8s var(--ease-out),
              opacity 0.7s var(--ease-out),
              visibility 0s linear 0.7s;
}
.htl-photo.is-active {
  opacity: 1;
  visibility: visible;
  transition: transform 0.8s var(--ease-out),
              opacity 0.7s var(--ease-out),
              visibility 0s;
}
.htl-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* card already matches the photo's ratio → no crop, no bars */
  /* Warm gold treatment unifies the B&W and colour archival photos. */
  filter: grayscale(0.5) sepia(0.26) saturate(1.12) contrast(1.02) brightness(0.94);
  transform: scale(1);
  transition: filter 0.9s var(--ease);
}
.htl-photo.is-active .htl-photo-img { animation: htlKenburns 9s var(--ease) forwards; }
.htl-photo:hover .htl-photo-img {
  filter: grayscale(0) sepia(0) saturate(1.05) contrast(1) brightness(1);
}
@keyframes htlKenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

/* Eras without a photo show no card at all — only the line, text and ghost year. */
.htl-photo.is-empty {
  display: none;
}

/* ── Info (text + ghost year) — sits below the line, opposite the photo ── */
.htl-info {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: clamp(180px, 21vw, 235px);
  transform: translateY(16px);   /* just below the line */
}

.htl-text {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* vertically centred to line up with the ghost year */
  align-items: flex-start;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s var(--ease-out), visibility 0s linear 0.7s;
}
.htl-text.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s var(--ease-out), visibility 0s;
}
.htl-pill {
  display: inline-block;
  background: var(--coal);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.4em 1.05em;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.htl-text-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.12;
  color: var(--coal);
  margin-bottom: 0.7rem;
}
.htl-text-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 520px;
}

/* Giant year — backdrop below the line, behind the text */
.htl-ghostlayer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.htl-ghost {
  position: absolute;
  right: clamp(8px, 3vw, 56px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(6rem, 13vw, 11rem);
  line-height: 0.8;
  color: var(--coal);
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.7s var(--ease-out);
}
.htl-ghost.is-active { opacity: 0.08; }

/* ── Controls · arrows + segmented progress ───────────────── */
.htl-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 44px);
  margin-top: clamp(18px, 3vw, 34px);
}
.htl-arrow {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--coal);
  background: transparent;
  color: var(--coal);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease);
}
.htl-arrow svg { width: 18px; height: 18px; }
.htl-arrow:hover {
  background: var(--coal);
  color: var(--cream);
}
.htl-segments {
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.htl-segment {
  position: relative;
  width: 24px;
  height: 4px;
  border: none;
  border-radius: 2px;
  padding: 0;
  background: var(--gold-pale);
  cursor: pointer;
  overflow: hidden;
  transition: width 0.4s var(--ease), background 0.3s var(--ease);
}
.htl-segment:hover { background: var(--gold-soft); }
.htl-segment.is-active { width: 44px; }
.htl-segment-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--coal);
  border-radius: 2px;
}
.htl-segment:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .htl-segment.is-active .htl-segment-fill { width: 100%; }
}

/* =============================================================
   PRODUTOS · Grid de categorias
   ============================================================= */
#produtos {
  padding: var(--gap) 0;
  background: var(--cream-warm);
  position: relative;
}
.produtos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 36px);
}
.produto-card {
  position: relative;
  background: var(--coal);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  cursor: default;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.produto-card.visible { opacity: 1; transform: translateY(0); }

.produto-card .produto-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 1.2s var(--ease), filter 1.2s var(--ease);
  filter: brightness(0.78) saturate(0.95);
}
.produto-card:hover .produto-img {
  transform: scale(1.06);
  filter: brightness(0.55) saturate(0.95);
}
.produto-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(38,38,36,0.15) 0%,
    rgba(38,38,36,0.25) 45%,
    rgba(38,38,36,0.92) 100%);
  z-index: 1;
  transition: opacity 0.6s var(--ease);
}
.produto-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: clamp(20px, 3vw, 34px);
  color: var(--white);
}
.produto-name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.1;
  margin-bottom: 0.4rem;
  color: var(--white);
}
.produto-tagline {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 1rem;
}
.produto-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.82);
  font-weight: 300;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.6s var(--ease), opacity 0.6s var(--ease), margin 0.6s var(--ease);
}
.produto-card:hover .produto-desc {
  max-height: 220px;
  opacity: 1;
  margin-top: 0;
}
.produto-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  background: var(--gold);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 6px 12px;
}

/* =============================================================
   DISTINÇÕES · Awards (dark section)
   ============================================================= */
#distincoes {
  padding: var(--gap) 0;
  background: var(--coal);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
#distincoes::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url('Assets/brand-mark-margaridos.svg'),
    url('Assets/brand-mark-margaridos.svg');
  background-size: 100px 100px;
  background-position: 0 0, 50px 50px;
  background-repeat: repeat;
  opacity: 0.08;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent 0%, black 25%, black 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 25%, black 75%, transparent 100%);
}
#distincoes .container { position: relative; z-index: 1; }

/* Cabeçalho mais próximo dos cartões — deixa os controlos à vista sem scroll. */
#distincoes .section-header { margin-bottom: clamp(36px, 4.5vw, 60px); }

/* Carrossel — trilho horizontal com scroll-snap (swipe nativo em mobile). */
.awards-carousel {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
}
.awards-track {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 4px;
  margin: 0 -4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;            /* Firefox */
}
.awards-track::-webkit-scrollbar { display: none; }

/* Quando todas as distinções cabem sem scroll, centra e dispensa controlos. */
.awards-carousel.is-static .awards-track { justify-content: center; }
.awards-carousel.is-static .awards-controls { display: none; }

.award-card {
  position: relative;
  flex: 0 0 clamp(258px, 30%, 340px);
  scroll-snap-align: start;
  box-sizing: border-box;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid rgba(176,135,112,0.25);
  background: rgba(255,255,255,0.02);
  text-align: left;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.award-card.visible { opacity: 1; transform: translateY(0); }
.award-card:hover {
  border-color: var(--gold);
  background: rgba(176,135,112,0.05);
}
.award-icon {
  width: 48px; height: 48px;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(176,135,112,0.12);
  color: var(--gold);
}
.award-icon svg { width: 24px; height: 24px; }
.award-year {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}
.award-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 0.8rem;
}
.award-product {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-light);
  font-weight: 300;
}

/* Controlos do carrossel — setas e pontos. */
.awards-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: clamp(28px, 3.5vw, 44px);
}
.awards-arrow {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(176,135,112,0.35);
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), opacity 0.3s var(--ease);
}
.awards-arrow svg { width: 20px; height: 20px; }
.awards-arrow:hover { border-color: var(--gold); background: rgba(176,135,112,0.12); }
.awards-arrow:disabled { opacity: 0.3; cursor: default; }

.awards-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}
.awards-dot {
  width: 8px; height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.awards-dot:hover { background: rgba(255,255,255,0.5); }
.awards-dot.is-active { background: var(--gold); transform: scale(1.4); }

.awards-footnote {
  text-align: center;
  margin-top: clamp(40px, 5vw, 64px);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold-soft);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================================
   MANIFESTO · Pillars grid
   ============================================================= */
#manifesto {
  padding: var(--gap) 0;
  background: var(--coal);
  color: var(--white);
  position: relative;
}

/* ── Manifesto · Visão (citação) ── */
/* Reduz o espaço entre o título e os blocos do manifesto. */
#manifesto .section-header:not(.manifesto-pillars-header) {
  margin-bottom: clamp(32px, 4vw, 56px);
}

/* Missão e Visão — blocos paralelos, mesmo estilo discreto, com rótulo dourado.
   Um só título protagonista; o resto subordinado e calmo. */
.manifesto-statements {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.manifesto-block + .manifesto-block { margin-top: clamp(32px, 4vw, 52px); }
.manifesto-block .eyebrow { margin-bottom: 0.9rem; }
.manifesto-text {
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 300;
  color: var(--text-light);
}

/* ── Manifesto · Valores (chips) ── */
.values-block {
  max-width: 920px;
  margin: clamp(48px, 6vw, 80px) auto 0;
  text-align: center;
}
.values-label { margin-bottom: 1.8rem; }
.values-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  max-width: 940px;
  margin: 0 auto;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.05rem, 1.5vw, 1.45rem);
  line-height: 1.7;
  color: var(--white);
}
.value-word { display: inline-flex; align-items: baseline; }
.value-word:not(:last-child)::after {
  content: '·';
  color: var(--gold);
  font-style: normal;
  margin: 0 clamp(0.5rem, 1vw, 0.85rem);
}

/* Separa o segundo movimento (pilares) do manifesto. */
.manifesto-pillars-header { margin-top: clamp(72px, 9vw, 128px); }

/* ── Manifesto · Pilares (tema escuro) ── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
  max-width: 1040px;
  margin: 0 auto;
}
.pillar-card {
  background: rgba(255,255,255,0.02);
  padding: clamp(18px, 2.1vw, 26px);
  border: 1px solid rgba(176,135,112,0.25);
  text-align: left;
  position: relative;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.pillar-card.visible { opacity: 1; transform: translateY(0); }
.pillar-card:hover {
  border-color: var(--gold);
  background: rgba(176,135,112,0.05);
  transform: translateY(-4px);
}
.pillar-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}
.pillar-icon {
  width: 34px; height: 34px;
  flex-shrink: 0;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pillar-icon svg { width: 100%; height: 100%; }
.pillar-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--white);
  line-height: 1.2;
}
.pillar-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-light);
  font-weight: 300;
}

/* =============================================================
   TESTEMUNHOS
   ============================================================= */
#testimonials {
  padding: var(--gap) 0;
  background: var(--coal);
  color: var(--white);
  position: relative;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 36px);
  max-width: 1240px;
  margin: 0 auto;
}
.testimonial-card {
  position: relative;
  padding: clamp(28px, 3.5vw, 44px);
  border: 1px solid rgba(176,135,112,0.25);
  background: rgba(255,255,255,0.02);
  text-align: left;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.testimonial-card.visible { opacity: 1; transform: translateY(0); }
.testimonial-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 4.5rem;
  line-height: 0.6;
  color: var(--gold);
  display: block;
  margin-bottom: 1.2rem;
  height: 30px;
}
.testimonial-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.88);
  margin-bottom: 1.8rem;
  font-weight: 400;
}
.testimonial-footer {
  border-top: 1px solid rgba(176,135,112,0.25);
  padding-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.testimonial-author {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.02em;
}
.testimonial-role {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.testimonials-note {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light-2);
  font-weight: 500;
}

/* =============================================================
   CONTACTOS / FOOTER
   ============================================================= */
#contacto {
  background: var(--cream);
  padding: var(--gap) 0 0;
  color: var(--text);
}
.contact-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(48px, 6vw, 80px);
}
.contact-header h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.15;
  color: var(--coal);
}
.contact-sub {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-top: 1.4rem;
  font-weight: 300;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: stretch;
}
.contact-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}
.info-block {
  border-left: 2px solid var(--gold);
  padding-left: 1.2rem;
}
.info-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.info-block p {
  font-size: 0.98rem;
  color: var(--coal);
  font-weight: 400;
  line-height: 1.55;
}
.info-block a:hover { color: var(--gold); }

.contact-social {
  display: flex;
  gap: 12px;
}
.contact-social a {
  width: 44px; height: 44px;
  border: 1px solid var(--coal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--coal);
  transition: all 0.35s var(--ease);
}
.contact-social a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}
.contact-social svg { width: 18px; height: 18px; }

.contact-map {
  min-height: 380px;
  background: var(--cream-warm);
  position: relative;
}
.contact-map iframe {
  width: 100%; height: 100%;
  min-height: 380px;
  border: 0;
  filter: grayscale(0.4) contrast(0.95) sepia(0.08);
}

.contact-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  color: var(--gold);
  text-align: center;
  margin: clamp(64px, 8vw, 100px) 0 clamp(40px, 5vw, 64px);
  letter-spacing: 0.01em;
}

.footer-partner {
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-partner img {
  display: block;
  height: clamp(15px, 1.6vw, 19px);
  width: auto;
}

.footer-bar {
  border-top: 1px solid var(--gold-pale);
  padding: 1.8rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1.6rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}
#footer-copy { text-align: left; }
#footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}
#footer-links a:hover { color: var(--gold); }
#footer-credit {
  text-align: right;
  color: var(--text-muted);
}
#footer-credit a {
  color: var(--gold);
  font-weight: 500;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1180px) {
  .nav-inner { gap: 18px; }
  .nav-links { gap: 1.5rem; }
  .nav-link  { font-size: 0.68rem; letter-spacing: 0.16em; }
  #nav-cta   { padding: 0.65rem 1.3rem; font-size: 0.66rem; letter-spacing: 0.18em; }
}

@media (max-width: 1024px) {
  .produtos-grid,
  .pillars-grid,
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Timeline · tablet portrait & below — stack photo over text */
@media (max-width: 860px) {
  /* Empilhado: TEXTO em cima, foto em baixo — sem linha nem dots.
     Anos sem foto encolhem o palco (classe .is-photoless via JS), evitando
     o vão que sobrava quando a foto ficava por cima. */
  .htl-line, .htl-line-fill, .htl-tdots { display: none; }

  .htl-stage {
    --htl-info-h:  clamp(190px, 50vw, 250px);
    --htl-photo-h: clamp(180px, 56vw, 280px);
    height: calc(var(--htl-info-h) + 28px + var(--htl-photo-h));
    transition: height 0.5s var(--ease);
  }
  .timeline-wrap.is-photoless .htl-stage { height: var(--htl-info-h); }

  /* Texto + ano fantasma no topo */
  .htl-info {
    top: 0;
    bottom: auto;
    height: var(--htl-info-h);
    transform: none;
    text-align: center;
  }
  .htl-ghost {
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    font-size: clamp(5rem, 26vw, 9rem);
  }
  .htl-text { align-items: center; }
  .htl-text-body { max-width: 460px; margin-left: auto; margin-right: auto; }

  /* Foto por baixo da info */
  .htl-traveler { left: 50%; top: calc(var(--htl-info-h) + 28px); }
  .htl-photo {
    top: 0;
    transform: translate(-50%, 0);
    height: var(--htl-photo-h);
    width: auto;
    max-width: 86vw;
  }

  .htl-arrow { width: 40px; height: 40px; }
  .htl-arrow svg { width: 16px; height: 16px; }
}

@media (max-width: 960px) {
  .nav-links { gap: 1.15rem; }
  .nav-link  { font-size: 0.66rem; letter-spacing: 0.14em; }
  .nav-logo .nav-brand-mark { height: 42px; }
  .nav-logo .nav-wordmark-img { height: 32px; }
}

@media (max-width: 820px) {
  .nav-links, #nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-logo .nav-brand-mark { height: 44px; }
  .nav-logo .nav-wordmark-img { height: 33px; }

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

  .pillars-grid,
  .testimonials-grid { grid-template-columns: 1fr; }
  /* Produtos ficam a 2 colunas no tablet (a foto a largura toda ficava enorme). */

  /* Touch (tablet e abaixo): a descrição aparece sempre, sem depender de hover. */
  .produto-desc { max-height: 220px; opacity: 1; margin-top: 0; }

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

  .footer-bar {
    flex-direction: column;
    text-align: center;
  }
  #footer-copy, #footer-credit { text-align: center; }
}

@media (max-width: 600px) {
  .nav-logo .nav-brand-mark { height: 38px; }
  .nav-logo .nav-wordmark-img { height: 28px; }

  .historia-stats { grid-template-columns: repeat(3, 1fr); }
  .stat-item { padding: 1.4rem 0.5rem; }
  .stat-value { font-size: clamp(1.7rem, 7vw, 2.3rem); }
  .stat-label { font-size: 0.58rem; letter-spacing: 0.14em; }

  /* Timeline · keep the 12 progress segments from overflowing narrow phones */
  .htl-controls { gap: 12px; }
  .htl-segments { gap: 4px; }
  .htl-segment { width: 13px; }
  .htl-segment.is-active { width: 24px; }
  .htl-arrow { width: 36px; height: 36px; }

  .produtos-grid { grid-template-columns: 1fr; }
  .produto-card { aspect-ratio: 4 / 5; }
}

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

/* =============================================================
   LEGAL PAGE · politica-de-privacidade.html
   ============================================================= */
body.legal-page,
body.links-page,
body.error-page {
  background: var(--cream);
}

/* =============================================================
   404 PAGE · 404.html
   ============================================================= */
#error-hero {
  background: var(--coal);
  color: var(--white);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 140px 0 100px;
}
#error-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url('Assets/brand-mark-margaridos.svg'),
    url('Assets/brand-mark-margaridos.svg');
  background-size: 100px 100px;
  background-position: 0 0, 50px 50px;
  background-repeat: repeat;
  opacity: 0.06;
  pointer-events: none;
}
.error-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}
.error-code {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(7rem, 22vw, 14rem);
  line-height: 0.9;
  color: var(--gold);
  margin-bottom: 1.2rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.02em;
}

/* The "0" of 404, drawn as a hand-inked enchido in laçada (aberta em
   cima, atada com fio), com cross-hatching. Line art only. */
.error-slice {
  height: 0.72em;
  width: auto;
  flex: none;
  margin: 0 0.01em;
  transform: rotate(-2deg);
}
.error-inner h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.15;
  color: var(--white);
  margin: 0.8rem auto 1.4rem;
  max-width: 14ch;
}
.error-sub {
  font-family: var(--sans);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.75;
  color: var(--text-light);
  max-width: 50ch;
  margin: 0 auto 2.6rem;
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
@media (max-width: 480px) {
  .error-actions { flex-direction: column; align-items: center; }
  .error-actions .btn-outline,
  .error-actions .btn-solid { width: 100%; max-width: 320px; }
}

#legal-hero {
  background: var(--coal);
  color: var(--white);
  padding: 180px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
#legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url('Assets/brand-mark-margaridos.svg'),
    url('Assets/brand-mark-margaridos.svg');
  background-size: 100px 100px;
  background-position: 0 0, 50px 50px;
  background-repeat: repeat;
  opacity: 0.08;
  pointer-events: none;
}
.legal-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}
.legal-hero-inner h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.1;
  color: var(--white);
  margin: 0.5rem 0 1.4rem;
}
.legal-meta {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

#legal {
  padding: clamp(64px, 8vw, 110px) 0 clamp(48px, 6vw, 80px);
}
.legal-content {
  max-width: 760px;
  margin: 0 auto;
}
.legal-intro {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  line-height: 1.55;
  color: var(--coal);
  margin-bottom: 4rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--gold-pale);
}
.legal-section {
  position: relative;
  margin-bottom: 3rem;
  padding-left: clamp(0px, 4vw, 64px);
}
.legal-num {
  position: absolute;
  left: 0;
  top: 0.2rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}
@media (max-width: 720px) {
  .legal-section { padding-left: 0; }
  .legal-num {
    position: static;
    display: block;
    margin-bottom: 0.4rem;
  }
}
.legal-section h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--coal);
  margin-bottom: 1.2rem;
  line-height: 1.2;
}
.legal-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 400;
}
.legal-section ul {
  margin: 1rem 0 1.4rem;
  padding-left: 1.2rem;
}
.legal-section ul li {
  position: relative;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  padding-left: 1.2rem;
  list-style: none;
}
.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 1px;
  background: var(--gold);
}
.legal-section a {
  color: var(--gold);
  border-bottom: 1px solid var(--gold-pale);
  transition: border-color 0.3s var(--ease);
}
.legal-section a:hover { border-color: var(--gold); }
.legal-section strong { color: var(--coal); font-weight: 600; }

/* Bloco de identificação (chave/valor, sem marcador). */
.legal-section ul.legal-identity { padding-left: 0; }
.legal-section ul.legal-identity li {
  padding-left: 0;
  margin-bottom: 0.5rem;
}
.legal-section ul.legal-identity li::before { content: none; }
.legal-section ul.legal-identity strong {
  display: inline-block;
  min-width: 130px;
  margin-right: 0.5rem;
}
.legal-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 3rem auto 0;
}

/* =============================================================
   LINKS PAGE · links.html
   ============================================================= */
body.links-page #nav { display: none; }

#links-hero {
  background: var(--coal);
  color: var(--white);
  padding: 80px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
#links-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url('Assets/brand-mark-margaridos.svg'),
    url('Assets/brand-mark-margaridos.svg');
  background-size: 100px 100px;
  background-position: 0 0, 50px 50px;
  background-repeat: repeat;
  opacity: 0.1;
  pointer-events: none;
}
.links-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 0 auto;
}
.links-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.8rem;
  color: var(--gold);
}
.links-logo img {
  width: 56px; height: 56px;
  display: block;
}
.links-hero-inner h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  color: var(--white);
  margin: 0.6rem 0;
}
.links-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold-soft);
  line-height: 1.55;
  margin-top: 0.6rem;
}
.links-tagline em {
  font-style: normal;
  color: rgba(255,255,255,0.78);
}
.links-divider {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 1.8rem auto 0;
}

#links {
  padding: clamp(48px, 6vw, 80px) 0 clamp(40px, 5vw, 64px);
}
.links-list {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.link-card a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 1.2rem 1.4rem 1.2rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--gold-pale);
  transition: border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease),
              transform 0.35s var(--ease);
  color: var(--coal);
}
/* Gold accent bar — grows from the left edge on hover/focus */
.link-card a::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.35s var(--ease);
}
.link-card a:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-pale);
}
.link-card a:focus-visible::before { transform: scaleY(1); }

@media (hover: hover) {
  .link-card a:hover {
    border-color: var(--gold);
    transform: translateX(5px);
    box-shadow: 0 10px 28px rgba(38,38,36,0.08);
  }
  .link-card a:hover::before { transform: scaleY(1); }
}
.link-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--gold);
  width: 32px;
  flex-shrink: 0;
  text-align: center;
}
.link-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.link-title {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--coal);
  letter-spacing: 0.01em;
}
.link-sub {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
}
.link-arrow {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--gold);
  opacity: 0.65;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
@media (hover: hover) {
  .link-card a:hover .link-arrow { transform: translateX(5px); opacity: 1; }
}
.link-card a:focus-visible .link-arrow { transform: translateX(5px); opacity: 1; }

.links-social {
  max-width: 540px;
  margin: 2.2rem auto 0;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.links-social a {
  width: 42px; height: 42px;
  border: 1px solid var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--coal);
  background: var(--paper);
  transition: all 0.35s var(--ease);
}
.links-social a:hover,
.links-social a:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
  outline: none;
}
.links-social svg { width: 18px; height: 18px; }

.links-footer {
  padding: 1.6rem 0 2.4rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.links-foot-links {
  display: flex;
  gap: 1.4rem;
  justify-content: center;
  margin-bottom: 0.8rem;
}
.links-foot-links a:hover,
.links-foot-links a:focus-visible { color: var(--gold); outline: none; }
.links-credit a {
  color: var(--gold);
  font-weight: 500;
}

/* ── Entrance · staggered fade-up (CSS-only) ──────────────── */
@keyframes linkFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.links-hero-inner > *,
.link-card,
.links-social {
  animation: linkFadeUp 0.7s var(--ease) backwards;
}
.links-logo            { animation-delay: 0.05s; }
.eyebrow-gold          { animation-delay: 0.12s; }
.links-hero-inner h1   { animation-delay: 0.18s; }
.links-tagline         { animation-delay: 0.24s; }
.links-divider         { animation-delay: 0.30s; }
.link-card:nth-child(1) { animation-delay: 0.36s; }
.link-card:nth-child(2) { animation-delay: 0.42s; }
.link-card:nth-child(3) { animation-delay: 0.48s; }
.link-card:nth-child(4) { animation-delay: 0.54s; }
.link-card:nth-child(5) { animation-delay: 0.60s; }
.link-card:nth-child(6) { animation-delay: 0.66s; }
.link-card:nth-child(7) { animation-delay: 0.72s; }
.links-social          { animation-delay: 0.80s; }

@media (prefers-reduced-motion: reduce) {
  .links-hero-inner > *,
  .link-card,
  .links-social { animation: none; }
}

/* ── Responsive · phones ──────────────────────────────────── */
@media (max-width: 600px) {
  #links-hero { padding: 56px 0 44px; }
  .links-logo { margin-bottom: 1.3rem; }
  .links-logo img { width: 48px; height: 48px; }
  .links-divider { margin-top: 1.4rem; }

  #links { padding: 40px 0 36px; }
  .links-list { gap: 12px; }
  .link-card a { gap: 14px; padding: 1.05rem 1.1rem 1.05rem 1.2rem; }
  .link-num { width: 26px; font-size: 1.25rem; }
  .link-title { font-size: 0.92rem; }
  .link-sub { font-size: 0.78rem; }
  .link-arrow { font-size: 1.25rem; }

  .links-social { margin-top: 1.8rem; }
  .links-foot-links { flex-direction: row; flex-wrap: wrap; gap: 1rem 1.4rem; }
}
