/* ================================================================
   Hello-Archi(R) — Architecture Studio
   home.css
   Home page only: preloader, the studio image slider, the sticky
   stacked projects, the services grid, the parallax quote, the FAQ
   accordion and the Works cursor-follow "View +" pill.
   Reuses the shared .hero / header / footer / CTA / modal from base.css.
   Split from the original styles.css. Loaded on the home page
   (after base.css).
   ================================================================ */

/* ================================================================
   PRELOADER
   ================================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--black);
  display: grid;
  place-items: center;
  transition: transform 1s var(--ease), visibility 1s var(--ease);
}
/* Loading screen slides up out of view (curtain reveal) */
.preloader.is-done { transform: translateY(-100%); visibility: hidden; }
.preloader__logo {
  color: var(--white);
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(14px);
  animation: preloaderIn 1s var(--ease) 0.15s forwards;
}
.preloader__logo sup { font-size: 0.45em; top: -0.9em; }
@keyframes preloaderIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Disable scroll while preloader is up */
body.is-loading { overflow: hidden; height: 100vh; }

/* ================================================================
   STUDIO (black section + counters)
   ================================================================ */
.studio {
  background: var(--black);
  color: var(--white);
  padding-block: clamp(90px, 14vw, 200px);
}
.studio .section-label { color: var(--grey); }
.studio__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 6vw, 100px);
  align-items: stretch;
  margin-top: clamp(32px, 5vw, 64px);
}
.studio__media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  min-height: 100%;
}
.studio__slider {
  position: absolute;
  inset: 0;
  min-height: 320px;
}
.studio__slide {
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.02);
  opacity: 0;
  z-index: 0;
}
/* Resting (visible) slide */
.studio__slide.is-active {
  opacity: 1;
  z-index: 2;
  animation: studioReveal 1400ms cubic-bezier(0.65, 0, 0.35, 1) both;
}
/* Outgoing slide simply stays beneath while the new one fades over it */
.studio__slide.is-leaving {
  opacity: 1;
  z-index: 1;
}

/* Transition: a soft fade paired with a horizontal sweep whose leading
   edge is an S-wave — the top half bulges out (convex) and the bottom
   half curves in (concave). Sampled along a full sine period so both
   curves ride across together. */
@keyframes studioReveal {
  0% {
    opacity: 0;
    clip-path: polygon(
      -30.0% 0%, -21.8% 10%, -16.7% 20%, -16.7% 30%, -21.8% 40%,
      -30.0% 50%, -38.2% 60%, -43.3% 70%, -43.3% 80%, -38.2% 90%,
      -30.0% 100%, 0% 100%, 0% 0%
    );
  }
  100% {
    opacity: 1;
    clip-path: polygon(
      130.0% 0%, 138.2% 10%, 143.3% 20%, 143.3% 30%, 138.2% 40%,
      130.0% 50%, 121.8% 60%, 116.7% 70%, 116.7% 80%, 121.8% 90%,
      130.0% 100%, 0% 100%, 0% 0%
    );
  }
}

/* Slider dots */
.studio__dots {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.studio__dots button {
  width: 28px;
  height: 3px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: rgba(245, 245, 245, 0.35);
  cursor: pointer;
  transition: background 0.35s ease, width 0.35s ease;
}
.studio__dots button.is-active {
  width: 44px;
  background: var(--white);
}
.studio__content { display: flex; flex-direction: column; }
.studio__statement {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);   /* large editorial copy (28-36px) */
  line-height: 1.3;                          /* 1.25-1.35 */
  font-weight: 400;
  letter-spacing: -0.015em;
  max-width: 820px;                          /* wide editorial measure (700-850px) */
  margin-bottom: clamp(48px, 7vw, 90px);
}
.counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 44px);
}
.counter {
  border-top: 1px solid rgba(245,245,245,0.16);
  padding-top: clamp(24px, 3vw, 40px);
}
.studio__more {
  align-self: flex-start;
  margin-top: clamp(40px, 6vw, 80px);
  color: var(--white);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  border-bottom: 1px solid rgba(245,245,245,0.35);
  padding-bottom: 4px;
  transition: border-color 0.3s ease, opacity 0.3s ease;
}
.studio__more span { display: inline-block; margin-left: 4px; }
.studio__more:hover { border-color: var(--white); opacity: 0.85; }

/* On phones the side-by-side slider squashes to a useless sliver, so promote
   the slider to a full-section background and lay the text over it. Lives here
   (not base.css) because home.css loads later and would otherwise win. */
@media (max-width: 760px) {
  .studio { position: relative; overflow: hidden; }
  .studio__grid { grid-template-columns: 1fr; gap: 32px; }
  /* Pull the figure out of the grid flow so it spans the whole section. It is
     positioned against .studio (the container stays static), giving a true
     full-bleed background behind all the text. */
  .studio__media {
    position: absolute;
    inset: 0;
    height: auto;
    min-height: 0;
    border-radius: 0;
    z-index: 0;
  }
  /* Dim + darken so the white copy stays readable over the imagery */
  .studio__media::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;          /* above the slides (z-index 0-2), below the dots */
    background: linear-gradient(180deg, rgba(10,10,10,0.72) 0%, rgba(10,10,10,0.84) 100%);
    pointer-events: none;
  }
  /* Raise the readable content above the background slider */
  .studio .section-label,
  .studio__content { position: relative; z-index: 2; }
  /* Dots stay tappable above the overlay */
  .studio__dots { z-index: 4; }
  /* base.css's mobile rule turns each counter into a baseline flex row, but
     this file keeps the 3-column grid — the two together leave the wrapped
     labels misaligned. Force a clean stacked card: number on top, label below,
     all three top-aligned across the row. */
  .counters { grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
  .counter { display: block; }
}
.counter__number {
  display: block;
  font-size: clamp(2.6rem, 4vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.counter__label {
  display: block;
  margin-top: 0.7rem;
  color: var(--grey-light);
  font-size: 0.8rem;            /* ~13px metadata label */
  letter-spacing: 0.02em;
}

/* ================================================================
   PROJECTS (sticky stacked slides)
   ================================================================ */
.projects { background: var(--black); }
.projects__stack { position: relative; }
.project-slide {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
/* Scroll "dwell": each slide stays fully on-screen for a little extra
   scrolling before the next one slides up to cover it. */
.project-slide:not(:last-child) { margin-bottom: 45vh; }
.project-slide__media {
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  z-index: 0;
  will-change: transform;
}
.project-slide::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10,10,10,0.1) 30%, rgba(10,10,10,0.85) 100%);
}
.project-slide__caption {
  position: relative;
  z-index: 2;
  color: var(--white);
  padding-bottom: clamp(50px, 9vh, 110px);
  width: 100%;
  text-align: center;          /* titles centred over the image */
}
.project-slide__index {
  font-size: 0.75rem;          /* ~12px metadata */
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--beige);
  opacity: 0.8;
}
.project-slide__title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 500;            /* medium weight */
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-top: 0.6rem;
}
.project-slide__meta {
  margin-top: 0.8rem;
  font-size: 0.8rem;           /* ~13px metadata: location — category */
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--beige);
  opacity: 0.85;
}

/* ================================================================
   SERVICES (what we do)
   ================================================================ */
.services {
  background: var(--black);
  color: var(--white);
  padding-block: clamp(90px, 14vw, 190px);
}
.services__headline {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);   /* restrained section title (28-40px) */
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.02em;
  max-width: 22ch;
  /* left-aligned layout: title block anchored to the left */
  margin-right: auto;
  text-align: left;
  width: min(100%, 760px);
  margin-bottom: clamp(50px, 8vw, 100px);
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 1.8vw, 28px);
}
/* 2x2 on phones (overrides the base.css media query, which loses to this
   file's load order) */
@media (max-width: 760px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}
.service-card {
  position: relative;
  background: transparent;
  border: 1px solid rgba(245, 245, 245, 0.18);
  border-radius: 4px;
  padding: clamp(26px, 2.4vw, 40px);
  min-height: clamp(260px, 26vw, 360px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
/* Image that reveals behind the card content on hover */
.service-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--card-img);
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  transform: scale(1.08);
  transition: opacity 0.6s var(--ease), transform 0.9s var(--ease);
}
.service-card__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.4) 0%, rgba(10, 10, 10, 0.82) 100%);
}
/* Keep all card content above the image layer */
.service-card__icon,
.service-card__title,
.service-card__desc,
.service-card__num { position: relative; z-index: 1; }
.service-card__icon {
  font-size: 1.6rem;
  margin-bottom: auto;
  color: var(--grey-light);
  transition: transform 0.5s var(--ease), color 0.5s var(--ease);
}
.service-card__title {
  font-size: clamp(1.25rem, 1.6vw, 1.45rem);   /* service titles 20-24px */
  font-weight: 500;                             /* medium weight */
  letter-spacing: -0.01em;
  margin-top: 2.5rem;
  transition: color 0.5s var(--ease);
}
.service-card__desc {
  margin-top: 0.7rem;
  color: var(--grey-light);                     /* soft grey secondary text */
  font-size: 0.95rem;                           /* ~15px body */
  line-height: 1.5;
  transition: color 0.5s var(--ease);
}
.service-card__num {
  position: absolute;
  top: clamp(26px, 2.4vw, 40px);
  right: clamp(26px, 2.4vw, 40px);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey-light);
  letter-spacing: 0.08em;
  transition: color 0.5s var(--ease);
}
/* Hover: image fades up behind the content, text inverts to white */
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--white);
}
.service-card:hover .service-card__bg { opacity: 1; transform: scale(1); }
.service-card:hover .service-card__icon { transform: translateY(-4px); color: var(--white); }
.service-card:hover .service-card__title { color: var(--white); }
.service-card:hover .service-card__desc { color: rgba(245, 245, 245, 0.82); }
.service-card:hover .service-card__num { color: rgba(245, 245, 245, 0.7); }

/* Home-only reveal stagger for the services grid */
.services__grid .reveal.is-in:nth-child(2) { transition-delay: 0.08s; }
.services__grid .reveal.is-in:nth-child(3) { transition-delay: 0.16s; }
.services__grid .reveal.is-in:nth-child(4) { transition-delay: 0.24s; }

/* ================================================================
   QUOTE (parallax)
   ================================================================ */
.quote {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}
.quote__bg {
  position: absolute;
  inset: -15% 0;
  background: url("../images/quote.1325bf8297db.jpg") center/cover no-repeat;
  z-index: 0;
  will-change: transform;
}
.quote__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(10,10,10,0.66);
}
.quote__inner { position: relative; z-index: 2; text-align: center; }
.quote__text {
  font-size: clamp(1.6rem, 3vw, 2.4rem);   /* large editorial quote, restrained */
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.02em;
  max-width: 26ch;
  margin-inline: auto;
}
.quote__author {
  display: block;
  margin-top: 2.2rem;
  font-style: normal;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  color: var(--beige-deep);
}

/* ================================================================
   FAQ
   ================================================================ */
.faq {
  background: var(--black);
  color: var(--white);
  padding-block: clamp(90px, 14vw, 190px);
}
.faq__layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.faq__headline {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);   /* big contact/help text on the left */
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 12ch;
}
.faq-item { border-top: 1px solid rgba(245, 245, 245, 0.16); }
.faq-item:last-child { border-bottom: 1px solid rgba(245, 245, 245, 0.16); }
.faq-item__q {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  padding: clamp(22px, 2.6vw, 34px) 0;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--white);
  font-family: inherit;
}
.faq-item__icon {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--grey);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 400;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease);
}
.faq-item.is-open .faq-item__icon {
  transform: rotate(45deg);
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.faq-item__a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s var(--ease);
}
.faq-item__a p {
  padding-bottom: clamp(22px, 2.6vw, 34px);
  color: var(--grey-light);
  font-size: 1rem;             /* ~16px body */
  line-height: 1.55;
  max-width: 52ch;
}

/* ================================================================
   WORKS SECTION — clickable slides + ONE cursor-following "View +"
   pill scoped to the whole section (not per slide)
   ================================================================ */
.projects { cursor: none; }                      /* hide native cursor across the whole stack */
.project-slide__link {
  position: absolute;
  inset: 0;
  z-index: 3;                                     /* above media + overlay, sits under caption text */
}
.project-slide__caption { z-index: 4; pointer-events: none; }   /* text stays visible, never blocks the link */

/* One pill for the entire Works section — fixed to the viewport, lerp-followed by JS */
.projects__view {
  position: fixed;
  top: 0; left: 0;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 9px 9px 20px;
  background: var(--white);
  color: var(--black);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease);
  will-change: left, top, transform;
}
.projects.is-hover .projects__view {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.projects__view b {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1;
}
/* Touch / no-hover devices: restore the native cursor and hide the custom pill */
@media (hover: none) {
  .projects { cursor: auto; }
  .projects__view { display: none; }
}
