/* ─────────────────────────────────────────────────────────
   DREAM MACHINE
   Cream paper, navy voice, baby-blue accent, red pop.
   Uppercase is a rare shout, not the default.
   ───────────────────────────────────────────────────────── */

:root {
  --paper:      #F2EFE8;
  --ink:        #0F2450;
  --ink-deep:   #061532;
  --ink-mute:   #9BC4E8;   /* baby blue */
  --ink-quiet:  #6A7896;   /* dusty desaturated blue for supporting text */
  --ink-body:   #0F2450;
  --sky:        #B9D3E9;
  --signal:     #D7361F;
  --go:         #1F8B4C;
  --rule:       #0F2450;
  --rule-hair:  1px;
  --gutter:     clamp(16px, 3.5vw, 40px);
  --step:       clamp(24px, 6vw, 96px);

  --sans:  "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

::selection { background: var(--ink); color: var(--paper); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 10px 14px;
  font: 600 13px/1 var(--sans);
}
.skip:focus { left: 8px; top: 8px; z-index: 99; }

/* ── WHEEL ──────────────────────────────────────────────── */

.wheel {
  color: var(--ink);
  display: block;
}
.wheel--sm { width: 26px; height: 26px; }
.wheel--hero {
  position: absolute;
  right: clamp(20px, 4vw, 80px);
  top: 50%;
  width: clamp(180px, 26vw, 360px);
  height: clamp(180px, 26vw, 360px);
  color: var(--sky);
  opacity: 0.7;
  animation: turn-once 3.2s cubic-bezier(.2,.7,.2,1) 0.15s both;
  transform-origin: 50% 50%;
  translate: 0 -50%;
  z-index: 0;
  pointer-events: none;
}
@keyframes turn-once {
  from { transform: rotate(-90deg); opacity: 0; }
  to   { transform: rotate(0deg);   opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) {
  .wheel--hero { animation: none; opacity: 0.7; transform: rotate(0deg); }
}

/* ── HEADER ─────────────────────────────────────────────── */

.site-head {
  padding: 20px var(--gutter);
  border-top: var(--rule-hair) solid var(--rule);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 800;
  font-size: clamp(14px, 1.2vw, 17px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.wordmark--foot { font-weight: 700; }
.wordmark__a,
.wordmark__b { font-style: normal; }

/* ── HERO ───────────────────────────────────────────────── */

.hero {
  padding: 0;
  border-bottom: var(--rule-hair) solid var(--rule);
  position: relative;
  overflow: hidden;
}
.hero__inner {
  padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(56px, 9vw, 128px);
  max-width: 1600px;
  margin: 0 auto;
  min-height: 52vh;
  position: relative;
}
.hero__body {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 5vw, 72px);
  min-width: 0;
  position: relative;
  z-index: 1;
}
.hero__title {
  font-weight: 900;
  font-size: clamp(43px, 7.2vw, 115px);
  line-height: 0.94;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  font-variation-settings: "wdth" 125;
  color: var(--ink);
  margin: 0;
  max-width: 14ch;
}
.hero__title .em { color: var(--ink-mute); font-style: normal; }

.hero__lede {
  max-width: 48ch;
  font-weight: 500;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.35;
  color: var(--ink);
  margin: 0;
}

/* ── STAIRCASE NAV ──────────────────────────────────────── */

.stair {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: var(--rule-hair) solid var(--rule);
}
.stair > li { border-bottom: var(--rule-hair) solid var(--rule); }
.stair > li > a {
  display: block;
  padding: clamp(14px, 1.8vw, 22px) var(--gutter);
  padding-left: calc(var(--gutter) + (var(--i, 0) * var(--step)));
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.005em;
  color: var(--ink);
  transition: background .2s ease, color .2s ease, padding-left .35s cubic-bezier(.2,.7,.2,1);
  white-space: nowrap;
}
.stair > li:hover > a { background: var(--ink); color: var(--paper); }
.stair > li > a:focus-visible { outline: 2px solid var(--ink); outline-offset: -6px; }

.stair--nav > li:nth-child(1) { --i: 0; }
.stair--nav > li:nth-child(2) { --i: 1; }
.stair--nav > li:nth-child(3) { --i: 2; }
.stair--nav > li:nth-child(4) { --i: 3; }

.stair__cta a { display: flex !important; align-items: center; justify-content: flex-end; gap: 14px; }

/* ── SECTIONS ───────────────────────────────────────────── */

section { padding: 0; position: relative; }
.section-inner {
  padding: clamp(52px, 7vw, 104px) var(--gutter);
  max-width: 1600px;
  margin: 0 auto;
}

.display-h {
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 clamp(33px, 4.2vw, 65px);
  max-width: 24ch;
}

/* ── THESIS ─────────────────────────────────────────────── */

.thesis__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
}
.thesis__grid article h3 {
  font-weight: 600;
  font-size: clamp(15px, 1.1vw, 17px);
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 0 12px;
}
.thesis__grid article p {
  margin: 0;
  font-weight: 400;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.5;
  color: var(--ink);
  max-width: 34ch;
}

/* ── PORTFOLIO ──────────────────────────────────────────── */

.portfolio__group + .portfolio__group { margin-top: clamp(36px, 5vw, 72px); }

.portfolio__group-head {
  padding: clamp(16px, 2vw, 24px) var(--gutter);
  border-top: var(--rule-hair) solid var(--rule);
  border-bottom: var(--rule-hair) solid var(--rule);
  font-weight: 600;
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: -0.005em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
}
.portfolio__group-head::before {
  content: "";
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--signal);
  flex: 0 0 10px;
}
.portfolio__group-head--active::before { background: var(--go); }

.stair--portfolio > li > a {
  padding: clamp(12px, 1.4vw, 18px) var(--gutter);
  padding-left: calc(var(--gutter) + (var(--i, 0) * var(--step)));
  font-size: clamp(20px, 2.2vw, 36px);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* Staircase indent — cycles across a group of 7 */
.stair--portfolio > li:nth-child(7n+1) { --i: 0; }
.stair--portfolio > li:nth-child(7n+2) { --i: 1; }
.stair--portfolio > li:nth-child(7n+3) { --i: 2; }
.stair--portfolio > li:nth-child(7n+4) { --i: 3; }
.stair--portfolio > li:nth-child(7n+5) { --i: 2; }
.stair--portfolio > li:nth-child(7n+6) { --i: 1; }
.stair--portfolio > li:nth-child(7n+7) { --i: 0; }

/* ── ABOUT ──────────────────────────────────────────────── */

.about__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 72px);
}
.about__col p {
  margin: 0 0 1.1em;
  font-weight: 400;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.5;
  color: var(--ink);
  max-width: 42ch;
}
.about__col p strong { font-weight: 600; }
.about__col .mark-caption {
  margin-top: 1.8em;
  font-style: italic;
  color: var(--ink-quiet);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.5;
  max-width: 40ch;
}

.facts {
  list-style: none;
  padding: 0;
  margin: clamp(28px, 3vw, 40px) 0 0;
}
.facts li {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 10px 0;
  border-bottom: var(--rule-hair) solid color-mix(in oklab, var(--ink) 15%, transparent);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
}
.facts li span:first-child { color: var(--ink-quiet); font-weight: 400; }

/* ── CONTACT ────────────────────────────────────────────── */

.contact__title {
  font-weight: 900;
  font-size: clamp(36px, 5.8vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.008em;
  text-transform: uppercase;
  font-variation-settings: "wdth" 125;
  color: var(--ink);
  margin: 0 0 clamp(28px, 4vw, 56px);
  max-width: 18ch;
}
.contact__title .em { color: var(--ink-mute); font-style: normal; }

.contact__email {
  display: inline-block;
  font-weight: 800;
  font-size: clamp(24px, 3.2vw, 48px);
  line-height: 1;
  text-transform: uppercase;
  font-variation-settings: "wdth" 125;
  color: var(--ink);
  padding: 8px 0;
  border-bottom: 3px solid var(--ink);
  transition: color .25s, background .25s, padding .25s;
}
.contact__email:hover { background: var(--ink); color: var(--paper); padding: 8px 12px; }

.contact__note {
  margin: clamp(28px, 4vw, 48px) 0 0;
  max-width: 52ch;
  font-weight: 400;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.5;
  color: var(--ink);
}

/* ── FOOTER ─────────────────────────────────────────────── */

.site-foot {
  border-top: var(--rule-hair) solid var(--rule);
}
.site-foot__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--gutter);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
  flex-wrap: wrap;
  gap: 16px;
}
.site-foot__row--fine {
  color: var(--ink-quiet);
  font-size: 12px;
  padding-top: 4px;
  padding-bottom: 20px;
}
.site-foot ul { list-style: none; display: flex; gap: clamp(14px, 2vw, 28px); margin: 0; padding: 0; }
.site-foot a { transition: color .2s; }
.site-foot a:hover { color: var(--ink-mute); }

/* ── RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 900px) {
  :root { --step: clamp(14px, 4vw, 40px); }
  .thesis__grid { grid-template-columns: 1fr; gap: 32px; }
  .about__row { grid-template-columns: 1fr; }
  .stair > li > a { font-size: 20px; }
  .stair--portfolio > li > a { font-size: 22px; }
  .wheel--hero {
    width: clamp(240px, 70vw, 420px);
    height: clamp(240px, 70vw, 420px);
    right: -60px;
    top: auto;
    bottom: -60px;
    translate: 0 0;
    opacity: 0.55;
  }
  .hero__body { gap: 40px; }
}

@media (max-width: 540px) {
  body { font-size: 16px; }
  .stair--portfolio > li:nth-child(n) { --i: 0; }
  .stair > li > a { padding-left: var(--gutter) !important; font-size: 19px; }
  .stair--nav > li > a { padding-left: calc(var(--gutter) + (var(--i, 0) * 12px)); }
  .wordmark__txt { display: none; }
  .site-foot .wordmark__txt { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
