/* ============================================
   Drougas Skiasi — Cinematic homepage
   Scroll scenes + redesigned home sections.
   Loaded only on index.html.
   ============================================ */

/* Commissioner: designed by a Greek type designer, natural Greek forms.
   Self-hosted (GDPR), variable 400-700. */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/commissioner-var-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/commissioner-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body[data-page="home"] {
  --display: 'Commissioner', 'Noto Sans', sans-serif;
  --ink: #15120f;
  --sand: #f3ece1;
  --pad-x: clamp(1.25rem, 5vw, 5.5rem);
}

/* ---------- header: transparent over the scenes, solid after ---------- */
body[data-page="home"] .site-header {
  position: fixed;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(10, 9, 8, 0.5) 0%, rgba(10, 9, 8, 0) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 0;
  box-shadow: none;
  transition: background 400ms ease, box-shadow 400ms ease;
}

body[data-page="home"].past-scenes .site-header {
  background: rgba(20, 18, 15, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

body[data-page="home"] .brand-logo--header {
  height: clamp(2.9rem, 6vw, 4rem);
}

/* ---------- scenes ---------- */
.scene {
  position: relative;
  height: var(--scene-len, 300vh);
  background: #0e0c0a;
  color: #fff;
}

.scene-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.scene-poster,
.scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scene canvas {
  z-index: 1;
  opacity: 0;
  transition: opacity 300ms ease;
}

.scene.is-live canvas {
  opacity: 1;
}

/* copy lives in the lower band: the upper frame (awning, frame) stays clean */
.scene-sticky::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(10, 9, 8, 0.8) 0%, rgba(10, 9, 8, 0.52) 22%, rgba(10, 9, 8, 0) 46%);
}

/* editorial two columns: headline left, supporting text + CTAs right,
   both resting on the same baseline at the bottom of the frame */
.scene-copy {
  position: absolute;
  z-index: 3;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: clamp(2.5rem, 7vh, 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 7rem);
  visibility: hidden;
  opacity: 0;
  will-change: opacity, transform;
}

.scene-copy .eyebrow {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.9rem;
}

.scene-copy h1,
.scene-copy h2 {
  font-family: var(--display);
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.04;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.scene-copy h1 {
  font-size: clamp(2.6rem, 5vw, 5rem);
}

.scene-copy h2 {
  font-size: clamp(2.3rem, 4.3vw, 4.3rem);
}

.copy-aside {
  padding-bottom: 0.45rem;
}

.copy-aside p {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.15vw, 1.12rem);
  line-height: 1.6;
  max-width: 36ch;
  margin: 0;
}

.copy-aside .hero-ctas {
  margin-top: 1.5rem;
}

.scene-copy .btn {
  padding: 0.9rem 1.5rem;
  font-weight: 600;
}

.scene-count {
  position: absolute;
  z-index: 3;
  top: clamp(6rem, 13vh, 8rem);
  right: var(--pad-x);
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.scene-progress {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent, #c8642c);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.scene-note {
  position: absolute;
  z-index: 3;
  right: var(--pad-x);
  bottom: 0.9rem;
  margin: 0;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

/* ---------- statement ---------- */
.statement {
  background: var(--ink);
  color: #f6efe6;
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 9vw, 7rem);
}

.statement-text {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 3.1rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 26ch;
  margin: 0;
  text-wrap: balance;
}

.statement-facts {
  list-style: none;
  padding: 0;
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.statement-facts li {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(246, 239, 230, 0.16);
}

.statement-facts span {
  color: rgba(246, 239, 230, 0.58);
  font-size: 0.9rem;
}

.statement-facts strong {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.35;
  color: #fff;
  max-width: 24ch;
}

/* ---------- section heads ---------- */
body[data-page="home"] .section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 20ch;
  text-wrap: balance;
}

.section-head--split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-note {
  margin: 0.9rem 0 0;
  color: var(--muted, #6b6259);
  font-size: 1rem;
}

.link-arrow {
  flex-shrink: 0;
  font-family: var(--display);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: color 200ms ease;
}

.link-arrow::after {
  content: ' \2192';
  display: inline-block;
  transition: transform 200ms ease;
}

.link-arrow:hover {
  color: var(--accent-hover);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- services: photo cards ---------- */
.services-x {
  padding-top: clamp(5rem, 10vw, 8rem);
}

.svc-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-auto-rows: clamp(220px, 20vw, 290px);
}

.svc {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
  background: #222;
}

.svc--lg {
  grid-row: span 2;
}

.svc img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.svc::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 9, 8, 0.82) 0%, rgba(10, 9, 8, 0.2) 55%, rgba(10, 9, 8, 0) 100%);
}

.svc-body {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.3rem 1.4rem;
}

.svc-num {
  display: none;
}

.svc h3 {
  font-family: var(--display);
  color: #fff;
  font-weight: 600;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  margin: 0;
}

.svc--lg h3 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
}

.svc p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  margin: 0.45rem 0 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 400ms ease, opacity 400ms ease;
}

.svc--lg p {
  max-height: 6rem;
  opacity: 1;
  max-width: 38ch;
  font-size: 1rem;
}

.svc:hover img,
.svc:focus-visible img {
  transform: scale(1.05);
}

.svc:hover p,
.svc:focus-visible p {
  max-height: 6rem;
  opacity: 1;
}

/* ---------- featured projects ---------- */
.projects-x {
  background: var(--sand);
}

.projects-x .featured-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.projects-x .featured-item {
  position: relative;
  border: 0;
  border-radius: 1rem;
  background: #222;
}

.projects-x .featured-item img {
  aspect-ratio: 4 / 5;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.projects-x .featured-item-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1rem 0.9rem;
  background: linear-gradient(0deg, rgba(10, 9, 8, 0.7), rgba(10, 9, 8, 0));
}

.projects-x .featured-item-info p {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
}

.projects-x .featured-item-info p::first-letter {
  text-transform: uppercase;
}

.projects-x .featured-item:hover img {
  transform: scale(1.04);
}

/* ---------- process (why us) ---------- */
.process-x .pillars {
  gap: clamp(1.5rem, 3vw, 3rem);
}

.process-x .pillar {
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(21, 18, 15, 0.14);
  border-radius: 0;
  padding: 1.4rem 0 0;
}

.process-x .pillar-num {
  display: block;
  font-family: var(--display);
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 500;
  line-height: 1;
  opacity: 1;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.process-x .pillar h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
}

/* ---------- CTA with the dusk render ---------- */
.cta-x {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(7rem, 16vw, 12rem) 0;
  background: #0e0c0a;
  text-align: left;
}

.cta-x-media,
.cta-x-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.cta-x::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(10, 9, 8, 0.8) 0%, rgba(10, 9, 8, 0.45) 45%, rgba(10, 9, 8, 0.1) 100%);
}

.cta-x .eyebrow {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.78);
}

.cta-x h2 {
  font-family: var(--display);
  color: #fff;
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  letter-spacing: -0.012em;
  line-height: 1.04;
  max-width: 13ch;
  margin: 0;
}

.cta-x p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  margin: 1.2rem 0 0;
}

.cta-x .cta-buttons {
  justify-content: flex-start;
  margin-top: 2rem;
}

/* ---------- no-JS / reduced motion ---------- */
.scenes-static .scene,
.no-js .scene {
  height: auto;
}

.scenes-static .scene-sticky,
.no-js .scene-sticky {
  position: relative;
  min-height: 100svh;
}

.scenes-static .scene-copy,
.no-js .scene-copy {
  position: relative;
  visibility: visible;
  opacity: 1;
  inset: auto;
  padding: 0 var(--pad-x);
  margin-top: 40vh;
}

.scenes-static .scene-copy + .scene-copy {
  margin-top: 2rem;
}

.scenes-static .scene canvas,
.scenes-static .scene-count {
  display: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .scene-copy {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .svc-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: clamp(200px, 38vw, 300px);
  }

  .projects-x .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* portrait: frame in a band under the header, copy on a solid panel below it.
   scroll-scenes.js sets --band-top / --band-h (band shrinks so the tallest beat fits);
   the defaults here only cover first paint. Keep the query in sync with the JS. */
@media (max-width: 1000px) and (orientation: portrait) {
  .scene-sticky {
    --band-top: 76px;
    --band-h: min(93.75vw, 46svh);
    background: #14110e;
  }

  .scene-poster {
    top: var(--band-top);
    height: var(--band-h);
  }

  /* soft edge where the frame meets the panel */
  .scene-sticky::after {
    inset: auto 0 auto 0;
    top: calc(var(--band-top) + var(--band-h) - 2.5rem);
    height: 2.5rem;
    background: linear-gradient(180deg, rgba(20, 17, 14, 0) 0%, #14110e 100%);
  }

  .scene-copy {
    --panel-bottom: 84px;
    top: calc(var(--band-top) + var(--band-h) + 1.5rem);
    bottom: auto;
  }

  .scene-copy h1,
  .scene-copy h2 {
    text-shadow: none;
  }

  .scenes-static .scene-copy {
    margin-top: calc(var(--band-top) + var(--band-h) + 1.5rem);
  }

  .scene-progress {
    top: calc(var(--band-top) + var(--band-h) - 2px);
    bottom: auto;
  }

  .scene-note {
    top: calc(var(--band-top) + 0.6rem);
    bottom: auto;
  }
}

@media (max-width: 767px) {
  body[data-page="home"] .site-header {
    background: rgba(14, 12, 10, 0.96);
  }

  .scene-copy {
    left: 1.25rem;
    right: 1.25rem;
    gap: 0.75rem;
  }

  .scene-copy .eyebrow {
    font-size: 0.88rem;
    margin-bottom: 0.6rem;
  }

  .scene-copy h1 {
    font-size: clamp(2.1rem, 9vw, 2.7rem);
  }

  .scene-copy h2 {
    font-size: clamp(1.9rem, 8vw, 2.4rem);
  }

  .copy-aside p {
    font-size: 0.98rem;
  }

  .copy-aside .hero-ctas {
    margin-top: 1.1rem;
    gap: 0.6rem;
  }

  .scene-copy .hero-ctas .btn {
    flex: 1 1 0;
    min-width: max-content;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  .scene-count {
    display: none;
  }

  .statement-facts {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .section-head--split {
    flex-direction: column;
    align-items: flex-start;
  }

  .svc-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }

  .svc--lg {
    grid-row: span 1;
  }

  .svc p {
    max-height: 6rem;
    opacity: 1;
  }

  .projects-x .featured-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .cta-x::before {
    background: linear-gradient(0deg, rgba(10, 9, 8, 0.85) 0%, rgba(10, 9, 8, 0.45) 60%, rgba(10, 9, 8, 0.2) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .svc img,
  .projects-x .featured-item img {
    transition: none;
  }
}

/* one eyebrow style for the whole homepage: sentence case, no tracking, muted */
body[data-page="home"] .eyebrow {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted, #6b6259);
}

body[data-page="home"] .eyebrow::before,
body[data-page="home"] .eyebrow::after {
  content: none;
}

body[data-page="home"] .scene-copy .eyebrow,
body[data-page="home"] .cta-x .eyebrow {
  color: rgba(255, 255, 255, 0.85);
}
