/* =====================================================================
   Directline — sectors page (sectors.html)
   hero: eight "doors" (real covers) that open one by one · a sticky
   index with progress · one chapter per sector in its own colour (the
   page tint follows the chapter in view), a fanned stack of the sector's
   real designs, a ghost English name drifting with the scroll, and the
   sector's projects linking to their case pages.
   ===================================================================== */
.inner { background: var(--sc-tint, var(--paper)); transition: background-color .8s ease; }

/* ======================= hero ======================= */
.sc-hero { background: var(--brand-grad); color: #fff; padding: 80px 0 70px; overflow: hidden; }
.sc-hero-head { display: grid; grid-template-columns: 1.3fr .7fr; gap: 50px; align-items: end; margin-bottom: 44px; }
.sc-title { font-size: clamp(42px, 6vw, 92px); line-height: 1.12; margin-top: 20px; letter-spacing: -1px; }
.sc-title > span { display: block; }
.sc-title em { font-style: normal; color: var(--lime); }
.sc-lead { color: #cfc2dd; font-size: 17px; line-height: 1.9; }
.motion-ok .sc-title > span { animation: sc-rise 1.1s cubic-bezier(.22,1,.36,1) both; }
.motion-ok .sc-title > span + span { animation-delay: .14s; }
.motion-ok .sc-lead { animation: sc-rise 1.1s .3s cubic-bezier(.22,1,.36,1) both; }
@keyframes sc-rise { from { opacity: 0; translate: 0 50px; } }

.sc-doors { display: flex; gap: 10px; height: min(58svh, 540px); }
.sc-door { position: relative; flex: 1 1 0; min-width: 0; border-radius: 20px; overflow: hidden; background: var(--acc); color: #fff; isolation: isolate;
  transition: flex-grow .8s cubic-bezier(.22,1,.36,1); }
.sc-door.is-on { flex-grow: 5.2; }
.sc-door img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; scale: 1.08; transition: scale 1.2s cubic-bezier(.22,1,.36,1), filter .8s; filter: saturate(.75); }
.sc-door.is-on img { scale: 1; filter: none; }
.sc-door-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgb(20 8 40 / .85)), color-mix(in srgb, var(--acc) 45%, transparent);
  transition: background-color .8s; }
.sc-door.is-on .sc-door-shade { background-color: transparent; }
.sc-door-num { position: absolute; top: 18px; right: 18px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / .18); backdrop-filter: blur(8px); }
.sc-door-en { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; writing-mode: vertical-rl; rotate: 180deg; font-size: 13px; letter-spacing: 4px; white-space: nowrap;
  transition: opacity .4s; }
.sc-door.is-on .sc-door-en { opacity: 0; }
.sc-door-text { position: absolute; right: 26px; left: 26px; bottom: 24px; opacity: 0; translate: 0 20px; transition: opacity .5s .15s, translate .6s .15s cubic-bezier(.22,1,.36,1); }
.sc-door.is-on .sc-door-text { opacity: 1; translate: 0 0; }
.sc-door-text b { display: block; font-size: clamp(26px, 2.6vw, 40px); line-height: 1.2; white-space: nowrap; }
.sc-door-text small { display: inline-block; margin-top: 8px; font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 600; }

/* ======================= sticky index ======================= */
.sc-index { position: sticky; top: 90px; z-index: 30; background: rgb(255 255 255 / .78); backdrop-filter: blur(16px); border-bottom: 1px solid rgb(42 22 77 / .08); }
.sc-index-inner { position: relative; }
.sc-index-track { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 12px 0; }
.sc-index-track::-webkit-scrollbar { display: none; }
.sc-index-track a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: #5d5168; transition: background .3s, color .3s; }
.sc-index-track a i { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); }
.sc-index-track a:hover { background: rgb(42 22 77 / .06); color: var(--ink); }
.sc-index-track a.on { background: var(--acc); color: #fff; }
.sc-index-track a.on i { background: #fff; }
.sc-index-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.sc-index-bar i { position: absolute; inset: 0; background: var(--sc-acc, var(--purple)); transform-origin: right; transform: scaleX(var(--p, 0)); transition: background .6s; }

/* ======================= chapters ======================= */
.sc-ch { position: relative; padding: 120px 0 110px; overflow: hidden; }
.sc-ch + .sc-ch { border-top: 1px solid rgb(42 22 77 / .08); }
.sc-ghost { position: absolute; top: 40px; left: 0; white-space: nowrap; font: 700 clamp(90px, 15vw, 230px)/1 'IBM Plex Sans Arabic', Arial, sans-serif; letter-spacing: -4px;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--acc) 30%, transparent); translate: var(--gx, 0) 0; pointer-events: none; z-index: 0; }
.sc-ch-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.sc-ch-num { font-size: 14px; color: var(--muted); letter-spacing: 1px; }
.sc-ch-num b { color: var(--acc); font-size: 18px; }
.sc-ch-title { font-size: clamp(40px, 5vw, 76px); line-height: 1.15; margin: 10px 0 4px; color: var(--ink); }
.sc-ch-en { font-size: 13px; letter-spacing: 4px; color: var(--acc); font-weight: 600; }
.sc-block { margin-top: 30px; }
.sc-block h3 { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.sc-block h3::before { content: ''; width: 22px; height: 2px; background: var(--acc); }
.sc-block > p { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.85; max-width: 560px; }
.sc-help { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sc-help a { display: inline-block; padding: 10px 18px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px rgb(42 22 77 / .12); font-size: 15px; font-weight: 600; transition: background .25s, color .25s, box-shadow .25s; }
.sc-help a:hover { background: var(--acc); color: #fff; box-shadow: none; }
.sc-cta { margin-top: 34px; background: var(--ink); color: #fff; }
.sc-cta:hover { background: var(--acc); }

.motion-ok .sc-ch-copy > * { opacity: 0; translate: 0 30px; transition: opacity .8s cubic-bezier(.22,1,.36,1), translate .8s cubic-bezier(.22,1,.36,1); }
.motion-ok .sc-ch.is-in .sc-ch-copy > * { opacity: 1; translate: 0 0; }
.motion-ok .sc-ch.is-in .sc-ch-copy > :nth-child(2) { transition-delay: .06s; } .motion-ok .sc-ch.is-in .sc-ch-copy > :nth-child(3) { transition-delay: .12s; }
.motion-ok .sc-ch.is-in .sc-ch-copy > :nth-child(4) { transition-delay: .18s; } .motion-ok .sc-ch.is-in .sc-ch-copy > :nth-child(5) { transition-delay: .24s; }
.motion-ok .sc-ch.is-in .sc-ch-copy > :nth-child(6) { transition-delay: .3s; }

/* the fan of real designs */
.sc-fan { position: relative; height: 520px; }
.sc-fan figure { position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 4/5; margin: 0; border-radius: 18px; overflow: hidden; background: #fff;
  box-shadow: 0 30px 60px rgb(20 8 40 / .25); translate: -50% -50%; transition: transform 1.1s cubic-bezier(.22,1,.36,1), box-shadow .3s; transition-delay: calc(var(--k) * 70ms); }
.sc-fan figure img { width: 100%; height: 100%; object-fit: cover; }
.sc-fan figure:nth-child(1) { z-index: 4; } .sc-fan figure:nth-child(2) { z-index: 3; } .sc-fan figure:nth-child(3) { z-index: 2; } .sc-fan figure:nth-child(4) { z-index: 1; }
.sc-ch.is-in .sc-fan figure:nth-child(1), html:not(.motion-ok) .sc-fan figure:nth-child(1) { transform: translate(14%, 6%) rotate(4deg); }
.sc-ch.is-in .sc-fan figure:nth-child(2), html:not(.motion-ok) .sc-fan figure:nth-child(2) { transform: translate(-46%, -10%) rotate(-7deg); }
.sc-ch.is-in .sc-fan figure:nth-child(3), html:not(.motion-ok) .sc-fan figure:nth-child(3) { transform: translate(62%, -14%) rotate(9deg); }
.sc-ch.is-in .sc-fan figure:nth-child(4), html:not(.motion-ok) .sc-fan figure:nth-child(4) { transform: translate(-12%, -24%) rotate(-2deg); }
.sc-fan-count { position: absolute; z-index: 5; left: 2%; bottom: 4%; width: 120px; height: 120px; border-radius: 50%; background: var(--acc); color: #fff; display: grid; place-content: center; text-align: center;
  font-size: 13px; box-shadow: 0 0 0 8px rgb(255 255 255 / .6); rotate: -8deg; }
.sc-fan-count b { font-size: 42px; line-height: 1; }
.motion-ok .sc-fan-count { scale: 0; transition: scale .7s .5s cubic-bezier(.34,1.56,.64,1); }
.motion-ok .sc-ch.is-in .sc-fan-count { scale: 1; }

/* projects row */
.sc-pr-head { margin: 70px 0 18px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 14px; }
.sc-pr-head::after { content: ''; flex: 1; height: 1px; background: rgb(42 22 77 / .12); }
.sc-projects { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.sc-projects a { display: block; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgb(42 22 77 / .08); transition: translate .4s cubic-bezier(.22,1,.36,1), box-shadow .4s; }
.sc-projects a:hover { translate: 0 -6px; box-shadow: 0 0 0 2px var(--pacc), 0 24px 40px rgb(42 22 77 / .14); }
.sc-pr-img { display: block; aspect-ratio: 4/5; overflow: hidden; }
.sc-pr-img img { width: 100%; height: 100%; object-fit: cover; transition: scale .8s cubic-bezier(.22,1,.36,1); }
.sc-projects a:hover .sc-pr-img img { scale: 1.06; }
.sc-pr-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; }
.sc-pr-meta b { font-size: 15px; }
.sc-pr-meta small { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ======================= not listed ======================= */
.sc-other { padding: 110px 0 130px; }
.sc-other-inner { text-align: center; max-width: 760px; }
.sc-other h2 { font-size: clamp(34px, 4.4vw, 64px); line-height: 1.2; }
.sc-other p { margin: 18px auto 32px; color: #5d5168; font-size: 18px; max-width: 600px; }

/* ======================= responsive ======================= */
@media (max-width: 1000px) {
  .sc-hero-head { grid-template-columns: 1fr; gap: 20px; }
  .sc-ch-inner { grid-template-columns: 1fr; gap: 30px; }
  .sc-fan { height: 440px; order: -1; }
}
@media (max-width: 700px) {
  .container { width: calc(100% - 32px); }
  .sc-hero { padding: 54px 0 40px; }
  .sc-doors { height: auto; flex-direction: column; gap: 8px; }
  .sc-door { flex: none; height: 64px; transition: height .7s cubic-bezier(.22,1,.36,1); border-radius: 16px; }
  .sc-door.is-on { height: 300px; }
  .sc-door-en { writing-mode: horizontal-tb; rotate: none; left: 16px; right: auto; translate: none; bottom: 50%; margin-bottom: -10px; font-size: 11px; letter-spacing: 2px; }
  .sc-door-num { top: 50%; margin-top: -14px; }
  .sc-door.is-on .sc-door-num { top: 16px; margin-top: 0; }
  .sc-door-text { right: 18px; left: 18px; bottom: 18px; }
  .sc-index { top: 74px; }
  .sc-ch { padding: 70px 0 70px; }
  .sc-ghost { top: 20px; }
  .sc-fan { height: 340px; }
  .sc-fan figure { width: 52%; }
  .sc-fan-count { width: 92px; height: 92px; } .sc-fan-count b { font-size: 32px; }
  .sc-projects { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sc-pr-head { margin-top: 44px; }
  .sc-cta { width: 100%; }
}
