/* ---------- Brand fonts (self-hosted, from client identity files) ---------- */
@font-face {
  font-family: "DejaVu Serif";
  src: url("assets/fonts/DejaVuSerif.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Serif";
  src: url("assets/fonts/DejaVuSerif-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Serif";
  src: url("assets/fonts/DejaVuSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Serif";
  src: url("assets/fonts/DejaVuSerif-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-Italic-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Official Cristoforo brand colors, sampled from the client's logo files */
  --gold: #c9983f;
  --gold-deep: #a17a30;
  --ink: #171721;      /* near-black navy */
  --navy: #1e2547;     /* secondary dark, from logo variant */
  --wine: #78000d;     /* brand accent red, used sparingly */
  --blush: #f6eae0;    /* light neutral, from logo variant */
  --blush-2: #eddccb;  /* deeper shade of blush for alternating bands */

  --parchment: var(--blush);
  --parchment-2: var(--blush-2);
  --text-dark: #201f2b;
  --text-muted: #6c6559;
  --text-light: var(--blush);
  --text-light-muted: rgba(246, 234, 224, 0.72);

  --serif: "DejaVu Serif", Georgia, serif;
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text-dark);
  background: var(--parchment);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 16px 36px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color .25s ease;
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--ink);
}
.btn--gold:hover { transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--text-light-muted);
  border-color: rgba(246, 234, 224, 0.35);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 18px;
}
.eyebrow--light { color: var(--gold); }
.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 14px;
}
.section--dark .kicker,
.section--dark .eyebrow,
.band--dark .kicker,
.page-header .kicker { color: var(--gold); }

.section__title {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  margin-bottom: 34px;
  max-width: 720px;
}
.section__title--sm { font-size: clamp(24px, 3vw, 32px); margin-bottom: 24px; }
.section--center .section__title,
.band__center .section__title { margin-left: auto; margin-right: auto; }

.prose { max-width: 680px; font-size: 17px; color: var(--text-dark); }
.section--dark .prose { color: var(--text-light-muted); }
.prose--center { max-width: 720px; margin-left: auto; margin-right: auto; text-align: center; }
.prose--light { color: var(--text-light-muted); }
.prose-lead { max-width: 680px; font-size: 17px; color: var(--text-muted); margin-bottom: 40px; }

.statement {
  font-family: var(--serif);
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  text-wrap: balance;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--gold-deep);
  margin-top: 20px;
}
.section--dark .statement,
.band--dark .statement { color: var(--gold); }
.statement--dark { color: var(--wine); }

/* ---------- Age gate ---------- */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: radial-gradient(ellipse at center, var(--navy) 0%, #08090d 100%);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.age-gate[hidden] { display: none; }
.age-gate__inner { max-width: 460px; }
.age-gate__icon {
  width: 84px;
  height: auto;
  margin: 0 auto 28px;
}
.age-gate__title { font-size: 30px; color: var(--text-light); margin-bottom: 16px; }
.age-gate__text { color: var(--text-light-muted); margin-bottom: 32px; }
.age-gate__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(23, 23, 33, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 152, 63, 0.15);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; }
.brand__logo { height: 40px; width: auto; }
.nav__right { display: flex; align-items: center; gap: 28px; }
.nav__links { list-style: none; display: flex; align-items: center; gap: 32px; margin: 0; padding: 0; }
.nav__links a { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light-muted); transition: color .2s ease; }
.nav__links a:hover, .nav__links a.is-active { color: var(--gold); }
.nav__cta { border: 1px solid var(--gold); padding: 10px 20px; border-radius: 999px; color: var(--gold) !important; }

/* Active nav link — driven by <body data-page="…"> set at build time, so
   the header partial itself never needs to change per page. */
body[data-page="home"] .nav__links a[data-page="home"],
body[data-page="story"] .nav__links a[data-page="story"],
body[data-page="craft"] .nav__links a[data-page="craft"],
body[data-page="cigar"] .nav__links a[data-page="cigar"],
body[data-page="company"] .nav__links a[data-page="company"],
body[data-page="contact"] .nav__links a[data-page="contact"] {
  color: var(--gold);
}
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text-light); }

/* ---------- Language switcher ---------- */
.lang-switcher { position: relative; }
.lang-switcher__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(246, 234, 224, 0.25);
  color: var(--text-light-muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.lang-switcher__toggle:hover { border-color: var(--gold); color: var(--gold); }
.lang-switcher__toggle svg { width: 10px; height: 10px; transition: transform .2s ease; }
.lang-menu.is-open + .lang-switcher__toggle svg,
.lang-switcher__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: var(--ink);
  border: 1px solid rgba(201, 152, 63, 0.25);
  border-radius: 10px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 50;
}
.lang-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-light-muted);
  transition: background .15s ease, color .15s ease;
}
.lang-menu a:hover { background: rgba(201, 152, 63, 0.12); color: var(--gold); }

/* Current language — driven by <body data-lang="…"> set at build time, so
   the header partial itself never needs to change per language. */
body[data-lang="en"] .lang-menu a[data-lang="en"],
body[data-lang="pt"] .lang-menu a[data-lang="pt"] {
  color: var(--gold);
}
body[data-lang="en"] .lang-menu a[data-lang="en"]::after,
body[data-lang="pt"] .lang-menu a[data-lang="pt"]::after {
  content: "✓";
  font-size: 11px;
}
.lang-menu__note {
  margin: 6px 4px 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(246, 234, 224, 0.1);
  font-size: 11px;
  color: var(--text-light-muted);
  line-height: 1.5;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--text-light);
  overflow: hidden;
  padding-top: 76px;
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201,152,63,0.16), transparent 55%),
    linear-gradient(160deg, #08090d 0%, var(--navy) 55%, var(--ink) 100%);
}
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("assets/textures/pattern.svg");
  background-size: 420px auto;
  opacity: 0.05;
}
.hero__content { position: relative; max-width: 720px; padding-top: 60px; padding-bottom: 100px; }
.hero__title { font-size: clamp(38px, 6vw, 64px); line-height: 1.1; color: var(--text-light); margin-bottom: 26px; }
.hero__lede { color: var(--text-light-muted); font-size: 18px; max-width: 560px; margin-bottom: 36px; }
.hero__horizon {
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}

/* ---------- Inner page header (banner) ---------- */
.page-header {
  position: relative;
  padding: 200px 0 90px;
  color: var(--text-light);
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(201,152,63,0.16), transparent 55%),
    linear-gradient(160deg, #08090d 0%, var(--navy) 60%, var(--ink) 100%);
}
.page-header::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("assets/textures/pattern.svg");
  background-size: 420px auto;
  opacity: 0.05;
}
.page-header__content { position: relative; max-width: 760px; }
.page-header__title { font-size: clamp(32px, 5vw, 52px); line-height: 1.15; color: var(--text-light); margin-bottom: 18px; }
.page-header__lede { color: var(--text-light-muted); font-size: 17px; max-width: 600px; }

/* ---------- Home teaser grid (links out to the other pages) ---------- */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 60px;
}
.teaser-card {
  display: flex;
  flex-direction: column;
  padding: 34px 32px;
  background: var(--parchment);
  border: 1px solid rgba(161, 122, 48, 0.2);
  border-radius: 6px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.teaser-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(23,23,33,0.1); }
.teaser-card__kicker { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--wine); margin-bottom: 12px; }
.teaser-card h3 { font-size: 24px; margin-bottom: 12px; }
.teaser-card p { color: var(--text-muted); font-size: 15px; flex-grow: 1; }
.teaser-card__link { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wine); margin-top: 8px; }
.teaser-card__link::after { content: " →"; }

/* ---------- Bands / sections ---------- */
.section { padding: 110px 0; position: relative; }
.section--dark { background: var(--ink); color: var(--text-light); }
.section > .band { margin-top: 70px; }
.band { padding: 90px 0; position: relative; }
.band--dark {
  background: var(--navy);
  color: var(--text-light);
}
.band--dark::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("assets/textures/pattern.svg");
  background-size: 380px auto;
  opacity: 0.04;
  pointer-events: none;
}
.band--dark .container { position: relative; }
.band--parchment { background: var(--parchment-2); }
.band__center { text-align: center; max-width: 780px; margin: 0 auto; }
.band__text {
  font-family: var(--serif);
  font-weight: 700;
  text-transform: uppercase;
  text-wrap: balance;
  font-size: clamp(19px, 2.4vw, 26px);
  margin-bottom: 20px;
}
.band__text--muted { font-family: var(--sans); font-weight: 400; text-transform: none; font-size: 16px; color: var(--text-light-muted); }

/* Origin story band — the client's hand-illustrated exploration map, used as a quiet backdrop.
   The gradient layer covers the full band; the map image uses "contain" so the full
   illustration (including its border and seal) stays visible instead of being cropped. */
.band--map {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  background-color: var(--parchment);
  background-image: linear-gradient(180deg, rgba(246,234,224,0.92), rgba(246,234,224,0.86)), url("assets/textures/map.png");
  background-size: cover, contain;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
.band--map > .container { width: 100%; }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
}
.feature-card {
  border: 1px solid rgba(201, 152, 63, 0.22);
  border-top: 2px solid var(--gold);
  border-radius: 4px;
  padding: 36px 30px;
  background: rgba(246, 234, 224, 0.02);
}
.feature-card__num {
  display: inline-block;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  width: 30px; height: 30px;
  line-height: 28px;
  text-align: center;
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 22px; color: var(--text-light); margin-bottom: 6px; }
.feature-card__sub { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 16px; }
.feature-card__sub--center { text-align: center; }
.feature-card p { color: var(--text-light-muted); font-size: 15px; }
.feature-card__statement { font-family: var(--serif); font-weight: 700; font-style: normal; text-transform: uppercase; color: var(--gold); font-size: 15px; margin-top: 20px; }

/* ---------- Pillars list ---------- */
.pillars {
  list-style: none;
  margin: 40px auto;
  padding: 0;
  max-width: 680px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pillars li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dark);
  padding: 16px 22px;
  background: var(--parchment);
  border: 1px solid rgba(120, 0, 13, 0.15);
  border-top: 2px solid var(--wine);
  border-radius: 8px;
  text-align: center;
  line-height: 1.4;
}

/* ---------- Contact form ---------- */
.contact-form { max-width: 720px; margin-top: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.form-full { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.contact-form input, .contact-form textarea {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text-dark);
  background: var(--parchment);
  border: 1px solid rgba(32, 31, 43, 0.2);
  border-radius: 6px;
  padding: 12px 14px;
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--wine); }
.form-note { margin-top: 16px; font-size: 14px; color: var(--wine); }

/* ---------- Finale ---------- */
.finale {
  position: relative;
  padding: 140px 0;
  color: var(--text-light);
  text-align: center;
  overflow: hidden;
}
.finale__bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,152,63,0.14), transparent 60%), linear-gradient(180deg, #08090d, #1e254790 60%, #08090d);
}
.finale__content { position: relative; }
.finale__statement { font-family: var(--serif); font-weight: 700; font-style: normal; text-transform: uppercase; text-wrap: balance; font-size: clamp(24px, 3.4vw, 36px); color: var(--gold); margin: 30px auto 44px; max-width: 640px; }
.finale__brand { display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.finale__logo { height: 34px; width: auto; }
.finale__sub { color: var(--text-light-muted); font-size: 14px; margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--text-light-muted); padding-top: 70px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(246,234,224,0.1); }
.footer__brand .brand { margin-bottom: 10px; }
.footer__brand .brand__logo { height: 30px; }
.footer__links { display: flex; flex-direction: column; gap: 12px; }
.footer__links a:hover { color: var(--gold); }
.footer__meta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer__social:hover { color: var(--gold); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 24px 32px; font-size: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__right {
    position: fixed; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink);
    border-top: 1px solid rgba(201,152,63,0.15);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav__right.is-open { max-height: 560px; overflow-y: auto; }
  .nav__links { flex-direction: column; align-items: flex-start; width: 100%; gap: 0; }
  .nav__links li { width: 100%; padding: 16px 32px; border-bottom: 1px solid rgba(246,234,224,0.06); }
  .nav__cta { display: inline-block; }
  .nav__toggle { display: flex; }
  .lang-switcher { padding: 16px 32px; }
  .lang-switcher__toggle { width: 100%; justify-content: space-between; }
  .lang-menu { position: static; margin-top: 10px; opacity: 1; visibility: visible; transform: none; display: none; }
  .lang-menu.is-open { display: block; }
  .feature-grid { grid-template-columns: 1fr; }
  .teaser-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}
