/* ============================================================
   MAZECREW — styles.css
   Mobile-first, real desktop layout. Vanilla, no framework.
   ============================================================ */

/* ---------- Satoshi (self-hosted) ---------- */
@font-face { font-family: "Satoshi"; font-style: normal; font-weight: 300;
  font-display: swap; src: url("../assets/fonts/satoshi-light.woff2") format("woff2"); }
@font-face { font-family: "Satoshi"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../assets/fonts/satoshi-regular.woff2") format("woff2"); }
@font-face { font-family: "Satoshi"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("../assets/fonts/satoshi-medium.woff2") format("woff2"); }
@font-face { font-family: "Satoshi"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../assets/fonts/satoshi-bold.woff2") format("woff2"); }
@font-face { font-family: "Satoshi"; font-style: normal; font-weight: 900;
  font-display: swap; src: url("../assets/fonts/satoshi-black.woff2") format("woff2"); }

/* ---------- Design tokens ---------- */
:root {
  --cyan:  #00B8D0;
  --pink:  #E81860;
  --black: #000000;
  --white: #ffffff;
  --ink:   #0d0d0d;         /* body text on light bg */

  --radius: 8px;            /* portfolio corner radius — set to 0 to square off */

  --font: "Satoshi", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1200px;
  --pad: clamp(1.25rem, 5vw, 3rem);

  --torn-white: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%201200%2040%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M0%2C40%20L0%2C16.4%20L0%2C16.4%20L17.0%2C24.9%20L32.5%2C21.9%20L53.8%2C9.5%20L77.9%2C9.0%20L100.6%2C9.8%20L116.4%2C19.0%20L147.0%2C11.2%20L165.4%2C24.3%20L198.4%2C23.0%20L220.3%2C33.4%20L235.2%2C30.3%20L255.0%2C11.8%20L271.4%2C16.0%20L301.7%2C12.7%20L327.3%2C24.6%20L348.8%2C22.2%20L364.0%2C9.5%20L382.2%2C25.7%20L404.7%2C16.2%20L430.4%2C19.8%20L450.4%2C28.7%20L478.4%2C14.3%20L503.9%2C21.7%20L535.4%2C27.0%20L555.2%2C33.5%20L571.5%2C18.9%20L600.7%2C12.0%20L624.4%2C9.0%20L651.8%2C27.9%20L677.3%2C30.8%20L697.5%2C26.1%20L723.4%2C23.1%20L746.5%2C29.8%20L779.4%2C20.3%20L806.7%2C9.6%20L834.8%2C24.8%20L868.6%2C29.4%20L888.3%2C18.0%20L915.7%2C8.6%20L938.9%2C12.4%20L955.3%2C9.5%20L984.6%2C11.4%20L1003.6%2C18.2%20L1035.0%2C10.1%20L1058.0%2C22.3%20L1089.7%2C29.3%20L1120.9%2C15.2%20L1143.2%2C17.3%20L1174.9%2C32.9%20L1191.9%2C12.6%20L1200%2C22%20L1200%2C40%20Z%22%20fill%3D%22%23ffffff%22/%3E%3C/svg%3E');
  --torn-black: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%201200%2040%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M0%2C40%20L0%2C16.4%20L0%2C16.4%20L17.0%2C24.9%20L32.5%2C21.9%20L53.8%2C9.5%20L77.9%2C9.0%20L100.6%2C9.8%20L116.4%2C19.0%20L147.0%2C11.2%20L165.4%2C24.3%20L198.4%2C23.0%20L220.3%2C33.4%20L235.2%2C30.3%20L255.0%2C11.8%20L271.4%2C16.0%20L301.7%2C12.7%20L327.3%2C24.6%20L348.8%2C22.2%20L364.0%2C9.5%20L382.2%2C25.7%20L404.7%2C16.2%20L430.4%2C19.8%20L450.4%2C28.7%20L478.4%2C14.3%20L503.9%2C21.7%20L535.4%2C27.0%20L555.2%2C33.5%20L571.5%2C18.9%20L600.7%2C12.0%20L624.4%2C9.0%20L651.8%2C27.9%20L677.3%2C30.8%20L697.5%2C26.1%20L723.4%2C23.1%20L746.5%2C29.8%20L779.4%2C20.3%20L806.7%2C9.6%20L834.8%2C24.8%20L868.6%2C29.4%20L888.3%2C18.0%20L915.7%2C8.6%20L938.9%2C12.4%20L955.3%2C9.5%20L984.6%2C11.4%20L1003.6%2C18.2%20L1035.0%2C10.1%20L1058.0%2C22.3%20L1089.7%2C29.3%20L1120.9%2C15.2%20L1143.2%2C17.3%20L1174.9%2C32.9%20L1191.9%2C12.6%20L1200%2C22%20L1200%2C40%20Z%22%20fill%3D%22%23000000%22/%3E%3C/svg%3E');
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--black);
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

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

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- Section shells ---------- */
.section { padding-block: clamp(3rem, 8vw, 6rem); position: relative; }
.section--light { background: var(--white); color: var(--ink); }
.section--dark  { background: var(--black); color: var(--white); }

.heading {
  color: var(--cyan);
  font-weight: 900;
  font-size: clamp(2.6rem, 11vw, 5.5rem);
  line-height: .95;
  letter-spacing: -.01em;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: clamp(2rem, 6vh, 4rem) var(--pad) clamp(4rem, 10vh, 6rem);
}
.hero__bg {
  position: absolute; inset: 0;
  /* portrait crop on mobile, landscape on wider screens */
  background: #0b3a2e url("../assets/img/hero/hero-bg-mobile.webp") center top/cover no-repeat;
  z-index: 0;
}
@media (min-width: 720px) {
  .hero__bg { background-image: url("../assets/img/hero/hero-bg.webp"); background-position: center; }
}
.hero__bg::after {  /* legibility veil */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.15) 35%, rgba(0,0,0,.45) 100%);
}
.hero__inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(1.1rem, 3.5vh, 2rem);
  width: 100%;
}
.hero__moto {
  color: var(--white);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: clamp(1.1rem, 4.6vw, 2rem);
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
}
.hero__brand { line-height: 0; }
.hero__brand img {
  width: clamp(150px, 42vw, 240px);
  height: auto;
  filter: drop-shadow(0 6px 22px rgba(0,0,0,.45));
}
.hero__nav {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(.1rem, 1vh, .4rem);
}
.hero__nav a {
  color: var(--white);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2rem, 9vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  text-shadow: 0 2px 16px rgba(0,0,0,.55);
  transition: color .2s ease, transform .2s ease;
}
.hero__nav a:hover, .hero__nav a:focus-visible { color: var(--cyan); transform: scale(1.04); }

/* ---------- Socials ---------- */
.socials { list-style: none; display: flex; gap: clamp(.8rem, 3vw, 1.3rem); padding: 0; margin: 0; }
.socials .ic { width: clamp(46px, 12vw, 58px); height: auto; }
.socials a {
  display: inline-flex; transition: transform .2s ease, filter .2s ease;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.4));
}
.socials a:hover, .socials a:focus-visible { transform: translateY(-4px) scale(1.08); }

/* ---------- Torn paper dividers ---------- */
.torn { position: absolute; left: 0; right: 0; height: 34px; z-index: 2; background-size: 100% 100%; background-repeat: no-repeat; pointer-events: none; }
.torn--bottom { bottom: -1px; background-image: var(--torn-white); }

/* ============================================================
   SERVICII
   ============================================================ */
.services { display: grid; gap: clamp(1.6rem, 4vw, 2.2rem); }
.service h3 {
  color: var(--pink);
  font-weight: 700;
  font-size: clamp(1.25rem, 4.6vw, 1.7rem);
  margin-bottom: .15em;
}
.service p {
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  color: var(--ink);
  max-width: 42ch;
}

/* ============================================================
   ECHIPA
   ============================================================ */
.team { position: relative; display: flex; align-items: center; justify-content: center; gap: 1rem; }
.team__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 2rem;
  width: 100%;
  scrollbar-width: none;
}
.team__track::-webkit-scrollbar { display: none; }
.team__member {
  scroll-snap-align: center;
  flex: 0 0 100%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: .35rem;
}
.team__photo {
  width: clamp(180px, 55vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #e8e8ea;
  margin-bottom: 1rem;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.team__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.team__name  { font-weight: 700; font-size: clamp(1.35rem, 5.5vw, 1.9rem); }
.team__role  { font-weight: 400; opacity: .9; font-size: clamp(1rem, 4.2vw, 1.25rem); }
.team__title { font-weight: 700; margin-top: .6rem; font-size: clamp(1.05rem, 4.4vw, 1.35rem); }
.team__ig { display: inline-flex; margin-top: .8rem; transition: transform .2s ease; }
.team__ig .ic { width: 46px; }
.team__ig:hover { transform: scale(1.1); }

.team__arrow {
  flex: 0 0 auto;
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.06); color: #fff;
  font-size: 1.8rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s ease, border-color .2s ease;
}
.team__arrow:hover { background: var(--cyan); border-color: var(--cyan); }
.team__arrow[hidden] { display: none; }

/* ============================================================
   PORTOFOLIU  (masonry via CSS columns)
   ============================================================ */
.portfolio { column-count: 1; column-gap: 14px; }
.pf-item {
  break-inside: avoid;
  margin: 0 0 14px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: #ddd;
}
.pf-item img {
  width: 100%; height: auto;
  /* --py = scroll parallax offset, --s = hover zoom; composed so they never clash.
     The eased transition gives the Salient-style trailing/elastic motion. */
  transform: translate3d(0, var(--py, 0px), 0) scale(var(--s, 1));
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.pf-item::after { /* darken on hover */
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,0); transition: background .3s ease;
}
.pf-zoom {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--cyan); color: #fff;
  display: grid; place-items: center;
  font-size: 1.5rem; font-weight: 700; line-height: 1;
  opacity: 0; transform: translateY(8px) scale(.8);
  transition: opacity .3s ease, transform .3s ease;
}
@media (hover: hover) {
  .pf-item:hover img { --s: 1.06; }
  .pf-item:hover::after { background: rgba(0,0,0,.12); }
  .pf-item:hover .pf-zoom { opacity: 1; transform: translateY(0) scale(1); }
}
/* On touch devices, always show the zoom hint */
@media (hover: none) { .pf-zoom { opacity: 1; transform: none; } }

/* Reveal-on-scroll (JS toggles .is-in) */
.pf-item { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.pf-item.is-in { opacity: 1; transform: none; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact__line { font-size: clamp(1.2rem, 5vw, 1.7rem); margin-bottom: .3rem; }
.contact__line .lbl { color: var(--pink); font-weight: 700; }
.contact__line a { transition: color .2s ease; }
.contact__line a:hover { color: var(--cyan); }
.contact__pitch {
  margin-top: 1.6rem; max-width: 30ch;
  font-size: clamp(1.15rem, 4.8vw, 1.6rem);
  line-height: 1.35;
}
.socials--contact { margin-top: 1.8rem; }

/* ============================================================
   PAGE UP band  (fixed, appears after hero)
   ============================================================ */
.pageup {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: clamp(58px, 9vh, 80px);
  display: grid; place-items: center;
  /* solid black band with a ragged (torn) top edge */
  background: var(--torn-black) top left / 100% 22px no-repeat, var(--black);
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
  cursor: pointer;
}
.pageup.is-visible { transform: translateY(0); }
body.lb-open .pageup { display: none; }        /* keep band out of the lightbox */
.pageup__label {
  position: relative; z-index: 1;
  color: rgba(255,255,255,.9); font-weight: 900;
  font-size: clamp(1.5rem, 6vw, 2.4rem); letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .2s ease, letter-spacing .2s ease;
}
.pageup:hover .pageup__label { color: var(--cyan); letter-spacing: .09em; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.92);
  display: grid; place-items: center;
  opacity: 0; transition: opacity .25s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__img {
  max-width: 92vw; max-height: 86vh; width: auto; height: auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 80px rgba(0,0,0,.6);
  touch-action: pinch-zoom;             /* allow pinch-to-zoom on mobile */
  transition: opacity .12s ease;
}
.lightbox button {
  position: absolute; background: rgba(255,255,255,.1); color: #fff;
  border: none; cursor: pointer; border-radius: 50%;
  width: 52px; height: 52px; font-size: 2rem; line-height: 1;
  display: grid; place-items: center; transition: background .2s ease;
}
.lightbox button:hover { background: var(--cyan); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__nav--prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ============================================================
   Hero staggered reveal (JS adds .revealed to <body>)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); }
body.revealed .reveal {
  animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards;
}
body.revealed .reveal[data-reveal="1"] { animation-delay: .05s; }
body.revealed .reveal[data-reveal="2"] { animation-delay: .30s; }
body.revealed .reveal[data-reveal="3"] { animation-delay: .55s; }
body.revealed .reveal[data-reveal="4"] { animation-delay: .85s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ============================================================
   DESKTOP / TABLET
   ============================================================ */
@media (min-width: 620px) {
  .portfolio { column-count: 2; }
}
@media (min-width: 720px) {
  .services { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .hero__nav { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 1.5rem 2.5rem; }
  .hero__nav a { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
}
@media (min-width: 1024px) {
  .portfolio { column-count: 3; column-gap: 18px; }
  .pf-item { margin-bottom: 18px; }
  .hero__brand img { width: 260px; }
  .contact__pitch { font-size: 1.7rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, body.revealed .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
  .pf-item { opacity: 1 !important; transform: none !important; }
  .pf-item img, .pageup, .pageup__label { transition: none !important; }
}
