/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body, h1, h2, h3, p, ul, ol, figure, blockquote, fieldset, legend, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg, picture { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

body {
  position: relative;
  overflow-x: clip;
  background: var(--limestone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--ink);
}

/* Layout */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}
.section {
  position: relative;
  padding-block: var(--section-y);
}

/* Mullion grid — faint drafting lines behind the page */
.drafting {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.drafting__cols {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  height: 100%;
  opacity: .06;
}
.drafting__cols i { border-left: 1px solid var(--ink); }
.drafting__cols i:last-child { border-right: 1px solid var(--ink); }

/* Type */
.h1, .h2, .h3 {
  font-family: var(--font-display);
  font-optical-sizing: none;
  font-weight: 380;
}
.h1 {
  font-size: var(--text-h1);
  font-variation-settings: "opsz" 144, "SOFT" 50;
  line-height: 1.18;
  letter-spacing: -.02em;
}
.h2 {
  font-size: var(--text-h2);
  font-variation-settings: "opsz" 120, "SOFT" 50;
  line-height: 1.02;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.h3 {
  font-size: var(--text-h3);
  font-variation-settings: "opsz" 48, "SOFT" 50;
  line-height: 1.12;
  letter-spacing: -.01em;
}
.h1 em, .h2 em { font-style: italic; }

.prose { max-width: 62ch; }
.prose--soft { color: var(--ink-soft); }

.label {
  font-size: var(--text-label);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* SplitText masks: leave room for descenders while lines rise */
.line-mask {
  padding-bottom: .35em;
  margin-bottom: -.35em;
  padding-inline: .06em;
  margin-inline: -.06em;
}

/* Buttons */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 26px;
  overflow: hidden;
  background: var(--sun);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: color .3s var(--ease-out);
}
.btn::before { /* hover fill lifts like a sash */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--sun-deep);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .45s var(--ease-sash);
}
.btn:hover, .btn:active { color: var(--on-sun-deep); }
.btn:hover::before, .btn:active::before { transform: scaleY(1); }
.btn--small { min-height: 44px; padding: 8px 18px; font-size: 1rem; }
.btn--ghost { background: transparent; }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover, .btn--ghost:active { color: var(--limestone); }

/* Text link with drawn arrow */
.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.link svg { flex: none; transition: transform .35s var(--ease-out); }
.link:hover svg { transform: translateX(5px); }

/* House line style for icons and drawings */
.ico {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

/* Dimension lines */
.dim {
  position: absolute;
  color: var(--ink);
  pointer-events: none;
}
.dim__line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
}
.dim__line line {
  stroke: currentColor;
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.dim::before, .dim::after { /* end ticks, drafted at 45° */
  content: "";
  position: absolute;
  background: currentColor;
  transform: rotate(-45deg);
}
.dim--v { width: 15px; }
.dim--v::before, .dim--v::after { left: 0; width: 15px; height: 1px; }
.dim--v::before { top: 0; }
.dim--v::after { bottom: 0; }
.dim--h { height: 15px; }
.dim--h::before, .dim--h::after { top: 0; width: 1px; height: 15px; }
.dim--h::before { left: 0; }
.dim--h::after { right: 0; }
.dim__tag {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 5px 7px;
  background: var(--dim-bg, var(--limestone));
  font-size: var(--text-label);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .08em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.dim--v .dim__tag {
  writing-mode: vertical-rl;
  padding: 7px 5px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--limestone);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

@media (max-width: 899px) {
  .drafting__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .drafting__cols i:nth-child(n + 5) { display: none; }
  .drafting__cols i:nth-child(4) { border-right: 1px solid var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
