:root {
  color-scheme: light;
  --paper: #efebe2;
  --ink: #1e3026;
  --deep: #182c23;
  --white: #f5f0e6;
  --accent: #c5ab79;
  --line: #b7b8a8;
  --serif: "Iowan Old Style", "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.72; }
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible { outline: 3px solid #a97929; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; }
h2 { font-size: clamp(2.45rem, 5.3vw, 5rem); line-height: 1.12; letter-spacing: -.045em; }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.9rem); line-height: 1.3; }
p + p { margin-top: 1rem; }
img { display: block; width: 100%; }
[hidden] { display: none !important; }
.wrap { width: min(88%, 84rem); margin-inline: auto; }
.eyebrow { font-size: .9rem; letter-spacing: .12em; font-weight: 650; margin-bottom: 1rem; }

.skip {
  position: absolute;
  left: 1rem;
  top: .5rem;
  z-index: 5;
  padding: .5rem 1rem;
  background: var(--white);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.hero {
  display: grid;
  min-height: min(50rem, 82svh);
  position: relative;
  isolation: isolate;
  background: #18271e;
  color: var(--white);
  align-items: end;
  overflow: hidden;
}
.hero .portfolio-menu summary {
  background: var(--deep);
  color: var(--white);
  border-radius: 5px;
}
.hero .menu-icon {
  width: 16px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px currentColor, 0 5px currentColor;
}
.hero > img, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero > img { z-index: -2; object-fit: cover; object-position: center 58%; }
.hero::after {
  content: "";
  z-index: -1;
  background: linear-gradient(90deg, #101c15ec, #101c1578 57%, #101c150d),
              linear-gradient(0deg, #101c15a8, transparent 58%);
}
.hero-copy { width: min(88%, 84rem); margin-inline: auto; padding: clamp(4rem, 10vw, 9rem) 0 clamp(3rem, 6vw, 5rem); }
.hero h1 {
  font-family: "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(3.2rem, 10.2vw, 9.5rem);
  line-height: .82;
  letter-spacing: -.06em;
  margin-bottom: 1.7rem;
}
.hero h1 em { color: #ebd4a4; font-weight: 400; }
.hero-copy > p:not(.eyebrow) { max-width: 32rem; font-size: 1.07rem; }

.button { display: inline-flex; align-items: center; gap: 1.2rem; padding: .7rem 1.35rem; font-weight: 650; text-decoration: none; min-height: 3rem; }
.light { background: var(--white); color: var(--deep); }
.light:hover { background: #e4d4b6; }
.hero .button { margin-top: 1.6rem; }

.overview, .process { padding-block: clamp(3.8rem, 9vw, 8rem); }
.overview { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 4rem; }
.overview > div:nth-child(2) { align-self: end; }
.facts { margin: 1.65rem 0 0; font-size: .93rem; }
.facts > div { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding-block: .5rem; border-top: 1px solid var(--line); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }

.motion { background: var(--deep); color: var(--white); padding-block: clamp(3rem, 7vw, 6rem); }
.motion .eyebrow { color: #e7cd9d; }
.demo-controls { display: flex; flex-wrap: wrap; gap: .55rem; margin: 2rem 0 1rem; }
.demo-controls a { padding: .55rem 1rem; min-height: 2.75rem; border: 1px solid #a4b1a3; text-decoration: none; }
.demo-controls a:hover { border-color: #e7cd9d; }
.demo-controls [aria-current] { background: #e7cd9d; border-color: #e7cd9d; color: var(--deep); }
.demo-layout { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(15rem, 1fr); gap: 1.5rem clamp(1.4rem, 3.5vw, 3rem); align-items: start; }
.demo-window { border: 1px solid #a4b1a3; min-width: 0; overflow: hidden; border-radius: .6rem; }
.window-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .25rem 1rem; padding: .6rem .85rem; background: #263e33; font-size: .9rem; }
.demo-window iframe { display: block; width: 100%; height: clamp(25rem, 65svh, 45rem); border: 0; background: #15251c; }
.demo-copy { padding-top: .65rem; }
.demo-copy h3, .iteration h3 { margin-bottom: .7rem; }
.demo-copy p { color: #e7e9dd; }

.process > h2 { margin-bottom: 2.8rem; }
.iteration { display: grid; grid-template-columns: minmax(13rem, 1fr) minmax(0, 2.3fr); align-items: start; gap: 1.5rem clamp(1.25rem, 4vw, 4rem); padding: 1.8rem 0 2.8rem; border-top: 1px solid var(--line); }
.evidence { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.1rem; }
.evidence.sketch { grid-template-columns: minmax(0,.72fr) minmax(0,1.28fr); }
.evidence.sketch figure:nth-child(3) { grid-column: 2; }
.evidence img { background: #e2ded4; aspect-ratio: 4/3; object-fit: contain; }
.evidence.sketch figure:first-child img { aspect-ratio: 4/5; }
figcaption { margin-top: .5rem; font-size: .9rem; }

.project-end { padding: 0 6% clamp(3rem, 7vw, 7rem); }

@media (max-width: 850px) {
  .demo-layout, .overview, .iteration { grid-template-columns: 1fr; }
  .demo-copy { padding-top: 0; }
  .demo-window iframe { height: clamp(23rem, 63svh, 35rem); }
}
@media (max-width: 480px) {
  .hero { min-height: 35rem; }
  .hero::after { background: linear-gradient(0deg, #101c15f5 3%, #101c1575 73%, #101c151f); }
  .hero h1 { font-size: clamp(3.2rem, 12.3vw, 5rem); }
  .demo-controls a { text-align: center; flex: 1 1 43%; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
