:root {
  /* Brand colors: cream, purple, black, silver */
  --cream: #F4ECDC;       /* page */
  --cream-deep: #E7DCC5;  /* panels */
  --black: #141114;       /* text, dark sections */
  --ink-soft: #585058;    /* secondary text */
  --purple: #5E4F78;      /* links, buttons, focus: logo purple, deepened for legibility */
  --purple-logo: #706089; /* exact logo purple, for large marks only */
  --silver: #BFC3CA;      /* steel tape measure, marks on black */

  --stencil: "Big Shoulders Stencil Display", "Arial Narrow", sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --pencil: "Reenie Beanie", "Comic Sans MS", cursive; /* carpenter-pencil notes on tape */

  --tape: #ECE1BE;        /* masking tape */
  --graphite: #2E3430;

  --gutter: clamp(16px, 4vw, 56px);
  --measure: 34em;
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--black);
  font: 400 1.1875rem/1.6 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--purple); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--stencil); font-weight: 800; line-height: .95; margin: 0; letter-spacing: .005em; }
h2 { font-size: clamp(2.5rem, 6vw, 4.25rem); }
h3 { font-size: 1.75rem; font-weight: 600; line-height: 1.05; }
p { margin: 0 0 1em; max-width: var(--measure); }

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

/* Header */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--black); text-decoration: none; font-weight: 600; font-size: 1.0625rem; margin-right: auto; }
.mark { height: 54px; width: auto; flex: none; }
.bar nav { display: flex; gap: 22px; }
.bar nav a { color: var(--black); text-decoration: none; font-size: 1rem; }
.bar nav a:hover { color: var(--purple); }
.call { font-size: 1rem; font-weight: 600; color: var(--cream); background: var(--black); padding: 8px 14px; border-radius: 3px; text-decoration: none; white-space: nowrap; }
.call:hover { background: var(--purple); }

/* Hero: the one loud moment */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch;
  min-height: calc(100svh - 62px);
}
.hero-copy { padding: clamp(40px, 8vh, 96px) var(--gutter); display: flex; flex-direction: column; justify-content: flex-end; }
.hero h1 {
  font-size: clamp(3rem, min(8.2vw, 12vh), 8.75rem);
  line-height: .86;
  letter-spacing: -.005em;
  max-width: 9.5ch;
  margin-bottom: .35em;
  text-wrap: balance;
}
.lede { font-size: 1.3125rem; line-height: 1.55; color: var(--ink-soft); max-width: 30em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.hero-photo { margin: 0; position: relative; overflow: hidden; background: var(--black); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; animation: cut 1.1s cubic-bezier(.7,0,.2,1) both .15s; }
.hero-photo .tape { position: absolute; left: 24px; bottom: 28px; font-size: 2.1rem; }

/* Masking tape with a carpenter-pencil note, torn at both ends */
.tape {
  display: inline-block; margin: 0;
  font: 400 1.65rem/1 var(--pencil); letter-spacing: .01em; color: var(--graphite);
  background: var(--tape);
  padding: 7px 16px 5px;
  rotate: var(--tilt, -1.5deg);
  filter: drop-shadow(0 1px 1.5px rgba(20, 17, 20, .28));
  clip-path: polygon(0 6%, 4% 0, 30% 3%, 62% 0, 96% 2%, 100% 0, 98% 28%, 100% 52%, 97% 78%, 100% 100%, 70% 97%, 35% 100%, 3% 98%, 0 100%, 2% 72%, 0 46%, 3% 22%);
}

/* Tape measure under the header; the blade pulls out as the page scrolls */
.ruler {
  position: absolute; left: 0; right: 0; top: 100%; height: 18px;
  background-color: var(--silver);
  background-image:
    repeating-linear-gradient(90deg, var(--black) 0 1.5px, transparent 1.5px 48px),
    repeating-linear-gradient(90deg, transparent 0 24px, var(--black) 24px 25px, transparent 25px 48px),
    repeating-linear-gradient(90deg, var(--black) 0 1px, transparent 1px 6px);
  background-size: 100% 10px, 100% 7px, 100% 4px;
  background-repeat: no-repeat;
  clip-path: inset(0 calc((1 - var(--pulled, 0)) * (100% - 64px)) 0 0);
  border-bottom: 1px solid rgba(20, 17, 20, .35);
}
.ruler span {
  position: absolute; bottom: 0; translate: -50% 0;
  font: 800 .6875rem/1 var(--stencil); color: var(--black);
}
@keyframes cut { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .hero-photo img { animation: none; } }

.btn {
  display: inline-block; font: 600 1.0625rem/1 var(--serif);
  padding: 15px 22px; border-radius: 3px; text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--black); color: var(--black); background: transparent;
}
.btn:hover { background: var(--cream-deep); }
.btn-solid { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn-solid:hover { background: var(--black); border-color: var(--black); }

/* Sections share horizontal padding; vertical rhythm set per section */
main > section:not(.hero) { padding-inline: var(--gutter); }

/* Work */
.work { padding-block: clamp(64px, 10vw, 128px) 48px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; margin-bottom: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  font: 400 1rem/1 var(--serif); color: var(--black); cursor: pointer;
  background: transparent; border: 1px solid var(--ink-soft); border-radius: 999px; padding: 9px 16px;
}
.filters button:hover { border-color: var(--black); }
.filters button[aria-pressed="true"] { background: var(--black); border-color: var(--black); color: var(--cream); }

.grid { columns: 3 300px; column-gap: 28px; }
.piece { break-inside: avoid; margin: 0 0 40px; position: relative; padding-top: 12px; }
.piece button { all: unset; display: block; width: 100%; cursor: zoom-in; }
.piece button:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; }
.piece img { width: 100%; background: var(--cream-deep); border-radius: 2px; }
.piece figcaption { padding-top: 10px; }
.piece h3.tape { position: absolute; top: 0; left: 14px; max-width: calc(100% - 28px); font: 400 1.65rem/1 var(--pencil); pointer-events: none; }
.piece h3 { font-family: var(--serif); font-weight: 600; font-size: 1.125rem; line-height: 1.3; }
.piece p { font-size: 1rem; line-height: 1.45; color: var(--ink-soft); margin: 2px 0 0; }
.piece[hidden] { display: none; }
.more { color: var(--ink-soft); font-size: 1.0625rem; }

/* Videos */
.videos { padding-block: 48px 96px; }
.videos h2 { margin-bottom: 32px; }
.video-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 28px; }
.video-list figure { margin: 0; }
.video-list video, .video-list iframe { width: 100%; aspect-ratio: 16/9; border: 0; background: var(--black); border-radius: 2px; display: block; }
.video-list figcaption { padding-top: 10px; font-weight: 600; font-size: 1.0625rem; }

/* Source: dark band */
.source {
  position: relative; overflow: hidden;
  background: var(--black); color: var(--cream);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  padding-block: clamp(64px, 9vw, 120px);
}
.source figure { margin: 0; }
.source :focus-visible, dialog#viewer :focus-visible { outline-color: var(--silver); }
.source > :not(.rings) { position: relative; }
.rings { position: absolute; right: -14%; top: 50%; translate: 0 -50%; width: min(1000px, 95vw); color: rgba(191, 195, 202, .13); pointer-events: none; }
.source img { border-radius: 2px; max-height: 80vh; width: auto; margin-inline: auto; }
.source h2 { margin-bottom: 28px; color: #fff; }
.source p { font-size: 1.3125rem; line-height: 1.6; color: #CFCBD2; }

/* Custom order steps: a real sequence, so numbered */
.custom { padding-block: clamp(64px, 10vw, 128px); }
.custom h2 { margin-bottom: 48px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.steps li { counter-increment: step; border-top: 2px solid var(--black); padding-top: 20px; }
.steps li::before {
  content: counter(step); display: block;
  font: 800 4.5rem/1 var(--stencil); color: var(--purple-logo); margin-bottom: 12px;
}
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--ink-soft); font-size: 1.0625rem; }

/* Showroom */
.showroom {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  padding-block: 0 clamp(64px, 10vw, 128px);
}
.showroom h2 { margin-bottom: 28px; }
.showroom img { border-radius: 2px; max-height: 78vh; width: auto; }

/* Contact */
.contact {
  background: var(--cream-deep);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(40px, 6vw, 96px);
  padding-block: clamp(64px, 9vw, 112px);
}
.contact h2 { margin-bottom: 32px; }
address { font-style: normal; font-size: 1.3125rem; margin-bottom: 24px; }
.hours { display: grid; grid-template-columns: max-content 1fr; gap: 4px 24px; margin: 0 0 24px; }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; color: var(--ink-soft); }
.direct { font-size: 1.1875rem; }

.ask { display: grid; gap: 18px; align-content: start; }
.ask label { display: grid; gap: 6px; font-weight: 600; font-size: 1rem; }
.ask input, .ask select, .ask textarea {
  font: 400 1.0625rem/1.4 var(--serif); color: var(--black);
  background: var(--cream); border: 1px solid var(--ink-soft); border-radius: 3px; padding: 12px 14px; width: 100%;
}
.ask input:focus, .ask select:focus, .ask textarea:focus { border-color: var(--purple); }
.ask .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 32px var(--gutter); font-size: 1rem; color: var(--ink-soft); }
.foot p { margin: 0; }
.foot-logo { height: 150px; width: auto; }
.foot p:last-child { margin-left: auto; display: flex; gap: 18px; }

/* Viewer */
dialog#viewer { border: 0; padding: 0; max-width: none; max-height: none; width: 100vw; height: 100dvh; background: rgba(20, 17, 20, .96); color: var(--cream); }
dialog#viewer::backdrop { background: transparent; }
dialog#viewer figure { margin: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 56px 72px 20px; }
dialog#viewer img { max-height: calc(100dvh - 140px); max-width: 100%; width: auto; object-fit: contain; }
dialog#viewer figcaption { padding-top: 14px; text-align: center; font-size: 1.0625rem; }
dialog#viewer figcaption strong { display: block; color: #fff; }
dialog#viewer button { position: absolute; font: 600 1rem/1 var(--serif); color: var(--cream); background: rgba(0,0,0,.35); border: 1px solid rgba(191,195,202,.45); border-radius: 3px; padding: 12px 16px; cursor: pointer; }
dialog#viewer button:hover { background: var(--purple); border-color: var(--purple); }
.v-close { top: 12px; right: 12px; }
.v-prev { left: 12px; top: 50%; translate: 0 -50%; }
.v-next { right: 12px; top: 50%; translate: 0 -50%; }

/* Tablet and down */
@media (max-width: 900px) {
  .bar nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding-block: 40px 36px; }
  .hero-photo { aspect-ratio: 1; }
  .source, .showroom, .contact { grid-template-columns: 1fr; }
  .source img, .showroom img { max-height: 60vh; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps li::before { font-size: 3.5rem; }
}
@media (max-width: 560px) {
  body { font-size: 1.0625rem; }
  .brand span { font-size: .9375rem; }
  .mark { height: 44px; }
  .call { padding: 8px 12px; }
  .call .num { display: none; }
  .lede, .source p { font-size: 1.125rem; }
  dialog#viewer figure { padding: 60px 12px 80px; }
  .v-prev, .v-next { top: auto; bottom: 16px; translate: none; }
  .foot p:last-child { margin-left: 0; }
}
