/* ==========================================================================
   Adam Goss CNC Woodcraft — stylesheet

   Light, grainy and hands-on, in the family of josephgoss.com, roam.community
   and everworlds.online: Bricolage Grotesque for type, IBM Plex Mono for
   small labels, glass pills and a film-grain overlay.

   The palette is white with brown wood grain, like a freshly planed board:
   white surfaces, walnut-brown text and lines, and oak/amber for accents. Red
   is kept for the logo and the laser in the hero (js/main.js). Every colour,
   font and size the site uses is in :root below — change those first.
   ========================================================================== */

:root {
  /* Surfaces: white, with a warm off-white for the footer and photo placeholders */
  --bg:         #ffffff;
  --bg-deep:    #faf6f1;
  --surface:    #f3ece4;

  /* Text: dark walnut brown */
  --ink:        #1f150e;
  --ink-dim:    rgba(31, 21, 14, .72);
  --ink-faint:  rgba(31, 21, 14, .6);

  /* Lines & glass, tinted brown */
  --line:        rgba(90, 53, 25, .14);
  --line-strong: rgba(90, 53, 25, .28);
  --glass:       rgba(120, 72, 36, .05);
  --glass-hi:    rgba(120, 72, 36, .11);

  /* Wood tones. --accent is oak/amber for fills and glows; --accent-hot is the
     darker tone used for small text and marks on the white background (it
     clears WCAG AA); --walnut is the deep brown used for dark buttons. */
  --accent:      #c8894a;
  --accent-hot:  #9a5b26;
  --accent-glow: rgba(200, 120, 58, .55);
  --walnut:      #2e1c10;

  /* Type */
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Space & shape */
  --wrap: 1200px;
  --radius: 18px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

/* No background on body: the white is on html, and the wood-grain board
   (.board) sits between the two, behind the whole page. */
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, .97rem + .2vw, 1.0875rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }

h2 {
  font-size: clamp(2.3rem, 5.2vw, 4.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.035em;
  text-wrap: balance;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.015em;
}

::selection { background: var(--accent); color: #1a0f08; }

.wrap {
  width: min(100% - 3rem, var(--wrap));
  margin-inline: auto;
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 2rem, var(--wrap)); }
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: .6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Film grain over everything */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 50;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* The wood-grain board behind the whole page. It's fixed to the screen, but
   js/main.js draws the grain in page coordinates, so it scrolls with the page.
   100vh rather than 100% so it doesn't resize as a phone's toolbar hides. */
.board {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* The laser, drawn above the page while it engraves (js/main.js adds it, then
   takes it away again). */
.laser {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 30;
  pointer-events: none;
}

/* Text sitting straight on the grain gets a soft white halo, so the grain
   lines never run right up against the letters. */
.section-head,
.contact-copy,
.gallery-foot,
.foot { text-shadow: 0 0 8px #fff, 0 0 3px #fff; }

/* Small uppercase labels */
.mono-label {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.mono-label i { font-style: normal; opacity: .6; padding: 0 .2em; }

/* A kicker is a mono label with the red "spindle" dot in front of it */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .7em;
}

.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-hot);
  box-shadow: 0 0 0 4px rgba(154, 91, 38, .14), 0 0 12px rgba(200, 137, 74, .6);
}

/* Magnetic elements get their pull through `translate`, leaving `transform` free */
.mag { transition: translate .35s var(--ease); }

/* ================================================================ BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 1.02rem/1 var(--font);
  cursor: pointer;
  transition: translate .35s var(--ease), transform .3s var(--ease),
              box-shadow .3s, background .3s, border-color .3s;
}

.btn:hover { transform: scale(1.04); }

.btn .arrow,
.gallery-foot svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .3s var(--ease);
}

.btn:hover .arrow,
.gallery-foot a:hover svg { transform: translate(2px, -2px); }

.btn-primary {
  background: var(--walnut);
  color: #fff8ef;
  box-shadow: 0 12px 44px -12px var(--accent-glow);
}

.btn-primary:hover { background: #4a2e1a; box-shadow: 0 16px 60px -8px var(--accent-glow); }

.btn-ghost {
  background: var(--glass);
  border-color: var(--line-strong);
  color: var(--ink);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  background: var(--glass-hi);
  border-color: rgba(90, 53, 25, .42);
}

/* ================================================================ TOP BAR */

.topbar {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  /* left: 50% would otherwise give it only half the screen to size itself in */
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 18px 40px -18px rgba(60, 35, 15, .3);
  translate: -50% -160%;
  opacity: 0;
  transition: translate .55s var(--ease), opacity .4s;
}

.topbar.show,
.topbar:focus-within {
  translate: -50% 0;
  opacity: 1;
}

.tb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 12px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.tb-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
  transition: transform .4s var(--ease);
}

.tb-brand:hover img { transform: rotate(-8deg) scale(1.08); }

.tb-links {
  display: flex;
  gap: 2px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.tb-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .95rem;
  color: var(--ink-dim);
  transition: color .25s, background .25s;
}

.tb-links a:hover { color: var(--ink); background: var(--glass); }
.tb-links a[aria-current="true"] { color: var(--ink); background: var(--glass-hi); }

.tb-cta {
  margin-left: 4px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a0f08;
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  box-shadow: 0 8px 26px -10px var(--accent-glow);
  transition: translate .35s var(--ease), background .25s;
}

.tb-cta:hover { background: #d99a5a; }

@media (max-width: 700px) {
  .tb-links { display: none; }
}

/* =================================================================== HERO */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 90px 0 110px;
}

/* A soft white wash behind the name, so it reads cleanly over the grain. It
   fades out well inside the hero, so the grain runs on unbroken below. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 45% at 50% 52%, rgba(255, 255, 255, .6), transparent 75%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 16px;
}

/* The logo, unchanged, in a white disc — the way it looks as the app icon */
.hero-badge {
  display: inline-block;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  animation: rise 1s var(--ease) backwards, bob 5s ease-in-out 1s infinite;
}

.hero-badge img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(90, 53, 25, .12);
  box-shadow: 0 0 0 6px rgba(90, 53, 25, .05), 0 0 60px rgba(200, 137, 74, .3), 0 18px 40px -10px rgba(60, 35, 15, .3);
  transition: transform .45s var(--ease), box-shadow .3s;
}

.hero-badge:hover img {
  transform: scale(1.08) rotate(-6deg);
  box-shadow: 0 0 0 6px rgba(90, 53, 25, .08), 0 0 80px rgba(200, 137, 74, .5), 0 18px 40px -10px rgba(60, 35, 15, .3);
}

/* "Adam Goss" over "CNC Wood Craft". The size is set so the longer second
   line always fits across the screen. */
.name {
  margin-top: 22px;
  font-size: clamp(2.4rem, 11.5vw, 9rem);
  font-weight: 500;
  line-height: .92;
  letter-spacing: -.045em;
  user-select: none;
  -webkit-user-select: none;
}

.name .line {
  display: block;
  white-space: nowrap;
}

.name .word {
  display: inline-block;
  white-space: nowrap;
}

/* Each letter swells under the cursor (the router bit), and as it does a
   photo of a finished piece shows through it: the photo is the letter's
   background clipped to the glyph, and the dark fill fades out on top.
   --h is how "hot" the letter is; --f is the same, but stays 0 until a
   photo has loaded, so a letter never fades to nothing. */
.name .ch {
  --h: 0;
  --f: 0;
  display: inline-block;
  font-variation-settings: "wght" 500, "wdth" 100;
  color: var(--ink);
  background: var(--img, none) center / cover no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: rgb(31 21 14 / calc(1 - var(--f)));
  filter:
    drop-shadow(0 0 1.5px rgb(255 255 255 / calc(var(--h) * .9)))
    drop-shadow(0 8px 22px rgb(60 35 15 / .16))
    brightness(calc(1 + var(--h) * .12));
  transform: translateY(calc(var(--h) * -.06em));
  animation: rise 1.1s var(--ease) backwards;
  animation-delay: calc(var(--n, 0) * 35ms + 150ms);
}

/* The line under the name, which the laser burns into the board. js/main.js
   draws it on a canvas laid over the line (.engrave-canvas), a letter at a
   time as the laser traces each one. The real text stays underneath,
   invisible, for screen readers, search and copying. */
.engrave {
  position: relative;
  width: fit-content;
  margin: clamp(16px, 2.6vh, 26px) auto 0;
  font-size: clamp(1.05rem, .6rem + 2.4vw, 2.3rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.015em;
  white-space: nowrap;
  color: #4a230c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .9), 0 -1px 0 rgba(60, 25, 5, .14);
}

/* With JS the text waits for the laser. If the script never runs, it shows up
   on its own after a few seconds. */
.js .engrave-text {
  color: transparent;
  text-shadow: none;
  animation: engrave-fallback 0s 5s forwards;
}

.engrave.has-canvas .engrave-text { animation: none; }

@keyframes engrave-fallback {
  to { color: #4a230c; text-shadow: 0 1px 0 rgba(255, 255, 255, .9); }
}

.engrave-canvas {
  position: absolute;
  left: -14px;              /* PAD in js/main.js: room for the laser's glow */
  top: -14px;
  width: calc(100% + 28px);
  height: calc(100% + 28px);
  pointer-events: none;
}

@keyframes rise {
  from { opacity: 0; translate: 0 .5em; filter: blur(12px); }
}

@keyframes fade-up {
  from { opacity: 0; translate: 0 20px; }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.actions {
  margin-top: clamp(30px, 6vh, 48px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  animation: fade-up 1s var(--ease) .9s backwards;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fade-up 1s var(--ease) 1.4s backwards;
}

.scroll-cue .mono-label { font-size: .68rem; color: var(--ink-faint); }

.scroll-line {
  position: relative;
  width: 1px;
  height: 42px;
  overflow: hidden;
  background: var(--line);
}

.scroll-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 1px;
  height: 40%;
  background: var(--accent-hot);
  box-shadow: 0 0 8px var(--accent-hot);
  animation: drip 2.2s var(--ease) infinite;
}

@keyframes drip {
  to { top: 100%; }
}

@media (max-width: 600px) {
  .hero-badge { width: 74px; height: 74px; }
  .btn { padding: 15px 22px; }
}

@media (max-height: 640px) {
  .scroll-cue { display: none; }
}

/* =============================================================== SECTIONS */

.section {
  position: relative;
  padding: clamp(90px, 13vh, 150px) 0;
}

.section-head {
  max-width: 780px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head h2 { margin-top: 18px; }

.section-sub {
  margin-top: 18px;
  max-width: 52ch;
  font-size: 1.1rem;
  color: var(--ink-dim);
}

.count:not(:empty) { color: var(--ink-faint); }

/* Scroll-in reveal (only with JS, so nothing is hidden without it) */
.js .reveal {
  opacity: 0;
  translate: 0 36px;
  transition: opacity 1s var(--ease), translate 1s var(--ease);
}

.js .reveal.in {
  opacity: 1;
  translate: 0 0;
}

/* ================================================================== WORK */

/* Four columns on a wide screen. Landscape photos take two columns, portrait
   ones two rows (the build script picks the shape from each photo). */
.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(190px, 21vw, 272px);
  grid-auto-flow: dense;
  gap: 14px;
  counter-reset: piece;
}

.gallery-item {
  position: relative;
  counter-increment: piece;
}

.gallery-item--wide { grid-column: span 2; }
.gallery-item--tall { grid-row: span 2; }

.gallery-item figure {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: zoom-in;
  isolation: isolate;
  box-shadow: 0 24px 50px -28px rgba(60, 35, 15, .4);
  transition: transform .6s var(--ease), border-color .3s, box-shadow .4s;
  -webkit-tap-highlight-color: transparent;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.9) saturate(1.04);
  transition: transform .9s var(--ease), filter .5s;
}

.gallery-item figure:hover {
  border-color: rgba(154, 91, 38, .45);
  box-shadow: 0 30px 60px -24px rgba(60, 35, 15, .45), 0 0 50px -20px var(--accent-glow);
}

.gallery-item figure:hover img {
  transform: scale(1.05);
  filter: brightness(1) saturate(1.08);
}

/* light that follows the cursor across the photo (js sets --mx/--my) */
.gallery-item figure::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 226, 190, .16), transparent 45%);
  opacity: 0;
  transition: opacity .4s;
}

.gallery-item figure:hover::after { opacity: 1; }

/* catalogue number, top left */
.gallery-item::before {
  content: counter(piece, decimal-leading-zero);
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 4px 9px;
  border-radius: 999px;
  font: 500 .7rem/1 var(--mono);
  letter-spacing: .08em;
  color: #f4ebe0;
  background: rgba(16, 11, 7, .6);
  border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

/* "open" arrow, top right, on hover */
.gallery-item::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3e4cf url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a0f08' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / 16px no-repeat;
  box-shadow: 0 8px 24px -6px var(--accent-glow);
  opacity: 0;
  scale: .6;
  pointer-events: none;
  transition: opacity .3s, scale .4s var(--ease);
}

.gallery-item:hover::after,
.gallery-item:focus-within::after { opacity: 1; scale: 1; }

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 48px 18px 16px;
  background: linear-gradient(to top, rgba(12, 8, 6, .9), rgba(12, 8, 6, .55) 45%, transparent);
  color: #f4ebe0; /* light text: the caption sits on the photo, not the page */
  pointer-events: none;
}

.gallery-item figcaption strong {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.2;
}

.gallery-item figcaption span {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(244, 235, 224, .75);
}

/* With a mouse, the subtitle waits for hover so the photos get the room */
@media (hover: hover) and (pointer: fine) {
  .gallery-item figcaption span {
    opacity: 0;
    translate: 0 6px;
    transition: opacity .3s, translate .4s var(--ease);
  }
  .gallery-item figure:hover figcaption span,
  .gallery-item figure:focus-visible figcaption span {
    opacity: 1;
    translate: 0 0;
  }
}

.gallery-item figure:focus-visible {
  outline: 2px solid var(--accent-hot);
  outline-offset: 3px;
}

.gallery-empty {
  grid-column: 1 / -1;
  padding: 3rem;
  text-align: center;
  color: var(--ink-dim);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.gallery-foot {
  margin-top: 28px;
  text-align: center;
  color: var(--ink-dim);
}

.gallery-foot a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color .25s;
}

.gallery-foot a:hover { border-color: var(--accent-hot); }
.gallery-foot svg { width: 15px; height: 15px; }

@media (max-width: 1000px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: clamp(170px, 34vw, 300px);
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .gallery-item--wide { grid-column: auto; }
  .gallery-item--tall { grid-row: auto; }
  .gallery-item figure { aspect-ratio: 4 / 3; height: auto; }
  .gallery-item--tall figure { aspect-ratio: 4 / 5; }
}

/* =============================================================== CONTACT */

.contact {
  border-top: 1px solid var(--line);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}

.contact-copy h2 { margin: 18px 0 22px; }

.contact-copy p {
  max-width: 44ch;
  color: var(--ink-dim);
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 32px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 14px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  font-weight: 500;
  transition: translate .35s var(--ease), background .3s, border-color .3s;
}

.pill:hover { background: var(--glass-hi); border-color: var(--line-strong); }

.pill svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--accent-hot);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--radius-lg);
  /* nearly opaque, so the grain only just shows through the form */
  background: linear-gradient(160deg, rgba(252, 243, 233, .94), rgba(255, 255, 255, .9));
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(60, 35, 15, .3);
}

.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color .25s, box-shadow .25s, background .25s;
}

.field textarea { resize: vertical; min-height: 130px; }
.field ::placeholder { color: var(--ink-faint); }

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f150e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

.field select option { background: #fff; color: var(--ink); }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(90, 53, 25, .42); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-hot);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(154, 91, 38, .15);
}

.form-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 4px;
}

.form-note {
  font-size: .9rem;
  color: var(--ink-faint);
}

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

@media (max-width: 520px) {
  .contact-form { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; }
}

/* ================================================================ FOOTER */

.foot {
  padding: 40px 0 34px;
  background: rgba(250, 246, 241, .7); /* the grain shows faintly through */
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: .95rem;
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 1.08rem;
  letter-spacing: -.015em;
}

.foot-brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.foot-brand span { color: var(--ink-dim); }
.foot-brand strong { color: var(--ink); font-weight: 700; }

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
}

.foot-links a { transition: color .25s; }
.foot-links a:hover { color: var(--ink); }

.foot-legal {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: .85rem;
}

/* ============================================================== LIGHTBOX */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 84px 1fr 84px;
  align-items: center;
  padding: 24px 0;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: lb-in .3s ease;
}

.lightbox[hidden] { display: none; }

@keyframes lb-in { from { opacity: 0; } }

.lb-figure {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.lb-figure img {
  max-width: 100%;
  max-height: calc(100svh - 150px);
  width: auto;
  border-radius: 14px;
  box-shadow: 0 40px 100px -30px rgba(60, 35, 15, .45);
  transition: opacity .35s, scale .5s var(--ease);
}

.lb-figure img.loading { opacity: 0; scale: .97; }

.lb-figure figcaption {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  text-align: center;
}

.lb-text { display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 12px; }
.lb-text strong { font-size: 1.2rem; font-weight: 600; letter-spacing: -.015em; }
.lb-text span { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }
#lbCount { color: var(--ink-faint); }

.lb-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  justify-self: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  color: var(--ink);
  cursor: pointer;
  transition: background .25s, border-color .25s, transform .3s var(--ease);
}

.lb-btn:hover { background: var(--glass-hi); border-color: rgba(90, 53, 25, .42); transform: scale(1.06); }

.lb-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lb-close { position: absolute; top: 18px; right: 18px; z-index: 1; }
.lb-prev { grid-column: 1; grid-row: 1; }
.lb-next { grid-column: 3; grid-row: 1; }

.lightbox[data-single] .lb-prev,
.lightbox[data-single] .lb-next { visibility: hidden; }

@media (max-width: 700px) {
  .lightbox {
    grid-template-columns: 1fr;
    padding: 70px 12px 96px;
  }
  .lb-figure { grid-column: 1; }
  .lb-figure img { max-height: calc(100svh - 230px); }
  .lb-prev, .lb-next { position: absolute; bottom: 24px; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { left: calc(50% + 12px); }
}

body.no-scroll { overflow: hidden; }

/* ============================================================ ACCESSIBLE */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; }
  .js .engrave:not(.has-canvas) .engrave-text { color: #4a230c; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.about-copy p:not(.kicker) { color: var(--ink-dim); font-size: 1.1rem; line-height: 1.6; max-width: 55ch; }
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
}
