/* ===================================================
   Exenic Graphics — Debbie Ortiz Portfolio
   Palette/type matched from exenicgraphics.webflow.io
   =================================================== */

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

:root{
  --ink: #1a1b1f;
  --nav-ink: #222222;
  --muted: #55565c;
  --primary: #915288;
  --link: #490745;
  --line: #cccccc;
  --white: #ffffff;
  --panel: #f1eef1;
  --max-w: 1200px;
  --gap: clamp(1.5rem, 4vw, 4rem);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background-color: var(--white);
  background-image:
    linear-gradient(rgba(255,255,255,.68), rgba(255,255,255,.68)),
    url('../Gridpattern.png');
  background-size: auto, 63px 63px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

.page-gradient{
  position: fixed;
  top: -20%;
  width: 200px;
  height: 140vh;
  background: linear-gradient(135deg, #F32CD6, #26D1EF, #6B60F8);
  background-size: 220% 220%;
  opacity: 0.15;
  filter: blur(45px);
  pointer-events: none;
  z-index: 0;
  animation: pageGradientDrift 18s ease-in-out infinite alternate;
}
.page-gradient-left{ left: -60px; }
.page-gradient-right{ right: -60px; animation-delay: -9s; }
@keyframes pageGradientDrift{
  0%{ background-position: 0% 0%; transform: translateY(-6%) rotate(0deg); }
  100%{ background-position: 100% 100%; transform: translateY(6%) rotate(10deg); }
}
@media (prefers-reduced-motion: reduce){
  .page-gradient{ animation: none; }
  .cta::before{ animation: none; }
}

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

h1, h2, h3{
  font-family: 'Merriweather', serif;
  font-weight: 400;
  color: var(--primary);
  margin: 0;
}

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

.visually-hidden{
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header{
  position: sticky; top: 0; z-index: 50;
}
.header-inner{
  margin: 0 auto;
  padding: 1.25rem 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img{ height: 32px; width: auto; }

.header-right{ display: flex; align-items: center; gap: 1.75rem; }

.main-nav{ display: flex; align-items: center; gap: 2.25rem; }
.main-nav a{
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--nav-ink);
  transition: color .2s ease;
}
.main-nav a:hover{ color: var(--primary); }
.nav-cta{
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
  background: var(--primary);
  padding: 7px 18px;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.nav-cta:hover{ color: var(--white); background: var(--link); }

.menu-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span{
  width: 22px; height: 2px; background: var(--ink); display: block;
}

/* ---------- Hero ---------- */
@keyframes heroReveal{
  from{ opacity: 0; transform: translateY(20px); }
  to{ opacity: 1; transform: translateY(0); }
}
@keyframes scrollCueBlip{
  0%{ opacity: 1; transform: translateY(0); }
  70%{ opacity: 0; transform: translateY(14px); }
  100%{ opacity: 0; transform: translateY(14px); }
}

.hero{
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: max(0px, calc(clamp(4rem, 12vh, 7rem) - 30px));
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
  padding-bottom: max(0px, calc(clamp(3rem, 8vh, 5rem) - 80px));
  text-align: center;
}

.hero-kicker,
.hero h1,
.hero-bio,
.scroll-cue{
  opacity: 0;
  animation: heroReveal .8s ease forwards;
}
.hero-kicker{
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #6d6d6d;
  margin-bottom: 1.25rem;
  animation-delay: .1s;
}
.hero h1{
  font-size: clamp(2rem, 6vw, 48pt);
  font-weight: 400;
  line-height: 1.2;
  max-width: 960px;
  margin: 0 auto;
  color: #1a1b1f;
  animation-delay: .22s;
}
.rotator .word{ color: var(--primary); }
.rotator{
  position: relative;
  display: block;
  height: 1.3em;
  overflow: hidden;
}
.rotator .word{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transform: translateY(-100%);
  transition: transform .5s cubic-bezier(.65,0,.35,1);
}
.rotator .word.active{ transform: translateY(0%); }
.rotator .word.exit{ transform: translateY(100%); }
.hero-bio{
  max-width: 700px;
  margin: 1.75rem auto 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 24px;
  animation-delay: .34s;
}
.hero-tags{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 1.75rem 0 0;
  opacity: 0;
  animation: heroReveal .6s ease forwards;
  animation-delay: .46s;
}
.scroll-cue{
  width: 26px;
  height: 42px;
  margin: 30px auto 0;
  border: 2px solid var(--line);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  animation-delay: .58s;
}
.scroll-cue span{
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--primary);
  animation: scrollCueBlip 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce){
  .hero-kicker, .hero h1, .hero-bio, .hero-tags, .scroll-cue{
    animation: none;
    opacity: 1;
  }
  .scroll-cue span{ animation: none; }
}

/* ---------- Drop-in cards: cards fall into place while scrolling ---------- */
.dropin{
  position: relative;
  height: 380vh;
  margin-top: max(0px, calc(clamp(2.5rem, 8vh, 5rem) - 60px));
}
.dropin-pin{
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: clamp(24px, 6vh, 64px);
  overflow: hidden;
}
.dropin-grid{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(0.85rem, 2vw, 1.75rem);
  width: 70%;
  max-width: var(--max-w);
}
.dropin-card{
  margin: 0;
  aspect-ratio: 3 / 4.3;
}
.dropin-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 30px 55px -20px rgba(26, 27, 31, 0.4);
}

@media (max-width: 700px){
  .dropin-grid{ grid-template-columns: repeat(3, 1fr); width: 88%; }
  .dropin{ margin-top: -75px; }
}

/* ---------- Work / case studies ---------- */
.work{
  padding: clamp(4rem, 10vh, 6rem) 0;
  display: flex;
  flex-direction: column;
  gap: calc(clamp(4rem, 10vh, 7rem) + 70px);
}
.case-study{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* Bento layout: two explicit rows of three cells — info card, icon, and photos,
   all at an even height per row, each image kept at its own natural proportions */
.case-grid--rows{
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.case-row{
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.case-study[data-project="rt"] .case-row:nth-child(2){
  gap: 8px;
}
.case-study[data-project="fuxebox"] .case-row:nth-child(2),
.case-study[data-project="ds"] .case-row:nth-child(2){
  gap: 30px;
}
.case-cell{
  margin: 0;
  border-radius: 16px;
  height: clamp(380px, 34vw, 420px);
}
.case-info-cell{
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: rgba(241, 238, 241, 0.3);
  padding: 20px clamp(1.25rem, 3vw, 2rem);
}
.case-icon-cell,
.case-photo{
  flex: 0 0 auto;
  width: auto;
  background: none;
  display: block;
  padding: 0;
}
.case-icon-cell img,
.case-photo img{
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 16px;
}

.case-logo{
  height: 35.2px;
  width: auto;
  align-self: flex-start;
  margin-top: 10px;
  margin-bottom: 0.75rem;
}
.case-info-cell p{
  color: var(--ink);
  font-size: 16px;
  line-height: 24px;
}
.see-project{
  display: block;
  width: fit-content;
  margin: 1.5rem 0 0 auto;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--link);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  transition: opacity .2s ease;
}
.see-project:hover{ opacity: 0.7; }

/* Reveal each cell bottom-to-top with a fade as its section scrolls into view */
.case-cell{
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}
.case-study.in-view .case-cell{
  opacity: 1;
  transform: translateY(0);
}
.case-row:nth-child(1) .case-cell:nth-child(1){ transition-delay: 0ms; }
.case-row:nth-child(1) .case-cell:nth-child(2){ transition-delay: 90ms; }
.case-row:nth-child(1) .case-cell:nth-child(3){ transition-delay: 180ms; }
.case-row:nth-child(2) .case-cell:nth-child(1){ transition-delay: 270ms; }
.case-row:nth-child(2) .case-cell:nth-child(2){ transition-delay: 360ms; }
.case-row:nth-child(2) .case-cell:nth-child(3){ transition-delay: 450ms; }

@media (min-width: 861px){
  .case-row:nth-child(1) .case-cell{
    height: 295px;
  }
  .case-row:nth-child(2) .case-cell{
    height: 315px;
  }
}

/* Mobile: info card full-width on its own row, everything else in a compact 2-up grid */
@media (max-width: 640px){
  .case-grid--rows{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .case-row{ display: contents; }
  .case-cell{
    height: auto;
  }
  .case-info-cell{
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .case-icon-cell,
  .case-photo{
    width: 100%;
  }
  .case-icon-cell img,
  .case-photo img{
    width: 100%;
    height: auto;
    max-width: none;
  }

  /* row 2: icon + first photo, side by side */
  .case-icon-cell{ grid-column: 1; grid-row: 2; }
  .case-row:nth-child(1) .case-photo{ grid-column: 2; grid-row: 2; }

  /* row 3: the vertical shot spans two rows on the left; the two horizontal
     shots stack on the right, matching their natural orientation */
  .case-row:nth-child(2) .case-cell:nth-child(1){ grid-column: 1; grid-row: 3 / span 2; }
  .case-row:nth-child(2) .case-cell:nth-child(2){ grid-column: 2; grid-row: 3; }
  .case-row:nth-child(2) .case-cell:nth-child(3){ grid-column: 2; grid-row: 4; }
}

/* ---------- CTA / Contact ---------- */
@property --cta-rotate{
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.cta{
  position: relative;
  isolation: isolate;
  max-width: var(--max-w);
  margin: 100px auto clamp(4rem, 10vh, 6rem);
  padding-top: 32px;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
  padding-bottom: 10px;
  background: rgba(249, 249, 249, 0.5);
  border-radius: 16px;
}
.cta::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(var(--cta-rotate), #F8C4F0, #A9F2FF, #B2ADFF);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  filter:
    drop-shadow(0 0 5px rgba(248, 196, 240, .5))
    drop-shadow(0 0 9px rgba(169, 242, 255, .4))
    drop-shadow(0 0 13px rgba(178, 173, 255, .4));
  animation: cta-glare-spin 3.5s linear infinite;
  pointer-events: none;
}
@keyframes cta-glare-spin{
  to{ --cta-rotate: 360deg; }
}
.cta-grid{
  display: grid;
  grid-template-columns: 35fr 65fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  text-align: left;
}
.cta-text{ align-self: start; }
.cta h2{ font-size: clamp(1.6rem, 3.2vw, 30px); line-height: 1.5; }
.cta-text p{
  margin: 1rem 0 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 24px;
}

@media (max-width: 860px){
  .cta-grid{ grid-template-columns: 1fr; text-align: center; }
}

.contact-form{
  display: grid;
  gap: 1rem;
  text-align: left;
}
.form-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px){
  .form-row{ grid-template-columns: 1fr; }
}
.contact-form label{
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--nav-ink);
}
.hp-field{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form input,
.contact-form textarea{
  width: 100%;
  margin-top: 0.4rem;
  padding: 8px 12px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus{
  outline: none;
  border-color: var(--primary);
}
.contact-form button{
  margin-top: 0.5rem;
  padding: 8px 35px;
  border: 0;
  border-radius: 20px;
  background: var(--primary);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background .2s ease;
  justify-self: start;
}
.contact-form button:hover{ background: var(--link); }
.form-note{
  font-size: 0.85rem;
  color: var(--primary);
  min-height: 1.2em;
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer img{ height: 24px; opacity: 0.7; }

/* ---------- Lightbox ---------- */
.lightbox{
  position: fixed; inset: 0;
  background: rgba(26, 27, 31, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 100;
}
.lightbox.open{ display: flex; }
.lightbox-inner{
  background: var(--white);
  max-width: 900px;
  max-height: 88vh;
  width: 100%;
  overflow-y: auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  position: relative;
}
.lightbox-close{
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--ink);
}
.lightbox-logo{ height: 30px; margin-bottom: 1rem; }
.lightbox-title{ font-size: 1.3rem; margin-bottom: 0.5rem; }
.lightbox-desc{ color: var(--ink); max-width: 60ch; margin-bottom: 1.5rem; font-size: 16px; line-height: 24px; white-space: pre-line; }
.lightbox-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}
.lightbox-tag{
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(145, 82, 136, 0.08);
  border: 1px solid rgba(145, 82, 136, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
}
.lightbox-gallery{
  columns: 220px;
  column-gap: 8px;
}
.lightbox-gallery img{
  width: 100%;
  margin-bottom: 8px;
  border-radius: 8px;
  break-inside: avoid;
}
.lightbox-video-tile{
  position: relative;
  margin-bottom: 8px;
  border-radius: 8px;
  overflow: hidden;
  break-inside: avoid;
  cursor: pointer;
}
.lightbox-video-tile img{
  width: 100%;
  margin-bottom: 0;
  border-radius: 0;
  display: block;
}
.play-badge{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(26, 27, 31, 0.75);
  transition: background .2s ease, transform .2s ease;
}
.play-badge::after{
  content: '';
  position: absolute;
  top: 50%;
  left: 56%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--white);
}
.lightbox-video-tile:hover .play-badge{
  background: var(--primary);
  transform: translate(-50%, -50%) scale(1.08);
}
.lightbox-video-tile.playing{
  aspect-ratio: 16 / 9;
}
.lightbox-video-tile.playing iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- Mobile nav ---------- */
@media (max-width: 640px){
  .main-nav{
    position: absolute;
    top: 100%; left: 0; right: 0;
    z-index: 49;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    transform: translateY(-140%);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
  }
  .main-nav.open{ transform: translateY(0); opacity: 1; }
  .main-nav a{
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--line);
  }
  .main-nav a:last-child{ border-bottom: 0; }
  .header-inner:has(.main-nav.open){ background: var(--white); }
  .header-right{ gap: 12px; }
  .nav-cta{ padding: 7px 14px; }
  .menu-toggle{ display: flex; }
}
