/* =========================================================
   MORÔ — home.css
   ========================================================= */

/* =========================
   HERO
   ========================= */
.hero{
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 90px;
  padding-bottom: 0;
  overflow: hidden;
}

.hero-bg{
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0d0304;
}
.hero-bg canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  mix-blend-mode: lighten;
}
.hero-grid{
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(to right, rgba(255,255,255,.045) 0px, rgba(255,255,255,.045) 1px, transparent 1px, transparent 56px),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.045) 0px, rgba(255,255,255,.045) 1px, transparent 1px, transparent 56px);
}
.hero-bg::after{
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(58% 50% at 50% 40%, rgba(10,10,11,0) 0%, rgba(10,10,11,.18) 72%, rgba(10,10,11,.48) 100%),
    linear-gradient(180deg, rgba(10,10,11,.12) 0%, rgba(10,10,11,.05) 26%, rgba(10,10,11,.32) 80%, rgba(10,10,11,.78) 100%);
}

.hero-inner{
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: 40px;
  text-align: center;
}

.hero-title{
  position: relative;
  margin: 0 auto;
  max-width: 17ch;
  font-size: clamp(26px, 5vw, 60px);
  font-weight: 800;
  text-transform: uppercase;
}
.hero-title em{
  font-style: normal;
  color: var(--red);
}

.hero-bottom{
  position: relative;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.hero-sub{
  max-width: 440px;
  margin: 0 auto;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}

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

.hero-scroll{
  position: absolute;
  right: var(--pad);
  bottom: 72px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-soft);
  font-weight: 700;
}
.hero-scroll .scroll-line{
  width: 1px; height: 34px;
  background: linear-gradient(var(--muted-soft), transparent);
}
@media (max-width: 700px){ .hero-scroll{ display: none; } }

/* =========================
   MARQUEE STRIP — attached to the bottom edge of the hero
   ========================= */
.marquee-strip{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  background: var(--black);
  color: var(--white);
  padding: 14px 0;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--red);
  border-bottom: 1px solid var(--red);
}
.marquee-track{
  display: inline-flex;
  align-items: center;
  gap: 40px;
  animation: marquee 32s linear infinite;
  will-change: transform;
}
.marquee-strip:hover .marquee-track{ animation-play-state: paused; }
.marquee-item{
  font-family: var(--font-body);
  font-size: clamp(11px, 1.3vw, 14px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--white);
}
.marquee-item.is-outline{
  color: var(--white);
}
.marquee-dot{
  width: 5px; height: 5px;
  background: var(--red);
  flex-shrink: 0;
}

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

/* =========================
   PROJECTS / CASES — scroll-jacked carrossel
   ========================= */
.projects{ background: var(--white); color: var(--black); padding: clamp(110px, 14vw, 190px) 0 clamp(60px, 8vw, 110px); }

/* title sitting centered, a little above the carousel — no longer absolutely
   positioned/pulled up with a negative transform, precisely to avoid the
   recurring bug where it crept up into the section above (Hero/Marquee). */
.projects-title-bg{
  position: relative;
  z-index: 1;
  margin: 0 0 clamp(14px, 2.4vw, 24px);
  font-size: clamp(36px, 5.2vw, 88px);
  line-height: 1;
  color: var(--red);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* fallback (no-JS / reduced motion): plain draggable horizontal row */
.projects-track-wrap{
  position: relative;
  z-index: 2;
  overflow-x: auto;
  scrollbar-width: none;
  cursor: grab;
  padding: 0 var(--pad);
  /* .projects-sticky is a column flexbox with align-items:center, so
     without an explicit width the cross-axis size shrinks to fit this
     element's CONTENT (the full-width track, e.g. 3070px) instead of the
     viewport — leaving nothing to scroll (scrollWidth === clientWidth).
     width:100% (kept in sync with align-self:stretch) pins it back to the
     sticky block's actual width so overflow-x can do its job. This was the
     real cause of the mobile carousel's arrows/dots not moving anything. */
  width: 100%;
  align-self: stretch;
  min-width: 0;
}
.projects-track-wrap:active{ cursor: grabbing; }
.projects-track-wrap::-webkit-scrollbar{ display: none; }

.projects-track{
  display: flex;
  gap: 16px;
  width: max-content;
}

/* scroll-jack pin (enabled via JS with .is-pinned) */
.projects-pin{ position: relative; }

/* sticky is always a positioned + flex container: relative even when not
   pinned (so the droplets canvas always has a correct anchor), flex column
   so the title sits centered and stacked right above the card row.

   NOTE on a bug fixed here for good: earlier versions centered this block
   with `top:50%; transform:translateY(-50%)`, which permanently shifts the
   painted box up by half its own height — including in the brief instant
   before the sticky is actually "stuck", when it still sits at its normal
   in-flow position. With a tall block (title + big cards) that pull-up was
   large enough to visibly creep into the section above (Hero/Marquee).
   Pinning the sticky to the full viewport height (`top:0; height:100svh`)
   and centering the content with flexbox INSIDE that box sidesteps the
   issue entirely — there is no offset transform to leak. */
.projects-sticky{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.projects-pin.is-pinned .projects-sticky{
  position: sticky;
  top: 0;
  height: 100svh;
}

/* background sits behind the title/cards but travels WITH the sticky block
   (not the tall scroll-jack pin), so it stays put through the whole
   pinned/scrolling phase instead of scrolling away. */
.projects-droplets{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}
@media (prefers-reduced-motion: reduce){
  .projects-droplets{ display: none; }
}

.projects-pin.is-pinned .projects-track-wrap{
  overflow: hidden;
  cursor: default;
  padding: 0 var(--pad);
  width: 100%;
}
.projects-pin.is-pinned .projects-track{
  will-change: transform;
}

.project-card{
  position: relative;
  flex: 0 0 auto;
  height: clamp(360px, 60vh, 620px);
  aspect-ratio: 540 / 800;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  transition: box-shadow .3s ease;
}
.project-card:hover{
  /* inset, not outer: .project-card has overflow:hidden (needed to clip the
     photos), which clips an OUTER box-shadow unevenly — an inset shadow
     paints inside the box instead, so all four edges show consistently. */
  box-shadow: inset 0 0 0 4px var(--black);
}
.project-card-bg{
  position: absolute; inset: 0;
  z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .5s ease, transform .6s ease;
}
.project-card-bg.is-hover{ opacity: 0; }
.project-card:hover .project-card-bg.is-base{ opacity: 0; }
.project-card:hover .project-card-bg.is-hover{ opacity: 1; }
.project-card:hover .project-card-bg{ transform: scale(1.03); }
.project-card-scrim{
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10,10,11,0) 35%, rgba(10,10,11,.88) 100%);
  pointer-events: none;
}
.project-card-num{
  position: relative; z-index: 2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(255,255,255,.7);
  margin-bottom: auto;
}
.project-card-info{ position: relative; z-index: 2; }
.project-card-info h3{ font-size: 17px; color: var(--white); margin-bottom: 5px; }
.project-card-info span{
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--white);
}

/* mobile-only nav (arrows + dots) — hidden on desktop, where the scroll-jack
   effect handles navigation via page scroll instead. */
.projects-nav, .projects-dots{ display: none; }

/* =========================
   PROJECTS — mobile: plain traditional carousel
   (js/script.js turns off the scroll-jack pin below this same 640px
   breakpoint — canPin — so this only needs to style the swipeable fallback,
   not coexist with the pinned/desktop behavior) */
@media (max-width: 640px){
  .projects{ padding: clamp(64px, 16vw, 96px) 0 clamp(48px, 10vw, 72px); }
  .projects-title-bg{ font-size: clamp(30px, 9vw, 46px); }

  .projects-track-wrap{
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .project-card{
    /* width-driven instead of height-driven: on a narrow, tall phone screen
       60vh (the desktop sizing) makes for an oversized card — sizing off
       the viewport WIDTH instead keeps it compact and lets the next card
       peek in at the edge, like a normal mobile carousel. */
    flex: 0 0 74vw;
    width: 74vw;
    height: auto;
    scroll-snap-align: center;
  }

  .projects-nav{
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 22px;
  }
  .projects-nav-btn{
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--line-soft);
    color: var(--black);
    background: transparent;
    flex-shrink: 0;
  }
  .projects-nav-btn svg{ width: 16px; height: 16px; transform: rotate(180deg); }
  .projects-nav-btn.is-next svg{ transform: none; }
  .projects-nav-btn:active{ background: rgba(10,10,11,.06); }

  .projects-dots{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
  }
  .projects-dot{
    width: 6px;
    height: 6px;
    background: rgba(10,10,11,.22);
    padding: 0;
    flex-shrink: 0;
    transition: background .25s ease, transform .25s ease;
  }
  .projects-dot.is-active{
    background: var(--red);
    transform: scale(1.35);
  }
}

/* =========================
   SERVICES
   ========================= */
.services-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.services-title{ font-size: clamp(24px, 3.4vw, 38px); max-width: 16ch; }
.services-head .eyebrow{ margin-bottom: 18px; }
.services-sub{ max-width: 320px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }

.services-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.service-card{
  background: var(--black-soft);
  padding: 40px 32px 36px;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background .4s ease;
  position: relative;
}
.service-card:hover{ background: var(--ink); }
.service-card:hover .service-icon{ transform: translate(4px,-4px); color: var(--red); }

.service-top{ display: flex; justify-content: space-between; align-items: flex-start; }
.service-num{
  font-family: var(--font-head);
  font-size: 11.5px;
  color: var(--muted-soft);
  font-weight: 700;
}
.service-icon{
  width: 18px; height: 18px;
  color: var(--muted);
  transition: transform .35s var(--ease), color .35s ease;
}
.service-card h3{ font-size: 16.5px; margin: 20px 0 8px; }
.service-card p{ color: var(--muted); font-size: 13px; line-height: 1.6; }

@media (max-width: 900px){
  .services-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .services-grid{ grid-template-columns: 1fr; }
  .service-card{ min-height: unset; }
}

/* =========================
   PROCESS
   ========================= */
.process{ background: var(--black); }
.process-head{ max-width: 600px; margin-bottom: 48px; }
.process-head .eyebrow{ margin-bottom: 18px; }
.process-title{ font-size: clamp(22px, 3vw, 34px); }

.process-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.process-step{
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.process-step-num{
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--red);
  font-weight: 700;
  display: block;
  margin-bottom: 16px;
}
.process-step h3{ font-size: 15.5px; margin-bottom: 8px; }
.process-step p{ color: var(--muted); font-size: 13px; line-height: 1.6; }

@media (max-width: 900px){
  .process-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .process-grid{ grid-template-columns: 1fr; }
}

/* =========================
   CTA SPLIT (mid page)
   ========================= */
.cta-split{ padding: clamp(56px, 8vw, 96px) var(--pad) clamp(96px, 13vw, 168px); background: var(--black); }
.cta-card{
  max-width: var(--container);
  margin: 0 auto;
  border-radius: 0;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/></svg>"),
    radial-gradient(120% 140% at 15% 20%, rgba(234,7,7,.55), transparent 55%),
    linear-gradient(135deg, #1a0505 0%, #4a0505 45%, #0a0a0b 100%);
  background-blend-mode: overlay, normal, normal;
  padding: clamp(44px, 7vw, 84px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-card-text{ position: relative; max-width: 540px; }
.cta-card h2{ font-size: clamp(22px, 3vw, 34px); color: var(--white); text-transform: uppercase; }
.cta-card-actions{ position: relative; }

/* =========================
   CLIENTS
   ========================= */
.clients{ padding: clamp(40px, 6vw, 64px) 0; }
.clients-marquee{
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 46px 0;
  overflow: hidden;
  white-space: nowrap;
}
.clients-track{
  display: inline-flex;
  align-items: center;
  gap: 64px;
  animation: marquee 26s linear infinite;
}
.clients-marquee:hover .clients-track{ animation-play-state: paused; }
.client-name{
  font-family: var(--font-head);
  font-size: clamp(18px, 2.6vw, 30px);
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  transition: color .3s ease;
}
.client-name:hover{ color: var(--white); }
.client-sep{ width: 6px; height: 6px; background: var(--red); flex-shrink: 0; }
.cta-final-note{
  margin-top: 22px;
  font-size: 12px;
  color: var(--muted-soft);
}
