/* =========================================================
   Bodega Superior — premium dark palette + minimal layout
   ========================================================= */

:root {
  --bg: #0a0907;
  --bg-soft: #100e0b;
  --bg-elev: #15120e;
  --line: rgba(245, 239, 230, 0.08);
  --line-strong: rgba(245, 239, 230, 0.18);

  --text: #f5efe6;
  --text-muted: #a39d92;
  --text-dim: #6b665e;

  --accent: #c9a961;
  --accent-bright: #e8c987;
  --accent-deep: #8a7340;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --container: 1280px;
  --pad-x: clamp(20px, 5vw, 80px);

  --radius: 2px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 50% at 80% -10%, rgba(201, 169, 97, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 0% 30%, rgba(201, 169, 97, 0.04), transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; }

/* =========================================================
   Decorative grain
   ========================================================= */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* =========================================================
   Custom cursor (desktop only)
   ========================================================= */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
  body { cursor: none; }
  a, button, .magnetic { cursor: none; }
}
.cursor__dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--accent-bright);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.18s var(--ease);
}
.cursor__ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.35s var(--ease), width 0.35s var(--ease), height 0.35s var(--ease), border-color 0.3s ease;
  opacity: 0.7;
}
.cursor.is-hover .cursor__ring {
  width: 64px;
  height: 64px;
  border-color: var(--accent-bright);
  opacity: 1;
}
.cursor.is-hover .cursor__dot {
  transform: translate(-50%, -50%) scale(0);
}

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 22px var(--pad-x);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 9, 7, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-top: 14px;
  padding-bottom: 14px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  position: relative;
}
.nav__logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.04em;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.nav__logo:hover .nav__logo-mark {
  background: var(--accent);
  color: var(--bg);
}
.nav__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  font-size: 15px;
}
.nav__logo-text span:first-child { color: var(--text); letter-spacing: 0.04em; text-transform: uppercase; font-family: var(--sans); font-size: 9px; font-weight: 600; margin-bottom: 4px; }
.nav__logo-text span:last-child { color: var(--accent); font-style: italic; font-size: 19px; }

.nav__menu {
  display: flex;
  gap: 36px;
  justify-content: center;
}
.nav__menu a {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color 0.3s ease;
}
.nav__menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease);
}
.nav__menu a:hover { color: var(--text); }
.nav__menu a:hover::after { width: 100%; }

.nav__right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.lang__btn {
  color: var(--text-dim);
  transition: color 0.25s ease;
  padding: 4px 2px;
}
.lang__btn.is-active { color: var(--accent); }
.lang__btn:hover { color: var(--text); }
.lang__sep { color: var(--text-dim); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 6px 0;
}
.nav__burger span {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--text);
  transition: transform 0.4s var(--ease), opacity 0.3s ease;
}
.nav__burger[aria-expanded="true"] span:first-child {
  transform: translateY(3px) rotate(45deg);
}
.nav__burger[aria-expanded="true"] span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* =========================================================
   Layout helpers
   ========================================================= */
section {
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 28px;
}
.eyebrow__line {
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 5.4vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section-title--lg {
  font-size: clamp(46px, 7vw, 110px);
}
.italic {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--text);
  max-width: 60ch;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 140px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.hero__inner {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(54px, 9vw, 148px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 14px 0 36px;
  max-width: 14ch;
}
.hero__title span { display: block; overflow: hidden; }
.hero__title-italic {
  font-style: italic;
  color: var(--accent);
  display: inline-block;
  font-weight: 400;
}

.hero__lead {
  font-family: var(--sans);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 50ch;
  margin-bottom: 48px;
  font-weight: 300;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 96px;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 64px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  max-width: 600px;
}
.hero__meta-key {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 500;
}
.hero__meta-val {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
}

.hero__seal {
  position: absolute;
  right: clamp(-60px, 2vw, 60px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(280px, 36vw, 520px);
  aspect-ratio: 1;
  z-index: 2;
  pointer-events: none;
  display: grid;
  place-items: center;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
}

.hero__seal-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter:
    drop-shadow(0 0 1px rgba(232, 201, 135, 0.4))
    drop-shadow(0 30px 80px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 60px rgba(201, 169, 97, 0.08));
  transform: perspective(1200px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 0.6s var(--ease);
  will-change: transform;
}

.hero__seal-glow {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 169, 97, 0.18), transparent 55%),
    radial-gradient(circle at 30% 40%, rgba(232, 201, 135, 0.10), transparent 60%);
  filter: blur(20px);
  z-index: -1;
  animation: sealPulse 7s ease-in-out infinite;
}

@keyframes sealPulse {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.04); }
}

/*
 * SVG <g> rotation: must use viewBox-unit origin (250 = center of 500x500 viewBox).
 * Avoid transform-box: fill-box here — it conflicts with user-space units in some
 * Chromium builds and causes a drifting orbit instead of a centered spin.
 */
.hero__seal-rotate {
  transform-origin: 250px 250px;
  animation: sealRotate 90s linear infinite;
}
@keyframes sealRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero__seal-arc {
  font-feature-settings: "ss01";
  text-transform: uppercase;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  z-index: 4;
}
.scroll-hint__line {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-hint__line::after {
  content: "";
  position: absolute;
  top: -56px;
  left: 0;
  width: 1px;
  height: 56px;
  background: var(--accent-bright);
  animation: scrollLine 2.4s var(--ease) infinite;
}
@keyframes scrollLine {
  0%   { top: -56px; }
  100% { top: 100%; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid;
  position: relative;
  overflow: hidden;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.3s var(--ease);
  isolation: isolate;
  white-space: nowrap;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease);
  z-index: -1;
}
.btn:hover::before { transform: translateY(0); }
.btn--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn--primary::before { background: var(--accent-bright); }
.btn--primary:hover { color: var(--bg); border-color: var(--accent-bright); }
.btn--ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: transparent;
}
.btn--ghost:hover { color: var(--bg); border-color: var(--accent); }
.btn--lg {
  padding: 22px 44px;
  font-size: 13px;
}

/* =========================================================
   Marquee
   ========================================================= */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 26px 0;
  margin-top: 40px;
  background: var(--bg-soft);
  position: relative;
  z-index: 2;
}
.marquee__track {
  display: inline-flex;
  gap: 38px;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 36px);
  color: var(--text-muted);
}
.marquee__track span:nth-child(odd):not(:nth-child(2n+2)) { color: var(--accent); }
.marquee__track span { display: inline-block; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   About
   ========================================================= */
.about {
  padding-top: clamp(100px, 12vw, 180px);
  padding-bottom: clamp(100px, 12vw, 180px);
  max-width: var(--container);
  margin: 0 auto;
}
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 6vw, 120px);
  align-items: start;
}
.about__left { position: sticky; top: 120px; }

.about__right p { color: var(--text-muted); margin-bottom: 24px; }
.about__right .lead { color: var(--text); margin-bottom: 28px; }

.about__list {
  list-style: none;
  margin-top: 56px;
  border-top: 1px solid var(--line);
}
.about__list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.about__list-num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
}
.about__list h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--text);
}
.about__list p { color: var(--text-muted); font-size: 15px; }

/* =========================================================
   Services
   ========================================================= */
.services {
  padding-top: clamp(100px, 12vw, 180px);
  padding-bottom: clamp(100px, 12vw, 180px);
  max-width: var(--container);
  margin: 0 auto;
}
.services__head {
  text-align: center;
  margin-bottom: clamp(60px, 8vw, 100px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  position: relative;
  padding: clamp(32px, 4vw, 56px);
  background: var(--bg);
  transition: background 0.5s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(201, 169, 97, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.card:hover { background: var(--bg-soft); }
.card:hover::before { opacity: 1; }

.card__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 32px;
  letter-spacing: 0.05em;
}
.card__title {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 400;
  margin-bottom: 18px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card__desc {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 38ch;
}
.card__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card__tags li {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.card:hover .card__tags li { border-color: rgba(201, 169, 97, 0.3); color: var(--text); }

/* =========================================================
   Contact
   ========================================================= */
.contact {
  padding-top: clamp(100px, 12vw, 180px);
  padding-bottom: clamp(100px, 12vw, 180px);
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.08), transparent 70%);
  pointer-events: none;
}

.contact__inner {
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  width: 100%;
  margin: clamp(60px, 8vw, 100px) 0 clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--line);
  padding-top: 56px;
}
.contact__col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact__key {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}
.contact__val {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
}

.link {
  position: relative;
  color: var(--text);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 2px;
  transition: color 0.3s ease, background-size 0.4s var(--ease);
}
.link:hover {
  color: var(--accent);
  background-size: 0% 1px;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  padding: 36px var(--pad-x);
  border-top: 1px solid var(--line);
  background: var(--bg);
  position: relative;
  z-index: 2;
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-muted);
}
.footer__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 14px;
  font-style: normal;
}
.footer__legal { display: flex; gap: 10px; flex-wrap: wrap; }

/* =========================================================
   Reveal animations (driven via IntersectionObserver)
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal[data-reveal="left"]  { transform: translate3d(-28px, 0, 0); }
.reveal[data-reveal="right"] { transform: translate3d(28px, 0, 0); }
.reveal[data-reveal="fade"]  { transform: none; }
.reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .nav__menu {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transform: translateY(-100%);
    transition: transform 0.5s var(--ease);
    z-index: 90;
  }
  .nav__menu.is-open { transform: translateY(0); }
  .nav__menu a { font-size: 18px; letter-spacing: 0.12em; }

  .nav__burger { display: flex; }

  .hero { padding-top: 120px; }
  .hero__seal {
    opacity: 0.16;
    right: -10vw;
    width: 90vw;
    top: 55%;
  }
  .hero__cta { margin-bottom: 64px; }
  .hero__meta {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .hero__meta-val { font-size: 22px; }

  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .about__left { position: static; }

  .services__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: repeat(2, 1fr); gap: 32px; padding-top: 40px; }
}

@media (max-width: 560px) {
  .nav { padding: 18px 20px; }
  .nav__logo-text span:last-child { font-size: 17px; }
  .nav__right { gap: 14px; }

  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .hero__meta { grid-template-columns: 1fr 1fr; gap: 20px; }

  .about__list li { grid-template-columns: 48px 1fr; gap: 14px; }
  .about__list-num { font-size: 22px; }
  .about__list h3 { font-size: 22px; }

  .contact__grid { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .scroll-hint { display: none; }
}
