/* Dylin Hardcastle — site styles */

:root {
  --bg: #f8f4ee;
  --bg-2: #f1ebe2;
  --ink: #1c1a18;
  --ink-2: #4a4541;
  --muted: #6b645d;
  --line: #ddd5c9;
  --accent: #a8425c;
  --accent-2: #e9c7cf;
  --sea: #1b3a4b;
  --sea-2: #9fbfcf;
  --max: 1120px;
  --serif: "Libre Baskerville", Baskerville, "Baskerville Old Face", "Hoefler Text", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
p a, .prose a, .lede a, .bullets a, .cv-item a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--sea-2);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
p a:hover, .prose a:hover, .lede a:hover, .bullets a:hover, .cv-item a:hover { color: var(--sea); text-decoration-color: var(--sea); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.1vw, 1.5rem); }

.wrap { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }

.eyebrow {
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  margin-top: 50px;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}
.site-header .wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1.9rem 0 1.5rem;
  transition: padding .3s ease, gap .3s ease;
}
.brand {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: .005em;
  line-height: 1.1;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 1.8rem; }
.nav a {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: .3rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-color: var(--sea); }

/* The nav is short enough to stay visible on phones, so no menu button is needed */
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .site-header { margin-top: 32px; }
  .site-header .wrap { padding: 1.4rem 0 1.15rem; }
  .brand { font-size: 1.45rem; }
  .nav ul { gap: .2rem 1.1rem; }
  .nav a { font-size: .74rem; letter-spacing: .12em; }
}

.brand-text { display: block; transition: opacity .2s ease, transform .3s ease; }
.brand-mark {
  display: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  letter-spacing: .02em;
  color: var(--ink);
  line-height: 1;
  padding-bottom: .15rem;
  animation: mark-in .3s ease both;
}
@keyframes mark-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* Scrolled: the name gives way to a DH mark sitting just left of the nav, all on one line */
.site-header.is-scrolled .wrap { flex-direction: row; justify-content: center; align-items: center; gap: 1.6rem; padding: .7rem 0; }
.site-header.is-scrolled .brand-text { display: none; }
.site-header.is-scrolled .brand-mark { display: block; }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.brand:hover .brand-mark { color: var(--sea); }
@media (max-width: 760px) {
  .brand-mark { font-size: 1.05rem; }
  .site-header.is-scrolled .wrap { gap: 1rem; }
  .site-header.is-scrolled .nav ul { gap: .1rem .9rem; }
  .site-header.is-scrolled .nav a { font-size: .7rem; letter-spacing: .1em; }
}

/* ---------- Page structure ---------- */

main { padding-bottom: 5rem; }

.page-head { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); text-align: center; }
.page-head h1 { margin-bottom: .35em; }
.one-line { white-space: nowrap; }
.page-head h1.one-line { font-size: min(3.9rem, 8vw); }
.page-head-action { margin: 1.6rem 0 0; }
.page-head .lede { font-family: var(--serif); font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--ink-2); max-width: 46ch; margin: 0 auto; }

.section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }

.prose p { margin: 0 0 1.25em; }
.prose p:last-child { margin-bottom: 0; }
.prose { font-size: 1.05rem; }
.prose em { font-style: italic; }


.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  color: var(--muted);
  font-size: .85rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--accent); }

/* ---------- About ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
}
.hero h1 { font-size: min(3rem, 8vw); font-weight: 400; margin-bottom: .3em; }
.hero .lede { font-family: var(--serif); font-size: clamp(1.1rem, 1.9vw, 1.35rem); color: var(--ink-2); margin: 0; max-width: 34ch; }
.hero-figure { margin: 0; }
.hero-figure img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.hero-figure figcaption { font-size: .78rem; color: var(--muted); margin-top: .6rem; letter-spacing: .02em; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 420px; }
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

.about-aside { position: sticky; top: 150px; }
.about-aside figure { margin: 0 0 1.6rem; }
.about-aside img { width: 100%; border-radius: 4px; }
.about-aside figcaption { font-size: .78rem; color: var(--muted); margin-top: .6rem; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: .45rem 0; border-top: 1px solid var(--line); }
.link-list li:first-child { border-top: 0; }
.link-list a { text-decoration: none; display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
.link-list a span:last-child { font-size: .76rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.link-list a:hover span:first-child { color: var(--sea); }

/* Home: latest book + art strip */
.feature {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
@media (max-width: 700px) { .feature { grid-template-columns: 1fr; } .feature img { max-width: 220px; } }
.feature img { border-radius: 3px; box-shadow: 0 16px 40px -18px rgba(28,26,24,.6), 0 1px 2px rgba(28,26,24,.15); }
.feature h2 { font-style: italic; margin-bottom: .4rem; }
.feature .honour { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.feature p { color: var(--ink-2); max-width: 58ch; }
.feature .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }

.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: .4rem; }
.strip-more { margin: 1.8rem 0 0; }
@media (max-width: 700px) { .strip { grid-template-columns: repeat(2, 1fr); } }
.strip a { display: block; overflow: hidden; border-radius: 4px; background: var(--bg-2); }
.strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .5s ease; }
.strip a:hover img { transform: scale(1.03); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head a { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; border-bottom: 1.5px solid var(--sea-2); }
.section-head a:hover { color: var(--sea); border-color: var(--sea); }

.quotes {
  color: var(--bg);
  background-color: var(--sea);
  background-image: linear-gradient(rgba(16, 36, 46, .82), rgba(16, 36, 46, .82)), url("../images/art/green-abstract-bg.jpg");
  background-size: cover;
  background-position: center;
}
.quotes .section { border: 0; }
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}
.quotes blockquote { margin: 0; }
.quotes blockquote p {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.35;
  margin: 0 0 .9rem;
  text-wrap: pretty;
}
.quotes blockquote p::before { content: "\201C"; color: var(--sea-2); }
.quotes blockquote p::after { content: "\201D"; color: var(--sea-2); }
.quotes cite { font-style: normal; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sea-2); }
.quotes .source { display: flex; align-items: center; gap: .8rem; }
.quotes .source cite { line-height: 1.35; }
.avatar {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 999px;
  overflow: hidden;
  display: grid; place-items: center;
  background: var(--bg);
  color: var(--sea);
  font-family: var(--serif);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .02em;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar img[hidden] { display: none; }
.avatar.is-logo { background: #fff; padding: 6px; }
.avatar.is-logo img { object-fit: contain; }

/* ---------- Books ---------- */

.book { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.book + .book { border-top: 1px solid var(--line); }
.book-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 1.5rem; }
.book-head h2 { margin: 0; font-style: italic; }
.book-head .meta { color: var(--muted); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }

.covers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.2rem;
  margin: 0 0 2.2rem;
}
@media (max-width: 560px) { .covers { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }
.covers figure { margin: 0; }
.covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 10px 30px -14px rgba(28,26,24,.55), 0 1px 2px rgba(28,26,24,.15);
  background: var(--bg-2);
}
.covers figcaption { font-size: .74rem; color: var(--muted); margin-top: .55rem; letter-spacing: .08em; text-transform: uppercase; }

.synopsis { max-width: 64ch; color: var(--ink-2); margin: 0 0 1.6rem; font-size: 1.05rem; }
.buy { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 2.2rem; align-items: center; }
.buy .label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: .4rem; }
.honours { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: .35rem; }
.honours li { font-family: var(--serif); font-size: 1.02rem; }
.honours li strong { font-weight: 700; }

.praise { display: grid; gap: 1.4rem; }
.praise blockquote { margin: 0; padding-left: 1.2rem; border-left: 2px solid var(--sea-2); }
.praise blockquote p { margin: 0 0 .35rem; font-family: var(--serif); font-size: 1.05rem; line-height: 1.5; text-wrap: pretty; }
.praise cite { font-style: normal; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.praise cite em { font-style: italic; text-transform: none; letter-spacing: 0; font-size: .9rem; }

details.more { margin-top: 1.4rem; }
details.more summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  padding: .55rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background .2s, color .2s;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; font-size: 1rem; }
details.more[open] summary::after { content: "\2212"; }
details.more summary:hover { background: var(--ink); color: var(--bg); }
details.more .praise { margin-top: 1.4rem; }

/* ---------- Art ---------- */

.order {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  scroll-margin-top: 150px;
}
.form .row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .form .row-3 { grid-template-columns: 1fr; } }
.field.is-prefilled input { border-color: var(--sea); background: #fff; }
@media (max-width: 800px) { .order { grid-template-columns: 1fr; } }
.order h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.order p { color: var(--ink-2); }

.form { display: grid; gap: 1rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .35rem; }
.field label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 1rem;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field textarea { min-height: 96px; resize: vertical; }
.hp { position: absolute; left: -9999px; }

.button {
  display: inline-block;
  font: inherit;
  font-size: .82rem;
  line-height: 1.65;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: .85rem 1.7rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.button:hover { background: var(--sea); border-color: var(--sea); color: #fff; }
.form-note { font-size: .82rem; color: var(--muted); margin: 0; }

.gallery {
  columns: 3;
  column-gap: 1.4rem;
}
@media (max-width: 900px) { .gallery { columns: 2; } }
@media (max-width: 540px) { .gallery { columns: 1; } }
.gallery figure {
  margin: 0 0 1.4rem;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}
.gallery figure[hidden] { display: none; }
.gallery a { display: block; overflow: hidden; border-radius: 4px; background: var(--bg-2); }
.gallery img { width: 100%; transition: transform .5s ease, filter .5s ease; }
.gallery a:hover img { transform: scale(1.025); }
.gallery figcaption { font-size: .82rem; color: var(--ink-2); margin-top: .55rem; display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.gallery figcaption em { font-style: italic; }
.gallery figcaption span { color: var(--muted); font-size: .76rem; }
.gallery figcaption:empty { display: none; }

.studio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 700px) { .studio { grid-template-columns: 1fr; } }
.studio figure { margin: 0; }
.studio img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.studio figcaption { font-size: .78rem; color: var(--muted); margin-top: .5rem; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20,18,16,.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(100%, 1400px); max-height: calc(100vh - 6rem); width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); }
.lightbox figcaption { position: absolute; left: 0; right: 0; bottom: 1.1rem; text-align: center; color: #d9d2c8; font-size: .85rem; padding: 0 4rem; display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.lightbox .lb-enquire { color: #fff; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--sea-2); }
.lightbox .lb-enquire:hover { border-color: #fff; }
.lb-btn {
  position: absolute;
  background: none;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 999px;
  font-size: 1.3rem;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s;
}
.lb-btn:hover { background: rgba(255,255,255,.14); }
.lb-close { top: 1.1rem; right: 1.1rem; }
.lb-prev { left: 1.1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox { padding: 1rem; } .lb-prev, .lb-next { top: auto; bottom: 3.2rem; transform: none; } }

/* ---------- CV ---------- */

.cv-section { padding: clamp(2rem, 4vw, 3.5rem) 0; }
.cv-section + .cv-section { border-top: 1px solid var(--line); }
.cv-section > .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); }
@media (max-width: 760px) { .cv-section > .wrap { grid-template-columns: 1fr; } }
.cv-section h2 { font-family: var(--sans); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin: .35rem 0 0; }

.cv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.cv-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem 1.5rem; }
.cv-item h3 { font-size: 1.15rem; margin: 0; }
.cv-item .when { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; padding-top: .35rem; }
.cv-item .kind { grid-column: 1 / -1; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.cv-item p { grid-column: 1 / -1; margin: .3rem 0 0; color: var(--ink-2); }
.cv-item p em { font-style: italic; }

.bullets { margin: 0; padding-left: 1.1rem; display: grid; gap: .45rem; color: var(--ink-2); }
.bullets li::marker { color: var(--accent); }
.cv-sub { font-family: var(--serif); font-style: italic; font-size: 1.1rem; margin: 0 0 .6rem; }
.cv-sub + .bullets { margin-bottom: 1.6rem; }
.cv-sub-plain { font-family: var(--sans); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 1.4rem 0 .5rem; }
.cv-sub-plain:first-child { margin-top: 0; }

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

.contact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  padding: clamp(1.75rem, 4vw, 3rem);
  max-width: 720px;
}
.contact-card h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
.contact-card .email {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  margin: 1rem 0 0;
  word-break: break-word;
}
.contact-card .small { color: var(--muted); font-size: .85rem; margin: 1rem 0 0; }
.contact-links { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.pill {
  display: inline-block;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.65;
  padding: .85rem 1.7rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.pill:hover { background: var(--sea); border-color: var(--sea); color: var(--bg); }
.thanks { min-height: 50vh; display: grid; place-items: center; text-align: center; }

/* ---------- Utilities ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header .wrap, .brand-text { transition: none; }
  .brand-mark { animation: none; }
  .gallery img { transition: none; }
}
