/* ============================================================
   ÓPTICA ALEN — sistema visual
   Mobile-first. Cream/espresso boutique palette.
   ============================================================ */

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

:root {
  /* Palette */
  --cream:        #F5F1EA;
  --cream-deep:   #EFEAE0;
  --cream-light:  #FAF7F1;
  --espresso:     #2B2620;
  --espresso-deep:#1A1612;
  --bronze:       #8A6F4A;
  --bronze-soft:  #A18860;
  --sand:         #C9B79C;
  --sand-light:   #DCCDB4;
  --line:         rgba(43, 38, 32, 0.14);
  --line-strong:  rgba(43, 38, 32, 0.30);
  --muted:        rgba(43, 38, 32, 0.62);

  /* Type */
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans:  'Manrope', system-ui, -apple-system, sans-serif;
  --mono:  ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;

  /* Spacing scale (rem at 16px) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* Easing */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::selection { background: var(--espresso); color: var(--cream); }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--espresso);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.serif { font-family: var(--serif); font-weight: 400; }
.sans  { font-family: var(--sans);  }
.mono  { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.015em;
  text-wrap: balance;
  font-size: clamp(48px, 12vw, 144px);
}
.display .it { font-style: italic; font-weight: 300; color: var(--bronze); }

.title-xl {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.012em;
  font-size: clamp(40px, 8vw, 96px);
}
.title-lg {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-size: clamp(32px, 5.5vw, 64px);
}
.title-md {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  font-size: clamp(24px, 3.4vw, 40px);
}
.lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.35;
  color: var(--espresso);
  text-wrap: pretty;
}
.body-lg { font-size: 17px; line-height: 1.6; color: var(--espresso); }
.body    { font-size: 15px; line-height: 1.6; color: var(--espresso); }
.body-sm { font-size: 13px; line-height: 1.55; color: var(--muted); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) { .container { padding: 0 48px; } }
@media (min-width: 1280px) { .container { padding: 0 64px; } }

.section { padding: 80px 0; }
.section-lg { padding: 96px 0; }
@media (min-width: 768px) {
  .section { padding: 120px 0; }
  .section-lg { padding: 160px 0; }
}

.divider { height: 1px; background: var(--line); width: 100%; }
.divider-strong { height: 1px; background: var(--line-strong); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.4s var(--ease-out), padding 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(245, 241, 234, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
  padding: 10px 0;
}
.nav.is-light {
  color: var(--cream);
}
.nav.is-light.is-scrolled {
  color: var(--espresso);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-brand .nav-glasses {
  width: 24px; height: 12px;
  flex-shrink: 0;
}
.nav-links {
  display: none;
  list-style: none;
  gap: 36px;
}
.nav-links a {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 6px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right 0.4s var(--ease-out);
}
.nav-links a:hover::after,
.nav-links a.is-active::after { right: 0; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.lang-switcher {
  display: flex;
  gap: 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.lang-switcher button {
  padding: 6px 8px;
  opacity: 0.5;
  transition: opacity 0.2s;
  font-weight: 500;
}
.lang-switcher button.is-active { opacity: 1; }
.lang-switcher button:hover { opacity: 1; }
.lang-switcher .sep { opacity: 0.3; padding: 6px 0; }

.nav-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  margin-right: -8px;
}
.nav-menu-btn span {
  display: block;
  width: 22px; height: 1px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out), opacity 0.2s;
}
.nav-menu-btn.is-open span:nth-child(1) { transform: translateY(2.5px) rotate(45deg); }
.nav-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.nav-menu-btn.is-open span:nth-child(3) { transform: translateY(-2.5px) rotate(-45deg); }

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-menu-btn { display: none; }
}

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 90;
  padding: 96px 28px 40px;
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease-soft);
  display: flex;
  flex-direction: column;
}
.nav-drawer.is-open { transform: translateY(0); }
.nav-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.nav-drawer-links li {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.nav-drawer-links a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 24px 0;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  transition: transform 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
.nav-drawer-links a .num {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--bronze);
}
.nav-drawer-links a:hover { transform: translateX(8px); color: var(--bronze); }
.nav-drawer-footer {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.btn .arrow {
  display: inline-block;
  transition: transform 0.4s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--espresso);
  color: var(--cream);
  border-color: var(--espresso);
}
.btn-primary:hover {
  background: var(--bronze);
  border-color: var(--bronze);
}
.btn-outline {
  background: transparent;
  color: var(--espresso);
  border-color: var(--espresso);
}
.btn-outline:hover {
  background: var(--espresso);
  color: var(--cream);
}
.btn-light {
  background: var(--cream);
  color: var(--espresso);
  border-color: var(--cream);
}
.btn-light:hover { background: transparent; color: var(--cream); border-color: var(--cream); }

.btn-ghost {
  padding: 0;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid currentColor;
  padding-bottom: 6px;
}

/* ============================================================
   PLACEHOLDER IMAGES (monochrome, labeled)
   ============================================================ */
.ph {
  position: relative;
  background: var(--cream-deep);
  color: var(--bronze);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
.ph::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 14px,
      rgba(138, 111, 74, 0.07) 14px,
      rgba(138, 111, 74, 0.07) 15px
    );
}
.ph::after {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(138, 111, 74, 0.35);
  pointer-events: none;
}
.ph-label {
  position: relative;
  z-index: 2;
  padding: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  max-width: 80%;
}
.ph-label::before {
  content: '◆ ';
  opacity: 0.6;
}
.ph-dark {
  background: var(--espresso);
  color: var(--sand);
}
.ph-dark::after { border-color: rgba(201, 183, 156, 0.25); }
.ph-dark .ph-label { color: var(--sand); }

.ph-1-1 { aspect-ratio: 1/1; }
.ph-4-5 { aspect-ratio: 4/5; }
.ph-3-4 { aspect-ratio: 3/4; }
.ph-16-9 { aspect-ratio: 16/9; }
.ph-9-16 { aspect-ratio: 9/16; }

/* Real images (replace placeholders) — fill the figure, crop to cover */
.real-img {
  position: relative;
  overflow: hidden;
  background: var(--cream-deep);
}
.real-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Variant: image keeps its natural aspect-ratio (no crop), no surrounding box. */
.real-img--natural { aspect-ratio: auto; background: transparent; }
.real-img--natural img { position: static; width: 100%; height: auto; inset: auto; }

/* Video placeholder (hero) */
.hero-video {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(60, 50, 40, 0.4) 0%, rgba(20, 16, 12, 0.85) 70%),
    linear-gradient(140deg, #3a2f24 0%, #1a1410 100%);
  overflow: hidden;
}
.hero-video::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(135deg, transparent 0, transparent 22px, rgba(255,255,255,0.025) 22px, rgba(255,255,255,0.025) 23px);
}
.hero-video::after {
  content: '';
  position: absolute;
  inset: 24px;
  border: 1px dashed rgba(245, 241, 234, 0.18);
}
.hero-video-label {
  position: absolute;
  top: 32px; left: 32px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(245, 241, 234, 0.55);
  z-index: 2;
}
.hero-video-label::before { content: '▶ '; }

/* Floating "eye" pulse decoration in hero video */
.hero-video-pulse {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 200px; height: 200px;
  border: 1px solid rgba(201, 183, 156, 0.25);
  border-radius: 50%;
  animation: pulse 3.6s var(--ease-out) infinite;
  z-index: 1;
}
.hero-video-pulse::after {
  content: '';
  position: absolute;
  inset: -40px;
  border: 1px solid rgba(201, 183, 156, 0.12);
  border-radius: 50%;
  animation: pulse 3.6s var(--ease-out) 1.2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.7); opacity: 0; }
  30% { opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ============================================================
   SCROLL REVEALS
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-soft), transform 0.9s var(--ease-soft);
  transition-delay: var(--delay, 0s);
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="fade"] { transform: none; }
[data-reveal="slide-left"] { transform: translateX(40px); }
[data-reveal="slide-left"].is-in { transform: translateX(0); }

/* "mask" — line/heading rises up while fading in.
   (Replaces clip-path reveals, which transition unreliably in Safari.) */
[data-reveal="mask"] {
  opacity: 0;
  transform: translateY(0.55em);
  transition: opacity 0.9s var(--ease-soft), transform 1.1s var(--ease-soft);
  transition-delay: var(--delay, 0s);
}
[data-reveal="mask"].is-in { opacity: 1; transform: none; }

/* "mask-image" — image settles upward with a subtle scale-down */
[data-reveal="mask-image"] {
  opacity: 0;
  transform: translateY(36px) scale(1.03);
  transform-origin: center;
  transition: opacity 1s var(--ease-soft), transform 1.3s var(--ease-soft);
  transition-delay: var(--delay, 0s);
}
[data-reveal="mask-image"].is-in { opacity: 1; transform: none; }

/* Text reveal: words flow inline and fade up in a staggered sequence */
.split-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 0.6s var(--ease-soft), transform 0.85s var(--ease-soft);
  transition-delay: calc(var(--word-i, 0) * 32ms + var(--delay, 0s));
  will-change: transform, opacity;
}
.split-host.is-in .split-word {
  opacity: 1;
  transform: none;
}

/* ============================================================
   MOBILE-FIRST ANIMATIONS (more impactful on small screens)
   ============================================================ */
@media (max-width: 767px) {
  /* Deeper travel distance on mobile */
  [data-reveal] {
    transform: translateY(44px);
    transition-duration: 1s;
  }
  [data-reveal="mask"] {
    transform: translateY(0.8em);
    transition-duration: 1.2s;
  }
  /* Images scale in more dramatically */
  [data-reveal="mask-image"] {
    transform: translateY(48px) scale(1.06);
    transition-duration: 1.4s;
  }
  /* Brand cards slide up staggered */
  .brand-card,
  .testimonial,
  .team-card,
  .value {
    transition: transform 0.5s var(--ease-out), opacity 0.8s var(--ease-soft), box-shadow 0.4s;
  }
  /* Tap feedback on interactive elements */
  .btn:active,
  .brand-card:active,
  .service-row:active,
  .brand-row a:active,
  .chip:active {
    transform: scale(0.97) !important;
    transition-duration: 0.15s !important;
  }
  /* Marquee slower on mobile for readability */
  .marquee-track { animation-duration: 40s; }
}

/* Scroll-linked subtle parallax for any element */
@media (min-width: 768px) {
  .brand-card:hover figure img {
    transform: scale(1.06);
    transition: transform 0.8s var(--ease-out);
  }
  .service-row:hover {
    background: var(--cream);
    transition: background 0.4s, padding-left 0.5s var(--ease-out);
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--espresso);
  color: var(--cream);
  padding: 80px 0 32px;
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(245, 241, 234, 0.14);
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
  }
}
.footer-brand .display-mark {
  font-family: var(--serif);
  font-size: clamp(64px, 12vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.footer-logo {
  display: block;
  width: 260px;
  max-width: 75%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 24px;
}
.footer-brand p { color: var(--sand); max-width: 320px; font-size: 14px; }
.footer h6 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 20px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.footer ul a { transition: color 0.3s; opacity: 0.8; }
.footer ul a:hover { opacity: 1; color: var(--sand); }
.footer-bottom {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 12px;
  color: rgba(245, 241, 234, 0.5);
  font-family: var(--mono);
  letter-spacing: 0.08em;
}
.footer-bottom span { overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .footer-bottom { font-size: 11px; letter-spacing: 0.04em; }
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ============================================================
   WHATSAPP FLOATING
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--espresso);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  box-shadow: 0 14px 40px rgba(20, 16, 12, 0.3);
  transition: transform 0.4s var(--ease-out), background 0.4s var(--ease-out);
}
.wa-float:hover {
  transform: scale(1.08);
  background: var(--bronze);
}
.wa-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--espresso);
  opacity: 0;
  animation: wa-ring 2.4s ease-out infinite;
}
@keyframes wa-ring {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}
.wa-float svg { width: 26px; height: 26px; }

/* ============================================================
   COOKIES BANNER
   ============================================================ */
.cookies {
  position: fixed;
  bottom: 20px; left: 20px;
  max-width: 360px;
  background: var(--cream-light);
  border: 1px solid var(--line);
  padding: 20px;
  z-index: 90;
  font-size: 13px;
  line-height: 1.5;
  transform: translateY(160%);
  transition: transform 0.7s var(--ease-soft);
  box-shadow: 0 24px 60px rgba(20, 16, 12, 0.15);
}
.cookies.is-visible { transform: translateY(0); }
.cookies p { margin-bottom: 14px; color: var(--espresso); }
.cookies-actions { display: flex; gap: 10px; }
.cookies-actions button {
  flex: 1;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--espresso);
  border-radius: 999px;
  transition: background 0.3s, color 0.3s;
}
.cookies-actions .accept { background: var(--espresso); color: var(--cream); }
.cookies-actions .accept:hover { background: var(--bronze); border-color: var(--bronze); }
.cookies-actions .deny:hover { background: var(--espresso); color: var(--cream); }
@media (max-width: 520px) {
  .cookies { left: 16px; right: 16px; bottom: 84px; max-width: none; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.marquee-track {
  display: flex;
  flex-shrink: 0;
  animation: marquee 60s linear infinite;
  gap: 64px;
  padding-right: 64px;
}
.marquee-item {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--espresso);
  white-space: nowrap;
}
.marquee-item .dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bronze);
  margin: 0 32px;
  vertical-align: middle;
}
.marquee-item .italic { font-style: italic; color: var(--bronze); font-weight: 300; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ============================================================
   PAGE TRANSITION
   ============================================================ */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--espresso);
  z-index: 200;
  transform: translateY(100%);
  pointer-events: none;
}
.page-transition.is-covering {
  transform: translateY(0);
  transition: transform 0.7s var(--ease-soft);
}
.page-transition.is-revealing {
  transform: translateY(-100%);
  transition: transform 0.9s var(--ease-soft);
}



/* ============================================================
   HELPERS
   ============================================================ */
.text-center { text-align: center; }
.text-bronze { color: var(--bronze); }
.text-muted  { color: var(--muted); }
.italic { font-style: italic; }
.upper { text-transform: uppercase; letter-spacing: 0.08em; }

.grid { display: grid; gap: 32px; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 24px; }
.gap-6 { gap: 32px; }
.gap-7 { gap: 48px; }

.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }
.mt-6 { margin-top: 32px; }
.mt-7 { margin-top: 48px; }
.mt-8 { margin-top: 64px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; clip-path: none; }
  .split-word { opacity: 1; transform: none; }
}
