/* ==========================================================
   Appler Made — shared styles
   Dark hero taken from the photo; light paper and linen
   for the supporting sections; burnt terracotta highlight.
   ========================================================== */

:root {
  --wall: #2d2620;        /* sampled from the photo's wall */
  --wall-deep: #26201b;
  --floor: #6a3a1c;       /* sampled from the polished floor */
  --cream: #f1e8da;
  --cream-dim: #cfc3b1;
  --terracotta: #6a332d;  /* burnt terracotta highlight */
  --terracotta-deep: #55271f;
  --paper: #f5f2ed;       /* light supporting sections */
  --linen: #ebe3d5;       /* creamy natural, for Steve's section */
  --ink: #2b2420;
  --ink-soft: #5f554d;
  --hairline: rgb(43 36 32 / .14);

  --sans: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --max: 78rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: .5rem 1rem;
  background: var(--ink);
  color: var(--paper);
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2.25rem) var(--gutter);
  padding-top: max(clamp(1.25rem, 3vw, 2.25rem), env(safe-area-inset-top));
  color: var(--cream);
}

.site-header--solid {
  position: sticky;
  top: 0;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
  /* line the logo up with the page content below */
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
}

.logo {
  font-size: clamp(1rem, 1.6vw, 1.45rem);
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.75rem);
  font-size: clamp(.95rem, 1.2vw, 1.1rem);
}

.nav a {
  text-decoration: none;
  padding-block: .25rem;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav a:hover,
.nav a[aria-current="page"] { border-color: var(--terracotta); }
.site-header:not(.site-header--solid) .nav a:hover { border-color: var(--cream); }

/* ---------- Hero ----------
   The text sits in normal flow; the photo is pulled up beneath
   it by a fixed fraction of its own width. That fraction lands
   in the empty wall above the vase, so the copy never collides
   with the table — on a phone or a wide monitor. If the text is
   taller than the overlap (small screens), the extra height is
   just more "wall" in the same colour.                        */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--wall);
  color: var(--cream);
}

.hero__text {
  position: relative;
  z-index: 2;
  padding: clamp(7rem, 9vw, 9rem) var(--gutter) 0;
  max-width: 52rem;
}

.hero h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.6rem, 5.4vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero__lede {
  margin: 1.25rem 0 0;
  max-width: 32rem;
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  line-height: 1.45;
  color: var(--cream-dim);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding: .95rem 1.6rem;
  border: 1px solid var(--terracotta);
  background: var(--terracotta);
  color: var(--cream);
  text-decoration: none;
  font-size: .82rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  transition: background-color .25s, color .25s;
}
.button svg { width: 2rem; height: auto; transition: transform .25s; }
.button:hover { background: var(--terracotta-deep); border-color: var(--terracotta-deep); }
.button:hover svg { transform: translateX(4px); }

.hero__photo {
  position: relative;
  z-index: 1;
  margin: -21vw 0 0;     /* overlap into the photo's empty wall */
}

.hero__photo img { width: 100%; }

/* Mid-size screens: the copy is relatively taller, so overlap less */
@media (min-width: 701px) and (max-width: 1360px) {
  .hero__photo { margin-top: -18vw; }
}

/* Phones: crop in on the table so it isn't tiny,
   and pull the photo up a matching amount */
@media (max-width: 700px) {
  .hero__photo { margin-top: -28vw; }
  .hero__photo img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: 50% 50%;
  }
}

/* soften the photo's top edge into the page colour */
.hero__photo::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 12vw;
  background: linear-gradient(var(--wall), rgb(45 38 32 / 0));
  pointer-events: none;
}

.hero__caption {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: clamp(1.5rem, 6vw, 5rem);
  text-align: left;
}
.hero__caption p { margin: 0; }
.hero__caption-title {
  font-style: italic;
  font-size: clamp(1rem, 1.7vw, 1.4rem);
}
.hero__caption-meta {
  margin-top: .4rem !important;
  font-size: clamp(.7rem, .9vw, .8rem);
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1.8;
  color: var(--cream-dim);
}

/* ---------- Meet Steve: split panel ----------
   Text centred on a plaster-textured linen half,
   photo bleeding to the edge on the other half.     */

.intro {
  display: grid;
  color: var(--ink);
  background-color: var(--linen);
  /* faint plaster grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42  0 0 0 0 .34  0 0 0 0 .26  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.intro__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 4vw, 5rem);
}

.intro__eyebrow {
  margin: 0 0 clamp(1.25rem, 2.5vw, 2rem);
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(.8rem, 1vw, .95rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terracotta);
}

.intro h2 {
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.85vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* each sentence on its own line when there's room */
.intro h2 span { display: inline-block; }

.intro__text p:not(.intro__eyebrow) {
  margin: 0 0 1em;
  max-width: 34rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  line-height: 1.75;
  color: var(--ink-soft);
}
.intro__text p:last-child { margin-bottom: 0; }

.intro__photo {
  position: relative;
  min-height: 70vw;
  background: #ddd3c4;
}
.intro__photo img,
.intro__photo .placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder--portrait {
  background: linear-gradient(170deg, #e2d8c9, #d2c6b4);
}

@media (min-width: 860px) {
  .intro { grid-template-columns: 1fr 1fr; }
  .intro__photo { min-height: 0; }
  .intro__text { min-height: min(52rem, 100svh); }
}

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

.site-footer {
  padding: clamp(3rem, 7vw, 5rem) var(--gutter);
  padding-bottom: max(clamp(3rem, 7vw, 5rem), env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
  background: var(--paper);
}
.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: baseline;
}
.site-footer p { margin: 0; color: var(--ink-soft); }
.site-footer a { color: var(--ink); text-decoration-color: var(--terracotta); text-underline-offset: .25em; }

/* Work page: terracotta menu bar */
.page-work .site-header--solid {
  background: color-mix(in srgb, var(--terracotta) 96%, transparent);
  border-bottom: 0;
  color: var(--cream);
}
.page-work .site-header--solid .nav a:hover,
.page-work .site-header--solid .nav a[aria-current="page"] { border-color: var(--cream); }

/* Work page: terracotta footer */
.page-work .site-footer {
  background: var(--terracotta);
  border-top: 0;
}
.page-work .site-footer p { color: rgb(241 232 218 / .8); }
.page-work .site-footer a { color: var(--cream); text-decoration-color: rgb(241 232 218 / .6); }
.page-work .site-footer a:hover { text-decoration-color: var(--cream); }

/* ---------- Work page ---------- */

.work-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter) clamp(1.5rem, 3vw, 2.5rem);
}
/* Intro copy + rotating images */
.work-head {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (min-width: 700px) {
  .work-head { grid-template-columns: 1.15fr 1fr; }
}

/* Portrait frame to suit the workshop photos */
.slideshow {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 80svh;
  width: 100%;
  overflow: hidden;
  background: #e6dfd4;
}
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.4s ease, transform 6s ease-out;
}
.slide.is-active {
  opacity: 1;
  transform: scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; transform: none; }
}

.work-head h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.05;
}
.work-head p {
  margin: 1rem 0 0;
  max-width: 34rem;
  font-style: italic;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
}

.work-head p.work-head__note {
  margin-top: 1rem;
  font-style: normal;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.medium-switch {
  display: flex;
  gap: .75rem;
  margin-top: 2rem;
}
.medium-switch a {
  padding: .6rem 1.25rem;
  border: 1px solid var(--hairline);
  text-decoration: none;
  font-size: .82rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: border-color .2s, background-color .2s;
}
.medium-switch a:hover { border-color: var(--terracotta); color: var(--terracotta); }

.medium {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
  scroll-margin-top: 4.5rem;
}
.medium + .medium { border-top: 1px solid var(--hairline); }

/* Heading on top, intro below it running the width of the tiles */
.medium__head {
  display: grid;
  gap: clamp(.75rem, 1.5vw, 1.1rem);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.medium__head h2 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
  line-height: 1.1;
}
.medium__head p { margin: 0; color: var(--ink-soft); }
.medium__intro p + p { margin-top: .9em; }



.pieces {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.75rem, 3vw, 2.75rem) clamp(1rem, 2.5vw, 2rem);
}

.piece figure { margin: 0; }

.piece__img {
  aspect-ratio: 1 / 1;   /* square frames keep whole pieces in view */
  overflow: hidden;
  background: #e6dfd4;
}
.piece__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Wide photos that can't be cropped square without cutting the piece:
   show the whole photo, centred on a soft mat */
.piece__img--fit { display: grid; place-items: center; background: #e9e1d6; }
.piece__img--fit img { height: auto !important; object-fit: contain; }

/* Placeholder frames until real photos arrive */
.placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgb(241 232 218 / .55);
}
.placeholder--wood {
  background:
    repeating-linear-gradient(100deg, rgb(255 255 255 / .03) 0 2px, transparent 2px 11px),
    linear-gradient(160deg, #8a5a33, #5e3a20);
}
.placeholder--clay {
  background:
    radial-gradient(circle at 50% 58%, rgb(106 51 45 / .16) 0 22%, transparent 23%),
    linear-gradient(160deg, #e4ddd2, #d6ccbe);
}
.placeholder--clay,
.placeholder--portrait { color: rgb(43 36 32 / .5); }

.piece figcaption { padding-top: .9rem; }

/* Clay: four across on desktop */
.pieces--clay .piece__img { background: #e9e1d6; }
.pieces--clay .piece__img img[src*="vase"] { object-position: 50% 80%; }
@media (min-width: 1000px) {
  .pieces--clay { grid-template-columns: repeat(4, 1fr); }
}

/* line the inquiry links up across a row */
.piece figure { display: flex; flex-direction: column; height: 100%; }
.piece figcaption { display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.piece .inquire { margin-top: auto; }
.piece figcaption > :nth-last-child(2) { margin-bottom: .9rem; }  /* space above the link */

/* "Inquire to Purchase" / "Inquire About Similar Work" */
.inquire {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .9rem;
  padding-bottom: .15rem;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  font-size: 1rem;
  text-decoration: none;
  transition: color .2s;
}
.inquire svg { width: .6rem; height: .6rem; transition: transform .2s; }
.inquire:hover { color: var(--terracotta); }
.inquire:hover svg { transform: translate(2px, -2px); }

.piece__desc {
  margin: .6rem 0 0;
  max-width: 34ch;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.piece h3 {
  margin: 0;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.3;
}
.piece__meta {
  margin: .2rem 0 0;
  font-size: .95rem;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- Phones and portrait tablets ---------- */

@media (max-width: 900px) {
  /* caption moves just below the photo, on a strip that continues the floor */
  .hero__caption {
    position: static;
    padding: 1.25rem var(--gutter) 1.75rem;
    background: #4a2a16;
  }
}

/* Bigger tap areas for small links on touch screens (looks unchanged) */
@media (pointer: coarse) {
  .nav a, .inquire, .logo { position: relative; }
  .nav a::after, .inquire::after, .logo::after {
    content: "";
    position: absolute;
    inset: -10px -6px;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .site-header--solid { flex-direction: row; align-items: center; }
  .site-header--solid .logo { font-size: .9rem; letter-spacing: .24em; }
  .hero__text { padding-top: 8.5rem; }
  .pieces { grid-template-columns: 1fr 1fr; gap: 1.5rem .9rem; }
  .piece h3 { font-size: 1.05rem; }
  .piece__meta { font-size: .85rem; }
  .piece__desc { font-size: .85rem; line-height: 1.5; }
  .placeholder { font-size: .62rem; }
}
