/* Works sector landing pages (/music-education, /energy-sustainability, …), built by tools/sectors.py.
   Part 1 is the spiral hero CSS exactly as delivered (wf-spiral-head.html, see SPIRAL-SPEC.md).
   Part 2 is what the spec leaves to "the style panel": colour, type, spacing, panel and rows. */

/* ═══ 1 · SPIRAL HERO (as delivered) ═══════════════════════════════════ */
/* ── /works — SPIRAL HERO · paste in Page settings → Inside <head> tag ──
   Everything positional lives here; colour, type and spacing stay in the
   Webflow style panel. Class names must match exactly.                  */

html{overflow-x:clip}

/* 1 · the sticky hero that holds for one screen of scrolling */
.hero-wrap{position:relative;height:200svh}
.hero{position:sticky;top:0;height:100svh;overflow:hidden}

/* 2 · the 3-D stack: perspective → pointer tilt → depth → rotation */
.field{position:absolute;inset:0;z-index:20;pointer-events:none;
  perspective:2150px;perspective-origin:50% 48%}
.tiltbox,.depth,.spin,.spin .w-dyn-items{position:absolute;inset:0;
  transform-style:preserve-3d}
.spin{will-change:transform}
.slot{display:none}                 /* the CMS items only supply the images */

/* 3 · the photo ribbon the script builds */
.ribbon{position:absolute;left:50%;top:50%;width:0;height:0;
  transform-style:preserve-3d}
.tile{position:absolute;left:0;top:0;transform-style:preserve-3d;
  will-change:transform}
.tile-face,.tile-back{position:absolute;inset:0;overflow:hidden;
  backface-visibility:hidden}
.tile-face img{width:100%;height:100%;object-fit:cover;
  object-position:50% 30%;display:block}
.tile-silk{position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(105deg,rgba(255,255,255,.34) 0%,
    rgba(255,255,255,.06) 34%,rgba(255,255,255,0) 58%)}
.tile-shade{position:absolute;inset:0;background:#05050A;opacity:0;
  pointer-events:none}
.tile-back{transform:rotateY(180deg);
  background:linear-gradient(180deg,#15151C 0%,#0B0B10 100%);
  box-shadow:inset 0 0 40px rgba(0,0,0,.75)}

/* 4 · headline — letters rise 0.62em into place, no mask */
.hero-title{position:relative;z-index:10;pointer-events:none;
  white-space:nowrap;width:max-content;margin-left:auto;margin-right:auto;
  font-size:5.6vw;line-height:.88;letter-spacing:-.01em;text-transform:uppercase}
.hero-title .word{display:inline-block;white-space:nowrap}
.hero-title .space{display:inline-block}
.hero-title .letter{display:inline-block;opacity:0;transform:translateY(.62em);
  will-change:transform,opacity;
  animation:rise .62s cubic-bezier(.22,1,.36,1) forwards}
@keyframes rise{to{opacity:1;transform:translateY(0)}}

/* 5 · the work panel lands from a tilt, so give it room to rotate */
.panel{position:relative;z-index:10;border-radius:24px;
  transform-origin:50% 50%;will-change:transform}
.row-media{position:relative;overflow:hidden}
.row-video{position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;opacity:0;transition:opacity .35s ease}
@media (hover:hover) and (pointer:fine){.row:hover .row-video{opacity:1}}
.row:focus-visible .row-video{opacity:1}

@media (max-width:860px){
  .hero-wrap{height:170svh}
  .hero-title{white-space:normal;width:auto;font-size:12.5vw;text-align:center}
}
@media (prefers-reduced-motion:reduce){
  .hero-title .letter{animation:none;opacity:1;transform:none}
}

/* ═══ 2 · STYLE PANEL: colour, type, spacing ════════════════════════════ */
/* colours and fonts come from tokens.css (design system); only the sector accent is local */
:root { --accent: rgb(var(--sector, 131, 201, 244)); }
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-text);
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.back-link { position: absolute; z-index: 50; top: max(16px, env(safe-area-inset-top)); left: clamp(16px, 4vw, 40px);
  display: inline-flex; gap: .5em; align-items: center; padding: .55em 1em; border-radius: 999px;
  font-size: 14px; text-decoration: none; color: var(--text);
  background: rgba(17, 17, 17, .55); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color .2s; }
.back-link:hover { background: rgba(var(--sector), .22); }

.hero { display: grid; place-items: center;
  background: radial-gradient(ellipse 70% 60% at 50% 46%, var(--ink-850) 0%, var(--bg) 72%); }
/* the spec's 5.6vw / 12.5vw are the maximum; long sector names shrink to fit (sectors.py sets --fit-*) */
.hero-title { font-size: min(5.6vw, var(--fit-line, 5.6vw)); }
@media (max-width: 860px) { .hero-title { font-size: min(12.5vw, var(--fit-word, 12.5vw)); } }
/* title sits IN FRONT of the spiral (spec had it behind) on a soft black fade so it stays readable */
.hero-title { z-index: 30; margin-top: 0; margin-bottom: 0; color: var(--white); font-family: var(--font-display);
  font-weight: 400; letter-spacing: 0; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.hero-title::before { content: ""; position: absolute; z-index: -1; inset: -1em -12%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .82) 50%, rgba(0, 0, 0, .45) 78%, rgba(0, 0, 0, 0) 100%); }

.tilt { padding: 0 0 9rem; }
.panel { width: min(1320px, 94vw); margin: 0 auto; background: var(--surface); border: 1px solid var(--line);
  padding: clamp(22px, 4vw, 64px); }
.panel-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 4.4vw, 60px); line-height: 1;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.panel-count { font-family: var(--font-text); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.panel-lede { margin: .9rem 0 clamp(18px, 3vw, 36px); max-width: 56ch; color: var(--text-2); font-size: clamp(15px, 1.3vw, 18px); }

.rows { list-style: none; margin: 0; padding: 0; overflow-x: clip; } /* rows slide in by ±17vw; keep that inside the panel */
.tilt { overflow-x: clip; } /* backstop for the panel's landing tilt on phones */
.row { display: grid; grid-template-columns: 1fr 1.05fr 1fr; gap: clamp(16px, 2.6vw, 40px); align-items: center;
  padding: clamp(22px, 3vw, 40px) 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit;
  position: relative; }
.row-label { display: flex; flex-direction: column; gap: .5em; }
.row-title { font-family: var(--font-display); font-size: clamp(26px, 2.8vw, 42px); line-height: 1.05; transition: color .3s; }
.row-meta { font-size: 13px; color: var(--text-3); }
.row-media { display: block; aspect-ratio: 16 / 10; border-radius: 12px; background: rgba(var(--sector), .16); }
.row-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s cubic-bezier(.22, .61, .36, 1); }
.row-media.is-soon { display: grid; place-items: center; background: rgba(var(--sector), .22); }
.coming-soon-anim { position: absolute; inset: 8%; }
.soon-badge { position: absolute; left: 12px; top: 12px; padding: .35em .8em; border-radius: 999px;
  background: #000; color: #fff; font-size: 12px; white-space: nowrap; }
.row-desc { display: flex; flex-direction: column; gap: 1em; color: var(--text-2); font-size: 15px; }
.row-cta { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.row-cta.is-static { color: var(--text-3); }
.row-num { position: absolute; right: 0; top: clamp(14px, 1.6vw, 20px); font-size: 12px; letter-spacing: .1em; color: var(--text-3); }
a.row:hover .row-title, a.row:focus-visible .row-title { color: var(--accent); }
a.row:hover .row-media img { transform: scale(1.04); }
a.row:focus-visible { outline-offset: 6px; border-radius: 8px; }

.next-sector { display: flex; flex-direction: column; gap: .3rem; padding-top: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--line); text-decoration: none; }
.next-label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.next-title { font-family: var(--font-display); font-size: clamp(30px, 5vw, 64px); line-height: 1.05; transition: color .3s; }
.next-sector:hover .next-title { color: var(--accent); }

@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; gap: 14px; }
  .row-num { top: clamp(22px, 3vw, 40px); }
  .row-label { padding-right: 2.75em; } /* keep long titles clear of the row number */
}

/* ── floating menu (same as the rest of the site; site.css handles sizes) ── */
.nav-container-2 { position: fixed; z-index: 10000; font-family: var(--font-text); }
.div-block-8 { background: #fff; border-radius: 100px; box-shadow: 4px 4px 40px rgba(0, 0, 0, .5); }
.link-8 { display: flex; justify-content: center; align-items: center; color: #000; text-decoration: none; font-weight: 400; }
.button-7 { display: flex; justify-content: center; align-items: center; color: #f8f8f8; text-decoration: none;
  background: #242424; border: 1px solid #363636; border-radius: 100px; }
.link-text-main { position: relative; overflow: hidden; }
.link-text-move { position: relative; transition: transform .35s cubic-bezier(.22, .61, .36, 1); }
.button-letter.is--2 { position: absolute; left: 0; top: 100%; }
.button-7:hover .link-text-move { transform: translateY(-100%); }
@media (max-width: 479px) { .button-hide-mobile { display: none; } }
