/* SideShift Brand Guidelines — editorial layout */

/* TWK Lausanne — installed locally as individually-named faces; map them to one family. */
@font-face { font-family: 'TWK Lausanne'; font-weight: 300; src: local('TWK Lausanne 300'), local('TWKLausanne-300'); }
@font-face { font-family: 'TWK Lausanne'; font-weight: 350; src: local('TWK Lausanne 350'), local('TWKLausanne-350'); }
@font-face { font-family: 'TWK Lausanne'; font-weight: 400; src: local('TWK Lausanne 400'), local('TWKLausanne-400'); }
@font-face { font-family: 'TWK Lausanne'; font-weight: 450; src: local('TWK Lausanne 450'), local('TWKLausanne-450'); }
@font-face { font-family: 'TWK Lausanne'; font-weight: 500; src: local('TWK Lausanne 500'), local('TWKLausanne-500'); }
@font-face { font-family: 'TWK Lausanne'; font-weight: 550; src: local('TWK Lausanne 550'), local('TWKLausanne-550'); }
@font-face { font-family: 'TWK Lausanne'; font-weight: 600; src: local('TWK Lausanne 600'), local('TWKLausanne-600'); }
@font-face { font-family: 'TWK Lausanne'; font-weight: 650; src: local('TWK Lausanne 650'), local('TWKLausanne-650'); }
@font-face { font-family: 'TWK Lausanne'; font-weight: 700; src: local('TWK Lausanne 700'), local('TWKLausanne-700'); }

:root {
  --blue: #3C83F9; --blue-dark: #0052B4; --sky: #CDE9FC; --ocean: #7AB5DD;
  --ink: #202020; --gray: #707070; --silver: #949494; --surface: #F1F1F1; --white: #FFFFFF;
  --success: #10C13D; --warning: #E9A23B; --error: #FF2B3A;
  --muted: #9D9D9D;
  --line: #E4E4E4;
  /* Product gray tints — alpha over Gray #707070 (see Color › Gray Tints) */
  --g-4: rgba(112,112,112,.04); --g-10: rgba(112,112,112,.10); --g-16: rgba(112,112,112,.16); --g-80: rgba(112,112,112,.80);
  --border-cool: rgba(123,129,140,.30);
  --sans: 'TWK Lausanne', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --sidebar-w: 240px;
  --gutter: 40px;
  --ease: cubic-bezier(.22,1,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink); background: var(--white);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  line-height: 1.4; font-weight: 450;
}
a { color: inherit; }
h1,h2,h3,p { margin: 0; }
em { font-style: normal; color: var(--blue); }

/* ---------- logo primitives ---------- */
.mark { display: block; width: 1em; height: 1.032em; fill: currentColor; }
.lockup { display: block; height: 1em; width: 5.796em; fill: currentColor; }

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  padding: 32px 12px; background: var(--white); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 30;
}
.sidebar__brand { display: block; margin: 0 0 40px 8px; color: var(--blue); font-size: 44px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav--foot { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.nav__link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
  text-decoration: none; color: var(--ink); transition: background .15s var(--ease);
}
.nav__link:hover, .nav__link.is-active { background: var(--surface); }
.nav__chev { width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg) translate(-2px,-2px); opacity: .8; }

.topbar { display: none; }

/* ---------- main ---------- */
.main { margin-left: var(--sidebar-w); }

/* ---------- full-bleed banners ---------- */
.banner {
  background: var(--blue); color: var(--white);
  padding: 96px var(--gutter) 64px; min-height: 420px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.banner__title {
  font-weight: 550; letter-spacing: -0.03em; line-height: .95;
  font-size: clamp(64px, 8.5vw, 132px);
}
.banner--hero { min-height: min(100vh, 1380px); padding-top: 88px; }
.hero__lockup { display: block; width: 100%; height: auto; aspect-ratio: 568 / 98; fill: var(--white); }
.hero__copy { max-width: 62ch; margin: 120px 0 auto; font-size: 20px; line-height: 1.3; font-weight: 450; }
.hero__copy p + p { margin-top: 28px; }
.hero__link { display: inline-block; margin-top: 36px; color: var(--white); font-size: 20px; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.banner--hero .banner__title { margin-top: 140px; }

.banner--foot { min-height: 560px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 48px; font-size: 16px; }
.foot__links a { text-decoration: underline; text-underline-offset: 5px; }
.foot__meta { margin-top: 40px; font-size: 12px; opacity: .75; }

/* ---------- editorial rows ---------- */
.row {
  border-top: 1px solid var(--line);
  padding: 20px var(--gutter) 96px;
  display: grid; grid-template-columns: 1fr; gap: 56px;
}
.row__label { display: block; font-size: 13px; font-weight: 600; letter-spacing: -0.005em; }
.row--3 { grid-template-columns: 140px minmax(0, 480px) 1fr; gap: 0 32px; padding-bottom: 48px; align-items: start; }
.row--3 .btn { justify-self: end; }
.row__desc { font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.row__desc + .row__desc { margin-top: 12px; }

.statement {
  font-weight: 550; letter-spacing: -0.03em; line-height: 1.02;
  font-size: clamp(38px, 6.4vw, 92px); max-width: 1100px;
}
.statement--sm { font-size: clamp(28px, 4vw, 56px); margin-top: 48px; }

/* Buttons — lifted from the product. Primary: black + diagonal sheen. Secondary: white + cool hairline. */
.btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.2); cursor: pointer;
  font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: -0.02em; line-height: 1;
  color: rgba(255,255,255,.92); text-decoration: none;
  /* one broad soft highlight sweeping left→right, like the Figma gel button — not thin stripes */
  background:
    linear-gradient(105deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.18) 30%, rgba(255,255,255,.03) 55%, rgba(255,255,255,.11) 78%, rgba(255,255,255,0) 100%),
    #000;
  box-shadow: 0 2px 3px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .12s var(--ease), box-shadow .15s;
}
.btn:hover { box-shadow: 0 3px 6px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--secondary {
  background: #fff; color: var(--ink); border: 0.5px solid var(--border-cool);
  box-shadow: 0 2px 3px rgba(104,101,101,.08);
}
.btn--secondary:hover { box-shadow: 0 3px 6px rgba(104,101,101,.12); }

/* ---------- logo section ---------- */
.stage { display: flex; align-items: center; justify-content: center; padding: 40px var(--gutter) 120px; }
.stage--tall { padding-top: 24px; }
.mark--hero { font-size: clamp(160px, 22vw, 320px); color: var(--blue); }
.lockup--hero { height: clamp(90px, 13vw, 200px); width: auto; color: var(--ink); }
.lockup--hero use { color: var(--ink); }

.tiles { display: grid; gap: 24px; padding: 0 var(--gutter) 120px; }
.tiles--2 { grid-template-columns: 1fr 1fr; }
.tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 16/9; border-radius: 4px; }
.tile .lockup { font-size: 34px; }
.tile--ink { background: var(--ink); color: #fff; }
.tile--surface { background: var(--surface); color: var(--ink); }

.avatars { display: grid; grid-template-columns: repeat(2, 300px); gap: 24px; justify-content: center; padding: 0 var(--gutter) 120px; }
.avatar { aspect-ratio: 1; border-radius: 24%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
/* optical centering: the mark's mass sits right of its bounding box, so nudge it left */
.avatar .mark { width: 50%; height: auto; aspect-ratio: 94.5 / 97.5; transform: translate(-12%, 1%); }
.avatar--bordered { box-shadow: inset 0 0 0 1px var(--line); }

.clearance { display: flex; justify-content: center; padding: 40px var(--gutter) 140px; }
.clearance__box {
  position: relative; padding: 42px; background: var(--sky);
  color: var(--ink);
}
.clearance__box .lockup { font-size: 42px; }
.clearance__box::before, .clearance__box::after {
  content: ""; position: absolute; border: 0 solid var(--error);
}
.clearance__box::before { inset: -100vh 42px; border-width: 0 1px; }
.clearance__box::after { inset: 42px -100vw; border-width: 1px 0; }
.clearance { overflow: hidden; }

.misuse-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 20px; padding: 0 var(--gutter) 140px; }
.misuse { margin: 0; }
.misuse__box {
  position: relative; height: 210px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--ink); overflow: hidden;
  background: linear-gradient(to top right, transparent calc(50% - .75px), var(--error) calc(50% - .75px), var(--error) calc(50% + .75px), transparent calc(50% + .75px));
}
.misuse__box .lockup { font-size: 26px; }
.misuse__box .mark { font-size: 26px; }
.misuse__box--stack { flex-direction: column; gap: 10px; }
.misuse__box--apart { gap: 90px; }
.lockup--wordonly { width: 4.55em; }
.misuse figcaption { margin-top: 14px; font-size: 13px; }

/* ---------- color ---------- */
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 var(--gutter) 120px; }
.swatches--4 { grid-template-columns: repeat(4, 1fr); }
.swatches--5 { grid-template-columns: repeat(5, 1fr); }
.swatches--6 { grid-template-columns: repeat(6, 1fr); }
.swatches--6 .chip { min-height: 320px; padding: 16px; }
.swatches--6 .chip__row { grid-template-columns: 44px 1fr; font-size: 11px; }
.swatches--tints .chip { min-height: 220px; }
.swatches--tints .chip__row { grid-template-columns: 44px 1fr; font-size: 11px; }
.swatches--3 { grid-template-columns: repeat(3, 1fr); }
.chip {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  min-height: 460px; padding: 24px; border: none; border-radius: 6px; cursor: pointer;
  font-family: inherit; font-size: 12px; text-align: left; transition: transform .18s var(--ease);
}
.chip:hover { transform: translateY(-3px); }
.chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.chip--bordered { box-shadow: inset 0 0 0 1px var(--line); }
.chip__row { display: grid; grid-template-columns: 56px 1fr; }
.chip__row b { font-weight: 400; opacity: .85; }
.swatches--5 .chip { min-height: 360px; padding: 18px; }
.swatches--5 .chip__row { grid-template-columns: 48px 1fr; font-size: 11px; }

/* ---------- typography ---------- */
.specimen { padding: 20px var(--gutter) 120px; }
.specimen__big { font-size: clamp(64px, 12vw, 180px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.specimen__glyphs { margin-top: 48px; font-size: clamp(28px, 4vw, 56px); font-weight: 550; letter-spacing: -0.02em; line-height: 1.15; max-width: 1100px; }
.specimen__glyphs--nums { margin-top: 20px; color: var(--gray); }

.scale { padding: 0 var(--gutter) 120px; }
.scale__row { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: baseline; padding: 28px 0; border-top: 1px solid var(--line); }
.scale__meta { font-size: 12px; color: var(--gray); }
.t-h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.t-h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.t-h3 { font-size: 20px; font-weight: 600; }
.t-body { font-size: 16px; max-width: 62ch; }
.t-body { font-weight: 450; }
.t-caption { font-size: 12px; font-weight: 350; color: var(--gray); }

/* ---------- voice ---------- */
.numbered { list-style: none; margin: 0; padding: 0; grid-column: 2 / -1; max-width: 760px; }
.numbered li { display: grid; grid-template-columns: 56px 1fr; padding: 28px 0; border-top: 1px solid var(--line); }
.numbered li:first-child { border-top: none; padding-top: 0; }
.numbered__n { font-size: 20px; font-weight: 450; color: var(--gray); }
.numbered h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.numbered p { margin-top: 8px; font-size: 14px; color: var(--gray); max-width: 56ch; }

.dd { grid-column: 2 / -1; width: 100%; max-width: 900px; border-collapse: collapse; font-size: 15px; }
.dd th { text-align: left; font-size: 12px; font-weight: 600; padding: 0 0 14px; }
.dd th:last-child { color: var(--error); }
.dd td { padding: 16px 24px 16px 0; border-top: 1px solid var(--line); vertical-align: top; }
.dd td:last-child { color: var(--gray); text-decoration: line-through; text-decoration-color: rgba(255,43,58,.6); }

/* ---------- imagery ---------- */
.rules { list-style: none; margin: 20px 0 0; padding: 0; }
.rules li { position: relative; padding: 8px 0 8px 26px; font-size: 13.5px; }
.rules li::before { content: ""; position: absolute; left: 0; top: 12px; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); }
.rules li::after { content: ""; position: absolute; left: 4.5px; top: 15px; width: 5px; height: 3px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg); }

.tiles--imagery { padding-bottom: 140px; }
.zone { margin: 0; }
.zone img { display: block; width: 100%; height: auto; border-radius: 4px; }
.zone figcaption { margin-top: 14px; font-size: 13px; }

/* ---------- in-app logo ---------- */
.app-logo { display: block; aspect-ratio: 1; height: auto; }
.apptiles { display: flex; align-items: flex-end; gap: 40px; padding: 20px var(--gutter) 120px; }

/* ---------- hover-to-download logos ---------- */
/* custom cursor: a download arrow (Ink on white) — falls back to pointer */
.dl {
  display: inline-block; text-decoration: none;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><circle cx='14' cy='14' r='13' fill='white' stroke='%23202020' stroke-width='1.5'/><path d='M14 7v9M10 12.5l4 4 4-4M9.5 20.5h9' fill='none' stroke='%23202020' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") 14 14, pointer;
}
.dl.tile, .dl.avatar { display: flex; }
.stage .dl { display: block; line-height: 0; }
.tip {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none;
  padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: -0.01em; line-height: 1;
  opacity: 0; transform: translate(16px, 18px) scale(.96);
  transition: opacity .12s var(--ease), transform .12s var(--ease);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.tip.is-visible { opacity: 1; transform: translate(16px, 18px) scale(1); }

/* ---------- assets ---------- */
.appicon { display: flex; align-items: flex-end; gap: 40px; padding: 20px var(--gutter) 120px; }
.appicon img { display: block; border-radius: 22.5%; height: auto; }
.agrid { display: grid; gap: 8px; padding: 0 var(--gutter) 24px; }
.agrid:last-of-type, .agrid + .row { margin-bottom: 0; }
.agrid--icons { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.agrid--badges { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.agrid--tiles { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.agrid--bg { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.agrid--rive { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.agrid + .row { margin-top: 96px; }
.acell {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; color: var(--gray);
  font-size: 10.5px; line-height: 1.2; text-align: center; transition: border-color .15s, box-shadow .15s, transform .15s var(--ease);
}
.acell:hover { border-color: var(--line-strong, #dadada); box-shadow: 0 6px 18px rgba(0,0,0,.06); transform: translateY(-2px); }
.acell img, .acell canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.agrid--icons .acell img { width: 32px; }
.agrid--badges .acell img { width: 88px; }
.agrid--tiles .acell img { width: 88px; border-radius: 18%; }
.agrid--bg .acell { padding: 0; overflow: hidden; }
.agrid--bg .acell img { aspect-ratio: 9/16; object-fit: cover; }
.agrid--bg .acell span { padding: 10px; }
.acell span { display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acell .rive { width: 120px; height: 120px; }
.tiles--video { grid-template-columns: repeat(auto-fill, 280px); }
.tiles--video video { display: block; width: 100%; aspect-ratio: 9/16; background: var(--ink); border-radius: 24px; }
.tiles--video figcaption a { color: var(--blue-dark); text-decoration: none; font-weight: 600; }
.sfx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 0 var(--gutter) 24px; }
.sfx {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font: 500 13px/1.2 var(--sans); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .15s, background .15s;
}
.sfx:hover { background: var(--surface); }
.sfx i { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); position: relative; }
.sfx i::after { content: ""; position: absolute; left: 9px; top: 7px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #fff; }
.sfx.is-playing i { background: var(--blue); }
.geist { padding: 0 var(--gutter) 24px; font-family: 'Geist', var(--sans); }
.geist__line { display: grid; grid-template-columns: 200px 1fr; align-items: baseline; gap: 24px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 28px; letter-spacing: -0.02em; }
.geist__line .scale__meta { font-family: var(--sans); font-weight: 450; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 16px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s var(--ease); z-index: 60; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- print / PDF export (scripts/build-pdf.sh) ---------- */
@page { size: 1440px 2036px; margin: 0; }
@media print {
  html { scroll-behavior: auto; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sidebar, .topbar, .toast, .tip { display: none !important; }
  .main { margin-left: 0; }
  .banner { break-before: page; min-height: 560px; }
  .banner--hero { break-before: auto; min-height: 1380px; }
  .banner--foot { break-before: page; }
  .row, .tiles, .swatches, .stage, .avatars, .apptiles, .clearance, .misuse-grid,
  .specimen, .scale, .zone { break-inside: avoid; }
  .chip:hover { transform: none; }
  .dl { cursor: auto; }
  .agrid--rive, .tiles--video, .sfx-grid { display: none; }
  .agrid { break-inside: auto; }
  a { text-decoration: none; }
}

/* ---------- responsive ---------- */
@media screen and (max-width: 1100px) {
  .swatches, .swatches--5, .swatches--6 { grid-template-columns: repeat(3, 1fr); }
  .chip, .swatches--5 .chip { min-height: 300px; }
  .misuse-grid { grid-template-columns: repeat(2, 1fr); }
  .avatars { grid-template-columns: repeat(2, minmax(0, 260px)); }
}
@media screen and (max-width: 860px) {
  :root { --gutter: 24px; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 40; align-items: center; justify-content: space-between; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
  .topbar__logo { color: var(--blue); font-size: 30px; }
  .topbar__toggle { display: flex; flex-direction: column; gap: 4px; width: 38px; height: 38px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
  .topbar__toggle span { height: 2px; background: var(--ink); }
  .main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .3s var(--ease); width: min(300px, 84vw); }
  .sidebar.is-open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.2); }
  .sidebar__brand { display: none; }
  .banner--hero { min-height: auto; }
  .row--3 { grid-template-columns: 1fr; gap: 16px; }
  .row--3 .btn { justify-self: start; }
  .numbered, .dd { grid-column: 1; }
  .tiles--2, .misuse-grid, .swatches, .swatches--5, .swatches--6, .swatches--3 { grid-template-columns: 1fr; }
  .apptiles { flex-wrap: wrap; gap: 24px; }
  /* fixed-size logo rows must wrap and scale on narrow screens */
  .appicon { flex-wrap: wrap; gap: 20px; padding-bottom: 80px; }
  .appicon img { max-width: 100%; }
  .appicon a:first-child img { width: 132px; }
  .clearance__box .lockup { font-size: clamp(26px, 8.5vw, 42px); }
  .clearance__box { padding: clamp(26px, 8.5vw, 42px); }
  .clearance__box::before { inset: -100vh clamp(26px, 8.5vw, 42px); }
  .clearance__box::after { inset: clamp(26px, 8.5vw, 42px) -100vw; }
  .banner__title { font-size: clamp(44px, 15vw, 132px); }
  .geist__line { grid-template-columns: 1fr; gap: 6px; font-size: 22px; }
  .misuse__box--apart { gap: 40px; }
  .avatars { gap: 16px; }
  .avatars { grid-template-columns: 1fr 1fr; }
  .scale__row { grid-template-columns: 1fr; gap: 8px; }
}
