/* =========================================================================
   Bilhan Tekstil — homepage
   ========================================================================= */

/* ---------- Preloader ---------- */
.pl { position: fixed; inset: 0; z-index: var(--z-loader); background: var(--c-night); display: grid; place-items: center; --logo-word: var(--c-paper); --logo-mark: var(--c-rust-400); }
.pl__thread { position: absolute; left: 0; top: 50%; height: 1px; width: 100%; background: var(--c-rust-400); transform-origin: left; transform: scaleX(0); }
.pl__logo { height: clamp(56px, 9vw, 104px); position: relative; }
.pl__logo .logo { height: 100%; }
.pl__count { position: absolute; right: var(--gutter); bottom: var(--sp-6); font-variant-numeric: tabular-nums; color: var(--fg-muted); }
.no-js .pl, .pl.is-skipped { display: none; }
/* Failsafe: if any script fails, the preloader still leaves after 6 s (JS normally removes it at ~3.8 s) */
.pl { animation: pl-failsafe .6s ease 6s forwards; }
@keyframes pl-failsafe { to { opacity: 0; visibility: hidden; } }

/* ---------- Hero (inside the pinned stage) ---------- */
.ha { position: absolute; inset: 0; z-index: 2; display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.ha__film { position: absolute; inset: 0; z-index: -1; }
.ha__film video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.ha__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,20,20,.6) 0%, rgba(20,20,20,.45) 40%, rgba(20,20,20,.92) 100%), rgba(20,20,20,.15); }
.ha__content { padding-top: 9rem; padding-bottom: clamp(3rem, 8vh, 6rem); }
.ha__kicker { color: var(--c-paper); }
.ha__kicker::before { content: ""; display: inline-block; width: 2.5rem; height: 1px; background: var(--c-rust-400); vertical-align: middle; margin-right: var(--sp-3); }
.ha__title { margin-top: var(--sp-5); }
.ha__title em { color: var(--c-rust-400); }
.ha__foot { display: flex; flex-wrap: wrap; gap: var(--sp-6); align-items: end; justify-content: space-between; margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.ha__lead { max-width: 30rem; margin: 0; color: var(--fg-subtle); font-size: var(--fs-lead); font-weight: 300; line-height: 1.5; }
.ha__scroll { position: absolute; right: var(--gutter); top: 50%; display: grid; justify-items: center; gap: var(--sp-3); writing-mode: vertical-rl; }
.ha__scroll i { display: block; width: 1px; height: 72px; background: linear-gradient(var(--c-rust-400), var(--c-rust-400)) no-repeat 0 0 / 1px 30%, var(--line); animation: drip 2.2s var(--ease-inout) infinite; }
@keyframes drip { 0% { background-position: 0 -30%; } 100% { background-position: 0 130%; } }
@media (max-width: 767px) { .ha__scroll { display: none; } }

/* Line masks: room below for ş ç ğ y so nothing is left behind when lines slide out */
[data-title] > div, .fs__copy h2 > div { padding-bottom: .18em; margin-bottom: -.18em; }

/* ---------- Fabric story ---------- */
.fs { position: relative; height: 680vh; background: var(--c-night); }
.fs__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; color: var(--fg); transition: color var(--dur-slow) var(--ease-out); --scrim: rgba(20,20,20,.62); --accent: #F2B8A6; }
.fs__stage.is-light { --fg: var(--c-ink); --fg-muted: var(--c-stone-600); --fg-subtle: var(--c-anthracite); --accent: var(--c-rust-500); --line: rgba(23,24,26,.18); --scrim: rgba(244,239,231,.72); }
.fs__stage.is-print { --scrim: rgba(20,20,20,.84); }
.fs__gl, .fs__fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.fs__fallback { background: url(/assets/img/production/weaving.jpg) center / cover; display: none; }
.no-webgl .fs__fallback { display: block; }
.fs__thread { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; z-index: 3; background: var(--c-rust-400); opacity: 0; pointer-events: none; }
.fs__steps { position: relative; z-index: 3; height: 100%; display: grid; align-items: end; padding-bottom: clamp(4.5rem, 11vh, 7rem); pointer-events: none; }
.fs__steps::before { content: ""; position: absolute; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); height: 75%;   /* full-bleed: the container is capped at 90rem, the scrim must not be */
  pointer-events: none; background: radial-gradient(110% 85% at 0% 100%, var(--scrim), transparent 72%); }
.fs__steps::before, .fs__progress, .fs__bar { transition: opacity var(--dur-base) var(--ease-out); }
.fs__stage.is-hero .fs__steps::before, .fs__stage.is-hero .fs__progress, .fs__stage.is-hero .fs__bar { opacity: 0; pointer-events: none; }
.fs__step { grid-area: 1 / 1; display: grid; gap: var(--sp-6); align-items: end; opacity: 0; visibility: hidden; pointer-events: auto; }
@media (min-width: 1024px) { .fs__step { grid-template-columns: minmax(0, 1fr) auto; } }
.fs__copy { max-width: 52rem; }
.fs__copy .label { color: var(--fg-muted); }
.fs__copy h2 { margin-top: var(--sp-4); }
.fs__copy em { color: var(--accent); }
.fs__copy .lead { margin-top: var(--sp-5); color: var(--fg-subtle); }
.fs__stat { margin: 0; display: grid; gap: var(--sp-2); justify-items: start; border-left: 1px solid var(--line); padding-left: var(--sp-5); }
.fs__stat .numeral { font-size: var(--fs-d2); color: var(--fg); }
.fs__stat .label { color: var(--fg-muted); }
@media (min-width: 1024px) { .fs__stat { justify-items: end; text-align: right; border-left: 0; border-right: 1px solid var(--line); padding: 0 var(--sp-5) 0 0; margin-right: 9rem; } }
.fs__progress { position: absolute; z-index: 4; right: var(--gutter); top: 50%; transform: translateY(-50%); display: grid; gap: var(--sp-2); }
.fs__progress button { all: unset; cursor: pointer; display: flex; align-items: center; gap: var(--sp-3); min-height: 44px; font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--fg); opacity: .5; transition: opacity var(--dur-base); }
.fs__progress button::before { content: ""; width: 24px; height: 1px; background: currentColor; transform-origin: left; transform: scaleX(.4); transition: transform var(--dur-base) var(--ease-out); }
.fs__progress button span { font-variant-numeric: tabular-nums; }
.fs__progress button[aria-current], .fs__progress button:hover { opacity: 1; }
.fs__progress button[aria-current]::before { transform: none; }
.fs__progress button:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.fs__bar { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
.fs__bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
@media (max-width: 1023px) { .fs__progress { display: none; } }

/* ---------- Collections strip ---------- */
.hz { position: relative; background: var(--bg); color: var(--fg); }
.hz__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; padding-top: clamp(5.5rem, 12vh, 7rem); padding-bottom: clamp(1.25rem, 3vh, 2.5rem); }
.hz__head { flex: none; padding-bottom: clamp(1.25rem, 3vh, 2.5rem); }
/* The strip gets whatever height is left under the heading; cards are sized from it, so label + title always fit */
.hz__viewport { flex: 1 1 auto; min-height: 0; container-type: size; }
.hz__head .h-d2 { margin-top: var(--sp-3); }
.hz__head em { color: var(--accent); }
.hz__track { display: flex; gap: clamp(1rem, 3vw, 3rem); align-items: flex-start; height: 100%; padding: 0 var(--gutter); width: max-content; }
/* --hz-meta ≈ label + title + gaps under each image */
.hz__card { --hz-meta: 9.5rem; display: grid; gap: var(--sp-4); width: min(clamp(220px, 30vw, 500px), calc((100cqh - var(--hz-meta)) * .8)); text-decoration: none; }
.hz__media { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--card); }
.hz__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.hz__card:hover .hz__media img, .hz__card:focus-visible .hz__media img { transform: scale(1.06); }
.hz__meta { display: grid; gap: var(--sp-2); border-top: 1px solid var(--card); padding-top: var(--sp-3); }
.hz__end { align-self: center; padding: 0 10vw 0 4vw; }

/* ---------- Sustainability ---------- */
.hs { background: var(--bg-sunken); color: var(--fg); padding-block: var(--section-y); }
.hs__grid { display: grid; gap: var(--sp-6) var(--sp-8); }
.hs__motto { max-width: 11ch; }
.hs__motto em { color: var(--c-forest); }
.hs__media { margin: 0; aspect-ratio: 470 / 445; max-width: 28rem; overflow: hidden; }
.hs__media img { width: 100%; height: 100%; object-fit: cover; }
.hs__body { display: grid; gap: var(--sp-5); justify-items: start; align-content: start; }
.hs__body .lead { margin: 0; }
.hs__body > .label { margin: var(--sp-3) 0 0; }
.hs__certs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.hs__certs li { padding: var(--sp-2) var(--sp-4); border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: var(--fs-small); color: var(--fg-subtle); background: var(--bg-elevated); }
@media (min-width: 900px) {
  .hs__grid { grid-template-columns: 1.15fr 1fr; grid-template-areas: "label label" "motto media" "body media"; align-items: start; }
  .hs__label { grid-area: label; } .hs__motto { grid-area: motto; } .hs__media { grid-area: media; justify-self: end; width: 100%; } .hs__body { grid-area: body; }
}

/* ---------- Brands + testimonials ---------- */
.hr { background: var(--bg); color: var(--fg); padding-block: var(--section-y) 0; }
.marquee { margin-top: var(--sp-6); overflow: hidden; background: var(--bg); isolation: isolate; border-block: 1px solid var(--line); -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { list-style: none; margin: 0; padding: var(--sp-6) 0; display: flex; gap: clamp(3rem, 8vw, 8rem); width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track li { flex: none; display: grid; place-items: center; }
.marquee__track img { height: clamp(36px, 4.5vw, 56px); width: auto; filter: grayscale(1) contrast(1.1); mix-blend-mode: multiply; opacity: .75; transition: opacity var(--dur-base), filter var(--dur-base); }
.marquee__track img:hover { opacity: 1; filter: none; }
@keyframes marquee { to { transform: translateX(calc(-50% - clamp(1.5rem, 4vw, 4rem))); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } .marquee__track li[aria-hidden] { display: none; } }

.ht { padding-block: var(--section-y); display: grid; gap: var(--sp-6); }
.ht__stage { display: grid; min-height: 14rem; }
.ht__item { grid-area: 1 / 1; margin: 0; display: grid; gap: var(--sp-6); align-content: start; }
.ht__item[hidden] { display: grid; visibility: hidden; opacity: 0; }
.ht__text { margin: 0; font-family: var(--font-display); font-weight: 300; font-size: clamp(1.6rem, 1.1rem + 2.4vw, 3.25rem); line-height: 1.2; max-width: 30ch; text-wrap: pretty; }
.ht__by img { height: 40px; width: auto; mix-blend-mode: multiply; filter: grayscale(1); opacity: .8; }
.ht__controls { display: flex; align-items: center; gap: var(--sp-5); }
.ht__btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--fg); display: grid; place-items: center; cursor: pointer; transition: border-color var(--dur-fast), background-color var(--dur-fast), color var(--dur-fast); }
.ht__btn svg { width: 20px; height: 20px; }
.ht__btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.ht__count { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- News ---------- */
.hn { background: var(--bg); color: var(--fg); padding-block: 0 var(--section-y); position: relative; }
.hn__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--sp-5); margin-bottom: var(--sp-7); }
.hn__head .h-d2 { margin-top: var(--sp-3); }
.hn__head em { color: var(--accent); }
.hn__head .link-thread { text-decoration: none; font-size: var(--fs-small); }
.hn__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.hn__row { display: grid; grid-template-columns: 9rem 1fr auto; align-items: center; gap: var(--sp-5); padding: var(--sp-6) 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding var(--dur-base) var(--ease-out), color var(--dur-fast); }
.hn__row time { font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--fg-muted); }
.hn__title { font-family: var(--font-display); font-size: var(--fs-h2); line-height: 1.15; }
.hn__thumb { display: none; }
.hn__arrow { font-size: 1.4rem; transition: transform var(--dur-base) var(--ease-out); }
.hn__row:hover, .hn__row:focus-visible { color: var(--accent); padding-inline: var(--sp-4); }
.hn__row:hover .hn__arrow { transform: translateX(6px); }
.hn__preview { position: fixed; left: 0; top: 0; z-index: var(--z-raised); width: 22rem; aspect-ratio: 770 / 412; pointer-events: none; overflow: hidden; opacity: 0; transform: translate(-50%, -50%) scale(.85); box-shadow: var(--shadow-lift); }
.hn__preview img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) {
  .hn__row { grid-template-columns: 1fr auto; grid-template-areas: "thumb thumb" "time time" "title arrow"; gap: var(--sp-3) var(--sp-4); }
  .hn__thumb { grid-area: thumb; display: block; aspect-ratio: 770 / 412; overflow: hidden; } .hn__thumb img { width: 100%; height: 100%; object-fit: cover; }
  .hn__row time { grid-area: time; } .hn__title { grid-area: title; } .hn__arrow { grid-area: arrow; }
  .hn__preview { display: none; }
}

/* ---------- Reduced motion / no JS: everything static and readable ---------- */
@media (prefers-reduced-motion: reduce) {
  .pl { display: none; }
  .fs { height: auto; } .fs__stage { position: relative; height: auto; }
  .ha { position: relative; min-height: 100svh; } .fs__thread, .fs__progress, .fs__bar { display: none; }
  .fs__gl { position: absolute; }
  .fs__steps { display: grid; gap: var(--sp-9); padding-block: var(--section-y); }
  .fs__step { grid-area: auto; opacity: 1; visibility: visible; }
  .fs__stage.is-hero .fs__steps::before { opacity: 1; }
  .hz { height: auto !important; } .hz__stage { position: relative; height: auto; } .hz__track { width: auto; overflow-x: auto; padding-block: var(--sp-7); }
}
.no-js .fs { height: auto; } .no-js .fs__stage { position: relative; height: auto; } .no-js .ha { position: relative; min-height: 100svh; }
.no-js .fs__steps { display: grid; gap: var(--sp-9); padding-block: var(--section-y); } .no-js .fs__step { grid-area: auto; opacity: 1; visibility: visible; }
.no-js .fs__thread, .no-js .fs__progress, .no-js .fs__bar { display: none; } .no-js .fs__fallback { display: block; opacity: .35; }
.no-js .hz__stage { position: relative; height: auto; } .no-js .hz__track { width: auto; overflow-x: auto; padding-block: var(--sp-7); }
/* Static strip (reduced motion / no JS): no fixed height to measure, so size cards by width only */
@media (prefers-reduced-motion: reduce) { .hz__viewport { container-type: normal; } .hz__track { height: auto; } .hz__card { width: clamp(220px, 30vw, 420px); } }
.no-js .hz__viewport { container-type: normal; } .no-js .hz__track { height: auto; } .no-js .hz__card { width: clamp(220px, 30vw, 420px); }
