/**
 * Breath and Word — theme styles
 * Cinematic ash atmosphere for The Breath and the Word.
 */

:root {
  --btw-bg: #070709;
  --btw-bg-elev: #101014;
  --btw-ink: #f0ebe2;
  --btw-muted: #b0a99f;
  --btw-dim: #6e6962;
  --btw-line: rgba(240, 235, 226, 0.14);
  --btw-line-strong: rgba(240, 235, 226, 0.28);
  --btw-accent: #d4c19a;
  --btw-accent-hot: #efe0b8;
  --btw-ash: #1a1b22;
  --btw-max: 42rem;
  --btw-wide: 68rem;
  --btw-header-h: 4.25rem;
  --btw-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--btw-bg);
  color: var(--btw-ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--btw-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--btw-accent-hot);
}

.btw-site {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(ellipse 80% 50% at 78% -5%, rgba(72, 78, 98, 0.55), transparent 58%),
    radial-gradient(ellipse 55% 40% at 8% 18%, rgba(48, 42, 36, 0.55), transparent 52%),
    radial-gradient(ellipse 60% 35% at 50% 100%, rgba(36, 34, 40, 0.4), transparent 55%),
    linear-gradient(180deg, #0e0e14 0%, var(--btw-bg) 35%, #050506 100%);
}

/* —— Atmosphere —— */
.btw-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.btw-mist {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  mix-blend-mode: soft-light;
}

.btw-mist--a {
  top: -20%;
  right: -10%;
  background: radial-gradient(circle, rgba(180, 190, 210, 0.35), transparent 65%);
  animation: btw-drift 28s var(--btw-ease) infinite alternate;
}

.btw-mist--b {
  bottom: -25%;
  left: -15%;
  background: radial-gradient(circle, rgba(120, 100, 80, 0.3), transparent 65%);
  animation: btw-drift 36s var(--btw-ease) infinite alternate-reverse;
}

.btw-grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

@keyframes btw-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-4%, 3%, 0) scale(1.08); }
}

.btw-main {
  position: relative;
  z-index: 1;
}

/* —— Header —— */
.btw-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--btw-header-h);
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}

.btw-site-header.is-scrolled {
  background: rgba(7, 7, 9, 0.82);
  border-bottom-color: var(--btw-line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btw-site-header__inner {
  width: min(100% - 2rem, var(--btw-wide));
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.btw-site-brand {
  text-decoration: none !important;
  color: var(--btw-ink) !important;
  flex: 0 1 auto;
  min-width: 0;
}

.btw-site-brand__series {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: clamp(0.72rem, 1.6vw, 0.88rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btw-nav {
  margin-left: auto;
}

.btw-nav__list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.35rem;
}

@media (min-width: 820px) {
  .btw-nav__list {
    display: flex;
  }
}

.btw-nav__list a {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--btw-muted);
  text-decoration: none !important;
}

.btw-nav__list a:hover {
  color: var(--btw-accent-hot);
}

.btw-header-cta {
  flex-shrink: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--btw-accent);
  color: #0a0a0c !important;
  background: var(--btw-accent);
  text-decoration: none !important;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btw-header-cta:hover {
  background: transparent;
  color: var(--btw-accent) !important;
  box-shadow: 0 0 0 1px var(--btw-accent);
}

/* —— Type primitives —— */
.btw-wrap {
  width: min(100% - 2rem, var(--btw-wide));
  margin-inline: auto;
}

.btw-narrow {
  width: min(100% - 2rem, var(--btw-max));
  margin-inline: auto;
}

.btw-brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: clamp(1.65rem, 5vw, 3rem);
  line-height: 1.08;
  margin: 0;
  color: #f7f2e8;
  text-shadow: 0 0 40px rgba(212, 193, 154, 0.18);
}

.btw-kicker {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--btw-accent);
  margin: 0 0 0.9rem;
}

.btw-diamond {
  width: 7px;
  height: 7px;
  margin: 1.1rem auto 0;
  border: 1px solid var(--btw-accent);
  transform: rotate(45deg);
  box-shadow: 0 0 18px rgba(212, 193, 154, 0.45);
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  color: #f7f2e8;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.75rem);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.45rem;
  margin: 0 0 0.45rem;
}

p {
  margin: 0 0 1.15rem;
  color: var(--btw-muted);
}

.btw-lead {
  font-size: 1.22rem;
  color: #d8d1c5;
}

.btw-quote {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.35;
  color: #ece4d4;
  margin: 0 0 1.4rem;
}

.btw-em {
  color: var(--btw-ink);
  font-weight: 600;
}

.btw-rule {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.5rem 0 0;
  color: var(--btw-dim);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  letter-spacing: 0.06em;
}

.btw-rule::before,
.btw-rule::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--btw-line-strong), transparent);
}

/* —— CTAs —— */
.btw-cta {
  display: inline-block;
  padding: 0.9rem 1.6rem;
  border: 1px solid var(--btw-accent);
  color: #0a0a0c !important;
  background: var(--btw-accent);
  text-decoration: none !important;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.92rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.25s var(--btw-ease), box-shadow 0.25s ease;
  box-shadow: 0 0 0 0 rgba(212, 193, 154, 0);
}

.btw-cta:hover {
  background: transparent;
  color: var(--btw-accent) !important;
  box-shadow: 0 0 28px rgba(212, 193, 154, 0.22);
  transform: translateY(-1px);
}

.btw-cta--ghost {
  background: transparent;
  color: var(--btw-accent) !important;
}

.btw-cta--ghost:hover {
  background: rgba(212, 193, 154, 0.1);
}

.btw-nolink {
  display: inline-block;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--btw-line);
  color: var(--btw-dim);
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* —— Hero —— */
.btw-hero {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.btw-hero__copy {
  width: min(100% - 2rem, 42rem);
  margin: 0 auto 2rem;
}

.btw-hero__headline {
  font-size: clamp(1.45rem, 3.2vw, 2.05rem);
  margin: 1rem 0 0.85rem;
  font-weight: 600;
}

.btw-hero__support {
  margin: 0 auto 1.6rem;
  max-width: 34rem;
}

.btw-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.btw-hero__art {
  position: relative;
  width: min(100%, 72rem);
  margin: 0 auto;
  padding: 0 clamp(0.5rem, 2vw, 1rem);
}

.btw-hero__art img {
  width: 100%;
  border: 1px solid var(--btw-line);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(212, 193, 154, 0.06),
    0 0 60px rgba(120, 130, 160, 0.12);
}

.btw-hero__glow {
  position: absolute;
  inset: 8% 12% auto 35%;
  height: 40%;
  background: radial-gradient(ellipse, rgba(220, 225, 240, 0.18), transparent 70%);
  pointer-events: none;
  mix-blend-mode: screen;
  animation: btw-pulse 5.5s ease-in-out infinite;
}

@keyframes btw-pulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}

/* —— Sections —— */
.btw-section {
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-top: 1px solid var(--btw-line);
  position: relative;
}

.btw-section--book {
  background:
    linear-gradient(90deg, rgba(16, 16, 20, 0.65), transparent 55%),
    radial-gradient(ellipse 50% 80% at 0% 50%, rgba(60, 55, 48, 0.35), transparent 60%);
}

.btw-book-split {
  width: min(100% - 2rem, var(--btw-wide));
  margin-inline: auto;
  display: grid;
  gap: 2.25rem;
  align-items: center;
}

@media (min-width: 880px) {
  .btw-book-split {
    grid-template-columns: minmax(220px, 0.9fr) 1.25fr;
    gap: 3.5rem;
  }
}

.btw-book-split__art {
  justify-self: center;
  max-width: 22rem;
  width: 100%;
  position: relative;
}

.btw-book-split__art::before {
  content: "";
  position: absolute;
  inset: 8% -8% -8% 8%;
  background: radial-gradient(circle, rgba(212, 193, 154, 0.18), transparent 65%);
  z-index: 0;
  filter: blur(10px);
}

.btw-book-split__art img {
  position: relative;
  z-index: 1;
  width: 100%;
  border: 1px solid var(--btw-line-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  transform: rotate(-1.5deg);
  transition: transform 0.45s var(--btw-ease);
}

.btw-book-split__art:hover img {
  transform: rotate(0deg) translateY(-4px);
}

.btw-shelf-intro {
  margin-bottom: 0.5rem;
}

.btw-shelf {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.25rem;
}

@media (min-width: 760px) {
  .btw-shelf {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.btw-item {
  padding: 1.5rem 1.35rem 1.6rem;
  border: 1px solid var(--btw-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    rgba(12, 12, 16, 0.55);
  transition: border-color 0.25s ease, transform 0.35s var(--btw-ease), box-shadow 0.35s ease;
}

.btw-item:hover {
  border-color: var(--btw-line-strong);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.btw-item--live {
  border-color: rgba(212, 193, 154, 0.35);
  box-shadow: 0 0 0 1px rgba(212, 193, 154, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btw-status {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--btw-accent);
  margin-bottom: 0.6rem;
}

.btw-status.is-later {
  color: var(--btw-dim);
}

.btw-item p {
  font-size: 1rem;
  margin-bottom: 1.15rem;
}

/* —— Inner pages —— */
.btw-page {
  width: min(100% - 2rem, var(--btw-max));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) 0 4rem;
}

.btw-page__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 1.5rem;
}

.btw-page .entry-content > *:first-child {
  margin-top: 0;
}

.btw-page .entry-content a {
  color: var(--btw-accent);
}

/* —— Footer —— */
.btw-site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--btw-line);
  padding: 2.75rem 0 3.25rem;
  text-align: center;
}

.btw-site-footer__inner {
  width: min(100% - 2rem, var(--btw-wide));
  margin-inline: auto;
}

.btw-site-footer__brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: #f0ebe2;
  margin: 0 0 0.4rem;
}

.btw-site-footer__tag {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  color: var(--btw-dim);
  margin: 0 0 1.25rem;
}

.btw-footer-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.btw-footer-nav__list a {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  text-decoration: none !important;
  color: var(--btw-muted);
}

.btw-site-footer__copy {
  margin: 0;
  font-size: 0.9rem;
  color: var(--btw-dim);
}

/* —— Reveal / motion —— */
[data-btw-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--btw-ease), transform 0.85s var(--btw-ease);
}

[data-btw-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

.btw-hero[data-btw-reveal] {
  transition-duration: 1s;
}

.admin-bar .btw-site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .btw-site-header {
    top: 46px;
  }
}
