/* DIAA STUDIO — Typefaces section (home banner + typeface pages).
   Diaa Studio Horizon (c) 2026 Diaa Studio, embedded for display on diaastudio.com under the Diaa Studio Font Licence 1.0.
   The release folder lives in 04_WEBSITE_ASSETS/01_FONTS/DIAA STUDIO HORIZON; web files are copied by _build/export_type_assets.py. */

@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-Thin.woff2") format("woff2"); font-weight: 100; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-ExtraLight.woff2") format("woff2"); font-weight: 200; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-Light.woff2") format("woff2"); font-weight: 300; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-Regular.woff2") format("woff2"); font-weight: 400; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-Medium.woff2") format("woff2"); font-weight: 500; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-SemiBold.woff2") format("woff2"); font-weight: 600; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-Bold.woff2") format("woff2"); font-weight: 700; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-ExtraBold.woff2") format("woff2"); font-weight: 800; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-Ultra.woff2") format("woff2"); font-weight: 900; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-ThinWide.woff2") format("woff2"); font-weight: 100; font-stretch: 112.5%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-ExtraLightWide.woff2") format("woff2"); font-weight: 200; font-stretch: 112.5%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-LightWide.woff2") format("woff2"); font-weight: 300; font-stretch: 112.5%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-RegularWide.woff2") format("woff2"); font-weight: 400; font-stretch: 112.5%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-MediumWide.woff2") format("woff2"); font-weight: 500; font-stretch: 112.5%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-SemiBoldWide.woff2") format("woff2"); font-weight: 600; font-stretch: 112.5%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-BoldWide.woff2") format("woff2"); font-weight: 700; font-stretch: 112.5%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-ExtraBoldWide.woff2") format("woff2"); font-weight: 800; font-stretch: 112.5%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-UltraWide.woff2") format("woff2"); font-weight: 900; font-stretch: 112.5%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-ThinExtended.woff2") format("woff2"); font-weight: 100; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-ExtraLightExtended.woff2") format("woff2"); font-weight: 200; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-LightExtended.woff2") format("woff2"); font-weight: 300; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-RegularExtended.woff2") format("woff2"); font-weight: 400; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-MediumExtended.woff2") format("woff2"); font-weight: 500; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-SemiBoldExtended.woff2") format("woff2"); font-weight: 600; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-BoldExtended.woff2") format("woff2"); font-weight: 700; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-ExtraBoldExtended.woff2") format("woff2"); font-weight: 800; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-UltraExtended.woff2") format("woff2"); font-weight: 900; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-ThinExpanded.woff2") format("woff2"); font-weight: 100; font-stretch: 150%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-ExtraLightExpanded.woff2") format("woff2"); font-weight: 200; font-stretch: 150%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-LightExpanded.woff2") format("woff2"); font-weight: 300; font-stretch: 150%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-RegularExpanded.woff2") format("woff2"); font-weight: 400; font-stretch: 150%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-MediumExpanded.woff2") format("woff2"); font-weight: 500; font-stretch: 150%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-SemiBoldExpanded.woff2") format("woff2"); font-weight: 600; font-stretch: 150%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-BoldExpanded.woff2") format("woff2"); font-weight: 700; font-stretch: 150%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-ExtraBoldExpanded.woff2") format("woff2"); font-weight: 800; font-stretch: 150%; font-display: swap; }
@font-face { font-family: "Horizon"; src: url("../fonts/horizon/DSHorizon-UltraExpanded.woff2") format("woff2"); font-weight: 900; font-stretch: 150%; font-display: swap; }

:root { --hz-accent: #ff4b1f; }
.hz { font-family: "Horizon", "Switzer", sans-serif; letter-spacing: 0; }

/* ---------- home: typefaces section ---------- */
.typefaces { padding-block: clamp(60px, 9vw, 140px); }
.type-banner { display: block; margin-top: clamp(28px, 4vw, 56px); overflow: hidden; }
.type-banner .word {
  display: block; font-family: "Horizon", sans-serif; font-weight: 800; font-stretch: 125%;
  font-size: clamp(34px, 11.2vw, 236px); line-height: 0.86; white-space: nowrap;
  transition: font-weight 0.9s var(--ease), font-stretch 0.9s var(--ease);
}
.type-banner:hover .word, .type-banner:focus-visible .word { font-weight: 300; }
.type-banner .row-meta { display: flex; justify-content: space-between; gap: 20px; margin-top: 18px; }

/* ---------- typeface page ---------- */
/* .tp-head h1 uses the site's case-study title (Switzer): studio copy never mixes with the product typeface */
.tp-head .by { grid-column: 1 / -1; font-size: var(--t-lead); margin-top: 18px; color: var(--mute); letter-spacing: -0.01em; }

/* live tester */
.tester { border-top: 1px solid var(--line); padding-top: 18px; }
.tester-sample {
  font-family: "Horizon", sans-serif; font-weight: 800; font-stretch: 125%; font-size: clamp(40px, 8vw, 150px);
  line-height: 1.02; padding-block: clamp(24px, 4vw, 56px); outline: none; overflow-wrap: anywhere; min-height: 1.2em;
}
.tester-sample:focus-visible { box-shadow: inset 0 -1px 0 var(--mute); }
.tester-controls { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; border-top: 1px solid var(--line); padding-top: 16px; }
.tester-controls label { display: flex; align-items: center; gap: 10px; }
.tester-controls output { min-width: 8ch; color: var(--fg); font-variant-numeric: tabular-nums; }
.tester-controls input[type=range] { accent-color: var(--fg); width: clamp(120px, 14vw, 200px); min-height: 44px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { font: inherit; font-size: 13px; color: var(--mute); background: none; border: 0; padding: 0 15px; min-height: 44px; cursor: pointer;
              transition: color var(--fast) var(--ease), background var(--fast) var(--ease); }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

/* weight + width ladders (live type) */
.ladder { list-style: none; margin: 0; padding: 0; }
.ladder li { display: grid; grid-template-columns: minmax(110px, 1fr) 6fr; column-gap: var(--gutter); align-items: baseline;
             border-bottom: 1px solid var(--line); padding: 10px 0; }
.ladder .label { font-family: "Switzer", sans-serif; }
.ladder .sample { font-family: "Horizon", sans-serif; font-size: clamp(26px, 4.6vw, 76px); line-height: 1.05; white-space: nowrap; overflow: hidden; }
.ladder.widths .sample { font-weight: 700; font-size: clamp(30px, 6vw, 108px); }

.idea-line { font-size: clamp(24px, 2.8vw, 46px); line-height: 1.12; letter-spacing: -0.02em; }
.idea-body { margin-top: 24px; color: var(--mute); font-size: 16px; line-height: 1.6; max-width: 640px; }

/* specimen gallery */
.specimen-grid { row-gap: clamp(28px, 4vw, 56px); margin-top: clamp(24px, 3vw, 40px); }
.specimen-grid figure { grid-column: span 6; }
.specimen-grid figure.wide { grid-column: 1 / -1; }
.specimen-grid .media { aspect-ratio: 16 / 9; }
.licence-note { grid-column: 1 / 9; font-size: var(--t-lead); line-height: 1.25; letter-spacing: -0.01em; }

@media (max-width: 900px) {
  .specimen-grid figure { grid-column: 1 / -1; }
  .licence-note { grid-column: 1 / -1; }
  .ladder li { grid-template-columns: 1fr; row-gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .type-banner .word { transition: none; }
}

/* ---------- typefaces index (type/) ---------- */
.type-list { list-style: none; margin: 0; padding: 0; }
.type-entry { border-bottom: 1px solid var(--line); }
.type-entry-link { display: block; padding-block: clamp(24px, 3vw, 44px); }
.type-entry-head { display: grid; grid-template-columns: 0.6fr 9fr 2.4fr; column-gap: var(--gutter); align-items: baseline; }
.type-entry-head > .label:last-child { justify-self: end; }
.type-name { font-weight: 800; font-stretch: 125%; font-size: clamp(40px, 8.4vw, 172px); line-height: 0.9; white-space: nowrap;
             transition: font-weight 0.9s var(--ease); }
.type-entry-link:hover .type-name, .type-entry-link:focus-visible .type-name { font-weight: 300; }
.type-entry-link:hover .arrow { transform: translateX(6px); }
.type-entry-body { margin-top: clamp(20px, 3vw, 40px); row-gap: 24px; }
.type-entry-media { grid-column: 1 / 9; aspect-ratio: 16 / 9; }
.type-entry-meta { grid-column: 9 / -1; margin: 0; display: grid; align-content: start; row-gap: 14px; }
.type-entry-meta dt { font-size: var(--t-label); color: var(--mute); }
.type-entry-meta dd { margin: 2px 0 0; font-size: 15px; line-height: 1.45; }
.type-entry-summary { color: var(--mute); font-size: 15px; line-height: 1.55; margin-top: 6px; }
.type-entry-sample { margin-top: clamp(20px, 3vw, 36px); font-weight: 400; font-stretch: 112.5%;
                     font-size: clamp(15px, 1.5vw, 22px); line-height: 1.5; color: var(--mute); overflow-wrap: anywhere; }
.type-entry.is-soon .type-entry-head { padding-block: 26px; color: var(--mute); }
.type-name.soon { font-family: "Switzer", sans-serif; font-size: var(--t-lead); font-weight: 400; font-stretch: 100%; }
.site-header nav a[aria-current="page"]::after { transform: scaleX(1); }

@media (max-width: 900px) {
  .type-entry-head { grid-template-columns: 0.6fr 5fr; }
  .type-entry-head > .label:last-child { display: none; }
  .type-entry-media, .type-entry-meta { grid-column: 1 / -1; }
}

/* ---------- full-screen specimen deck (type/<slug>/) ----------
   Each page is a sticky 100svh slide; the next slide rises over it while the current one recedes (scale + shade).
   The slide background is the page's own colour, so the 16:9 page fills any screen edge to edge.
   Transforms are driven by type.js; with reduced motion the slides simply stack. */
.deck-intro { padding-top: clamp(40px, 6vw, 96px); padding-bottom: clamp(16px, 2vw, 24px); }
.deck { position: relative; }
.slide {
  position: sticky; top: 0; height: 100svh; margin: 0; overflow: hidden;
  background: var(--slide-bg, var(--bg)); display: grid; place-items: center;
  transform-origin: 50% 30%; will-change: transform;
}
.slide-inner { width: min(100vw, calc(100svh * 16 / 9)); aspect-ratio: 16 / 9; overflow: hidden; will-change: transform, clip-path; }
.slide-inner img { width: 100%; height: 100%; object-fit: cover; }
.slide-shade { position: absolute; inset: 0; background: #050505; opacity: 0; pointer-events: none; }
.deck-hud {
  position: fixed; left: var(--margin); right: var(--margin); bottom: clamp(16px, 2.4vw, 28px); z-index: 16;
  display: flex; align-items: center; gap: 16px; pointer-events: none;
  color: #fff; mix-blend-mode: difference; font-size: var(--t-label);
  opacity: 0; transform: translateY(8px); transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.deck-hud.is-on { opacity: 1; transform: none; }
.deck-hud .count { font-variant-numeric: tabular-nums; min-width: 5.5ch; }
.deck-hud .name { min-width: 14ch; }
.deck-hud .bar { flex: 0 1 180px; height: 1px; background: rgba(255, 255, 255, 0.3); }
.deck-hud .bar i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .slide, .slide-inner, .slide-inner img { will-change: auto; transform: none !important; clip-path: none !important; }
  .slide-shade { display: none; }
}

/* ---------- deck mode "horizon": pinned stage, pages travel sideways and open from a horizon line ---------- */
.deck-horizon { height: calc(var(--n, 13) * 100svh); }
.deck-horizon .deck-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.deck-horizon .deck-track { display: flex; height: 100%; will-change: transform; }
.deck-horizon .slide { position: relative; top: auto; flex: 0 0 100vw; height: 100svh; transform: none; border-radius: 0; }
.deck-horizon .slide-shade { display: none; }
.deck-line {
  position: absolute; left: 0; right: 0; top: 50%; height: 1px; margin-top: -0.5px; pointer-events: none;
  background: var(--hz-accent); box-shadow: 0 0 18px 1px rgba(255, 75, 31, 0.55); opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .deck-horizon { height: auto; }
  .deck-horizon .deck-stage { position: static; height: auto; overflow: visible; }
  .deck-horizon .deck-track { flex-direction: column; transform: none !important; }
  .deck-horizon .slide { flex-basis: auto; }
  .deck-line { display: none; }
}

/* ---------- live specimen pages (sp-*) ----------
   Each page is a real HTML section that fills the screen (100% x 100svh). --u scales the 1920 x 1080 design
   to the screen; the page background is the section, so no bands appear around it. Pages stick and the next
   one slides up over the previous; their content rises in line by line (type.js adds .is-in). */
.sp-deck { position: relative; }
.sp-page {
  --u: min(calc(100vw / 1920), calc(100svh / 1080));
  position: sticky; top: 0; width: 100%; height: 100svh; overflow: hidden;
  padding: 0 calc(var(--u) * 56); font-family: "Horizon", "Switzer", sans-serif; letter-spacing: 0;
  transform-origin: 50% 40%; will-change: transform;
}
.sp-page.ink { background: #0a0a09; color: #edebe7; }
.sp-page.paper { background: #edebe7; color: #0a0a09; }
.sp-page.accent { background: #ff4b1f; color: #0a0a09; }
.sp-page * { margin: 0; padding: 0; box-sizing: border-box; }
.sp-page .meta { font-family: "Switzer", sans-serif; font-weight: 400; font-size: max(10px, calc(var(--u) * 14)); line-height: 1.35; }
.sp-page .meta b { font-weight: 500; color: inherit; }
.sp-page .meta { margin: 0; border: 0; padding-top: 0; row-gap: 0; }  /* the site .meta (case-study facts) must not leak in */
.sp-page .dim { opacity: 0.55; }
.sp-page .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: calc(var(--u) * 28); }
.sp-page .rail { position: absolute; left: calc(var(--u) * 56); right: calc(var(--u) * 56); }
.sp-page .rail.top { top: max(14px, calc(var(--u) * 36)); }
.sp-page .rail.bot { bottom: max(14px, calc(var(--u) * 34)); align-items: end; }
.sp-page .body { font-family: "Switzer", sans-serif; font-size: max(12px, calc(var(--u) * 21)); line-height: 1.45; }
.sp-page .label { font-family: "Switzer", sans-serif; font-weight: 500; font-size: max(11px, calc(var(--u) * 15)); line-height: 1.3; color: inherit; }
.sp-page .stage { position: absolute; left: calc(var(--u) * 56); right: calc(var(--u) * 56);
                  top: calc(max(14px, calc(var(--u) * 36)) + max(44px, calc(var(--u) * 84))); bottom: max(58px, calc(var(--u) * 110)); }
.sp-page img { display: block; max-width: none; width: auto; }
.sp-page.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.sp-shade { position: absolute; inset: 0; background: #050505; opacity: 0; pointer-events: none; z-index: 2; }

/* content reveal: rails fade, stage rows rise in sequence */
.sp-page .rail { opacity: 0; transition: opacity 0.8s var(--ease) 0.1s; }
.sp-page.is-in .rail { opacity: 1; }
.sp-page [data-anim] {
  opacity: 0; transform: translateY(calc(var(--u) * 56));
  transition: opacity 0.9s var(--ease), transform 1.2s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms + 120ms);
}
.sp-page.is-in [data-anim] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .sp-page { position: relative; will-change: auto; transform: none !important; }
  .sp-page .rail, .sp-page [data-anim] { opacity: 1; transform: none; transition: none; }
  .sp-shade { display: none; }
}

/* inside the specimen the pages carry their own top rail, so the site header steps aside */
body.in-deck .site-header { transform: translateY(-100%); }

/* ---------- typefaces index header ---------- */
.ti-head .tagline { margin-top: clamp(40px, 5vw, 80px); }
/* specimen band: Horizon shown as the product, two rows gliding in opposite directions */
.glyph-band { overflow: hidden; padding-block: clamp(28px, 4vw, 56px); user-select: none; }
.glyph-band .tag { padding-inline: var(--margin); margin-bottom: 14px; }
.glyph-row { display: flex; width: max-content; white-space: nowrap; font-family: "Horizon", sans-serif; letter-spacing: 0;
             animation: glide 48s linear infinite; }
.glyph-row span { padding-right: 0.6em; }
.glyph-row.r1 { font-weight: 800; font-stretch: 125%; font-size: clamp(54px, 9vw, 168px); line-height: 1.05; }
.glyph-row.r2 { font-weight: 100; font-stretch: 150%; font-size: clamp(34px, 5vw, 92px); line-height: 1.2; color: var(--mute);
                animation-direction: reverse; animation-duration: 62s; }
.glyph-band:hover .glyph-row { animation-play-state: paused; }
@keyframes glide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .glyph-row { animation: none; } }
