/* ============================================================
   TIRDESAL — style.css
   Simplified with CSS Scroll-Snap
   ============================================================ */

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
}
body {
  font-family: Manrope, -apple-system, Roboto, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.85;
  color: #4D4845;
  background: #fff;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Design tokens ────────────────────────────────────────── */
:root {
  --black:   #181614;
  --cream:   #F7F5F2;
  --tan:     #E0DBD5;
  --muted:   #9A9490;
  --white:   #fff;
  --gutter:  clamp(1.5rem, 8vw, 8rem);
}

/* ── Typography ───────────────────────────────────────────── */
.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.eyebrow--light { color: rgba(255,255,255,0.8); }
.eyebrow--dim   { color: rgba(255,255,255,0.32); }

.heading-lg {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #181614;
  margin-bottom: 1.4rem;
}

.heading-md {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #181614;
  margin-bottom: 1.2rem;
}

.rule {
  width: 28px;
  height: 1px;
  background: var(--tan);
  border: none;
  margin: 1.5rem 0;
}

.body-lead {
  font-weight: 300;
  color: #4D4845;
  margin-bottom: 0.5rem;
}

p + p { margin-top: 0.6rem; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-family: Manrope, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
}
.btn--ghost:hover { background: rgba(255,255,255,0.08); }

.btn--solid {
  background: var(--black);
  border: 1px solid var(--black);
  color: #fff;
}
.btn--solid:hover { background: #000; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar--scrolled {
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--tan);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 60px;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
}
.navbar__logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.22em;
  color: #fff;
  position: absolute;
  left: clamp(1.5rem, 4vw, 4rem);
  transition: color 0.3s ease;
}

.navbar--scrolled .navbar__logo {
  color: var(--black);
}
.navbar__links {
  display: flex;
  gap: 2.5rem;
  position: absolute;
  right: clamp(1.5rem, 4vw, 4rem);
}
.navbar__links a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.8);
  transition: color 0.3s ease;
}
.navbar__links a:hover {
  color: #fff;
}

.navbar--scrolled .navbar__links a {
  color: var(--black);
}
.navbar--scrolled .navbar__links a:hover {
  opacity: 0.6;
}

.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  right: clamp(1.5rem, 4vw, 4rem);
  padding: 0.5rem;
}
.navbar__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}
.navbar--scrolled .navbar__burger span {
  background: var(--black);
}
.navbar__burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.is-active span:nth-child(2) { opacity: 0; }
.navbar__burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  color: #fff;
  background: #000;
  overflow: hidden;
  z-index: 1;
}

.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 6rem 3rem 6rem var(--gutter);
  max-width: 600px;
}

.hero__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 7.5vw, 7.5rem);
  font-weight: 400;
  line-height: 0.93;
  letter-spacing: 0.04em;
  margin-bottom: 1.2rem;
}

.hero__sub {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2.5rem;
}

/* ============================================================
   SPLIT SECTIONS
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  min-height: 80vh;
  position: relative;
  z-index: 2;
}

#about {
  padding: 6rem 0;
}

.split--tan {
  background: #F0EDEA;
  padding: 4rem 0;
  min-height: 95vh;
}
.split--tan .split__text-inner p {
  color: #5A5551;
  font-size: 15px;
}
.split--tan .heading-md {
  font-size: clamp(3rem, 4.5vw, 4.5rem);
  margin-bottom: 1.8rem;
}
.split--tan .split__media {
  padding: 2rem;
}
.split--tan .split__media img {
  width: auto;
  max-width: 100%;
  height: 90vh;
  max-height: 90vh;
  object-fit: contain;
  aspect-ratio: auto;
}

.split__text {
  display: flex;
  align-items: center;
  padding: 6rem 3rem 6rem var(--gutter);
}

.split__text-inner {
  max-width: 420px;
}

.split__text-inner p {
  color: #4D4845;
  font-weight: 300;
}

.split__media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  overflow: hidden;
}
.split__media img {
  width: min(480px, 90%);
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 4px;
}

/* ============================================================
   OUR WORK BANNER (between CNC and Our Work bar)
   ============================================================ */
.ourwork-banner {
  width: 100%;
  position: relative;
  z-index: 2;
  background: var(--white);
  line-height: 0;
}
.ourwork-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   PANORAMA
   ============================================================ */
.panorama {
  width: 100%;
  height: clamp(300px, 40vw, 700px);
  overflow: hidden;
  background: #fff;
}
.panorama img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panorama--sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 3;
}

/* ============================================================
   OUR WORK BAR
   ============================================================ */
.work-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 57px;
  padding: 0 var(--gutter);
  border-top: 1px solid var(--tan);
  border-bottom: 1px solid var(--tan);
  background: var(--white);
  position: relative;
  z-index: 5;
}

/* ============================================================
   DIVISIONS - CSS Sticky stacking
   ============================================================ */
.divisions-container {
  position: relative;
  z-index: 5;
}

.divisions-wrapper {
  position: relative;
  height: 500vh;
}

.division {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  background: var(--bg, #2D2B29);
  color: var(--color, #fff);
}

.division:nth-child(1) { z-index: 1; }
.division:nth-child(2) { z-index: 2; }
.division:nth-child(3) { z-index: 3; }
.division:nth-child(4) { z-index: 4; }
.division:nth-child(5) { z-index: 5; }

.division__text {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 3rem 5rem var(--gutter);
}

.division__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 5.5vw, 5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--color, #fff);
  margin: 0.8rem 0 1.4rem;
}

.division__text p {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.85;
  color: var(--body, rgba(255,255,255,0.6));
  max-width: 420px;
}

.division__media {
  flex: 0 0 50%;
  overflow: hidden;
}
.division__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.division--flip .division__media { order: -1; }
.division--flip .division__text { padding: 5rem var(--gutter) 5rem 3rem; }

/* ============================================================
   SUSTAINABILITY
   ============================================================ */
.sustainability {
  background: var(--white);
  padding: 7rem var(--gutter);
  position: relative;
  z-index: 10;
}

.sustainability__content {
  max-width: 1400px;
  margin: 0 auto;
}

.sustainability__text {
  max-width: 560px;
  margin-bottom: 3.5rem;
}

.sustainability__text p {
  color: #4D4845;
  font-weight: 300;
}

.sustainability__image {
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
}

.sustainability__image img {
  width: 100%;
  height: auto;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  background: var(--cream);
  padding: 6rem var(--gutter);
  position: relative;
  z-index: 10;
}

.contact__wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 5rem;
  align-items: start;
}

.contact__info .heading-lg {
  color: var(--black);
  margin-bottom: 1rem;
}

.contact__intro {
  font-weight: 300;
  color: #4D4845;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.meta-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.contact__details p {
  font-weight: 300;
  font-size: 14px;
  color: var(--black);
  line-height: 1.65;
}
.contact__details a:hover { text-decoration: underline; }

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.form-field input,
.form-field textarea {
  font-family: Manrope, sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--black);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--tan);
  padding: 12px 0;
  outline: none;
  resize: none;
  transition: border-color 0.2s;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(24,22,20,0.4); }
.form-field input:focus,
.form-field textarea:focus { border-bottom-color: var(--black); }

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 var(--gutter);
}
.footer__logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: #fff;
}
.footer__copy {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.22);
}

/* ============================================================
   RESPONSIVE — Large (≤ 1280px)
   Ajustos per evitar massa espai buit als laterals
   ============================================================ */
@media (max-width: 1280px) {
  .split__media img {
    width: min(420px, 90%);
  }

  .contact__wrapper {
    gap: 4rem;
  }
}

/* ============================================================
   RESPONSIVE — Tablet gran (≤ 1024px)
   Split passa a una columna, contact s'estreny
   ============================================================ */
@media (max-width: 1024px) {
  .split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .split__text {
    padding: 5rem clamp(2rem, 6vw, 5rem);
    order: 1;
  }
  .split__text-inner { max-width: 100%; }
  .split__media {
    height: 50vw;
    min-height: 300px;
    padding: 0;
    order: 2;
  }
  .split__media img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    aspect-ratio: auto;
  }

  /* CNC: imatge horitzontal a tablet */
  .split--tan {
    padding: 0;
    min-height: auto;
  }
  .split--tan .split__text {
    padding: 5rem clamp(2rem, 6vw, 5rem);
  }
  .split--tan .split__media {
    height: 55vw;
    max-height: 500px;
    padding: 0;
  }
  .split--tan .split__media img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
  }

  .contact__wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ============================================================
   RESPONSIVE — Tablet (≤ 900px)
   Navbar burger, divisions apilades
   ============================================================ */
@media (max-width: 900px) {
  /* Navbar */
  .navbar__links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(8px);
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    border-top: 1px solid var(--tan);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .navbar__links a { color: var(--black); }
  .navbar__links.is-open { display: flex; }
  .navbar__burger { display: flex; }

  /* Hero */
  .hero__content {
    padding: 5rem 2rem 4rem;
    max-width: 100%;
  }

  /* Divisions */
  .divisions-wrapper {
    height: 500vh;
  }
  .division {
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }
  .division__text {
    flex: 0 0 auto;
    padding: 4rem 2rem 2rem;
    order: 1;
  }
  .division__text p { max-width: 100%; }
  .division__title { margin-bottom: 0.8rem; }
  .division__media {
    flex: 1;
    order: 2;
    min-height: 0;
  }
  .division--flip .division__media { order: 2; }
  .division--flip .division__text { order: 1; padding: 4rem 2rem 2rem; }

  /* Panorama */
  .panorama { height: 45vw; min-height: 220px; }
  .panorama--sticky { height: 60vh; }

  /* Contact */
  .contact { padding: 4rem 2rem; }
  .form-row { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ============================================================
   RESPONSIVE — Tablet petit / Paisatge mòbil (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --gutter: 2rem; }

  .hero__title { font-size: clamp(3.5rem, 10vw, 5rem); }

  .work-bar { padding: 0 2rem; }

  .division__text {
    padding: 3rem 2rem 1.5rem;
  }
  .division__title { font-size: clamp(2.5rem, 8vw, 4rem); }
  .division__text p { font-size: 13px; }

  .sustainability { padding: 5rem 2rem; }

  .footer { padding: 0 2rem; }
}

/* ============================================================
   RESPONSIVE — Mòbil (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  :root { --gutter: 1.5rem; }

  /* Navbar */
  .navbar__inner { height: 56px; }
  .navbar__links { top: 56px; padding: 1.2rem 1.5rem; }

  /* Hero */
  .hero__content { padding: 4rem 1.5rem 3rem; }
  .hero__title { font-size: clamp(2.8rem, 11vw, 4rem); }
  .hero__sub { font-size: 13px; margin-bottom: 2rem; }

  /* Titulars */
  .heading-lg { font-size: clamp(2.2rem, 9vw, 3rem); }
  .heading-md { font-size: clamp(1.8rem, 7vw, 2.5rem); }

  /* Split (ja és 1 col des de 1024px) */
  .split__text { padding: 3rem 1.5rem; }
  .split__media { height: 60vw; }

  /* Panorama */
  .panorama { height: 55vw; min-height: 180px; }
  .panorama--sticky { height: 50vh; }

  /* Divisions */
  .division__text { padding: 2.5rem 1.5rem 1.5rem; }
  .division__title { font-size: clamp(2rem, 9vw, 3rem); margin-bottom: 0.6rem; }
  .division__text p { font-size: 13px; line-height: 1.7; }

  /* Our Work bar */
  .work-bar { padding: 0 1.5rem; }

  /* Sustainability */
  .sustainability { padding: 4rem 1.5rem; }

  /* Contact */
  .contact { padding: 3.5rem 1.5rem; }
  .contact__info .heading-lg { font-size: clamp(2rem, 9vw, 3rem); }

  /* Footer */
  .footer {
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    height: auto;
    padding: 1.5rem;
    text-align: center;
  }
}
