/* ==========================================================================
   DOMUS Viagens — Shared Theme
   Warm Catholic-pilgrimage aesthetic: earth + parchment, DM Serif Display + Lato.
   See DESIGN.md for tokens, components, and usage.
   ========================================================================== */

/* ---------- 1. Design tokens ---------------------------------------------- */
:root {
  /* Earth palette (primary) */
  --earth:       #63402e;
  --earth-dk:    #4a2f20;
  --earth-dkr:   #3a2318;
  --earth-lt:    #8c5e46;

  /* Surfaces */
  --parchment:   #f5efe8;
  --stone:       #faf6f2;
  --deep:        #1e1410;
  --ash:         #8a7066;
  --sand:        #e2d5c8;
  --border:      #e2d5c8;

  /* Accent (refined) */
  --horizon:     #00afcc;
  --horizon-dk:  #0092aa;
  --gold:        #b8902a;       /* deep, dignified — not metallic */
  --gold-soft:   #d4a017;       /* used for stars/ratings */

  /* Status */
  --success:     #1da851;
  --whatsapp:    #25D366;
  --whatsapp-dk: #1aa355;
  --danger:      #b91c1c;

  /* Shadow scale — single source of truth */
  --sh-card:    0 2px 12px  rgba(99, 64, 46, .10);
  --sh-hover:   0 8px 28px  rgba(99, 64, 46, .18);
  --sh-lift:    0 12px 40px rgba(99, 64, 46, .22);
  --sh-nav:     0 4px 16px  rgba(30, 20, 16, .12);
  --sh-modal:   0 16px 48px rgba(30, 20, 16, .28);

  /* Type stack */
  --ff-d: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --ff-b: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  /* Motion */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:  cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:     .15s;
  --t-base:     .25s;
  --t-slow:     .55s;

  /* Layout */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  14px;
  --radius-xl:  18px;
}

/* ---------- 2. Reset & base ----------------------------------------------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--ff-b);
  font-weight: 400;
  color: var(--deep);
  background-color: var(--parchment);
  /* subtle parchment grain — pure CSS, ~1KB inline SVG */
  background-image:
    radial-gradient(at 100% 0%, rgba(140, 94, 70, .04) 0%, transparent 55%),
    radial-gradient(at 0% 100%, rgba(99, 64, 46, .035) 0%, transparent 50%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.39 0 0 0 0 0.25 0 0 0 0 0.18 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
  background-size: auto, auto, 220px 220px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(99, 64, 46, .22); color: var(--deep); }

/* Focus — subtle but visible */
:focus-visible {
  outline: 2px solid var(--earth);
  outline-offset: 2px;
  border-radius: 2px;
}
input:focus, select:focus, textarea:focus, button:focus { outline: none; }

/* Scrollbar — match the warm palette */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--parchment); }
::-webkit-scrollbar-thumb {
  background: var(--sand);
  border: 2px solid var(--parchment);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--earth-lt); }

/* ---------- 3. Typography helpers ----------------------------------------- */
.font-display { font-family: var(--ff-d); font-weight: 400; letter-spacing: -0.01em; }
.font-body    { font-family: var(--ff-b); }

/* DM Serif Display ships only one weight; never use font-bold/font-black on it.
   Use letter-spacing & size for hierarchy instead. */
h1, h2, h3, h4 { font-family: var(--ff-d); font-weight: 400; letter-spacing: -0.012em; line-height: 1.1; }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 1.6vw, 1.375rem); }

/* SUPERTITLE — small uppercase eyebrow above h2s */
.section-supertitle {
  font-family: var(--ff-b);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--earth-lt);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-supertitle::before {
  content: "";
  display: inline-block;
  width: 22px; height: 1px;
  background: var(--earth-lt);
  opacity: .55;
}

/* SECTION RULE — refined ornamental divider with centered diamond */
.section-rule,
.ornament-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  width: max-content;
}
.section-rule::before,
.section-rule::after {
  content: "";
  height: 1px;
  background: var(--earth);
  display: block;
}
.section-rule::before { width: 36px; }
.section-rule::after  { width: 12px; opacity: .5; }
.section-rule { position: relative; }
.section-rule .dot,
.section-rule::marker { display: none; }
/* center diamond using inline SVG bg on a span the consumer drops in,
   or simulate via two pseudo lines + a CSS dot */
.section-rule[data-ornament]::before { width: 28px; }
.section-rule[data-ornament] {
  position: relative;
}
.section-rule.center { margin-left: auto; margin-right: auto; }

/* Refined eyebrow + headline pair */
.eyebrow {
  font-family: var(--ff-b);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--earth);
}

/* ---------- 4. Layout primitives ----------------------------------------- */
.container-7xl { max-width: 80rem; margin-inline: auto; padding-inline: 1rem; }

/* ---------- 5. Buttons ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ff-b);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-earth        { background: var(--earth);    color: var(--stone); }
.btn-earth:hover  { background: var(--earth-dk); }
.btn-earth-dk     { background: var(--earth-dk); color: var(--stone); }
.btn-earth-dk:hover { background: var(--earth-dkr); }

.btn-outline-earth        { background: transparent; color: var(--earth); border-color: var(--earth); }
.btn-outline-earth:hover  { background: var(--parchment); }

.btn-ghost-light          { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost-light:hover    { background: rgba(255,255,255,.24); }

.btn-stone                { background: var(--stone); color: var(--earth-dk); }
.btn-stone:hover          { background: var(--parchment); }

.btn-whatsapp             { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover       { background: var(--whatsapp-dk); }

.btn-sm  { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn-xs  { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-lg  { padding: 0.875rem 2rem; font-size: 0.9375rem; }
.btn-block { width: 100%; }

/* ---------- 6. Pills (small metadata badges) ----------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-b);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  white-space: nowrap;
}
.pill i { font-size: 0.625rem; }
.pill-neutral { background: transparent; color: var(--ash); border: 1px solid var(--border); }
.pill-neutral i { color: var(--earth-lt); }
.pill-blue    { background: rgba(99,64,46,.08); color: var(--earth); border: 1px solid rgba(99,64,46,.24); font-weight: 700; }
.pill-earth   { background: var(--earth);    color: var(--stone); }
.pill-date    { background: var(--earth);    color: var(--stone); font-weight: 700; }
.pill-gold    { background: rgba(184,144,42,.10); color: var(--gold); border: 1px solid rgba(184,144,42,.30); font-weight: 700; }

/* ---------- 7. Category badges ------------------------------------------- */
.badge {
  display: inline-block;
  font-family: var(--ff-b);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-nac    { background: var(--earth-lt); color: var(--stone); }
.badge-intl   { background: var(--deep);     color: var(--stone); }
.badge-rom    { background: var(--earth);    color: var(--stone); }
.badge-promo  { background: var(--stone);    color: var(--earth); border: 1.5px solid var(--earth); }
.badge-new    { background: var(--gold);     color: var(--stone); }

/* date chip variant used in pacotes.html cards */
.date-chip {
  font-family: var(--ff-b);
  background: var(--parchment);
  color: var(--earth);
  border: 1px solid var(--border);
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

/* ---------- 8. Cards ------------------------------------------------------ */
.card {
  background: var(--stone);
  border-radius: var(--radius-lg);
  box-shadow: var(--sh-card);
  overflow: hidden;
}

.pkg-card {
  background: var(--parchment);
  border-radius: var(--radius-lg);
  box-shadow: var(--sh-card);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
}
.pkg-card:hover { transform: translateY(-5px); box-shadow: var(--sh-hover); }
.pkg-card img.zoom { transition: transform var(--t-slow) var(--ease-out); }
.pkg-card:hover img.zoom { transform: scale(1.05); }

.cat-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: block;
  position: relative;
  box-shadow: var(--sh-card);
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--sh-hover); }
.cat-img { transition: transform var(--t-slow) var(--ease-out); display: block; width: 100%; height: 100%; object-fit: cover; }
.cat-card:hover .cat-img { transform: scale(1.04); }

/* ---------- 9. Forms ------------------------------------------------------ */
.field-input,
.field-select,
.field-textarea {
  width: 100%;
  font-family: var(--ff-b);
  font-size: 0.875rem;
  color: var(--deep);
  background: var(--stone);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.75rem;
  transition: border-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--earth);
  box-shadow: 0 0 0 3px rgba(99, 64, 46, .12);
}
.field-textarea { resize: vertical; min-height: 100px; }
.field-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 6px;
}

/* ---------- 10. Navigation ----------------------------------------------- */
.nav-dropdown:hover .nav-dropdown-menu { display: block; }

.utility-bar {
  background: var(--deep);
  font-size: 0.75rem;
  padding: 6px 0;
}
.utility-bar a,
.utility-bar button {
  color: var(--ash);
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
  transition: color var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.utility-bar a:hover,
.utility-bar button:hover { color: var(--stone); }

.brand-bar {
  background: var(--stone);
  border-bottom: 1px solid var(--border);
}

.main-nav {
  background: var(--earth);
  color: var(--stone);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--sh-nav);
}
.main-nav a.nav-link {
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--stone);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background-color var(--t-fast);
}
.main-nav a.nav-link:hover { background: var(--earth-dk); }
.main-nav a.nav-link.active { background: var(--earth-dk); }

/* dropdown panel */
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--deep);
  text-decoration: none;
  transition: background-color var(--t-fast);
}
.nav-dropdown-menu a:hover { background: var(--parchment); }

/* breadcrumb */
.breadcrumb {
  background: var(--stone);
  border-bottom: 1px solid var(--border);
  padding: 0.625rem 0;
  font-size: 0.75rem;
  color: var(--ash);
}
.breadcrumb a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
.breadcrumb a:hover { color: var(--earth); }
.breadcrumb .crumb-current { color: var(--deep); font-weight: 700; }
.breadcrumb .crumb-sep { color: var(--sand); font-size: 9px; margin-inline: 6px; }

/* ---------- 11. Hero ----------------------------------------------------- */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30, 20, 16, .42) 0%,
    rgba(30, 20, 16, .22) 38%,
    rgba(30, 20, 16, .78) 100%
  );
}
.carousel-slide { transition: opacity .7s var(--ease-out); }
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
  border: 0;
  padding: 0;
}
.carousel-dot.active { background: #fff; transform: scale(1.3); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-fade-1 { animation: fadeUp .75s var(--ease-out) both; }
.hero-fade-2 { animation: fadeUp .75s .18s var(--ease-out) both; }
.hero-fade-3 { animation: fadeUp .75s .32s var(--ease-out) both; }

/* ---------- 12. WhatsApp float ------------------------------------------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--whatsapp);
  color: #fff;
  border-radius: 9999px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-b);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(30, 20, 16, .18), 0 0 0 0 rgba(37, 211, 102, .55);
  z-index: 60;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
  animation: pulse-whatsapp 2.6s var(--ease-soft) infinite;
}
.whatsapp-float:hover { transform: scale(1.05); animation: none; }

@keyframes pulse-whatsapp {
  0%, 100% { box-shadow: 0 4px 16px rgba(30, 20, 16, .18), 0 0 0 0 rgba(37, 211, 102, .35); }
  50%      { box-shadow: 0 4px 16px rgba(30, 20, 16, .18), 0 0 0 12px rgba(37, 211, 102, 0); }
}

/* ---------- 13. Modal ---------------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(30, 20, 16, .72);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modal-fade var(--t-base) var(--ease-out);
}
.modal.active { display: flex; }
.modal-card {
  width: 100%;
  max-width: 28rem;
  background: var(--stone);
  border-radius: var(--radius-lg);
  box-shadow: var(--sh-modal);
  animation: modal-rise .35s var(--ease-out);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-family: var(--ff-d); font-size: 1.0625rem; color: var(--deep); }
.modal-close {
  background: transparent; border: 0;
  font-size: 1.5rem; line-height: 1;
  color: var(--ash); cursor: pointer;
  transition: color var(--t-fast);
  padding: 4px 8px;
}
.modal-close:hover { color: var(--deep); }
.modal-body { padding: 1.5rem; }

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- 14. Footer --------------------------------------------------- */
.site-footer {
  background: var(--deep);
  color: var(--ash);
  padding: 3rem 0 1.25rem;
  margin-top: 0;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 3px;
  background: var(--earth-lt);
  border-radius: 0 0 4px 4px;
}
.site-footer h4 {
  font-family: var(--ff-b);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0 0 1.25rem;
}
.site-footer a {
  color: var(--ash);
  text-decoration: none;
  transition: color var(--t-fast);
}
.site-footer a:hover { color: var(--stone); }
.site-footer .social-icons {
  display: flex; gap: 1rem;
  font-size: 1.125rem;
}
.site-footer .social-icons a:hover.fb { color: #60a5fa; }
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: rgba(138, 112, 102, .60);
  display: flex;
  flex-direction: column;
  gap: .5rem;
  justify-content: space-between;
  align-items: center;
}
@media (min-width: 640px) { .site-footer .footer-bottom { flex-direction: row; } }

/* ---------- 15. Reduced motion ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 16. Print fallback (used by pacote-detalhe) ------------------ */
@media print {
  .utility-bar, .main-nav, .breadcrumb, .whatsapp-float, .site-footer, .modal { display: none !important; }
  body { background: #fff; }
  .pkg-card, .card { box-shadow: none; border: 1px solid var(--border); }
}
