/* ============================================================
   HIPPOCRENE DESIGN — hippocrenedesign.com
   White gallery / coastal classic. Self-hosted fonts (no CDN).
   ============================================================ */

@font-face {
  font-family: 'Cinzel';
  src: url('../fonts/Cinzel.ttf') format('truetype');
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('../fonts/EBGaramond.ttf') format('truetype');
  font-weight: 400 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('../fonts/EBGaramond-Italic.ttf') format('truetype');
  font-weight: 400 800; font-style: italic; font-display: swap;
}

:root {
  --paper:  #FCFBF8;
  --ink:    #23231F;
  --green:  #2B4A36;
  --oyster: #E4E0D6;
  --mist:   #8C96A0;
  --measure: 62ch;
  --frame: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.1875rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

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

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

.masthead {
  text-align: center;
  padding: 3.5rem 1.5rem 0;
}
.masthead .mark { width: 72px; margin: 0 auto 1.4rem; }
.masthead .wordmark {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.05rem, 2.1vw, 1.55rem);
  letter-spacing: 0.3em;
  text-indent: 0.3em; /* re-centers tracked caps */
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ink);
}
.masthead .wordmark a { color: inherit; }
.masthead .wordmark a:hover { text-decoration: none; }
.masthead .device {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--mist);
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin-top: 0.55rem;
}

/* symmetric double rule with center lozenge */
.rule-fleuron {
  display: flex; align-items: center; justify-content: center;
  gap: 1.1rem;
  max-width: 30rem; margin: 1.9rem auto;
}
.rule-fleuron::before, .rule-fleuron::after {
  content: ""; flex: 1; height: 1px; background: var(--oyster);
}
.rule-fleuron span {
  width: 7px; height: 7px; background: var(--green);
  transform: rotate(45deg); flex: none;
}

.site-nav {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.4rem 2.6rem;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 0 1rem 0.4rem;
}
.site-nav a { color: var(--ink); padding: 0.3rem 0.1rem; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.site-nav a:hover { text-decoration: none; color: var(--green); border-bottom-color: var(--green); }
.site-nav a[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); }

.header-close { max-width: var(--frame); margin: 1.6rem auto 0; border: 0; border-top: 1px solid var(--oyster); }

/* ---------- Sections ---------- */

main { max-width: var(--frame); margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 4.5rem 0 1.5rem; text-align: center; }

.eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.3em; text-indent: 0.3em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1.1rem;
}
h1, h2 {
  font-family: 'Cinzel', serif;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink);
}
h1 { font-size: clamp(1.5rem, 3.1vw, 2.2rem); line-height: 1.3; }
h2 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.3; }

.lede {
  max-width: var(--measure);
  margin: 1.4rem auto 0;
  font-size: 1.28rem;
  color: #4B4B45;
}
.lede em { font-style: italic; }

.note {
  max-width: var(--measure);
  margin: 1.2rem auto 0;
  color: #5A5A53;
}

/* ---------- Hero ---------- */

.hero { padding: 5rem 0 1.5rem; text-align: center; }
.hero > div { position: relative; }
.hero h1 { max-width: 21ch; margin: 0 auto; }

/* ---------- Collection doors (triptych) ---------- */

.doors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3.5rem 0 1rem;
}
.door {
  display: block;
  border: 1px solid var(--oyster);
  background: #fff;
  padding: 1.1rem;
  transition: border-color .25s;
}
.door:hover { text-decoration: none; border-color: var(--green); }
.door .im { aspect-ratio: 4 / 3.4; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #fff; }
.door .im img { width: 100%; height: 100%; object-fit: cover; }
.door .im.contain img { object-fit: contain; padding: 8%; }
.door .label {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.26em; text-indent: 0.26em;
  text-transform: uppercase;
  font-size: 0.86rem;
  color: var(--ink);
  padding: 1.15rem 0 0.35rem;
  text-align: center;
}
.door:hover .label { color: var(--green); }
.door .count {
  text-align: center;
  font-style: italic;
  color: var(--mist);
  font-size: 0.95rem;
  padding-bottom: 0.4rem;
}

/* ---------- Folio plates ---------- */

.plates {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.4rem;
  margin: 3.2rem 0 2rem;
}
.plate {
  border: 1px solid var(--oyster);
  background: #fff;
  padding: 1.35rem;
  transition: border-color .25s;
}
.plate:hover { border-color: var(--green); }
.plate .im {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 5 / 3.6;
  overflow: hidden; background: #fff;
}
.plate .im img { width: 100%; height: 100%; object-fit: cover; }
.plate.contain .im img { object-fit: contain; padding: 4%; }
.plate figcaption { text-align: center; padding-top: 1.2rem; }
.plate .no {
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  letter-spacing: 0.32em; text-indent: 0.32em;
  text-transform: uppercase;
  color: var(--green);
}
.plate .desc {
  font-style: italic;
  color: #55554E;
  font-size: 1.02rem;
  margin-top: 0.3rem;
}
.plate.wide { grid-column: 1 / -1; }
.plate.wide .im { aspect-ratio: 21 / 9; }

/* ---------- Studio / prose pages ---------- */

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: left;
}
.prose p { margin: 0 0 1.2rem; }
.prose h2 { text-align: center; margin: 2.6rem 0 1.2rem; }
.prose ul { margin: 0 0 1.2rem 1.4rem; }
.prose li { margin-bottom: 0.45rem; }
.center { text-align: center; }

.legal { font-size: 1.05rem; }
.legal h2 { font-size: 1.3rem; margin: 2.2rem 0 0.9rem; text-align: left; }
.legal .updated { font-style: italic; color: var(--mist); text-align: center; margin-bottom: 2rem; }
.placeholder { background: #FFF7DE; padding: 0 0.25em; }

/* ---------- Inquiries ---------- */

.inquiry-card {
  max-width: 34rem;
  margin: 2.6rem auto 0;
  border: 1px solid var(--oyster);
  background: #fff;
  padding: 3rem 2.5rem;
}
.inquiry-card .line { margin-bottom: 1.5rem; }
.inquiry-card .k {
  font-family: 'Cinzel', serif;
  font-size: 0.74rem; letter-spacing: 0.3em; text-indent: 0.3em;
  text-transform: uppercase; color: var(--green);
  margin-bottom: 0.35rem;
}
.inquiry-card .v { font-size: 1.2rem; }

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

footer {
  margin-top: 5.5rem;
  border-top: 1px solid var(--oyster);
  text-align: center;
  padding: 3.2rem 1.5rem 3.6rem;
}
footer .mark { width: 54px; margin: 0 auto 1.1rem; opacity: 0.9; }
footer .fw {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.3em; text-indent: 0.3em;
  text-transform: uppercase; font-size: 0.86rem;
}
footer .addr { font-style: italic; color: var(--mist); font-size: 0.98rem; margin-top: 0.5rem; }
footer nav {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.3rem 1.8rem;
  margin-top: 1.6rem;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
}
footer nav a { color: #6E6E66; }
footer nav a:hover { color: var(--green); }
footer .fine {
  margin-top: 1.6rem;
  font-size: 0.92rem;
  color: var(--mist);
  font-style: italic;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .plates { gap: 1.6rem; }
}
@media (max-width: 760px) {
  .doors { grid-template-columns: 1fr; max-width: 30rem; margin-inline: auto; }
  .plates { grid-template-columns: 1fr; max-width: 32rem; margin-inline: auto; }
  .plate.wide .im { aspect-ratio: 5 / 3.6; }
  .site-nav { gap: 0.35rem 1.5rem; }
  .section { padding-top: 3.2rem; }
}

/* ---------- Epigraph & colophon ---------- */
.epigraph { padding-bottom: 2rem; }
.epigraph .greek {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.5rem;
  letter-spacing: 0.14em;
  color: var(--ink);
}
.epigraph .trans {
  font-style: italic;
  color: var(--mist);
  font-size: 1rem;
  margin-top: 0.45rem;
}
.colophon {
  text-align: center;
  font-style: italic;
  color: var(--mist);
  font-size: 1.02rem;
  margin-top: 0.6rem;
}

/* ---------- Category carousel cards ---------- */
.cat { padding-top: 3.4rem; }
.cat:first-of-type { padding-top: 1.2rem; }
.card {
  border: 1px solid var(--oyster);
  background: #fff;
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1.4rem 1.4rem;
  text-align: center;
  transition: border-color .25s;
}
.card:hover { border-color: var(--green); }
.cat-label {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.28em; text-indent: 0.28em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--ink);
}
.cat-line {
  font-style: italic;
  color: #55554E;
  font-size: 1.02rem;
  margin: 0.5rem auto 1.4rem;
  max-width: 42ch;
}
.viewport { overflow: hidden; }
.track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.slide { flex: 0 0 100%; scroll-snap-align: start; margin: 0; }
.slide .im {
  aspect-ratio: 5 / 3.4;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #fff;
}
.slide .im img { width: 100%; height: 100%; object-fit: cover; }
.slide.ct .im img { object-fit: contain; padding: 3%; }
.slide figcaption {
  font-style: italic;
  color: #55554E;
  font-size: 0.98rem;
  padding-top: 0.9rem;
}
.ctrl {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem;
  padding-top: 1rem;
}
.ctrl button {
  background: none;
  border: 1px solid var(--oyster);
  color: var(--green);
  width: 2.3rem; height: 2.3rem;
  font-size: 1.25rem; line-height: 1;
  cursor: pointer;
  transition: border-color .2s;
  font-family: 'EB Garamond', serif;
}
.ctrl button:hover { border-color: var(--green); }
.ctrl button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.count {
  font-family: 'Cinzel', serif;
  font-size: 0.76rem;
  letter-spacing: 0.24em; text-indent: 0.24em;
  color: var(--mist);
  min-width: 4.2rem;
}
.cat-foot {
  font-style: italic;
  color: var(--mist);
  font-size: 0.9rem;
  padding-top: 0.9rem;
}

/* ---------- Process ---------- */
.step-no {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--green);
  margin: 2.2rem 0 0.6rem !important;
  text-align: center;
}
.prose .step-no:first-child { margin-top: 0 !important; }
.sample-slot {
  max-width: var(--measure);
  margin: 2.4rem auto 0;
  border: 1px dashed var(--oyster);
  padding: 3rem 1.5rem;
  text-align: center;
  font-style: italic;
  color: var(--mist);
}

/* ---------- State cards (sketch / render / CAD) ---------- */
.st-tabs {
  display: flex; justify-content: center;
  gap: 2.2rem;
  margin: 0.9rem 0 1.3rem;
}
.st-tab {
  background: none; border: none; cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.24em; text-indent: 0.24em;
  text-transform: uppercase;
  color: var(--mist);
  padding: 0.35rem 0.1rem;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.st-tab:hover { color: var(--green); }
.st-tab[aria-pressed="true"] { color: var(--green); border-bottom-color: var(--green); }
.st-tab:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.st-im {
  aspect-ratio: 5 / 3.4;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #fff;
}
.st-im img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.st-im.contain img { object-fit: contain; padding: 3%; }
.st-cap {
  font-style: italic;
  color: #55554E;
  font-size: 0.98rem;
  padding-top: 0.9rem;
}

/* ---------- Contact form ---------- */
.form-card {
  max-width: 34rem;
  margin: 2.6rem auto 0;
  border: 1px solid var(--oyster);
  background: #fff;
  padding: 2.6rem 2.4rem;
  text-align: left;
}
.form-card label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--green);
  margin: 1.3rem 0 0.4rem;
}
.form-card label:first-of-type { margin-top: 0; }
.form-card input, .form-card textarea {
  width: 100%;
  border: none; border-bottom: 1px solid var(--oyster);
  background: transparent;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.1rem;
  color: var(--ink);
  padding: 0.35rem 0.1rem;
  transition: border-color .2s;
}
.form-card textarea { resize: vertical; min-height: 7rem; line-height: 1.55; }
.form-card input:focus, .form-card textarea:focus {
  outline: none; border-bottom-color: var(--green);
}
.form-card button[type="submit"] {
  display: block;
  margin: 2rem auto 0;
  background: none;
  border: 1px solid var(--green);
  color: var(--green);
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.26em; text-indent: 0.26em;
  text-transform: uppercase;
  padding: 0.75rem 2.2rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.form-card button[type="submit"]:hover { background: var(--green); color: #fff; }
.form-note {
  text-align: center;
  font-style: italic;
  color: var(--mist);
  font-size: 0.92rem;
  margin-top: 1.4rem;
}

/* ---------- Process, synced to card stages ---------- */
.proc {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem;
  max-width: 880px;
  margin: 2.4rem auto 1.8rem;
}
.proc-step .step-no { margin: 0 0 0.5rem !important; }
.proc-step p:not(.step-no) {
  font-size: 1.02rem;
  color: #4B4B45;
  line-height: 1.55;
}
@media (max-width: 760px) {
  .proc { grid-template-columns: 1fr; max-width: 30rem; gap: 1.8rem; }
}

/* ---------- Visual process columns ---------- */
.proc-step { margin: 0; }
.proc-step .p-im {
  border: 1px solid var(--oyster);
  background: #fff;
  padding: 0.6rem;
  margin-bottom: 1rem;
}
.proc-step .p-im img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }

/* ---------- Selected works strip ---------- */
.gallery { max-width: 1060px; margin: 2.4rem auto 0; }
.g-viewport { overflow: hidden; border: 1px solid var(--oyster); background: #fff; padding: 1rem; }
.g-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.g-track::-webkit-scrollbar { display: none; }
.g-track:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.g-slide {
  flex: 0 0 calc((100% - 2rem) / 3);
  scroll-snap-align: start;
  margin: 0;
}
.g-slide .im {
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #fff;
  border: 1px solid var(--oyster);
}
.g-slide .im img { width: 100%; height: 100%; object-fit: cover; }
.g-slide.ct .im img { object-fit: contain; padding: 5%; }
.g-slide figcaption { text-align: center; padding-top: 0.7rem; }
.g-cat {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.26em; text-indent: 0.26em;
  text-transform: uppercase;
  color: var(--green);
}
.g-desc {
  display: block;
  font-style: italic;
  color: #55554E;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}
@media (max-width: 760px) {
  .g-slide { flex: 0 0 82%; }
}

/* ---------- Language toggle ---------- */
.lang-toggle {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--mist);
  margin-top: 0.6rem;
}
.lang-toggle .lang-cur { color: var(--green); }
.lang-toggle a.lang-alt { color: var(--mist); }
.lang-toggle a.lang-alt:hover { color: var(--green); text-decoration: none; }

/* ---------- Zoomable process + gallery images ---------- */
.p-im img, .g-slide .im img { cursor: zoom-in; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(35, 35, 31, 0.93);
  display: flex; align-items: center; justify-content: center;
  padding: 4vw;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 999;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 92vw; max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 8px 48px rgba(0,0,0,.45);
  cursor: default;
}
.lb-close {
  position: absolute; top: 1.4rem; right: 1.8rem;
  background: none; border: none;
  color: #FCFBF8;
  font-size: 2.1rem; line-height: 1;
  cursor: pointer;
  font-family: Georgia, serif;
}
.lb-close:hover { opacity: 0.7; }

/* utility spacing (replaces inline styles; CSP style-src 'self') */
.mt-20{margin-top:2rem}.mt-16{margin-top:1.6rem}.mt-22{margin-top:2.2rem}.pt-24{padding-top:2.4rem}
.err-wrap{max-width:34rem;margin:0 auto;padding:5rem 1.25rem 4rem;text-align:center}
