/* ============================================================
   STRANGE LOOP — single-screen, above-the-fold layout
   Only the supplied copy. Three hero treatments share this frame.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;1,6..72,300;1,6..72,400&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink:    #0b0b0c;
  --paper:  #f4f3ef;
  --muted:  #6c6a64;
  --line:   rgba(11, 11, 12, 0.14);

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --maxw: 1180px;
  --gutter: clamp(22px, 5vw, 64px);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;                /* single screen, nothing below the fold */
}
a { color: inherit; text-decoration: none; }

/* ---------- the one screen ---------- */
.stage {
  position: relative;
  height: 100vh; height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.stage__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
video.stage__bg { object-fit: cover; }
.scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(5,5,6,0.62) 0%, rgba(5,5,6,0.18) 34%, rgba(5,5,6,0.30) 64%, rgba(5,5,6,0.88) 100%);
}

/* ---------- top bar ---------- */
.nav {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(20px, 3.2vh, 30px) var(--gutter);
  flex: 0 0 auto;
}
.mark {
  font-family: var(--mono);
  font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 500;
}
.nav .meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.nav .navlink {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
  background: none; border: 0; cursor: pointer; padding: 6px 0;
  position: relative; transition: color .2s;
}
.nav .navlink::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav .navlink:hover { color: var(--ink); }
.nav .navlink:hover::after { transform: scaleX(1); }
.stage--dark .nav .navlink { color: rgba(244,243,239,0.7); }
.stage--dark .nav .navlink:hover { color: #fff; }

/* ---------- About modal: white text on black ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: #08080a; color: #f4f3ef;
  display: flex; overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal__inner {
  max-width: 660px; width: 100%; margin: auto;
  padding: clamp(72px, 12vh, 132px) var(--gutter);
}
.modal__eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(244,243,239,0.5); margin: 0 0 30px;
}
.modal__lead {
  font-family: var(--sans); font-weight: 400;
  font-size: clamp(19px, 2vw, 25px); line-height: 1.5; letter-spacing: -0.01em;
  color: #f4f3ef; margin: 0 0 1.15em;
}
.modal p {
  font-family: var(--sans); font-weight: 400;
  font-size: clamp(15.5px, 1.45vw, 18px); line-height: 1.66;
  color: rgba(244,243,239,0.82); margin: 0 0 1.25em; max-width: 62ch;
}
.modal p:last-child { margin-bottom: 0; }
.modal__inline-link {
  color: #f4f3ef;
  text-decoration: underline;
  text-decoration-color: rgba(244,243,239,0.42);
  text-underline-offset: 0.18em;
}
.modal__inline-link:hover { text-decoration-color: #f4f3ef; }
.modal__close {
  position: fixed; top: clamp(18px, 3vh, 28px); right: var(--gutter); z-index: 210;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(244,243,239,0.3); background: rgba(0,0,0,0.2);
  color: #f4f3ef; cursor: pointer; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
}
.modal__close:hover { background: rgba(244,243,239,0.12); border-color: rgba(244,243,239,0.6); }
body.modal-open { overflow: hidden; }

/* ---------- content frame ---------- */
.frame {
  position: relative; z-index: 10;
  flex: 1 1 auto;
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(16px, 2.6vh, 30px);
  max-width: var(--maxw); width: 100%; margin: 0 auto;
  padding: clamp(12px, 2.5vh, 30px) var(--gutter) clamp(22px, 4vh, 54px);
}

.headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(27px, 4.2vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 19ch;
}
.headline em { font-style: italic; }

.intro {
  margin: clamp(18px, 2.6vh, 28px) 0 0;
  font-family: var(--mono);
  font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
}
.intro b { color: inherit; font-weight: 500; }

/* ---------- case studies (collapsible to stay above the fold) ---------- */
.studies {
  border-top: 1px solid var(--line);
}
.study {
  border-bottom: 1px solid var(--line);
}
.study > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(48px, 56px) 1fr auto;
  align-items: baseline;
  gap: clamp(12px, 2.4vw, 34px);
  padding: clamp(11px, 1.7vh, 16px) 0;
  transition: opacity .2s;
}
.study > summary::-webkit-details-marker { display: none; }
.study > summary:hover { opacity: 0.62; }
.study .idx {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted);
}
.study .client {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(16px, 1.7vw, 21px);
}
.study .client b {
  font-style: normal; font-weight: 400;
  font-family: var(--sans); font-size: clamp(14px, 1.45vw, 17px);
  letter-spacing: -0.005em;
}
.study .sign {
  font-family: var(--mono); font-size: 16px; color: var(--muted); line-height: 1;
  transition: transform .25s ease;
}
.study[open] .sign { transform: rotate(45deg); }
.study .desc {
  grid-column: 2 / -1;
  margin: 0 0 clamp(13px, 1.8vh, 18px);
  max-width: 64ch;
  color: #34322f;
  font-size: clamp(13.5px, 1.2vw, 15.5px);
  line-height: 1.5;
}
.study[open] > summary { padding-bottom: clamp(6px, 1vh, 10px); }

/* ---------- dark variant (video / dark canvas) ---------- */
.stage--dark { background: #050506; color: var(--paper); }
.stage--dark .intro { color: rgba(244,243,239,0.7); }
.stage--dark .intro b { color: #fff; }
.stage--dark .nav .meta { color: rgba(244,243,239,0.62); }
.stage--dark .studies { border-top-color: rgba(244,243,239,0.22); }
.stage--dark .study { border-bottom-color: rgba(244,243,239,0.18); }
.stage--dark .study .idx { color: rgba(244,243,239,0.55); }
.stage--dark .study .sign { color: rgba(244,243,239,0.6); }
.stage--dark .study .desc { color: rgba(244,243,239,0.74); }

/* ---------- concept switcher (peruse the three) ---------- */
.switcher {
  position: fixed; z-index: 60; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 3px; padding: 5px;
  max-width: 94vw; overflow-x: auto; scrollbar-width: none;
  background: rgba(244,243,239,0.84);
  backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--line); border-radius: 100px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.16);
}
.switcher::-webkit-scrollbar { display: none; }
.switcher a {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 8px 12px; border-radius: 100px; color: var(--muted); white-space: nowrap;
  transition: background .2s, color .2s;
}
.switcher a:hover { color: var(--ink); }
.switcher a.active { background: var(--ink); color: var(--paper); }

@media (max-width: 600px) {
  .nav .meta { display: none; }
  .headline { font-size: clamp(24px, 7vw, 34px); }
}
@media (prefers-reduced-motion: reduce) {
  .study .sign { transition: none; }
}
