/* ============ Tokens ============ */
:root {
  --bg: #FDFBF9;
  --surface: #FFFFFF;
  --peach-050: #FFF6EF;
  --peach-100: #FFEEDF;
  --peach-200: #FFDFC5;
  --accent: #F8A76F;
  --accent-deep: #E88B4C;
  --ink: #33302D;
  --gray: #7A756F;
  --line: #EFE9E2;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font-display: "Montserrat", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ============ Type ============ */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.accent { color: var(--accent-deep); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.section-sub { color: var(--gray); margin-top: 0.5rem; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 251, 249, 0.72);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-dot { color: var(--accent-deep); }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray);
  text-decoration: none;
  transition: color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--ink); }
}
.nav-cta {
  color: var(--accent-deep) !important;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  width: min(1072px, calc(100% - 48px));
  height: min(70svh, 600px);
  min-height: 420px;
  margin: 24px auto 0;
  border-radius: 24px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  animation: hero-settle 1400ms var(--ease-out) both;
}

@keyframes hero-settle {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

/* Scrim sutil para que el nombre lea sobre la foto */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(38, 28, 20, 0.5) 0%, rgba(38, 28, 20, 0.12) 32%, rgba(38, 28, 20, 0) 52%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  text-align: center;
  padding: 0 24px clamp(28px, 5vh, 56px);
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: rgba(255, 251, 246, 0.94);
  text-shadow: 0 2px 30px rgba(38, 28, 20, 0.35);
  animation: hero-rise 900ms var(--ease-out) 150ms both;
}

.hero-tag {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 251, 246, 0.78);
  animation: hero-rise 900ms var(--ease-out) 320ms both;
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8em 1.6em;
  border-radius: 999px;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--accent-deep); }
}
.btn-ghost { color: var(--ink); border: 1px solid var(--line); background: var(--surface); }
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }
}
.btn-big { font-size: 1.05rem; padding: 1em 2em; }

/* ============ Clients strip (marquee) ============ */
.clients {
  padding-top: 8px;
  padding-bottom: 56px;
}
.clients p {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #A8A29B;
  white-space: nowrap;
  flex-shrink: 0;
}

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ Work ============ */
.work { padding: 72px 0; border-top: 1px solid var(--line); }

.section-head { margin-bottom: 1.8rem; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2rem; }

.pill {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--gray);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5em 1.1em;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.pill:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) {
  .pill:hover { border-color: var(--accent); color: var(--accent-deep); }
}
.pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

/* Card (facade before the IG iframe loads) */
.card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: var(--peach-050);
  border: 1px solid var(--line);
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
}
.card.is-hidden { display: none; }

.card.is-entering {
  animation: card-in 320ms var(--ease-out) var(--enter-delay, 0ms) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.card-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px;
  text-align: left;
  font-family: var(--font-body);
}
.card:nth-child(3n+1) .card-facade { background: linear-gradient(160deg, #FFF6EF 0%, #FFE3CC 100%); }
.card:nth-child(3n+2) .card-facade { background: linear-gradient(160deg, #FAF7F4 0%, #EFE6DC 100%); }
.card:nth-child(3n)   .card-facade { background: linear-gradient(160deg, #FFF1E4 0%, #F7D8BE 100%); }

.card-facade .chip,
.card-facade .play,
.card-facade .card-label {
  position: relative;
  z-index: 1;
}

.card-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(25, 20, 16, 0.62) 0%, rgba(25, 20, 16, 0.08) 34%, rgba(25, 20, 16, 0) 50%);
  pointer-events: none;
}

/* Con portada de foto, chip/label pasan a blanco */
.card-facade:has(.card-thumb) .chip {
  color: #fff;
  background: rgba(25, 20, 16, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.card-facade:has(.card-thumb) .card-label {
  color: #fff;
  text-shadow: 0 1px 12px rgba(25, 20, 16, 0.5);
}
.card-facade:not(:has(.card-thumb)) .card-scrim { display: none; }

@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-4px); }
  .card:hover .play { background: var(--accent); }
  .card:hover .play svg { fill: #fff; }
}
.card-facade:active { transform: scale(0.98); transition: transform 120ms var(--ease-out); }

.chip {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 0.4em 0.9em;
}

.play {
  align-self: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(232, 139, 76, 0.25);
  transition: background-color 180ms ease;
}
.play svg { fill: var(--accent-deep); margin-left: 3px; transition: fill 180ms ease; }

.card-label {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.25;
}

.card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.grid-empty {
  grid-column: 1 / -1;
  color: var(--gray);
  text-align: center;
  padding: 3rem 0;
}

/* ============ About ============ */
.about { background: var(--peach-050); padding: 88px 0; }

.about-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: start;
}

.about-lede {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 1.4rem 0 1rem;
}
.about-text p + p { margin-top: 1rem; color: var(--gray); }

.about-list { list-style: none; margin-top: 4.4rem; }
.about-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--peach-200);
  font-weight: 500;
}
.about-list .num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-deep);
  letter-spacing: 0.05em;
}

/* ============ Contact ============ */
.contact { padding: 110px 0; text-align: center; }
.contact-title { margin-bottom: 1rem; }
.contact-sub { color: var(--gray); margin-bottom: 2.2rem; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  background: #25D366;
  color: #fff;
}
@media (hover: hover) and (pointer: fine) {
  .btn-whatsapp:hover { background: #1EBE5B; }
}
.wa-icon { flex-shrink: 0; }

.contact-phone { margin-top: 1.6rem; }
.contact-phone a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .contact-phone a:hover { color: var(--ink); }
}

/* ============ WhatsApp float ============ */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.38), 0 2px 8px rgba(38, 28, 20, 0.12);
  transition: transform 180ms var(--ease-out), background-color 150ms ease, box-shadow 180ms ease;
  animation: wa-in 600ms var(--ease-out) 900ms both;
}
@media (hover: hover) and (pointer: fine) {
  .wa-float:hover {
    background: #1EBE5B;
    transform: scale(1.06);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45), 0 3px 10px rgba(38, 28, 20, 0.14);
  }
}
.wa-float:active { transform: scale(0.94); }

@keyframes wa-in {
  from { opacity: 0; transform: scale(0.9) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============ Footer ============ */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: #A8A29B;
}
.footer-phone {
  color: inherit;
  text-decoration: none;
  transition: color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .footer-phone:hover { color: var(--ink); }
}

/* ============ Reveal on scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 550ms var(--ease-out), transform 550ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ Responsive ============ */
@media (max-width: 820px) {
  .hero { width: calc(100% - 32px); height: min(62svh, 520px); border-radius: 18px; }
  .hero-bg { object-position: 42% 28%; }
  .about-inner { grid-template-columns: 1fr; gap: 8px; }
  .about-list { margin-top: 1.5rem; }
  .nav { gap: 1rem; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: opacity 200ms ease; transform: none; }
  .card, .btn, .pill, .card-facade { transition: none; }
  .hero-bg, .hero-name, .hero-tag { animation: none; }
  .marquee-track { animation: none; }
  .card.is-entering { animation: none; }
  .wa-float { animation: none; transition: background-color 150ms ease; }
  @media (hover: hover) { .card:hover { transform: none; } }
}
