/* ==========================================================================
   Adri Escalante — UGC Portfolio
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --ink: #131313;
  --ink-soft: #2a2a2a;
  --muted: #6f6c67;
  --accent: #fb2c37;
  --accent-hover: #d81f29;
  --line: rgba(19,19,19,0.13);
  --line-light: rgba(255,255,255,0.22);
  --radius: 10px;
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
  --ff-display: "Plus Jakarta Sans", -apple-system, sans-serif;
  --ff-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  overscroll-behavior-y: none;
  background: var(--bg);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  overflow-x: clip;
  overscroll-behavior-y: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Ambient background ---------- */
.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  will-change: transform;
}
.blob-1 {
  width: 46vmax;
  height: 46vmax;
  top: -14vmax;
  left: -10vmax;
  background: radial-gradient(circle, rgba(251,44,55,0.28), rgba(251,44,55,0) 72%);
  animation: driftA 19s ease-in-out infinite alternate;
}
.blob-2 {
  width: 40vmax;
  height: 40vmax;
  top: 6vmax;
  right: -12vmax;
  background: radial-gradient(circle, rgba(255,130,110,0.24), rgba(255,130,110,0) 72%);
  animation: driftB 24s ease-in-out infinite alternate;
}
.blob-3 {
  width: 44vmax;
  height: 44vmax;
  bottom: -18vmax;
  left: 8vmax;
  background: radial-gradient(circle, rgba(255,160,90,0.22), rgba(255,160,90,0) 72%);
  animation: driftC 27s ease-in-out infinite alternate;
}
.blob-4 {
  width: 34vmax;
  height: 34vmax;
  bottom: -8vmax;
  right: 4vmax;
  background: radial-gradient(circle, rgba(200,20,60,0.23), rgba(200,20,60,0) 72%);
  animation: driftD 21s ease-in-out infinite alternate;
}
.blob-5 {
  width: 24vmax;
  height: 24vmax;
  top: 32vmax;
  left: 38vmax;
  background: radial-gradient(circle, rgba(251,44,55,0.16), rgba(251,44,55,0) 72%);
  animation: driftE 33s ease-in-out infinite alternate;
}
.blob-6 {
  width: 20vmax;
  height: 20vmax;
  top: 58vmax;
  right: 22vmax;
  background: radial-gradient(circle, rgba(255,140,120,0.18), rgba(255,140,120,0) 72%);
  animation: driftF 29s ease-in-out infinite alternate;
}
@keyframes driftA {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(9vmax, 8vmax) scale(1.15); }
}
@keyframes driftB {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-8vmax, 10vmax) scale(0.9); }
}
@keyframes driftC {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(7vmax, -9vmax) scale(1.1); }
}
@keyframes driftD {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-10vmax, -6vmax) scale(1.2); }
}
@keyframes driftE {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-6vmax, 9vmax) scale(1.18); }
}
@keyframes driftF {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(8vmax, -7vmax) scale(0.85); }
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  cursor: pointer;
}
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-solid-light { background: #fff; color: var(--ink); }
.btn-solid-light:hover { background: var(--accent); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245,244,241,0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.logo .dot { color: var(--accent); }

.main-nav { display: flex; gap: 36px; }
.main-nav a {
  font-size: 13px;
  font-weight: 500;
  background-image: radial-gradient(90px circle at var(--mx, -999px) var(--my, 50%), var(--accent) 0%, var(--ink-soft) 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-reduced-motion: reduce) {
  .main-nav a { background-image: none; color: var(--ink-soft); }
}

.header-actions { display: flex; align-items: center; gap: 20px; }
.header-cta {
  padding: 9px 18px;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(20px, 4vw, 32px);
  padding-bottom: clamp(30px, 6vw, 60px);
  overflow: hidden;
}
.hero-grid { display: block; }

.hero-visual {
  position: relative;
  width: 100%;
  min-height: clamp(340px, 46vw, 560px);
  overflow: hidden;
}
.hero-word {
  position: absolute;
  top: 2%;
  left: 0;
  right: 0;
  z-index: 1;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(52px, 11vw, 165px);
  line-height: 1;
  margin: 0;
  text-align: center;
  letter-spacing: -0.02em;
}
.hero-word span {
  display: inline-block;
  cursor: none;
  background-image: radial-gradient(160px circle at var(--mx, -999px) var(--my, 50%), var(--accent) 0%, var(--ink) 72%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, rgba(251,44,55,0.5) 55%, transparent 75%);
  filter: blur(1.5px);
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.15s ease;
  will-change: transform;
}
.cursor-dot.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-word span { background-image: none; color: var(--ink); }
}

.hero-photo {
  position: absolute;
  top: 10%;
  left: 0;
  width: 100%;
  height: 90%;
  z-index: 2;
  pointer-events: none;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 62%, transparent 100%);
}

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(24px, 5vw, 40px);
  flex-wrap: wrap;
}
.hero-foot-left { display: flex; flex-direction: column; gap: 18px; }
.hero-tagline {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0;
}
.hero-cta { display: flex; gap: 12px; }
.hero-meta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
}
.meta-sep { color: var(--accent); }

/* ---------- Brands marquee ---------- */
.brands {
  background: var(--ink);
  color: #fff;
  padding: 16px 0;
}
.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.marquee-track {
  display: flex;
  flex-shrink: 0;
  animation: marquee 26s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}
.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
  padding-right: 12px;
  white-space: nowrap;
}
.marquee-track span {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: 0.02em;
}
.marquee-track .sep { color: var(--accent); font-family: var(--ff-body); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- USP strip ---------- */
.usp { padding: clamp(40px, 7vw, 72px) 0; border-bottom: 1px solid var(--line); }
.usp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.usp-item { text-align: center; display: flex; flex-direction: column; align-items: center; }
.usp-icon { width: 34px; height: 34px; color: var(--accent); margin-bottom: 14px; }
.usp-item h3 { font-size: 16px; margin: 0 0 6px; }
.usp-item p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- Section heading shared ---------- */
h2 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.04;
  margin: 0 0 20px;
  letter-spacing: -0.015em;
}

/* ---------- About ---------- */
.about { padding: clamp(64px, 9vw, 120px) 0; }
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: stretch;
}
.about-media { position: relative; min-height: 420px; }
.about-media img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  border-radius: 16px;
}
.about-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(245,244,241,0.94);
  backdrop-filter: blur(6px);
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dot-accent {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(251,44,55,0.18);
}

.about-text { max-width: 52ch; margin: 22px 0 30px; }
.about-text p { margin: 0 0 14px; color: var(--ink-soft); font-size: 16px; }
.about-text strong { color: var(--ink); }

.chip-group { margin-bottom: 20px; }
.chip-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
}
.chip-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

/* ---------- Portfolio ---------- */
.portfolio { padding: clamp(50px, 8vw, 100px) 0 clamp(70px, 9vw, 120px); background: var(--bg-alt); }
.portfolio-head { margin-bottom: clamp(30px, 5vw, 48px); }
.portfolio-sub { color: var(--muted); font-size: 15px; max-width: 44ch; margin: 0; }

.portfolio-divider {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: clamp(48px, 7vw, 80px) 0 18px;
}
.work-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2.6vw, 28px);
  max-width: 760px;
  margin: 0 auto;
}
.work-photo {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 14px;
}
.work-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(.16, 1, .3, 1);
}
.work-photo:hover img { transform: scale(1.045); }
.work-photo figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  margin: 0;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}
@media (max-width: 640px) {
  .work-photos { grid-template-columns: 1fr; gap: 8px; }
  .work-photo { aspect-ratio: 4 / 5; }
}

:root { --phone-w: clamp(180px, 44vw, 230px); }
@media (min-width: 640px) { :root { --phone-w: clamp(200px, 28vw, 240px); } }
@media (min-width: 1000px) { :root { --phone-w: 250px; } }

.carousel { display: flex; flex-direction: column; align-items: center; }

.reel-stage {
  position: relative;
  width: 100%;
  height: calc(var(--phone-w) * 2.12);
  perspective: 1400px;
}

.reel-track { position: static; }

.reel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--phone-w);
  height: calc(var(--phone-w) * 2.06);
  transition: transform 0.65s cubic-bezier(.16, 1, .3, 1), opacity 0.65s cubic-bezier(.16, 1, .3, 1), filter 0.65s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
  transform-style: preserve-3d;
}

.reel-frame {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 9px;
  border-radius: 30px;
  overflow: hidden;
  background: #0c0c0d;
  transition: box-shadow 0.6s ease;
}
.reel.is-active .reel-frame {
  box-shadow: 0 34px 60px -28px rgba(19,19,19,0.45);
}

.reel-notch {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 20px;
  background: #0c0c0d;
  border-radius: 999px;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 21px;
  display: block;
}

.sound-toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(12,12,13,0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.3s ease;
}
.reel.is-active .sound-toggle { opacity: 1; }
.sound-toggle:hover { background: var(--accent); transform: scale(1.06); }
.sound-toggle svg { width: 15px; height: 15px; }
.icon-sound { display: none; }
.sound-toggle[data-muted="false"] .icon-mute { display: none; }
.sound-toggle[data-muted="false"] .icon-sound { display: block; }

.reel-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  margin: 0;
  background: rgba(245,244,241,0.92);
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.reel.is-active .reel-tag { opacity: 1; }

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}
.carousel-arrow,
.carousel-playpause {
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.carousel-arrow { width: 42px; height: 42px; }
.carousel-playpause { width: 36px; height: 36px; }
.carousel-arrow:hover,
.carousel-playpause:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.carousel-arrow svg { width: 18px; height: 18px; }
.carousel-playpause svg { width: 13px; height: 13px; }
.icon-play { display: none; }
.carousel-playpause[data-playing="false"] .icon-pause { display: none; }
.carousel-playpause[data-playing="false"] .icon-play { display: block; }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  padding: clamp(80px, 13vw, 160px) 0;
  color: #fff;
  overflow: hidden;
}
.contact-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.contact-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,6,7,0.74), rgba(10,4,5,0.9));
}
.contact-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.contact-headline {
  color: #fff;
  font-size: clamp(38px, 7vw, 78px);
  margin: 0 auto 18px;
  max-width: 16ch;
}
.contact-email {
  display: inline-block;
  font-size: clamp(15px, 1.6vw, 17px);
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  margin-bottom: 30px;
}
.contact-email:hover { color: #fff; }
.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.btn-pill { border-radius: 999px; }
.btn-outline-light {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.btn-outline-light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.contact-tiktok {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.contact-tiktok:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); padding: clamp(56px, 9vw, 96px) 0 clamp(32px, 5vw, 48px); }
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}
.footer-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition: background 0.2s ease;
}
.footer-mark:hover { background: var(--accent); }

.footer-nav { display: flex; gap: 28px; }
.footer-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.footer-nav a:hover { color: var(--ink); }

.footer-socials { display: flex; gap: 16px; }
.footer-socials a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-socials a:hover { color: var(--accent); border-color: var(--accent); }
.footer-socials svg { width: 16px; height: 16px; }

.footer-copy {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
/* Defensive: if JS fails, content must never stay invisible */
.reveal[data-split] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }

  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 20px var(--gutter) 28px;
    gap: 18px;
  }

  .about-grid { grid-template-columns: 1fr; }
  .about-text { max-width: none; }

  .usp-grid { grid-template-columns: 1fr; gap: 28px; }

  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .hero-word { font-size: clamp(38px, 12.5vw, 60px); }
  .hero-photo { height: clamp(260px, 74vw, 380px); }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-meta { text-align: left; }
  .contact-headline { max-width: 14ch; }
  .footer-nav { gap: 20px; flex-wrap: wrap; justify-content: center; }
}
