:root {
  --burgundy: #6B1F2E;
  --burgundy-dark: #4A1421;
  --cream: #F4ECDD;
  --ink: #2A1820;
  --ink-soft: #3D2F26;
  --terracotta: #A85A2E;
  --gold: #E0B976;
  --gold-deep: #C9974A;
  --olive: #566B3A;
  --paper: #E9E7D2;
  --white: #FFFFFF;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Fredoka', 'Manrope', sans-serif;
  font-weight: 600;
  color: var(--burgundy-dark);
  line-height: 1.2;
}

a { color: var(--burgundy); }
a:hover { color: var(--terracotta); }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--burgundy-dark);
  padding: 16px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cream);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand:hover { color: var(--gold); }
.site-header nav a {
  color: var(--cream);
  text-decoration: none;
  margin-left: 22px;
  font-size: 0.95rem;
}
.site-header nav a:hover { color: var(--gold); }

/* Hero */
.hero {
  background: url('./assets/douro-background.jpg');
  background-size: cover;
  background-position: center 35%;
  color: var(--cream);
  padding: 64px 0 56px;
  text-align: center;
}
.hero .wrap { max-width: 960px; }
.hero img.mascot {
  display: block;
  width: 160px;
  height: auto;
  margin: 0 auto -50px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.35));
  position: relative;
  z-index: 1;
}
.hero-text {
  display: inline-block;
  background: rgba(74,20,33,0.96);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  margin-bottom: 28px;
  backdrop-filter: blur(2px);
}
.hero h1 {
  color: var(--white);
  font-size: 2.6rem;
  margin: 0 0 12px;
}
.hero p.tagline {
  font-size: 1.2rem;
  color: var(--gold);
  max-width: 560px;
  margin: 0 auto;
}
.badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}
.badge:hover { background: var(--gold); color: var(--burgundy-dark); }
.badge.disabled {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

/* Email capture */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* Honeypot — off-screen rather than display:none, since the better bots skip
   hidden inputs but happily fill a field that's technically rendered. */
.hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.capture {
  background: var(--burgundy-dark);
  color: var(--cream);
  padding: 56px 0;
  text-align: center;
}
.capture .wrap { max-width: 640px; }
.capture h2 {
  color: var(--white);
  font-size: 1.9rem;
  margin: 0 0 12px;
}
.capture-sub {
  color: var(--gold);
  font-size: 1.05rem;
  margin: 0 auto 28px;
  max-width: 520px;
}
.capture-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.capture-form input[type="email"] {
  flex: 1 1 260px;
  max-width: 340px;
  font-family: inherit;
  font-size: 1rem;
  padding: 14px 18px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink);
}
.capture-form input[type="email"]::placeholder { color: #A89280; }
.capture-form input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
}
.capture-form button {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--burgundy-dark);
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}
.capture-form button:hover { background: var(--white); }
.capture-form button:disabled {
  opacity: 0.65;
  cursor: default;
}
.capture-status {
  min-height: 1.5em;
  margin: 18px auto 0;
  max-width: 480px;
  font-size: 0.95rem;
}
.capture-status.is-success { color: var(--gold); font-weight: 600; }
.capture-status.is-error { color: #F0B7A8; }
.capture-status.is-pending { color: var(--paper); }
.capture-fineprint {
  margin: 14px auto 0;
  max-width: 480px;
  font-size: 0.82rem;
  color: var(--brownFaint, #A89280);
}
.capture-fineprint a { color: var(--gold); }

/* Features */
.features {
  padding: 64px 0;
}
.features .wrap { max-width: 960px; }
.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: 0 6px 18px rgba(42,24,32,0.08);
}
.feature-card .icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.feature-card .icon-img { width: 44px; height: 44px; object-fit: contain; margin: 7px 0 10px; display: block; }
.feature-card h3 { font-size: 1.15rem; margin: 0 0 8px; }
.feature-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* CTA band */
.cta-band {
  background: var(--terracotta);
  color: var(--white);
  text-align: center;
  padding: 48px 0;
}
.cta-band h2 { color: var(--white); margin: 0 0 20px; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 36px 0;
  font-size: 0.9rem;
}
.site-footer .wrap {
  max-width: 960px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
}
.site-footer nav a {
  color: var(--paper);
  text-decoration: none;
  margin-right: 18px;
}
.site-footer nav a:hover { color: var(--gold); }
.site-footer .copyright { color: var(--brownFaint, #A89280); }

/* Legal / content pages */
.page {
  background: var(--white);
  max-width: 760px;
  margin: 40px auto 80px;
  padding: 40px 48px;
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 24px rgba(42,24,32,0.08);
}
.page h1 { margin-top: 0; }
.page h2 { margin-top: 2em; border-bottom: 1px solid var(--paper); padding-bottom: 6px; }
.page .updated { color: var(--ink-soft); font-size: 0.9em; }
.page .callout {
  background: var(--paper);
  border-left: 4px solid var(--gold-deep);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.95rem;
}

/* A capture-form button outside the capture band (unsubscribe page). */
.capture-button {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--burgundy);
  color: var(--cream);
  cursor: pointer;
}
.capture-button:hover { background: var(--terracotta); }
.capture-button:disabled { opacity: 0.65; cursor: default; }
.page .capture-status.is-success { color: var(--olive); font-weight: 600; }
.page .capture-status.is-error { color: var(--burgundy); }

/* Lead-magnet header, with Galo beside the title rather than beside the body
   copy — that keeps the paragraphs at full measure instead of indenting every
   line of the article around him. */
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}
.page-head-text { flex: 1; min-width: 0; }
.page-head-text h1 { margin-top: 0; }
.page-head-text .updated { margin-bottom: 0; }
.lead-galo {
  flex: none;
  width: 132px;
  height: auto;
  /* He's taller than the title block, so his box sets the header's height —
     and ~23% of that box is transparent padding below his feet. Without this
     the empty band pushes the opening paragraph down by an extra 43px. */
  margin-bottom: -48px;
  filter: drop-shadow(0 8px 14px rgba(42,24,32,0.18));
}

/* Closing CTA, with Galo standing on the top edge of the box — the same
   treatment the auth email templates use.

   The negative margin looks far too large because roughly 20% of
   galo-celebrate-static.png's height is transparent padding below his feet
   (and 18% above his comb). The margin has to clear that empty band before
   it moves a single visible pixel, so ~42px of the -62px is spent getting
   his feet down to the box edge and only the last ~20px is real overlap.
   Re-measure the alpha bounds if this asset is ever swapped. */
.cta-callout { margin-top: 24px; }
.cta-galo {
  display: block;
  width: 150px;
  height: auto;
  margin: 0 auto -62px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 14px rgba(42,24,32,0.18));
}
.cta-callout .callout {
  margin: 0;
  padding-top: 26px;
}

/* Lead-magnet phrase list (25-phrases.html) */
.phrase-list {
  list-style: decimal;
  padding-left: 1.6em;
  margin: 20px 0 32px;
}
.phrase {
  margin-bottom: 22px;
  padding-left: 6px;
}
.phrase::marker { color: var(--gold-deep); font-weight: 700; }
.phrase p { margin: 0 0 4px; }
.phrase-en {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
}
.phrase-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 1.1rem;
}
.phrase-pair .pt {
  font-family: 'Fredoka', 'Manrope', sans-serif;
  font-weight: 600;
  color: var(--burgundy);
}
.phrase-pair .not {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #A89280;
}
.phrase-pair .br {
  text-decoration: line-through;
  color: #A89280;
  font-size: 1rem;
}
.phrase-note {
  font-size: 0.93rem;
  color: var(--ink-soft);
  margin-top: 4px !important;
}

@media (max-width: 640px) {
  .page { padding: 28px 22px; margin: 20px auto 60px; }
  .hero h1 { font-size: 2rem; }
  .site-header nav a { margin-left: 14px; font-size: 0.85rem; }
  .capture h2 { font-size: 1.5rem; }
  .capture-form input[type="email"] { max-width: none; flex-basis: 100%; }
  .capture-form button { width: 100%; }
  /* Galo drops below the title rather than shrinking into a stamp beside it,
     landing between the byline and the opening paragraph. */
  .page-head {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  /* Negative margins claw back the transparent bands baked into the PNG
     (~14% above his comb, ~23% below his feet), which otherwise read as a
     big empty gap once he's stacked under the title. */
  .lead-galo { width: 108px; margin: -10px 0 -20px; }
  /* Overlap is tied to the rendered height, so it rescales with the width. */
  .cta-galo { width: 118px; margin-bottom: -49px; }
}
