:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6db;
  --ink: #15140f;
  --ink-2: #55524a;
  --line: #d6d0c2;
  --accent: #e8451e;
  --card: #fffdf8;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1280px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12110e;
    --paper-2: #1b1a16;
    --ink: #f1ede3;
    --ink-2: #a8a396;
    --line: #33312a;
    --accent: #ff6a3d;
    --card: #1b1a16;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
em { font-style: italic; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.mark { font-family: var(--serif); font-size: 28px; line-height: 1; text-decoration: none; }
.mark span { color: var(--accent); }
.top nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); font-size: 15px; }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--accent); }
.nav-cta { border: 1px solid var(--ink); padding: 7px 14px; border-radius: 999px; white-space: nowrap; }
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }
@media (max-width: 560px) { .top nav a:not(.nav-cta) { display: none; } }

/* Shared */
main > section, main > article, .section-label { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow, .num, .section-label span, .when, .facts dt {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}
.section-label { display: flex; align-items: center; gap: 16px; padding-top: clamp(56px, 9vw, 120px); }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.solutions .section-label, .history .section-label { padding-inline: 0; }
.big { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6.4vw, 84px); line-height: 1; letter-spacing: -0.01em; margin-top: 28px; }

/* Hero */
.hero { padding-top: clamp(48px, 9vw, 120px); }
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(46px, 9.2vw, 136px); line-height: 0.96; letter-spacing: -0.02em;
  max-width: 14ch; margin-top: 22px; text-wrap: balance;
}
.hero-foot { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 6vw, 96px); margin-top: clamp(36px, 6vw, 80px); align-items: end; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; max-width: 52ch; }
.hero-index { border-top: 1px solid var(--ink); }
.hero-index a {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; gap: 8px;
  padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500;
  transition: padding 0.25s ease, color 0.25s ease;
}
.hero-index a:hover { padding-left: 10px; color: var(--accent); }
.hero-index span { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.hero-index i { font-style: normal; font-size: 14px; font-weight: 400; color: var(--ink-2); }
@media (max-width: 860px) {
  .hero-foot { grid-template-columns: 1fr; }
  .hero-index a { grid-template-columns: 36px 1fr; }
  .hero-index i { grid-column: 2; }
}

/* Projects */
.project {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px);
  align-items: center; padding-top: clamp(48px, 8vw, 112px);
}
.project.flip .project-copy { order: 2; }
.project h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 54px); line-height: 1.04; letter-spacing: -0.01em; margin: 14px 0 22px; text-wrap: balance; }
.project-copy p + p { margin-top: 14px; }
.project-copy > p:not(.num) { color: var(--ink-2); max-width: 56ch; }
.tag { margin-left: 8px; padding: 2px 8px; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; font-size: 11px; }
.facts { margin-top: 28px; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dd { font-size: 15px; line-height: 1.5; }
.project-visual { min-width: 0; }
.show { --ratio: 4 / 3; --stage: var(--card); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 18px; }
.slides::-webkit-scrollbar { display: none; }
.slides li { flex: 0 0 100%; scroll-snap-align: start; min-width: 0; }
.slides img { width: 100%; aspect-ratio: var(--ratio); object-fit: contain; background: var(--stage); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.45); }
.slides p { margin-top: 14px; font-size: 13.5px; color: var(--ink-2); max-width: 52ch; min-height: 3.2em; }
.show-nav { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.show-nav button { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: 18px; cursor: pointer; transition: background 0.2s, color 0.2s; }
.show-nav button:hover { background: var(--ink); color: var(--paper); }
.show-count { font-family: var(--mono); font-size: 12px; color: var(--ink-2); min-width: 44px; text-align: center; }
.show-teague { --ratio: 1 / 1; --stage: #111; }
.show-hayloft { --ratio: 1600 / 1112; --stage: #f1edf3; }
.show-retail { --ratio: 4 / 3; --stage: #fff; }
.show-retail .slides img { border: 12px solid #1c1b18; border-radius: 26px; }
.show-flow { --ratio: 1600 / 1050; --stage: #fff; }
.features { margin-top: 18px; display: grid; gap: 10px; color: var(--ink-2); font-size: 16px; max-width: 58ch; }
.features b { color: var(--ink); font-weight: 600; }
.hero-id { display: flex; align-items: center; gap: 14px; }
.hero-id img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
@media (max-width: 860px) {
  .project { grid-template-columns: minmax(0, 1fr); }
  .project.flip .project-copy { order: 0; }
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
}

.frame-hayloft { border-radius: 22px; border: 0; }

/* Solutions */
.sol-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(32px, 5vw, 64px); border-top: 1px solid var(--ink); counter-reset: sol; }
.sol-grid li { counter-increment: sol; padding: 26px 28px 34px 0; border-bottom: 1px solid var(--line); }
.sol-grid li::before { content: "0" counter(sol); font-family: var(--mono); font-size: 12px; color: var(--accent); }
.sol-grid h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.1; margin: 10px 0 10px; }
.sol-grid p { color: var(--ink-2); font-size: 16px; max-width: 36ch; }
@media (max-width: 960px) { .sol-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .sol-grid { grid-template-columns: 1fr; } .sol-grid li { padding-right: 0; } }

/* History */
.timeline { margin-top: clamp(32px, 5vw, 64px); border-top: 1px solid var(--ink); }
.timeline li { display: grid; grid-template-columns: minmax(110px, 1fr) 3fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.timeline .when { padding-top: 8px; color: var(--accent); }
.timeline h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.1; }
.timeline p { color: var(--ink-2); margin-top: 8px; max-width: 62ch; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* Contact */
.contact { padding-top: clamp(72px, 12vw, 160px); padding-bottom: clamp(56px, 9vw, 120px); text-align: left; }
.contact h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 7.4vw, 104px); line-height: 0.98; letter-spacing: -0.02em; max-width: 14ch; margin: 18px 0 22px; text-wrap: balance; }
.contact > p:not(.eyebrow) { font-size: 19px; color: var(--ink-2); max-width: 46ch; }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 30px; }
.button { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; padding: 15px 26px; border-radius: 999px; transition: transform 0.2s ease; }
.button:hover { transform: translateY(-2px); }
.text-link { text-underline-offset: 4px; }
.text-link:hover { color: var(--accent); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 22px var(--gutter); border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }

/* Reveal */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js-reveal .reveal.in { opacity: 1; transform: none; }

[id] { scroll-margin-top: 72px; }

.lede a { text-decoration-color: var(--accent); text-underline-offset: 4px; }
.lede a:hover { color: var(--accent); }
