/* ------------------------------------------------------------------
   Ben Sutton Ceramics — site styles
   Plain CSS, no build step. Warm, minimal, image-forward.
------------------------------------------------------------------ */

:root {
  --bg:        #faf8f5;   /* warm off-white ground */
  --bg-alt:    #f1ece4;   /* slightly deeper warm panel */
  --ink:       #252019;   /* warm near-black text */
  --ink-soft:  #6f675d;   /* muted secondary text */
  --line:      #e4ded4;   /* hairline */
  --accent:    #8a6a4f;   /* warm brown, used sparingly */
  --accent-dk: #6f5340;

  --maxw: 1180px;
  --gap: clamp(0.9rem, 2.4vw, 1.8rem);
  --pad: clamp(1.15rem, 5vw, 3rem);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Bitter", Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: .01em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
p { margin: 0 0 1.15em; }
.lead { font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.5; color: var(--ink); }
.eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; color: var(--ink-soft); margin: 0 0 1.2rem; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.prose { max-width: 64ch; }

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding-block: clamp(1.1rem, 3vw, 1.8rem);
}
.brand { display: inline-block; line-height: 0; }
.wordmark-img {
  height: clamp(21px, 5.2vw, 33px);
  width: auto;
}
.site-nav { margin-top: clamp(.8rem, 2vw, 1.15rem); }
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(1rem, 4vw, 2.4rem);
}
.site-nav a {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .74rem;
  color: var(--ink-soft);
  padding-block: .3rem;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .74rem;
  padding: .85em 1.9em;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--accent-dk); border-color: var(--accent-dk); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  width: 100%;
  height: clamp(360px, 72vh, 720px);
  overflow: hidden;
  background: var(--bg-alt);
}
.hero picture, .hero img { width: 100%; height: 100%; }
.hero img { object-fit: cover; object-position: center 42%; }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,17,14,.42) 0%, rgba(20,17,14,.05) 42%, transparent 70%);
}
.hero__caption {
  position: absolute; left: 0; right: 0; bottom: clamp(1.4rem, 5vw, 3rem);
  text-align: center; color: #fff; padding-inline: var(--pad);
}
.hero__caption p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.6vw, 1.7rem);
  letter-spacing: .02em;
  text-shadow: 0 1px 12px rgba(0,0,0,.35);
}

/* ---------- Intro block ---------- */
.intro { text-align: center; }
.intro .prose { margin-inline: auto; }
.intro__links { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.8rem; }

/* ---------- Gallery ---------- */
.gallery-grid { column-count: 3; column-gap: var(--gap); }
@media (max-width: 980px) { .gallery-grid { column-count: 2; } }
@media (max-width: 560px)  { .gallery-grid { column-count: 1; } }

.tile {
  display: block;
  margin: 0 0 var(--gap);
  break-inside: avoid;
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  cursor: zoom-in;
}
.tile img { width: 100%; height: auto; transition: transform .6s cubic-bezier(.2,.6,.2,1), opacity .3s ease; }
.tile::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(20,17,14,0); transition: background .3s ease;
}
.tile:hover img, .tile:focus-visible img { transform: scale(1.035); }
.tile:hover::after { background: rgba(20,17,14,.06); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(24,21,18,.95);
  display: flex; align-items: center; justify-content: center; padding: clamp(1rem, 4vw, 3rem);
  opacity: 0; transition: opacity .22s ease; }
.lightbox.is-open { opacity: 1; }
/* Ensure the hidden attribute truly hides the overlay (the display:flex above otherwise
   overrides the browser default [hidden]{display:none}, leaving an invisible click-blocking layer). */
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 1rem; max-width: 100%; max-height: 100%; }
.lightbox img { max-width: 100%; max-height: 82vh; width: auto; height: auto; box-shadow: 0 16px 50px rgba(0,0,0,.5); background: var(--bg-alt); }
.lightbox figcaption { color: #e9e3d8; font-size: .82rem; letter-spacing: .03em; text-align: center; max-width: 60ch; }
.lb-btn { position: absolute; background: none; border: 0; color: #f3efe7; cursor: pointer;
  font-size: 2rem; line-height: 1; padding: .5rem .8rem; opacity: .8; transition: opacity .2s ease; }
.lb-btn:hover { opacity: 1; }
.lb-close { top: clamp(.5rem,2vw,1.2rem); right: clamp(.5rem,2vw,1.2rem); font-size: 1.9rem; }
.lb-prev { left: clamp(.2rem,1.5vw,1rem); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(.2rem,1.5vw,1rem); top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) { .lb-prev, .lb-next { font-size: 1.5rem; } }

/* ---------- About ---------- */
.about-lead { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.about-lead__img { background: var(--bg-alt); }
@media (max-width: 760px) { .about-lead { grid-template-columns: 1fr; } }
.about-body { margin-top: clamp(2rem, 5vw, 3.5rem); }
.about-body .prose { margin-inline: auto; }
.about-figure { margin: clamp(2rem,5vw,3.5rem) auto 0; max-width: 820px; }
.about-figure figcaption { color: var(--ink-soft); font-size: .82rem; text-align: center; margin-top: .7rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(1.8rem, 5vw, 4rem); }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-aside a { color: var(--accent-dk); border-bottom: 1px solid var(--line); }
.contact-aside a:hover { border-bottom-color: var(--accent-dk); }

.form-field { margin-bottom: 1.15rem; }
.form-field label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-soft); margin-bottom: .45rem; }
.form-field input, .form-field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 2px;
  padding: .7em .8em; transition: border-color .2s ease;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--accent); outline: none; }
.form-field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 1rem; font-size: .95rem; }
.form-status.is-error { color: #a2402f; }
.form-status.is-ok { color: var(--accent-dk); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  text-align: center;
  padding-block: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--ink-soft);
  font-size: .8rem;
  letter-spacing: .04em;
}
.site-footer a { border-bottom: 1px solid var(--line); }
.site-footer a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.footer-mark { width: 40px; height: auto; margin: 0 auto .9rem; opacity: .8; }

/* ---------- Page head ---------- */
.page-head { text-align: center; padding-top: clamp(2rem, 6vw, 4rem); }
.page-head h1 { margin-bottom: .3rem; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-lg { margin-top: clamp(2rem, 5vw, 3.5rem); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
