/* ============================================================
   GLOBAL.CSS — Reset, Variables, Typography, Layout, Utilities
   ============================================================ */

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 17px; }
img, picture, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; font-size: 16px; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; }
p, h1, h2, h3, h4 { overflow-wrap: break-word; }

/* ----- Variables ----- */
:root {
  --bg:         #F8F3EE;
  --surface:    #F3E3E7;
  --rose:       #C9899D;
  --wine:       #7E4157;
  --gold:       #C9A56D;
  --sage:       #87937A;
  --text:       #2C221F;
  --text-muted: rgba(44, 34, 31, 0.55);
  --white:      #FFFFFF;

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --max-width:  1200px;
  --nav-height: 88px;

  --ease:     cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* ----- Base ----- */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Typography ----- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.15;
  color: var(--wine);
}

h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem,   4vw, 3.25rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.15rem; font-family: var(--font-body); color: var(--text); }

p { max-width: 62ch; font-size: 1rem; line-height: 1.75; }

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
}

section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ----- Utility ----- */
.text-center   { text-align: center; }
.text-center p { margin-inline: auto; }
.italic        { font-style: italic; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  clip-path: inset(50%); white-space: nowrap;
}

/* ----- Section Header ----- */
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-header { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-header h2 { font-style: italic; }
.section-header p { margin-top: 0.85rem; color: var(--text-muted); font-size: 1.05rem; }

/* ----- Gold Divider ----- */
.divider {
  display: block;
  width: 0;
  height: 1px;
  background: var(--gold);
  margin: 1.25rem 0;
  transition: width 1s var(--ease-out);
}
.divider.animate { width: 56px; }
.text-center .divider { margin-inline: auto; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.4s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--rose); color: var(--white); }
.btn--primary:hover { background: var(--wine); }
.btn--outline { border: 1px solid var(--rose); color: var(--rose); }
.btn--outline:hover { background: var(--rose); color: var(--white); }
.btn--gold { border: 1px solid var(--gold); color: var(--gold); }
.btn--gold:hover { background: var(--gold); color: var(--white); }
.btn--whatsapp { background: #25D366; color: var(--white); }
.btn--whatsapp:hover { background: #1ebe5d; }
.btn--phone { background: #4A80BF; color: var(--white); }
.btn--phone:hover { background: #3A6CAA; }
.btn--email { background: #BF5045; color: var(--white); }
.btn--email:hover { background: #A84038; }
.btn--instagram { background: #BF4472; color: var(--white); }
.btn--instagram:hover { background: #A83762; }

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

/* Transition delay helpers for staggered items */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }
.reveal:nth-child(7) { transition-delay: 0.6s; }
.reveal:nth-child(8) { transition-delay: 0.7s; }

/* Text mask reveal */
.text-reveal { overflow: hidden; }
.text-reveal > * { display: block; transform: translateY(105%); transition: transform 0.9s var(--ease-out); }
.text-reveal.visible > * { transform: translateY(0); }

/* ----- Cards ----- */
.card { overflow: hidden; border-radius: 3px; background: var(--white); }

.card__image {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface);
}
.card__image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.card:hover .card__image img { transform: scale(1.05); }

.card__body { padding: 1.5rem; }
.card__body h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.card__body p  { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.25rem; }

/* ----- Page Hero (sub-pages) ----- */
.page-hero {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 3rem;
  background: var(--surface);
  text-align: center;
}
.page-hero h1 { font-style: italic; }
.page-hero p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-inline: auto;
  max-width: 52ch;
}
