/* Palette sampled from the two spoon photos. */
:root {
  --knot: #2d241c;        /* darkest knot in the bark */
  --bark: #6a6157;        /* shaded bark */
  --weathered: #aca290;   /* sun-greyed bark */
  --driftwood: #ddcaad;   /* palest bark highlights */
  --honey: #e1bd8c;       /* freshly carved spoon bowl */
  --heartwood: #6b4318;   /* deep grain lines in the bowl */

  --font-display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --wordmark-size: clamp(3.75rem, 13.6vw, 17rem);
  --wordmark-size-narrow: 18vw;
  --wordmark-leading: 0.95;
  --tagline-size: clamp(1.125rem, 2.1vw, 1.75rem);
  --heading-size: clamp(2rem, 4.2vw, 3.5rem);
  --body-size: 1.125rem;
  --email-size: clamp(1rem, 1.7vw, 1.375rem);
  --small-size: 0.9375rem;

  --plank-aspect: 2400 / 931;
  --plank-aspect-narrow: 4 / 3;
  --plank-focus-narrow: 12% 50%;   /* keep the bowl in frame when cropped */
  --narrow-breakpoint-gap: 2.5rem;

  --reveal-duration: 1600ms;
  --reveal-ease: cubic-bezier(0.22, 0.61, 0.21, 1);
  --settle-duration: 900ms;
  --settle-delay: 250ms;

  --focus-ring: 3px;
  --underline-thickness: 0.09em;
  --underline-offset: 0.22em;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--knot);
  color: var(--driftwood);
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.55;
}

img { display: block; width: 100%; height: auto; }
picture { display: block; }
p { margin: 0; }

/* ---------- Masthead ---------- */

.masthead {
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(1.75rem, 4vw, 3.5rem);
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--wordmark-size);
  line-height: var(--wordmark-leading);
  letter-spacing: -0.02em;
  white-space: nowrap;
  /* Letters are filled with the grain of the carved spoon bowl. */
  color: var(--honey);
  background-color: var(--honey);
  background-image: url("/img/grain.jpg");
  background-image: image-set(url("/img/grain.webp") type("image/webp"), url("/img/grain.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Room for descenders so the clipped fill is not cut off. */
  padding-bottom: 0.08em;
  margin-left: -0.04em;
}

.tagline {
  margin-top: clamp(0.75rem, 1.6vw, 1.5rem);
  font-size: var(--tagline-size);
  color: var(--weathered);
  text-wrap: balance;
}

/* ---------- Full-width spoon ---------- */

.plank img {
  aspect-ratio: var(--plank-aspect);
  object-fit: cover;
}

/* ---------- Contact ---------- */

.bench {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  align-items: end;
  background: var(--driftwood);
  color: var(--knot);
}

.bench-photo img {
  height: 100%;
  object-fit: cover;
}

.bench-text {
  padding: clamp(2rem, 5vw, 5rem) var(--gutter);
}

.bench-text h2 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--heading-size);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.email {
  display: inline-block;
  margin-top: 0.35em;
  font-size: var(--email-size);
  font-weight: 600;
  color: var(--heartwood);
  text-decoration: underline;
  text-decoration-thickness: var(--underline-thickness);
  text-underline-offset: var(--underline-offset);
  overflow-wrap: anywhere;
}

.email:hover { color: var(--knot); }

.email:focus-visible {
  outline: var(--focus-ring) solid var(--knot);
  outline-offset: var(--focus-ring);
}

/* ---------- Footer ---------- */

.colophon {
  padding: 1.5rem var(--gutter);
  font-size: var(--small-size);
  color: var(--weathered);
}

/* ---------- Narrow screens ---------- */

@media (max-width: 56rem) {
  .bench { grid-template-columns: minmax(0, 1fr); }
  .bench-text { padding-block: var(--narrow-breakpoint-gap); }
}

@media (max-width: 36rem) {
  .wordmark {
    font-size: var(--wordmark-size-narrow);
    white-space: normal;
  }
  .plank img {
    aspect-ratio: var(--plank-aspect-narrow);
    object-position: var(--plank-focus-narrow);
  }
}

/* ---------- One load moment: the spoon is drawn in, bowl first ---------- */

@media (prefers-reduced-motion: no-preference) {
  .plank img {
    animation: draw-in var(--reveal-duration) var(--reveal-ease) both;
  }
  .wordmark, .tagline {
    animation: settle var(--settle-duration) ease-out both;
  }
  .tagline { animation-delay: var(--settle-delay); }
}

@keyframes draw-in {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes settle {
  from { opacity: 0; }
  to   { opacity: 1; }
}
