/* ==========================================================================
   Dexteris AI
   Soft-UI, used sparingly. Depth is spent on four things only — the header
   bar, the hero stage, form fields, and the primary button. Everything else
   is flat, separated by hairlines, so the page reads as documentation
   rather than as a demo of the shadow technique.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  --brand:      #e8703a;
  --brand-deep: #cf5a26;
  --brand-soft: rgba(232, 112, 58, .13);
  --navy:       #3a5d80;

  --bg:      #eceef2;
  --panel:   #e7eaef;
  --ink:     #17222e;
  --ink-2:   #4d5b6b;
  --ink-3:   #7d8b9b;
  --rule:    rgba(58, 93, 128, .17);
  --rule-2:  rgba(58, 93, 128, .10);

  --sh-dark:   rgba(40, 60, 84, .22);
  --sh-lite:   rgba(255, 255, 255, .95);
  --grad-up:   linear-gradient(145deg, #f3f5f9, #e1e4ea);
  --grad-down: linear-gradient(145deg, #e3e6ec, #f1f3f7);

  --raise:    8px 8px 18px var(--sh-dark), -8px -8px 18px var(--sh-lite);
  --raise-sm: 4px 4px 10px var(--sh-dark), -4px -4px 10px var(--sh-lite);
  --press:    inset 4px 4px 10px var(--sh-dark), inset -4px -4px 10px var(--sh-lite);
  --well:     inset 9px 9px 20px var(--sh-dark), inset -9px -9px 20px var(--sh-lite);

  --sans:    "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Archivo", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 20px;
  --gut:  clamp(20px, 4vw, 44px);
  --maxw: 1140px;
}

/* Dark values are declared twice — once behind prefers-color-scheme for the
   system default, once on [data-theme="dark"] so the toggle wins either way. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:        #212832;
    --panel:     #1d242d;
    --ink:       #e9edf2;
    --ink-2:     #a3b0bf;
    --ink-3:     #74828f;
    --rule:      rgba(170, 198, 225, .16);
    --rule-2:    rgba(170, 198, 225, .09);
    --brand:     #f27c45;
    --brand-deep:#ffa075;
    --brand-soft:rgba(242, 124, 69, .16);
    --navy:      #7ba4cb;
    --sh-dark:   rgba(8, 11, 15, .60);
    --sh-lite:   rgba(255, 255, 255, .055);
    --grad-up:   linear-gradient(145deg, #283039, #1c222a);
    --grad-down: linear-gradient(145deg, #1c222a, #283039);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:        #212832;
  --panel:     #1d242d;
  --ink:       #e9edf2;
  --ink-2:     #a3b0bf;
  --ink-3:     #74828f;
  --rule:      rgba(170, 198, 225, .16);
  --rule-2:    rgba(170, 198, 225, .09);
  --brand:     #f27c45;
  --brand-deep:#ffa075;
  --brand-soft:rgba(242, 124, 69, .16);
  --navy:      #7ba4cb;
  --sh-dark:   rgba(8, 11, 15, .60);
  --sh-lite:   rgba(255, 255, 255, .055);
  --grad-up:   linear-gradient(145deg, #283039, #1c222a);
  --grad-down: linear-gradient(145deg, #1c222a, #283039);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 108px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.05rem, 4.4vw, 3.05rem); letter-spacing: -.032em; text-wrap: balance; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); letter-spacing: -.026em; }
h3 { font-size: 1.04rem; letter-spacing: -.018em; }
p  { margin: 0; text-wrap: pretty; }

::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--bg); padding: 14px 20px; border-radius: 0 0 var(--r) 0;
  box-shadow: var(--raise-sm);
}
.skip:focus { left: 0; }

/* ---------- shared bits ---------- */
.label {
  font-family: var(--mono); font-size: .69rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.lede { font-size: 1.04rem; color: var(--ink-2); max-width: 62ch; line-height: 1.68; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-size: .9rem; font-weight: 600;
  color: var(--ink); padding: 13px 24px;
  border: 0; border-radius: 999px;
  background: var(--grad-up); box-shadow: var(--raise-sm);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: box-shadow .22s ease, color .2s ease;
}
.btn:hover { box-shadow: var(--raise); }
.btn:active { box-shadow: var(--press); }
.btn svg { width: 14px; height: 14px; flex: none; transition: transform .25s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  box-shadow: 5px 5px 12px var(--sh-dark), -4px -4px 10px var(--sh-lite);
}
.btn-primary:hover { box-shadow: 8px 8px 18px var(--sh-dark), -6px -6px 14px var(--sh-lite); }
.btn-primary:active { box-shadow: inset 4px 4px 9px rgba(120, 40, 10, .45); }

/* ---------- header ---------- */
.header { position: fixed; inset: 0 0 auto 0; z-index: 50; padding-block: clamp(12px, 2vw, 18px); }
.bar {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  padding: 9px 9px 9px 18px; border-radius: 999px;
  background: var(--grad-up); box-shadow: var(--raise);
  transition: box-shadow .3s ease;
}
.header.is-stuck .bar { box-shadow: var(--raise-sm); }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand svg { width: 24px; height: 24px; flex: none; }
.brand b { font-family: var(--display); font-size: 1rem; font-weight: 700; letter-spacing: -.03em; }
.brand span { color: var(--brand); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  font-size: .855rem; font-weight: 500; color: var(--ink-2);
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
  transition: color .2s ease, box-shadow .25s ease;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--ink); box-shadow: var(--press); }
.bar .btn { padding: 11px 20px; font-size: .855rem; }
.nav-cta { display: none; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 0; border-radius: 50%;
  background: var(--grad-up); box-shadow: var(--raise-sm);
  color: var(--ink-2); cursor: pointer;
  transition: box-shadow .2s ease, color .2s ease;
}
.icon-btn:hover { color: var(--brand); }
.icon-btn:active { box-shadow: var(--press); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .moon { display: block; }
  :root:not([data-theme="light"]) .icon-btn .sun { display: none; }
}
.burger { display: none; }

@media (max-width: 900px) {
  .nav {
    position: absolute; inset: calc(100% + 10px) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px; border-radius: var(--r-lg);
    background: var(--grad-up); box-shadow: var(--raise);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  .nav[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 12px 15px; font-size: .94rem; }
  .nav-cta {
    display: block; margin-top: 6px; text-align: center; font-weight: 600;
    color: #fff !important;
    background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  }
  .burger { display: grid; }
  .bar > .btn { display: none; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 92px); }
.section + .section { border-top: 1px solid var(--rule-2); }
.section-head { display: grid; gap: 14px; max-width: 64ch; margin-bottom: clamp(32px, 4vw, 44px); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(112px, 16vw, 156px); padding-bottom: clamp(44px, 6vw, 72px); border-top: 0; }
.hero-grid {
  display: grid; gap: clamp(32px, 5vw, 60px);
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
}
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin: 16px 0 20px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.stage {
  position: relative; aspect-ratio: 1 / 1; max-width: 480px;
  width: 100%; margin-inline: auto;
  border-radius: var(--r-lg); background: var(--grad-down);
  box-shadow: var(--well); overflow: hidden;
}
.stage canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  cursor: crosshair; touch-action: manipulation;
}
.stage figcaption {
  position: absolute; left: 20px; right: 20px; bottom: 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
  pointer-events: none;
}
.mode { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-3); transition: color .3s ease; }
.mode::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; transition: background .3s ease;
}
.mode:not(:empty) { min-width: 4.2em; justify-content: flex-end; }

/* ---------- work ---------- */
.project { display: grid; gap: clamp(28px, 4vw, 52px); grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
@media (max-width: 900px) { .project { grid-template-columns: 1fr; } }
.project + .project { margin-top: clamp(40px, 5vw, 60px); padding-top: clamp(40px, 5vw, 60px); border-top: 1px solid var(--rule-2); }
.project h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: -.025em; margin: 10px 0 16px; }
.project p { color: var(--ink-2); font-size: .95rem; }
.project p + p { margin-top: 14px; }

.shot {
  margin: 0; border-radius: var(--r); overflow: hidden;
  background: var(--grad-down); box-shadow: var(--well);
  aspect-ratio: 4 / 3; display: grid; place-items: center;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .empty {
  display: grid; gap: 10px; justify-items: center; padding: 24px; text-align: center;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}
.shot .empty svg { width: 26px; height: 26px; opacity: .55; }

.record { margin: 24px 0 0; display: grid; gap: 0; }
.record > div {
  display: grid; grid-template-columns: 11rem 1fr; gap: 6px 20px;
  padding: 11px 0; border-top: 1px solid var(--rule-2);
}
.record > div:last-child { border-bottom: 1px solid var(--rule-2); }
.record dt {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); padding-top: 2px;
}
.record dd { margin: 0; font-size: .91rem; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .record > div { grid-template-columns: 1fr; } }

/* ---------- capability columns ---------- */
.disciplines { display: grid; gap: clamp(26px, 3vw, 34px); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 940px) { .disciplines { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .disciplines { grid-template-columns: 1fr; } }
.disciplines section { display: grid; gap: 14px; align-content: start; padding-top: 18px; border-top: 2px solid var(--brand); }
.disciplines h3 { letter-spacing: -.02em; }
.disciplines ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.disciplines li { font-size: .875rem; color: var(--ink-2); }

/* ---------- stack ---------- */
.stack { display: grid; gap: 22px; }
.stack > div { display: grid; grid-template-columns: 9rem 1fr; gap: 10px 24px; align-items: start; }
@media (max-width: 620px) { .stack > div { grid-template-columns: 1fr; } }
.stack ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.stack li {
  font-family: var(--mono); font-size: .72rem; color: var(--ink-2);
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule);
}

/* ---------- team ---------- */
.people { display: grid; }
.person {
  display: grid; gap: 18px 40px;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  padding-top: 22px; border-top: 1px solid var(--rule);
}
@media (max-width: 760px) { .person { grid-template-columns: 1fr; gap: 14px; } }
.person-id { display: grid; gap: 7px; align-content: start; }
.person h3 { font-size: 1.15rem; }
.person .role {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand);
}
.person-bio { display: grid; gap: 16px; max-width: 62ch; }
.person p { font-size: .94rem; color: var(--ink-2); }
.person ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .875rem; color: var(--ink-2); }
.person ul li { display: flex; gap: 11px; }
.person ul li::before {
  content: ""; flex: none; width: 4px; height: 4px; margin-top: 9px;
  border-radius: 50%; background: var(--navy);
}

/* ---------- engagement + contact ---------- */
.engage { display: grid; gap: clamp(30px, 4vw, 56px); grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: start; }
@media (max-width: 900px) { .engage { grid-template-columns: 1fr; } }
.engage h2 { margin-bottom: 16px; }
.engage p { color: var(--ink-2); font-size: .95rem; }
.engage p + p { margin-top: 14px; }
.direct { margin-top: 28px; display: grid; gap: 2px; }
.direct a {
  display: flex; align-items: center; gap: 13px; padding: 13px 0;
  border-top: 1px solid var(--rule-2); text-decoration: none;
  font-size: .9rem; color: var(--ink-2); transition: color .2s ease;
}
.direct a:last-child { border-bottom: 1px solid var(--rule-2); }
.direct a:hover { color: var(--brand); }
.direct svg { width: 16px; height: 16px; color: var(--brand); flex: none; }
.direct b { color: var(--ink); font-weight: 600; }

.form { display: grid; gap: 14px; }
.row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--mono); font-size: .65rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); padding-left: 3px; }
.field input, .field textarea, .field select {
  font-family: var(--sans); font-size: .92rem; color: var(--ink);
  padding: 14px 18px; border: 0; border-radius: var(--r);
  background: var(--grad-down); box-shadow: var(--press);
  width: 100%; resize: vertical; transition: box-shadow .25s ease;
}
.field textarea { min-height: 120px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; box-shadow: var(--press), 0 0 0 2px var(--brand-soft);
}
.field select { appearance: none; cursor: pointer; }
.field .sel { position: relative; }
.field .sel::after {
  content: ""; position: absolute; right: 20px; top: 50%;
  width: 7px; height: 7px; margin-top: -5px; pointer-events: none;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg);
}
.form .btn-primary { justify-self: start; margin-top: 4px; }
.form small { font-size: .76rem; color: var(--ink-3); }

/* ---------- footer ---------- */
.footer { padding-block: 40px; border-top: 1px solid var(--rule-2); }
.footer-in { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: center; justify-content: space-between; }
.footer .brand { margin-right: 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer nav a { font-size: .84rem; color: var(--ink-2); text-decoration: none; }
.footer nav a:hover { color: var(--brand); }
.footer small { display: block; width: 100%; color: var(--ink-3); font-size: .77rem; }

/* ---------- reveal ----------
   The resting state is visible. JS arms only what starts below the fold, so
   the first painted frame is already the finished page. */
.js .rv[data-armed] { opacity: 0; transform: translateY(16px); }
.js .rv[data-armed].in {
  opacity: 1; transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1);
}
@media (prefers-reduced-motion: reduce) {
  .js .rv[data-armed] { opacity: 1; transform: none; }
  .btn:hover svg { transform: none; }
}

/* ---------- draft slots ----------
   Facts I don't have yet. Grep for "tk" before you publish. */
.tk {
  background: none; color: var(--brand);
  border-bottom: 1px dotted var(--brand); padding-bottom: 1px;
}

.shot-fig { margin: 0; align-self: start; }
.shot-fig figcaption {
  margin-top: 10px; font-family: var(--mono); font-size: .66rem;
  letter-spacing: .06em; line-height: 1.55; color: var(--ink-3);
}
