/* Transformation And Acceptance — Books by Danielle Rose T.
   Dark, steel-and-oxblood theme. No external fonts or trackers. */

:root {
  --bg: #0d0b0c;
  --bg-raised: #151213;
  --surface: #1c1819;
  --surface-hover: #241f20;
  --line: #2e2829;
  --line-strong: #463d3e;
  --text: #ece6e2;
  --text-muted: #a89e99;
  --text-faint: #786f6b;
  --accent: #b0172f;
  --accent-hover: #d1213d;
  --accent-soft: rgba(176, 23, 47, 0.14);
  --steel: #9aa1a8;
  --steel-light: #c9ced3;

  --font-display: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --radius: 4px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

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

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

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

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

[hidden] { display: none !important; }

a { color: var(--steel-light); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: var(--accent); }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 0.9rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 12px;
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 11, 12, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 68px;
}
.brand { text-decoration: none; color: var(--text); display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-family: var(--font-display); font-size: 1.28rem; letter-spacing: 0.02em; }
.brand-title em { font-style: normal; color: var(--accent-hover); }
.brand-sub { font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-faint); margin-top: 4px; }
.brand:hover { color: #fff; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line-strong); color: var(--text);
  border-radius: var(--radius); padding: 8px 12px; font: inherit; font-size: 0.85rem; cursor: pointer;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  display: block; padding: 8px 14px;
  font-size: 0.86rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); text-decoration: none; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg-raised); border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--accent-hover); }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px;
  font: 600 0.84rem/1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--steel); color: #fff; }
.btn-lg { padding: 18px 32px; font-size: 0.92rem; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------------- sections */

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head h2 { margin: 0; }
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 640px; }

/* ---------------------------------------------------------------- hero (home) */

.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 85% 20%, rgba(176, 23, 47, 0.22), transparent 55%),
    linear-gradient(180deg, #120f10, var(--bg));
}
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-top: clamp(48px, 8vw, 110px); padding-bottom: clamp(48px, 8vw, 110px);
}
.hero h1 span { display: block; color: var(--steel-light); font-size: 0.5em; margin-top: 0.5em; letter-spacing: 0.02em; }
.hero .lede { margin-bottom: 32px; }

.cover-fan { position: relative; height: clamp(320px, 38vw, 480px); }
.cover-fan img {
  position: absolute; width: 46%; aspect-ratio: 2 / 3; object-fit: cover;
  border-radius: 2px; box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, 0.06);
}
.cover-fan img:nth-child(1) { left: 2%; top: 10%; transform: rotate(-7deg); filter: brightness(0.7); }
.cover-fan img:nth-child(2) { right: 2%; top: 10%; transform: rotate(7deg); filter: brightness(0.7); }
.cover-fan img:nth-child(3) { left: 27%; top: 0; z-index: 2; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .cover-fan { max-width: 420px; width: 100%; margin: 0 auto; height: 360px; }
}

/* ---------------------------------------------------------------- welcome letter */

.letter { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.letter-portrait img { border-radius: var(--radius); filter: grayscale(0.25) contrast(1.05); border: 1px solid var(--line); }
.letter-portrait figcaption { font-size: 0.82rem; color: var(--text-faint); margin-top: 10px; }
.letter-body p { color: #d7d0cb; }
.letter-body p:first-of-type::first-letter {
  font-family: var(--font-display); float: left; font-size: 3.6em; line-height: 0.85;
  padding: 6px 10px 0 0; color: var(--accent-hover);
}
.signature { font-family: var(--font-display); font-size: 1.6rem; color: var(--text); margin-top: 1.4em; }
@media (max-width: 720px) {
  .letter { grid-template-columns: 1fr; }
  .letter-portrait { max-width: 200px; }
}

/* ---------------------------------------------------------------- catalog cards (home) */

.catalog-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.catalog-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; text-decoration: none; color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.catalog-card:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.catalog-card .stack { display: flex; margin-bottom: 26px; height: 150px; }
.catalog-card .stack img {
  width: 98px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); margin-right: -38px;
}
.catalog-card h3 { font-size: 1.55rem; margin-bottom: 6px; }
.catalog-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 18px; }
.catalog-card .count { margin-top: auto; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel); }
.catalog-card .count::after { content: " →"; color: var(--accent-hover); }
@media (max-width: 900px) { .catalog-cards { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- amazon author band */

.author-band {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  border: 1px solid var(--line-strong); border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, var(--accent-soft), transparent 70%), var(--surface);
  padding: 28px 32px; border-radius: var(--radius);
}
.author-band h2, .author-band h3 { margin: 0 0 4px; }
.author-band p { margin: 0; color: var(--text-muted); }

/* ---------------------------------------------------------------- book grid */

.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 32px 24px; }
@media (max-width: 560px) { .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; } .book-card h3 { font-size: 1.02rem; } }
.book-card { display: flex; flex-direction: column; }
.book-card a.cover-link { display: block; position: relative; overflow: hidden; border-radius: 2px; background: var(--surface); }
.book-card a.cover-link img {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}
.book-card a.cover-link:hover img { transform: scale(1.04); filter: brightness(1.08); }
.book-card .badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  background: rgba(13, 11, 12, 0.85); color: var(--steel-light);
  font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 4px 8px; border-radius: 2px;
}
.book-card h3 { font-size: 1.15rem; margin: 14px 0 4px; }
.book-card h3 a { color: var(--text); text-decoration: none; }
.book-card h3 a:hover { color: #fff; }
.book-card .sub { font-size: 0.86rem; color: var(--text-muted); margin: 0 0 10px; line-height: 1.45; }
.book-card .more { margin-top: auto; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--accent-hover); }
.book-card .more:hover { color: #fff; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 12px; padding: 0; }
.tags li {
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--steel-light); border: 1px solid var(--line-strong); padding: 3px 8px; border-radius: 2px;
}

/* ---------------------------------------------------------------- catalog page */

.page-head { padding: clamp(44px, 7vw, 84px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 10% 0%, rgba(176, 23, 47, 0.16), transparent 60%); }
.page-head .lede { margin-bottom: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; padding: 24px 0 8px; }
.search {
  flex: 1 1 260px; max-width: 380px; position: relative;
}
.search input {
  width: 100%; padding: 12px 14px 12px 40px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  color: var(--text); font: inherit; font-size: 0.95rem;
}
.search input::placeholder { color: var(--text-faint); }
.search svg { position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--text-faint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: transparent; border: 1px solid var(--line-strong); color: var(--text-muted);
  padding: 7px 12px; border-radius: 999px; font: inherit; font-size: 0.78rem; letter-spacing: 0.06em;
  cursor: pointer; transition: all 0.15s;
}
.chip:hover { color: var(--text); border-color: var(--steel); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); }
.sort select {
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 8px 10px; font: inherit; font-size: 0.85rem;
}
.result-count { font-size: 0.85rem; color: var(--text-faint); margin: 8px 0 28px; }
.empty { display: none; padding: 40px 0; color: var(--text-muted); }

/* ---------------------------------------------------------------- book detail */

.breadcrumb { font-size: 0.82rem; color: var(--text-faint); padding: 22px 0 0; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }

.book-hero { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); padding: 36px 0 clamp(48px, 7vw, 88px); align-items: start; }
.book-cover { position: sticky; top: 96px; }
.book-cover img { width: 100%; border-radius: 2px; box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, 0.06); }
.book-cover .btn { width: 100%; margin-top: 18px; }
.book-info h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: 0.25em; }
.book-info .subtitle { font-size: 1.18rem; color: var(--text-muted); margin-bottom: 0.9em; }
.book-info .series { color: var(--steel); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 1rem; }
.book-info .byline { color: var(--text-muted); margin-bottom: 1.4rem; }
.book-info .byline a { color: var(--text); }
.tagline { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.65rem); line-height: 1.35; color: var(--text); border-left: 3px solid var(--accent); padding-left: 20px; margin: 0 0 28px; }

.buy-box { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 36px; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 40px; }
.facts div { padding: 14px 18px; box-shadow: 1px 1px 0 var(--line); }
.facts dt { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 0.98rem; }

.description p, .description li { color: #d7d0cb; }
.description ul { padding-left: 1.2em; margin: 0 0 1.1em; }
.description li { margin-bottom: 0.3em; }
.block { margin-top: 44px; }
.block h2 { font-size: 1.5rem; }

.quotes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 0; padding: 0; list-style: none; }
.quotes blockquote {
  margin: 0; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 22px 26px; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.45; position: relative;
}
.quotes blockquote::before { content: "“"; position: absolute; left: 10px; top: 2px; font-size: 2.4rem; color: var(--accent); line-height: 1; }

.highlights { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.highlights li { padding-left: 28px; position: relative; color: #d7d0cb; }
.highlights li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 14px; height: 2px; background: var(--accent); }

.stories { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: story; }
.stories li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px 16px 58px; position: relative; counter-increment: story; }
.stories li::before { content: counter(story, decimal-leading-zero); position: absolute; left: 20px; top: 16px; font-family: var(--font-display); color: var(--accent-hover); font-size: 1.1rem; }
.stories strong { display: block; font-weight: 600; }
.stories span { color: var(--text-muted); font-size: 0.94rem; }

.foreword { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.foreword p { font-style: italic; color: #d7d0cb; }
.foreword .signature { font-style: normal; font-size: 1.3rem; margin: 0; }

.content-note { font-size: 0.88rem; color: var(--text-muted); border: 1px dashed var(--line-strong); padding: 14px 18px; border-radius: var(--radius); }
.content-note strong { color: var(--text); }

.edition-note { background: var(--accent-soft); border: 1px solid rgba(176, 23, 47, 0.45); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 32px; font-size: 0.95rem; }

@media (max-width: 820px) {
  .book-hero { grid-template-columns: 1fr; }
  .book-cover { position: static; max-width: 340px; }
}

/* ---------------------------------------------------------------- about / contact */

.about { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-photo img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.about-text p { color: #d7d0cb; font-size: 1.06rem; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } .about-photo { max-width: 360px; } }

.contact-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 72px); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.contact-list svg { width: 22px; height: 22px; color: var(--accent-hover); flex: none; }
.contact-list a { color: var(--text); word-break: break-word; }

.form { display: grid; gap: 18px; }
.form label { display: block; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  color: var(--text); font: inherit; padding: 12px 14px;
}
.form input:focus, .form textarea:focus { border-color: var(--steel); outline: none; }
.form textarea { min-height: 170px; resize: vertical; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form .row2 { grid-template-columns: 1fr; } }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.form .consent input { width: auto; margin-top: 4px; accent-color: var(--accent); }
.form-status { padding: 14px 18px; border-radius: var(--radius); font-size: 0.95rem; display: none; }
.form-status.ok { display: block; background: rgba(60, 140, 90, 0.15); border: 1px solid rgba(60, 140, 90, 0.5); }
.form-status.err { display: block; background: var(--accent-soft); border: 1px solid rgba(176, 23, 47, 0.5); }

.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose p, .prose li { color: #d7d0cb; }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); background: var(--bg-raised); padding: 48px 0 32px; margin-top: 0; font-size: 0.9rem; color: var(--text-muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: var(--text-faint); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
