/* ================================================================
   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);
  color: var(--white);

  display: grid;
  place-items: center;

  transition:
    transform 1s var(--ease),
    visibility 1s var(--ease);
}

/* Curtain exit */

.preloader.is-done {
  transform: translateY(-100%);
  visibility: hidden;
}

/* ==========================================================
   TEXT-ONLY PRELOADER (NO LOGO)
   Original behaviour
   ========================================================== */

.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);
  }
}

/* ==========================================================
   LOGO + COMPANY NAME
   ========================================================== */

.preloader__lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  max-width: calc(100vw - 36px);
}

/* Logo enters first */

.preloader__mark {
  position: relative;
  z-index: 2;

  display: block;
  width: clamp(56px, 7vw, 90px);
  height: clamp(56px, 7vw, 90px);
  object-fit: contain;
  flex: 0 0 auto;

  opacity: 0;
  transform: translateY(12px) scale(0.94);

  animation:
    preloaderMarkIn 650ms var(--ease) 100ms forwards;
}

@keyframes preloaderMarkIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Hidden name container */

.preloader__name-mask {
  display: block;
  width: 0;
  min-width: 0;
  flex: 0 0 auto;

  margin-left: 0;
  overflow: hidden;
  white-space: nowrap;

  transition:
    width 950ms var(--ease),
    margin-left 950ms var(--ease);
}

/* Actual company name */

.preloader__name {
  display: block;
  width: max-content;

  color: var(--white);
  font-size: clamp(1.25rem, 3vw, 2.7rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  white-space: nowrap;

  opacity: 0;
  transform: translateX(-20px);

  transition:
    transform 950ms var(--ease),
    opacity 700ms ease;
}

/* ==========================================================
   REVEAL ANIMATION
   ========================================================== */

.preloader.is-revealed .preloader__name-mask {
  width: var(--preloader-name-width, 0px);
  margin-left: clamp(12px, 1.6vw, 24px);
}

.preloader.is-revealed .preloader__name {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 600px) {

  .preloader__mark {
    width: 58px;
    height: 58px;
  }

  .preloader__name {
    font-size: clamp(1.1rem, 4.5vw, 1.6rem);
  }

  .preloader.is-revealed .preloader__name-mask {
    margin-left: 12px;
  }
}

/* ==========================================================
   ACCESSIBILITY
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

  .preloader__mark {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .preloader__name-mask,
  .preloader__name {
    transition: none;
  }

  .preloader.is-revealed .preloader__name {
    opacity: 1;
    transform: none;
  }

  .preloader {
    transition: none;
  }
}

/* Disable page scrolling while preloader is visible */

body.is-loading {
  overflow: hidden;
  height: 100vh;
}



/* ==========================================================
   STUDIO
   ========================================================== */

.studio {
  position: relative;
  background: var(--black);
  color: var(--white);
  padding-block: clamp(54px, 7vh, 86px);
}

.studio .section-label {
  color: var(--grey);
}

/* Layout */

.studio__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 5vw, 90px);
  align-items: stretch;
  margin-top: clamp(32px, 4vh, 48px);
}

/* ==========================================================
   IMAGE SLIDER
   ========================================================== */

.studio__media {
  position: relative;
  margin: 0;
  min-height: clamp(660px, 90svh, 860px);
  overflow: hidden;
  border-radius: 4px;
}

.studio__slider {
  position: absolute;
  inset: 0;
}

.studio__slide {
  position: absolute;
  inset: 0;
  background-image: none;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.02);
  opacity: 0;
  z-index: 0;
}

.studio__slide.is-active {
  opacity: 1;
  z-index: 2;
  animation: studioReveal 1400ms
    cubic-bezier(0.65, 0, 0.35, 1) both;
}

.studio__slide.is-leaving {
  opacity: 1;
  z-index: 1;
}

/* Slider animation */

@keyframes studioReveal {
  0% {
    opacity: 0;
    clip-path: polygon(
      -30% 0%, -21.8% 10%, -16.7% 20%,
      -16.7% 30%, -21.8% 40%, -30% 50%,
      -38.2% 60%, -43.3% 70%, -43.3% 80%,
      -38.2% 90%, -30% 100%, 0% 100%, 0% 0%
    );
  }

  100% {
    opacity: 1;
    clip-path: polygon(
      130% 0%, 138.2% 10%, 143.3% 20%,
      143.3% 30%, 138.2% 40%, 130% 50%,
      121.8% 60%, 116.7% 70%, 116.7% 80%,
      121.8% 90%, 130% 100%, 0% 100%, 0% 0%
    );
  }
}

/* Slider navigation */

.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: 0;
  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);
}

/* ==========================================================
   CONTENT
   ========================================================== */

.studio__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(28px, 4vh, 44px);
  min-width: 0;
}

/* Main statement */

.studio__statement {
  max-width: 820px;
  font-size: clamp(23px, 1.9vw, 30px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.studio__statement > :first-child {
  margin-top: 0;
}

.studio__statement > :last-child {
  margin-bottom: 0;
}

/* ==========================================================
   COUNTERS
   ========================================================== */

.counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 40px);
}

.counter {
  border-top: 1px solid rgba(245, 245, 245, 0.16);
  padding-top: clamp(18px, 2.5vh, 28px);
}

.counter__number {
  display: block;
  font-size: clamp(42px, 3.6vw, 60px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.counter__label {
  display: block;
  margin-top: 10px;
  color: var(--grey-light);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* ==========================================================
   STUDIO LINK
   ========================================================== */

.studio__more {
  align-self: flex-start;
  color: var(--white);
  font-size: clamp(15px, 1.15vw, 18px);
  border-bottom: 1px solid rgba(245, 245, 245, 0.35);
  padding-bottom: 5px;
  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;
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (min-width: 761px) and (max-width: 1023px) {

  .studio__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
  }

  .studio__media {
    min-height: 580px;
  }

  .studio__statement {
    font-size: clamp(19px, 2.2vw, 23px);
    line-height: 1.4;
  }

  .studio__content {
    gap: 28px;
  }

  .counter__number {
    font-size: clamp(32px, 4vw, 44px);
  }

  .counter__label {
    font-size: 11px;
  }
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 760px) {

  .studio {
    overflow: hidden;
    padding-block: clamp(76px, 12vh, 120px);
  }

  .studio__grid {
    display: block;
    margin-top: 32px;
  }

  /* Full-background slider */

  .studio__media {
    position: absolute;
    inset: 0;
    min-height: 0;
    border-radius: 0;
    z-index: 0;
  }

  .studio__media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.72),
      rgba(10, 10, 10, 0.84)
    );
    pointer-events: none;
  }

  .studio .section-label,
  .studio__content {
    position: relative;
    z-index: 2;
  }

  .studio__dots {
    z-index: 4;
  }

  /* Content */

  .studio__content {
    gap: 36px;
  }

  .studio__statement {
    font-size: clamp(22px, 5vw, 30px);
    line-height: 1.35;
  }

  /* Counters */

  .counters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .counter {
    display: block;
    padding-top: 14px;
  }

  .counter__number {
    font-size: clamp(28px, 7vw, 46px);
  }

  .counter__label {
    font-size: 11px;
    overflow-wrap: anywhere;
  }

  .studio__more {
    font-size: 15px;
  }
}


/* ================================================================
   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: none;
  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, 11vh, 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: none;
  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-position: center;
  background-size: cover;
  background-repeat: 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; }
}
