/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #0E0C08;
  --bg-2:      #16130D;
  --bg-3:      #1E1A12;
  --cream:     #F3EDE0;
  --cream-2:   #D9CDB0;
  --cream-3:   #8C8272;
  --gold:      #C9A15A;
  --gold-2:    #E4C578;
  --gold-dark: #8B6F35;
  --line:      rgba(243,237,224,.14);

  --serif: "Playfair Display", Georgia, serif;
  --sans:  "Montserrat", "Segoe UI", system-ui, sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@property --mesh-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --mesh-x     { syntax: "<percentage>"; inherits: false; initial-value: 40%; }
@property --mesh-y     { syntax: "<percentage>"; inherits: false; initial-value: 40%; }

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { font-family: var(--serif); text-wrap: balance; line-height: 1.1; letter-spacing: -0.01em; font-weight: 600; }
em { font-style: italic; color: var(--gold-2); }
ul { list-style: none; padding: 0; }
::selection { background: var(--gold); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 1.5rem; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--gold); color: var(--bg);
  border-radius: 8px; font-weight: 600; transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.kicker {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .9rem;
}

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  max-width: 20ch;
  margin-bottom: 1.1rem;
}

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 1.6rem;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 999px;
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background-color .3s, color .3s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #1a1508;
  box-shadow: 0 4px 18px rgba(201,161,90,.22);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(201,161,90,.35); }
.btn-primary:active { transform: translateY(-1px); transition-duration: .12s; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); transform: translateY(-3px); }

.btn-sm { padding: .55rem 1.2rem; font-size: .82rem; }
.btn-lg { padding: 1.05rem 2.2rem; font-size: 1rem; }

.has-magnetic { display: inline-flex; position: relative; isolation: isolate; }
.magnetic-inner {
  display: inline-flex; align-items: center; justify-content: center; gap: inherit;
  will-change: transform;
  transition: transform .8s var(--ease-soft);
}

/* =============================================================
   4b. Splash loader (double safety: CSS 4.5s + JS)
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: grid; place-items: center;
  pointer-events: auto;
  transition: opacity .9s, clip-path 1.1s;
  animation: splashSafety .01s 4.5s forwards;
}
.splash.is-out { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }
.splash-logo { width: 100px; animation: splashPulse 1.6s var(--ease-soft) infinite; }
@keyframes splashPulse { 0%,100% { opacity: .75; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .splash-logo { animation: none; } }

/* =============================================================
   5. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  transition: background-color .4s var(--ease-out), backdrop-filter .4s var(--ease-out), box-shadow .4s var(--ease-out), padding .3s;
  padding-block: 1.1rem;
}
.nav.is-scrolled {
  background: rgba(14,12,8,.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
  padding-block: .7rem;
}
.nav-inner { display: flex; align-items: center; gap: 1.5rem; }
.nav-brand { display: flex; align-items: center; gap: .6rem; margin-right: auto; }
.nav-logo { width: 40px; height: auto; }
.nav-wordmark {
  font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
  letter-spacing: .01em; color: var(--cream);
}
.nav-wordmark em { color: var(--gold); font-style: normal; }
.nav-links { display: none; gap: 1.8rem; }
.nav-link {
  position: relative; padding: .3rem 0; font-size: .88rem; font-weight: 500; color: var(--cream-2);
  transition: color .3s;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--gold); transition: width .35s var(--ease-out);
}
.nav-link:hover { color: var(--cream); }
.nav-link:hover::after { width: 100%; }
.nav-cta { display: none; }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 0;
}
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--cream); transition: transform .3s, opacity .3s; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 95;
  background: var(--bg); color: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-soft);
}
.nav-mobile[aria-hidden="false"] { clip-path: inset(0); }
.nav-mobile a { font-family: var(--serif); font-size: 1.5rem; }

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding-block: 8rem 4rem;
  overflow: hidden;
  isolation: isolate;
}
.hero-mesh {
  position: absolute; inset: -10%; z-index: -1;
  background:
    radial-gradient(55% 45% at var(--mesh-x) var(--mesh-y), rgba(201,161,90,.30), transparent 62%),
    conic-gradient(from var(--mesh-angle), rgba(228,197,120,.14), rgba(139,111,53,.06), rgba(201,161,90,.16), rgba(228,197,120,.14));
  filter: blur(90px) saturate(120%);
  opacity: .85;
  animation: meshShift 24s linear infinite;
}
@keyframes meshShift {
  0%   { --mesh-angle: 0deg;   --mesh-x: 30%; --mesh-y: 34%; }
  50%  { --mesh-angle: 180deg; --mesh-x: 68%; --mesh-y: 58%; }
  100% { --mesh-angle: 360deg; --mesh-x: 30%; --mesh-y: 34%; }
}
.hero-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .1; mix-blend-mode: overlay; z-index: -1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}
.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-glyph { color: var(--gold); margin-bottom: 1.3rem; opacity: .9; }
.hero-title {
  font-size: clamp(2.3rem, 6.6vw, 4.4rem);
  line-height: 1.08;
  max-width: 18ch;
  margin-bottom: 1.4rem;
}
.split-word { display: inline-block; }
.hero-sub {
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--cream-2);
  margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

.hero-scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1px solid var(--line); border-radius: 999px;
  display: grid; place-items: center;
}
.hero-scroll-cue span {
  width: 3px; height: 8px; border-radius: 999px; background: var(--gold);
  animation: scrollCue 1.8s var(--ease-soft) infinite;
}
@keyframes scrollCue { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(10px); opacity: .3; } }

/* =============================================================
   7. Compromiso
   ============================================================= */
.compromiso { padding-block: 6.5rem; background: var(--bg-2); }
.compromiso-lede { max-width: 58ch; color: var(--cream-2); font-size: 1.05rem; margin-bottom: 3.2rem; }
.pillars { display: grid; gap: 2rem; }
.pillar { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.pillar-num { font-family: var(--serif); font-style: italic; color: var(--gold-dark); font-size: 1.2rem; }
.pillar h3 { font-size: 1.25rem; margin-block: .5rem .6rem; }
.pillar p { color: var(--cream-3); font-size: .96rem; }

/* =============================================================
   8. Team
   ============================================================= */
.team { padding-block: 6.5rem; }
.team .section-title { max-width: 26ch; }
.team-grid { display: grid; gap: 2.2rem; margin-top: 3rem; }
.team-card {
  --rx: 0deg; --ry: 0deg;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft), box-shadow .55s var(--ease-soft);
}
.team-card:hover {
  transition-duration: .15s;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.5), 0 0 0 1px rgba(201,161,90,.25);
}
.team-photo { aspect-ratio: 4/5; overflow: hidden; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-soft), filter .6s; }
.team-card:hover .team-photo img { transform: scale(1.06); filter: saturate(1.1) brightness(1.03); }
.team-info { padding: 1.8rem; transform: translateZ(30px); }
.team-info h3 { font-size: 1.35rem; margin-bottom: .3rem; }
.team-role { color: var(--gold); font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1rem; }
.team-bio { color: var(--cream-3); font-size: .94rem; margin-bottom: 1.2rem; }
.team-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.team-tags li {
  font-size: .74rem; padding: .32rem .7rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--cream-2);
}

/* =============================================================
   9. Practice marquee
   ============================================================= */
.practice { padding-block: 4.5rem; background: var(--bg-2); border-block: 1px solid var(--line); }
.practice-kicker { text-align: center; }
.marquee { overflow: hidden; position: relative; }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--bg-2), transparent); }
.marquee-track {
  display: inline-flex; gap: .9rem; white-space: nowrap; will-change: transform;
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--cream-2);
}
.marquee-track .dot { color: var(--gold-dark); }

/* =============================================================
   10. CTA banner
   ============================================================= */
.cta-banner {
  padding-block: 7rem;
  text-align: center;
  position: relative;
  background: radial-gradient(60% 80% at 50% 0%, rgba(201,161,90,.14), transparent 70%), var(--bg);
}
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta-inner .kicker { }
.cta-inner .section-title { max-width: 24ch; }
.cta-sub { color: var(--cream-2); max-width: 44ch; margin-bottom: 2rem; }
.cta-alt { margin-top: 1.1rem; font-size: .88rem; color: var(--cream-3); }
.cta-alt a { color: var(--gold-2); text-decoration: underline; text-decoration-color: rgba(228,197,120,.35); }
.cta-alt a:hover { text-decoration-color: var(--gold-2); }

/* =============================================================
   11. Footer
   ============================================================= */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 2rem; padding-block: 3.2rem;
}
.footer-brand { display: flex; align-items: center; gap: .9rem; }
.footer-brand img { width: 46px; }
.footer-brand p { font-family: var(--serif); font-size: 1rem; }
.footer-brand span { display: block; font-family: var(--sans); font-size: .78rem; color: var(--cream-3); margin-top: .2rem; }
.footer-contact { font-family: var(--sans); font-size: .82rem; margin-top: .6rem; line-height: 1.6; }
.footer-contact a { color: var(--cream-2); transition: color .3s; }
.footer-contact a:hover { color: var(--gold); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-links a { font-size: .88rem; color: var(--cream-2); transition: color .3s; }
.footer-links a:hover { color: var(--gold); }
.footer-social { display: flex; gap: .7rem; }
.social-icon {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 999px; color: var(--cream-2);
  transition: color .3s, border-color .3s, transform .3s var(--ease-soft);
}
.social-icon:hover { color: var(--gold); border-color: var(--gold); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 1.4rem; }
.footer-bottom p { text-align: center; font-size: .8rem; color: var(--cream-3); }

/* =============================================================
   12. Floating WhatsApp button
   ============================================================= */
.whatsapp-float {
  position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 90;
  width: 58px; height: 58px; border-radius: 999px;
  background: #1fb855; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: transform .4s var(--ease-bounce), box-shadow .4s;
}
.whatsapp-float:hover { transform: scale(1.08) translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,.45); }

/* =============================================================
   13. Reveal on scroll
   ============================================================= */
[data-reveal] {
  opacity: 0; transform: translateY(36px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* =============================================================
   14. Responsive (mobile-first)
   ============================================================= */
@media (min-width: 720px) {
  .pillars { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .team-card { grid-template-columns: 40% 1fr; }
  .team-photo { aspect-ratio: auto; height: 100%; }
}

@media (min-width: 1280px) {
  .hero-title { max-width: 20ch; }
}

/* =============================================================
   15. Reduced motion — only intrusive effects gated
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh { animation-duration: 60s; }
  .hero-scroll-cue span { animation: none; }
  [data-reveal] { transition-duration: .3s; }
}
