/* =========================================================
   Home page
   ========================================================= */

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 8vw, 104px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.hero-copy h1 { color: var(--sawdust); max-width: 12ch; }
.hero-copy .lede { margin: 22px 0 32px; font-size: 1.15rem; color: var(--sawdust-dim); max-width: 44ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-where { margin: 28px 0 0; font-size: .95rem; color: var(--sawdust-dim); display: flex; align-items: center; gap: 8px; }
.hero-where svg { flex: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: 16ch; }
}

/* ---------- Bench carousel (stacked photos) ---------- */
.bench { position: relative; width: 100%; max-width: 440px; justify-self: center; }
.bench-stack {
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 26px 34px 0 0;   /* room for the cards peeking behind */
  touch-action: pan-y;
}
.bench-photo {
  position: absolute; inset: 0;
  margin: 0;
  border-radius: var(--radius-photo);
  overflow: hidden;
  background: #4a3423;
  box-shadow: 0 1px 0 rgba(255, 235, 200, .18) inset, 0 18px 40px rgba(10, 6, 3, .55), 0 3px 8px rgba(10, 6, 3, .4);
  transform-origin: 30% 90%;
  transition: transform .7s cubic-bezier(.22, .8, .24, 1), opacity .55s ease;
  opacity: 0; z-index: 0;
  transform: translate(26px, -24px) rotate(5deg) scale(.92);
}
/* Back photos are darkened with an overlay (much cheaper than a CSS filter) */
.bench-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: #140d08; opacity: .5;
  transition: opacity .6s ease;
}
.bench-photo.is-front::after { opacity: 0; }
.bench-photo.is-next::after  { opacity: .28; }
.bench-photo.is-after::after { opacity: .48; }
.bench-photo img, .bench-photo .img-missing { width: 100%; height: 100%; object-fit: cover; }
.bench-photo.is-front { opacity: 1; z-index: 3; transform: none; }
.bench-photo.is-next  { opacity: 1; z-index: 2; transform: translate(16px, -13px) rotate(2.5deg) scale(.965); }
.bench-photo.is-after { opacity: 1; z-index: 1; transform: translate(30px, -25px) rotate(5deg) scale(.93); }
.bench-photo.is-gone  { opacity: 0; z-index: 4; transform: translate(-60%, 30px) rotate(-9deg) scale(.96); }
.bench-photo.no-anim  { transition: none; }

.bench-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 26px 34px 12px 0;
}
.bench-caption {
  margin: 0; text-align: center;
  font-family: var(--font-display); font-weight: 500; font-style: italic;
  font-size: 1.05rem; color: var(--sawdust);
  min-height: 1.6em;
  max-width: none;
}
.round-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(242, 228, 200, .08);
  border: 2px solid rgba(242, 228, 200, .4);
  color: var(--sawdust); cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.round-btn:hover { background: rgba(242, 228, 200, .18); border-color: var(--sawdust); }

/* Tape measure — each inch is one photo, and the blade fills as
   the next photo gets closer. */
.tape {
  --n: 6;
  position: relative;
  margin-right: 34px;
  height: 50px;
  border-radius: 3px 3px 3px 3px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.35) 0 2px, transparent 2px calc(100% - 3px), rgba(90,60,10,.35) calc(100% - 3px)),
    var(--tape);
  box-shadow: 0 6px 14px rgba(10, 6, 3, .45);
  overflow: hidden;
}
.tape-ticks {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px calc(100% / var(--n))),
    repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--n) / 2 - 1px), var(--ink) calc(100% / var(--n) / 2 - 1px) calc(100% / var(--n) / 2 + 1px), transparent calc(100% / var(--n) / 2 + 1px) calc(100% / var(--n))),
    repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--n) / 4 - .5px), var(--ink) calc(100% / var(--n) / 4 - .5px) calc(100% / var(--n) / 4 + .5px), transparent calc(100% / var(--n) / 4 + .5px) calc(100% / var(--n) / 4)),
    repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--n) / 8 - .5px), rgba(43,29,19,.75) calc(100% / var(--n) / 8 - .5px) calc(100% / var(--n) / 8 + .5px), transparent calc(100% / var(--n) / 8 + .5px) calc(100% / var(--n) / 8));
  background-size: 100% 58%, 100% 42%, 100% 30%, 100% 20%;
  background-repeat: no-repeat;
  background-position: 0 0;
}
.tape-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 100%;
  background: rgba(58, 40, 27, .16);
  transform: scaleX(0); transform-origin: left center;
  pointer-events: none; will-change: transform;
}
.tape-marker {
  position: absolute; left: -1.5px; top: 0; bottom: 0; width: 3px;
  background: #b32d1e; pointer-events: none; will-change: transform;
}
.tape-marks { position: absolute; inset: 0; display: flex; }
.tape-mark {
  flex: 1 1 0;
  position: relative;
  border: 0; margin: 0; padding: 0;
  background: transparent; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  color: var(--ink);
}
.tape-mark span {
  position: absolute; left: 7px; bottom: 3px; line-height: 1;
}
.tape-mark:hover { background: rgba(58, 40, 27, .08); }
.tape-mark[aria-current="true"] span { color: #b32d1e; }
.tape-mark:focus-visible { outline-offset: -3px; outline-color: var(--ink); }

@media (max-width: 600px) {
  .bench-stack, .bench-controls, .tape { margin-right: 18px; }
  .bench-stack { margin-top: 20px; }
  .bench-photo.is-next  { transform: translate(9px, -9px) rotate(2deg) scale(.97); }
  .bench-photo.is-after { transform: translate(18px, -17px) rotate(4deg) scale(.94); }
  .tape { height: 44px; }
  .bench-caption { font-size: .98rem; }
}

/* ---------- What I build (cut list) ---------- */
/* Heading holds its own column and stays put while the list scrolls */
.build-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.build-head { position: sticky; top: 110px; margin-bottom: 0; }
.cutlist { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.cut {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name actions" "desc actions";
  gap: 6px 36px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid rgba(43, 29, 19, .28);
}
.cut h3 { grid-area: name; color: var(--ink); }
.cut p { grid-area: desc; margin: 0; }
.cut-actions { grid-area: actions; display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.cut-link {
  font: inherit; font-weight: 700; font-size: .96rem;
  color: var(--ink); background: none; border: 0; padding: 4px 0; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
  text-decoration-color: rgba(43, 29, 19, .3);
  white-space: nowrap;
  transition: text-decoration-color .2s, color .2s;
}
.cut-link:hover { text-decoration-color: var(--ink); }
.cut-link.solid { color: var(--oil-deep); text-decoration-color: var(--oil); }
.cut-link.solid:hover { color: var(--ink); text-decoration-color: var(--ink); }
.cutlist-note { margin-top: 26px; font-size: .98rem; }
.cutlist-note a { color: var(--oil-deep); font-weight: 700; }

@media (max-width: 900px) {
  .build-grid { grid-template-columns: 1fr; gap: 32px; }
  .build-head { position: static; }
}
@media (max-width: 600px) {
  .cut { grid-template-columns: 1fr; grid-template-areas: "name" "desc" "actions"; padding: 22px 0; }
  .cut-actions { justify-content: flex-start; margin-top: 8px; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.about-mark {
  justify-self: center;
  width: min(300px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 12px;
  background: radial-gradient(circle at 35% 30%, #6b4a30, #2a1c12 70%);
  box-shadow: 0 0 0 2px rgba(242, 228, 200, .18), 0 24px 50px rgba(10, 6, 3, .55);
}
.about-mark img, .about-mark .img-missing { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--maple); }
.about-copy h2 { color: var(--sawdust); margin-bottom: 22px; }
.about-copy p { color: var(--sawdust-dim); font-size: 1.1rem; }
.signoff {
  font-family: var(--font-hand); font-size: 2.3rem; line-height: 1; color: var(--oil);
  margin: 6px 0 0; transform: rotate(-3deg); transform-origin: left center; display: inline-block;
}
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 6vw, 72px);
  align-items: start;
}
.contact-copy h2 { color: var(--ink); }
.contact-copy > p { margin-top: 16px; font-size: 1.1rem; }

.steps { list-style: none; counter-reset: step; margin: 30px 0 34px; padding: 0; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 44px 1fr; gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(43, 29, 19, .22);
}
.steps li:last-child { border-bottom: 1px solid rgba(43, 29, 19, .22); }
.steps li::before {
  content: counter(step);
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  background: var(--ink); color: var(--maple-light);
}
.steps b { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.steps span { color: var(--ink-soft); font-size: .98rem; }

.contact-links { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.fb-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 8px;
  background: #1877f2; color: #fff; text-decoration: none; font-weight: 700;
}
.fb-btn:hover { background: #0f63d1; }
.place { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }

.order-form {
  position: relative;
  color: var(--sawdust);
  background-color: var(--walnut-deep);
  background-image: linear-gradient(rgba(16, 10, 6, .45), rgba(16, 10, 6, .45)), var(--grain-dark);
  background-size: auto, 1600px 600px; background-position: 0 0, center;
  border-radius: var(--radius-board);
  padding: clamp(24px, 4vw, 38px);
  box-shadow: 0 1px 0 rgba(255, 230, 190, .15) inset, 0 24px 50px rgba(20, 13, 8, .45);
}
.order-form h3 { font-size: 1.6rem; margin-bottom: 6px; }
.order-form .form-sub { color: var(--sawdust-dim); font-size: .98rem; margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; gap: 0; } }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: 1rem;
  color: var(--ink);
  background: var(--maple-light);
  border: 2px solid transparent;
  border-radius: 7px;
  padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--oil); box-shadow: 0 0 0 3px rgba(209, 143, 58, .35);
}
.field ::placeholder { color: #8d7862; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%232b1d13' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 40px;
}
.order-form .btn { width: 100%; margin-top: 4px; font-size: 1.05rem; }
.order-form .btn[disabled] { opacity: .7; cursor: default; }
.form-status { margin-top: 14px; font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: #b9e08e; }
.form-status.err { color: #ffb4a3; }
.hp { display: none; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
