:root {
  --ink: #101010;
  --muted: #6c6b68;
  --line: #d8d6d1;
  --paper: #f6f5f2;
  --panel: #ffffff;
  --page: #ffffff;
  --subtle: #eeede9;
  --subtle-hover: #f2f1ee;
  --card: #faf9f6;
  --shadow: rgba(0,0,0,.13);
  --action: #111111;
  --action-ink: #ffffff;
  --accent: #5f5cff;
  color-scheme: light;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

:root[data-theme="dark"] {
  --ink: #f2f1ed;
  --muted: #aaa8a2;
  --line: #383836;
  --paper: #161616;
  --panel: #0e0e0e;
  --page: #0b0b0b;
  --subtle: #20201f;
  --subtle-hover: #292927;
  --card: #171716;
  --shadow: rgba(0,0,0,.45);
  --action: #f2f1ed;
  --action-ink: #111111;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--page); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--page); }
button, input, textarea, select { font: inherit; }
a { color: inherit; }
button { color: inherit; }

.site-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(330px, 31%) 1fr;
  background: var(--panel);
  overflow: clip;
}

.story-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 680px;
  padding: 27px 25px 22px;
  border-right: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  z-index: 3;
}

.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand-controls { display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; width: 112px; height: 46px; border-radius: 4px; object-fit: cover; }
.copyright { font-size: 12px; letter-spacing: -0.01em; }
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); cursor: pointer; font-size: 11px; transition: background .2s ease, transform .2s ease; }
.theme-toggle:hover { background: var(--subtle-hover); }
.theme-toggle:active { transform: translateY(1px); }
.theme-toggle b { font-weight: 500; }

.section-nav { display: flex; align-items: center; gap: 6px; margin-top: 43px; }
.nav-tab { appearance: none; border: 0; background: transparent; padding: 8px 11px; border-radius: 4px; cursor: pointer; font-size: 12px; transition: background .2s ease, transform .2s ease; }
.nav-tab:hover { background: var(--subtle-hover); }
.nav-tab:active { transform: translateY(1px); }
.nav-tab.is-active { background: var(--subtle); box-shadow: inset 0 0 0 1px rgba(127,127,127,.08); }

.story-stack { position: relative; flex: 1; min-height: 0; }
.story-view { display: none; padding-top: 39px; animation: story-in .42s cubic-bezier(.2,.8,.2,1) both; }
.story-view.is-active { display: block; }
@keyframes story-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.availability { width: fit-content; display: inline-flex; align-items: center; gap: 9px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; font-size: 12px; box-shadow: 0 3px 8px rgba(0,0,0,.06); }
.availability b { font-weight: 400; transition: transform .2s ease; }
.availability:hover b { transform: translateX(3px); }
.eyebrow { margin: 0 0 22px; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
h1 { max-width: 460px; margin: 26px 0 13px; font-size: clamp(35px, 3.2vw, 54px); line-height: .99; font-weight: 500; letter-spacing: -.065em; text-wrap: balance; }
.story-view:not([data-view="work"]) h1 { margin-top: 0; }
[data-view="agency"] { padding-top: 27px; }
[data-view="agency"] h1 { font-size: clamp(31px, 2.7vw, 45px); line-height: 1; }
[data-view="agency"] .lede { font-size: 13px; }
[data-view="agency"] .process-list { margin-top: 24px; }
[data-view="agency"] .process-list li { padding: 10px 0; }
.lede { max-width: 400px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.48; letter-spacing: -.012em; }
.primary-action { display: inline-flex; align-items: center; justify-content: center; margin-top: 29px; padding: 12px 18px; border-radius: 7px; background: var(--action); color: var(--action-ink); text-decoration: none; font-size: 13px; box-shadow: 0 6px 14px rgba(0,0,0,.23); transition: transform .2s ease, box-shadow .2s ease; }
.primary-action:hover { transform: translateY(-2px); box-shadow: 0 9px 18px rgba(0,0,0,.25); }
.proof-list { list-style: none; display: grid; gap: 12px; margin: 54px 0 0; padding: 0; font-size: 12px; }
.proof-list li { position: relative; padding-left: 24px; }
.proof-list li::before { content: "✓"; position: absolute; left: 0; color: #534fe3; font-weight: 700; }
.process-list { list-style: none; margin: 42px 0 0; padding: 0; border-top: 1px solid var(--line); }
.process-list li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.process-list span { color: var(--muted); font-size: 11px; }
.founder-card { margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
.founder-card > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.founder-card p { margin: 0; font-size: 12px; line-height: 1.45; }
.founder-card a { display: inline-flex; gap: 7px; margin-top: 10px; font-size: 11px; text-decoration: none; }
.founder-card a b { font-weight: 400; transition: transform .2s ease; }
.founder-card a:hover b { transform: translate(2px,-2px); }
.contact-links { display: grid; margin-top: 38px; border-top: 1px solid var(--line); }
.contact-links a { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 13px; text-decoration: none; }
.contact-links a span { transition: transform .2s ease; }
.contact-links a:hover span { transform: translate(2px,-2px); }

.panel-footer { margin-top: auto; padding-top: 24px; }
.panel-footer p { margin: 0 0 14px; text-align: center; font-size: 11px; color: var(--muted); }
.panel-footer p a { color: var(--ink); text-underline-offset: 3px; }
.sector-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; font-size: 10px; font-weight: 600; letter-spacing: -.02em; }

.gallery-panel { position: relative; min-width: 0; padding: 25px 27px 27px; background: var(--paper); }
.gallery-topline { position: relative; display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: 11px; color: var(--muted); }
.filter-toggle { appearance: none; border: 0; background: transparent; padding: 6px 0 6px 10px; cursor: pointer; font-size: 11px; }
.filter-toggle span { display: inline-block; margin-left: 5px; transition: transform .2s ease; }
.filter-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
.filter-menu { position: absolute; top: 31px; right: 0; z-index: 8; width: 190px; padding: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 12px 35px var(--shadow); }
.filter-menu button { width: 100%; padding: 9px 10px; border: 0; border-radius: 4px; background: transparent; text-align: left; cursor: pointer; font-size: 12px; }
.filter-menu button:hover, .filter-menu button.is-active { background: var(--subtle); }

.project-gallery { display: grid; gap: 27px; }
.project-card { position: relative; min-height: 420px; overflow: hidden; background: #e5e4e0; border: 1px solid #cdcbc5; opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.project-card.is-visible { opacity: 1; transform: translateY(0); }
.project-card[hidden] { display: none; }
.project-link { display: block; position: relative; min-height: inherit; color: #fff; text-decoration: none; overflow: hidden; }
.project-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.002); filter: saturate(.88) contrast(1.02); transition: transform 1s cubic-bezier(.2,.8,.2,1), filter .5s ease; }
.project-card:hover .project-media { transform: scale(1.035); filter: saturate(1) contrast(1.03); }
.project-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02) 45%, rgba(0,0,0,.8) 100%); pointer-events: none; }
.project-number { position: absolute; top: 17px; left: 17px; font-size: 11px; color: rgba(255,255,255,.82); text-shadow: 0 1px 5px #000; }
.access-badge { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 4px; color: #111; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.access-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #26a45e; }
.access-badge.is-private::before { background: #f19643; }
.project-copy { position: absolute; left: 22px; right: 22px; bottom: 20px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.project-title { margin: 0; font-size: clamp(25px, 3vw, 43px); line-height: .95; font-weight: 500; letter-spacing: -.055em; }
.project-description { max-width: 520px; margin: 9px 0 0; color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.38; }
.project-meta { flex: 0 0 auto; text-align: right; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: rgba(255,255,255,.75); }
.project-meta b { display: block; margin-top: 8px; color: #fff; font-size: 16px; font-weight: 400; transition: transform .2s ease; }
.project-card:hover .project-meta b { transform: translate(3px,-3px); }
.media-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; color: #333; background: linear-gradient(135deg,#e6defd,#ffd7c6 55%,#ff6a3d); font-size: 14px; }
.gallery-end { min-height: 310px; padding: 70px 20px 30px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; border-top: 1px solid var(--line); }
.gallery-end p { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.gallery-end a { font-size: clamp(35px,5vw,72px); letter-spacing: -.065em; text-decoration: none; }
.gallery-end a span { display: inline-block; font-size: .55em; transition: transform .2s ease; }
.gallery-end a:hover span { transform: translate(4px,-4px); }

.empty-state { padding: 100px 30px; border: 1px solid var(--line); text-align: center; color: var(--muted); }

@media (max-width: 900px) {
  .site-shell { display: block; overflow: visible; }
  .story-panel { position: relative; top: 0; height: auto; min-height: min(760px, 100svh); border-right: 0; border-bottom: 1px dashed var(--line); }
  .story-stack { min-height: 480px; }
  h1 { font-size: clamp(44px, 11vw, 70px); }
  .gallery-panel { padding: 18px; }
  .project-card { min-height: clamp(380px, 66vw, 620px); }
}

@media (max-width: 560px) {
  .story-panel { min-height: 100svh; padding: 21px 19px 18px; }
  .brand-row { align-items: flex-start; }
  .brand-controls { gap: 8px; }
  .theme-toggle { min-height: 30px; padding: 5px 8px; }
  .copyright { display: none; }
  .section-nav { margin-top: 34px; }
  .story-view { padding-top: 33px; }
  .proof-list { margin-top: 40px; }
  .panel-footer { position: static; }
  .gallery-panel { padding: 12px; }
  .gallery-topline { padding: 5px 2px; }
  .project-gallery { gap: 12px; }
  .project-card { min-height: 440px; }
  .project-copy { left: 16px; right: 16px; bottom: 16px; display: block; }
  .project-description { max-width: 92%; }
  .project-meta { margin-top: 16px; text-align: left; }
}

@media (max-width: 380px) {
  .brand-logo { width: 96px; height: 40px; }
  .section-nav { gap: 2px; }
  .nav-tab { padding-inline: 9px; }
  h1, [data-view="agency"] h1 { font-size: clamp(36px, 12vw, 48px); }
  .project-card { min-height: 400px; }
  .access-badge { top: 10px; right: 10px; padding: 6px 7px; }
}

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