/* ============================================
   MARIBUSTAMANTE.COM — GLOBAL STYLES
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:wght@300;400;500&display=swap');

/* ── CSS VARIABLES ── */
:root {
  --bg:        #f3f5f9;
  --surface:   #e7e7e7;
  --ink:       #1d1d1b;
  --ink-mid:   #4a4a48;
  --ink-soft:  #8a8a88;
  --ink-muted: #6a6a68;
  --gold:      #e8ab0d;
  --white:     #ffffff;

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'DM Sans', sans-serif;

  --nav-h: 72px;
  --max-w: 1200px;
  --gutter: clamp(24px, 5vw, 80px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.65;
}
img { display: block; max-width: 100%; }
.pic img, .img-wrap img { max-width: unset; width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  appearance: none;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 500; line-height: 1.15; }
.display-xl  { font-size: clamp(3rem, 6vw, 6rem); letter-spacing: -0.02em; }
.display-lg  { font-size: clamp(2.2rem, 4vw, 4rem); letter-spacing: -0.015em; }
.display-md  { font-size: clamp(1.6rem, 2.5vw, 2.4rem); letter-spacing: -0.01em; }
.display-sm  { font-size: clamp(1.2rem, 1.8vw, 1.6rem); }
.label       { font-family: var(--ff-body); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-soft); }
.body-lg     { font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.75; }
.body-sm     { font-size: 0.88rem; color: var(--ink-muted); }

/* ── LAYOUT UTILITIES ── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.section   { padding: clamp(64px, 8vw, 120px) 0; }
.grid-2    { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3vw, 48px); }
.grid-3    { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.5vw, 40px); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ── THIN DIVIDER ── */
.divider { width: 48px; height: 1px; background: var(--gold); margin: 24px 0; }
.divider--center { margin: 24px auto; }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(243, 245, 249, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface);
  transition: border-color 0.3s;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav__logo {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.nav__logo span { color: var(--gold); }
.nav__links { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.nav__link {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mid);
  transition: color 0.2s;
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease-out);
}
.nav__link:hover, .nav__link.active { color: var(--ink); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  transition: background 0.25s, color 0.25s;
}
.nav__cta:hover { background: var(--ink); color: var(--bg); }

/* Hamburger */
.nav__burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.nav__burger span { display: block; width: 24px; height: 1.5px; background: var(--ink); transition: 0.3s; }
.nav__burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--surface);
  padding: 32px var(--gutter);
  flex-direction: column;
  gap: 24px;
  z-index: 99;
}
.nav__mobile.open { display: flex; }
.nav__mobile .nav__link { font-size: 1rem; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: 0.25s var(--ease-out);
  cursor: pointer;
}
.btn--primary {
  background: var(--ink);
  color: var(--bg);
}
.btn--primary:hover { background: var(--ink-mid); }
.btn--outline {
  border: 1px solid var(--ink);
  color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--bg); }
.btn--ghost {
  color: var(--ink-mid);
  gap: 8px;
}
.btn--ghost:hover { color: var(--ink); }
.btn--ghost .arrow { transition: transform 0.25s var(--ease-out); }
.btn--ghost:hover .arrow { transform: translateX(4px); }

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--surface);
  padding: 56px 0 32px;
  margin-top: 80px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer__logo {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 16px;
}
.footer__logo span { color: var(--gold); }
.footer__desc { color: var(--ink-muted); font-size: 0.9rem; line-height: 1.7; max-width: 280px; }
.footer__heading { font-family: var(--ff-body); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 20px; }
.footer__links { display: flex; flex-direction: column; gap: 12px; }
.footer__links a { color: var(--ink-muted); font-size: 0.9rem; transition: color 0.2s; }
.footer__links a:hover { color: var(--ink); }
.footer__bottom { border-top: 1px solid var(--surface); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer__copy { font-size: 0.78rem; color: var(--ink-soft); }
.footer__legal { display: flex; gap: 24px; }
.footer__legal a { font-size: 0.78rem; color: var(--ink-soft); transition: color 0.2s; }
.footer__legal a:hover { color: var(--ink); }

/* ── PAGE HERO ── */
.page-hero {
  padding-top: calc(var(--nav-h) + clamp(64px, 8vw, 100px));
  padding-bottom: clamp(48px, 6vw, 80px);
}

/* ── PROJECT CARD ── */
.project-card {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
}
.project-card__img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out);
}
.project-card:hover .project-card__img { transform: scale(1.04); }
.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(29,29,27,0.72) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.35s;
  display: flex;
  align-items: flex-end;
  padding: 28px;
}
.project-card:hover .project-card__overlay { opacity: 1; }
.project-card__info { color: var(--white); }
.project-card__title { font-family: var(--ff-display); font-size: 1.2rem; font-weight: 500; }
.project-card__tag { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; margin-top: 4px; }
.project-card__meta { padding: 20px 0 0; }
.project-card__meta-title { font-family: var(--ff-display); font-size: 1.05rem; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.project-card__meta-tag { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }

/* ── IMAGE PLACEHOLDER (dev) ── */
.img-placeholder {
  width: 100%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── FORM ── */
.form-group { margin-bottom: 24px; }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.form-field {
  width: 100%;
  padding: 14px 0;
  border-bottom: 1px solid var(--surface);
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.25s;
}
.form-field:focus { border-color: var(--ink); }
.form-field::placeholder { color: var(--ink-soft); }
textarea.form-field { resize: vertical; min-height: 100px; }
.form-select { cursor: pointer; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--ink);
  color: var(--white);
  padding: 20px 28px;
  max-width: 520px;
  width: calc(100% - 48px);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  opacity: 0;
  animation: slideUp 0.4s 0.8s var(--ease-out) forwards;
}
@keyframes slideUp { from { opacity: 0; transform: translateX(-50%) translateY(16px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.cookie-banner p { font-size: 0.85rem; line-height: 1.55; flex: 1; min-width: 200px; }
.cookie-banner a { color: var(--gold); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-btn {
  padding: 9px 20px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}
.cookie-btn--accept { background: var(--gold); color: var(--ink); }
.cookie-btn--accept:hover { opacity: 0.85; }
.cookie-btn--decline { border: 1px solid rgba(255,255,255,0.3); color: var(--white); }
.cookie-btn--decline:hover { border-color: rgba(255,255,255,0.6); }

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
}
@media (max-width: 480px) {
  :root { --gutter: 20px; }
  .cookie-banner { bottom: 0; left: 0; right: 0; transform: none; max-width: 100%; width: 100%; border-radius: 0; }
  @keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
}
