/* ==========================================================================
   The Process of Living — sitewide stylesheet
   Colors come from the book cover: navy, sunset gold, sky blue.
   Units: rem for type and layout spacing, px for borders/shadows,
   em for spacing that scales with its own element (button padding).
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: "Playfair Display"; src: url("/fonts/playfair-display-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/playfair-display-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/playfair-display-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --navy: #0e2f44;
  --navy-deep: #0a2232;
  --gold: #f2b84b;          /* buttons/accents on navy; navy text on it */
  --gold-dark: #9a5f17;     /* gold for text on light backgrounds (passes 4.5:1) */
  --sky: #4f7f9f;
  --sky-pale: #e9eff3;
  --ivory: #f7f4ee;
  --ink: #24323c;
  --ink-soft: #3a4a55;
  --white: #fff;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --container: 1290px;
  --gutter: 2rem;
  --shadow: 0 1px 2px rgba(14, 47, 68, .06), 0 12px 32px rgba(14, 47, 68, .07);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--sans); font-size: 1.125rem; line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: .15em; }
a:hover { color: var(--gold-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; color: var(--navy); line-height: 1.2; margin: 0 0 .6em; }
p { margin: 0 0 1.2em; }
.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 50rem; margin-inline: auto; }
.center { text-align: center; }
.eyebrow { margin: 0 0 1rem; font-size: .875rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dark); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--gold); color: var(--navy); padding: .6em 1em; font-weight: 700; }
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 1.05em 2em; border: 1px solid transparent; border-radius: 2px; font-family: var(--sans); font-size: .9375rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; line-height: 1.3; text-align: center; transition: background-color .2s, color .2s, border-color .2s; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #ffcd6e; color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: #164a6a; color: var(--white); }
.btn-outline-light { border-color: var(--white); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--navy); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.btn-row.center { justify-content: center; }

/* ---------- Header / navigation ---------- */
.site-header { background: var(--navy); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5rem; }
.brand { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .03em; color: var(--white); text-decoration: none; white-space: nowrap; }
.brand em, .footer-brand em { color: var(--gold); }
.brand:hover { color: var(--white); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.6rem; }
.main-nav a { color: #e8eef2; text-decoration: none; font-size: .9375rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--gold); }
.social { display: flex; gap: .25rem; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; color: #e8eef2; }
.social a:hover { color: var(--gold); }
.social svg { width: 18px; height: 18px; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.4); color: var(--white); width: 2.75rem; height: 2.75rem; border-radius: 2px; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); border-top: 1px solid rgba(255,255,255,.12); display: none; max-height: calc(100vh - 5rem); overflow-y: auto; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.25rem; }
  .main-nav li a { display: block; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .main-nav .social { padding-top: .75rem; }
}

/* ---------- Home hero ---------- */
.hero { position: relative; color: var(--white); overflow: hidden; background: var(--navy-deep); }
.hero-img { position: absolute; inset: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 75% center; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9,30,44,.9) 0%, rgba(9,30,44,.62) 42%, rgba(9,30,44,0) 72%); }
.hero .container { position: relative; z-index: 1; padding-block: 9rem 10rem; }
.hero-text { max-width: 38rem; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: var(--white); font-size: clamp(2.75rem, 6vw, 4.5rem); line-height: 1.05; margin-bottom: 1.5rem; }
.hero h1 em { color: var(--gold); }
.hero-sub { font-size: 1.375rem; color: #e8eef2; margin-bottom: 2.25rem; }

/* ---------- Interior page title band ---------- */
.page-band { position: relative; overflow: hidden; background: #cfe0ec; }
.page-band .band-img { position: absolute; inset: 0; }
.page-band .band-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.page-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(247,244,238,.92) 0%, rgba(247,244,238,.7) 55%, rgba(247,244,238,.25) 100%); }
.page-band .container { position: relative; z-index: 1; min-height: 17rem; display: flex; flex-direction: column; justify-content: center; padding-block: 4rem; }
.page-band h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); margin-bottom: 1.25rem; }
.post-band h1 { font-size: clamp(2.25rem, 4.5vw, 3.25rem); max-width: 50rem; margin-bottom: .75rem; }
.post-meta { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.post-meta a { color: var(--gold-dark); }

/* ---------- Sections ---------- */
.section { padding-block: 6rem; }
.section-tight { padding-block: 4.5rem; }
.bg-sky { background: var(--sky-pale); }
.bg-white { background: var(--white); }
.bg-navy { background: var(--navy); color: #e8eef2; }
.bg-navy h2, .bg-navy p.lead-serif { color: var(--white); }
.section-title { font-size: clamp(2.25rem, 4vw, 3rem); }
.lead { font-size: 1.3125rem; color: var(--ink-soft); }
.lead-serif { font-family: var(--serif); font-style: italic; font-size: 2.25rem; line-height: 1.3; margin-bottom: 1.75rem; }
.pillar-icon { display: block; margin: 0 auto 1.5rem; color: #b5741e; }
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 4rem; }
.split > * { flex: 1 1 26rem; min-width: 0; }
.split.top { align-items: flex-start; }
.split .media { display: flex; justify-content: center; }
.photo { box-shadow: var(--shadow); border-radius: 2px; }

/* Pillars */
.pillars-heading { font-style: italic; font-size: 1.875rem; color: var(--gold-dark); text-align: center; margin-bottom: 3rem; }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 2rem; }
.pillar { background: var(--white); border-top: 4px solid var(--navy); padding: 2.5rem 2.25rem 1.5rem; box-shadow: var(--shadow); }
.pillar:nth-child(2) { border-top-color: #b5741e; }
.pillar:nth-child(3) { border-top-color: var(--sky); }
.pillar .num::before { content: attr(data-n); }
.pillar .num { display: block; min-height: 3.5rem; font-family: var(--serif); font-size: 3.5rem; line-height: 1; color: #d9e3ea; margin-bottom: 1rem; }
.pillar:nth-child(2) .num { color: #eedcc0; }
.pillar h3 { font-weight: 600; font-size: 1.75rem; letter-spacing: .12em; }
.pillar p { font-size: 1.0625rem; }

/* ---------- The Book ---------- */
.book-cover { max-width: 24rem; width: 100%; }
.badge-line { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--gold-dark); margin-bottom: 1.5rem; }
.award { width: 100%; max-width: 25rem; margin-block: 2rem; }
.buy-more { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid #dcd5c8; }
.buy-more h3 { font-family: var(--sans); font-size: .875rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.buy-more ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; }
.buy-more a { font-weight: 600; }

/* ---------- Reviews ---------- */
.reviews { display: grid; gap: 2.5rem; max-width: 56rem; margin-inline: auto; }
.review { position: relative; background: var(--white); padding: 3.5rem 3.5rem 3rem; box-shadow: var(--shadow); margin: 0; }
/* large decorative opening quote mark instead of a border */
.review::before { content: "\201C"; position: absolute; top: 1.25rem; right: 2.5rem; font-family: var(--serif); font-size: 9rem; line-height: 1; color: #eedcc0; pointer-events: none; }
.review .stars { width: 120px; height: auto; margin-bottom: 1.25rem; }
.review h2 { font-size: 1.625rem; line-height: 1.3; padding-right: 5rem; position: relative; }
.review blockquote { margin: 0; font-style: italic; color: var(--ink-soft); }
.review figcaption { font-weight: 700; color: var(--navy); }
.review figcaption span { font-weight: 400; color: var(--ink-soft); }

/* ---------- Media (video/audio) ---------- */
.media-list { display: grid; gap: 4rem; }
.media-item { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 3rem; align-items: center; }
.media-item h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.media-item .kicker { font-size: .875rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: .5rem; }
.media-item img { box-shadow: var(--shadow); }
.yt { position: relative; aspect-ratio: 16 / 9; background: #000; box-shadow: var(--shadow); }
.yt button { all: unset; position: absolute; inset: 0; cursor: pointer; display: block; }
.yt button img { width: 100%; height: 100%; object-fit: cover; }
.yt button .play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(14,47,68,.88); display: flex; align-items: center; justify-content: center; transition: background-color .2s; }
.yt button:hover .play, .yt button:focus-visible .play { background: var(--gold-dark); }
.yt button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
audio { width: 100%; margin-top: .5rem; }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.contact-list a { display: inline-flex; align-items: center; gap: .9rem; font-size: 1.25rem; font-weight: 600; text-decoration: none; }
.contact-list .ico { display: inline-flex; width: 3rem; height: 3rem; border-radius: 50%; background: var(--navy); color: var(--gold); align-items: center; justify-content: center; flex: none; }
.contact-list svg { width: 20px; height: 20px; }

/* ---------- Blog index ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 3rem; }
.filters button { font: 600 .9375rem var(--sans); padding: .6em 1.2em; min-height: 2.75rem; border: 1px solid #c9d3da; background: var(--white); color: var(--navy); border-radius: 999px; cursor: pointer; }
.filters button:hover { border-color: var(--navy); }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 2.25rem; }
.card { background: var(--white); box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; }
.card[hidden] { display: none; }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 1.6rem 1.75rem 2rem; display: flex; flex-direction: column; flex: 1; }
.card-cats { font-size: .8125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: .5rem; }
.card h2 { font-size: 1.5rem; margin-bottom: .6rem; }
.card h2 a { text-decoration: none; }
.card h2 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card h2 a:hover { color: var(--gold-dark); }
.card p { font-size: 1rem; color: var(--ink-soft); margin-bottom: 1rem; }
.card time { margin-top: auto; font-size: .9375rem; color: #5b6870; }

/* ---------- Blog post ---------- */
.post-layout { display: flex; flex-wrap: wrap; gap: 4rem; align-items: flex-start; }
.post-body { flex: 999 1 36rem; min-width: 0; max-width: 46rem; }
.post-aside { flex: 1 1 16rem; position: sticky; top: 7rem; }
.post-body h2, .post-body h3, .post-body h4 { margin-top: 2rem; }
.post-body h2 { font-size: 2rem; } .post-body h3 { font-size: 1.625rem; } .post-body h4 { font-size: 1.375rem; }
.post-body a { color: #1d5a80; }
.post-body img { margin: .5rem 0 1.5rem; border-radius: 2px; }
.post-body img.alignright { float: right; margin: .35rem 0 1rem 1.75rem; max-width: 45%; }
.post-body img.alignleft { float: left; margin: .35rem 1.75rem 1rem 0; max-width: 45%; }
.post-body img.aligncenter { margin-inline: auto; }
.post-body ul, .post-body ol { padding-left: 1.4rem; margin: 0 0 1.4em; }
.post-body li { margin-bottom: .5em; }
.post-body blockquote { margin: 1.5rem 0; padding: 1rem 1.5rem; background: var(--white); border-top: 3px solid var(--gold); font-style: italic; }
.post-body::after { content: ""; display: table; clear: both; }
.aside-box { background: var(--white); padding: 2rem; box-shadow: var(--shadow); text-align: center; }
.aside-box img { margin: 0 auto 1.25rem; max-width: 12rem; }
.aside-box h2 { font-size: 1.5rem; }
.aside-box p { font-size: 1rem; }
.post-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid #dcd5c8; }
.post-nav a { text-decoration: none; max-width: 20rem; }
.post-nav span { display: block; font-size: .8125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); }
.post-nav strong { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; }
.post-nav .next { text-align: right; margin-left: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #c9d6df; padding: 3.5rem 0 2.5rem; font-size: .9375rem; }
.site-footer a { color: #c9d6df; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; padding-bottom: 2rem; }
.footer-brand { font-family: var(--serif); font-size: 1.375rem; color: var(--white); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-weight: 600; }
.footer-nav a { display: inline-block; padding-block: .35rem; }
.footer-bottom { border-top: 1px solid #23445a; padding-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .875rem; }
.to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 40; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Small screens ---------- */
@media (max-width: 767px) {
  :root { --gutter: 1.25rem; }
  body { font-size: 1.0625rem; }
  .section { padding-block: 4rem; }
  .section-tight { padding-block: 3rem; }
  .hero .container { padding-block: 5rem 5.5rem; }
  .hero::after { background: linear-gradient(180deg, rgba(9,30,44,.55) 0%, rgba(9,30,44,.85) 100%); }
  .hero-sub { font-size: 1.1875rem; }
  .page-band .container { min-height: 12rem; padding-block: 3rem; }
  .page-band::after { background: rgba(247,244,238,.82); }
  .split { gap: 2.5rem; }
  .split > * { flex-basis: 100%; }
  .review { padding: 2rem 1.5rem; }
  .lead-serif { font-size: 1.75rem; }
  .post-body img.alignright, .post-body img.alignleft { float: none; margin: .5rem auto 1.5rem; max-width: 100%; }
  .post-aside { position: static; }
  .btn { width: 100%; }
  .btn-row .btn { flex: 1 1 100%; }
  .site-footer { padding-bottom: 5rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* The Book page: cover with purchase buttons/options stacked under it */
.book-col { display: flex; flex-direction: column; align-items: center; }
.book-buy { width: 100%; max-width: 24rem; margin-top: 2.5rem; display: flex; flex-direction: column; gap: .75rem; }
.book-buy .buy-more { margin-top: 1.25rem; text-align: center; }
.book-buy .buy-more ul { justify-content: center; }
.split .award { margin-bottom: 0; }
/* Bigger cover, less empty space between the columns (desktop) */
.book-split { gap: 3.5rem; }
.book-split > * { flex: 1 1 0; }  /* two equal columns */
.book-split .book-cover { max-width: 30rem; }
/* Both purchase buttons on one row under the cover (wraps on narrow screens) */
.book-split .book-buy { max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: center; }
.book-split .book-buy .btn { flex: 1 1 auto; padding-inline: 1.25em; white-space: nowrap; }
.book-split .book-buy .buy-more { flex-basis: 100%; }
@media (min-width: 1100px) { .book-split > :first-child { flex: 1.15 1 0; } }
@media (max-width: 767px) { .book-split > * { flex-basis: 100%; } }
.book-split .award { margin-inline: auto; } /* center the Firebird award badge in the text column */
/* Contact page: intro heading centered above the two columns */
.contact-intro { max-width: 52rem; margin: 0 auto 3.5rem; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.3; }
@media (max-width: 767px) { .review::before { font-size: 5rem; top: 1rem; right: 1.25rem; } .review h2 { padding-right: 2.5rem; font-size: 1.4rem; } }

/* Reviews: show the first few lines, "Read the full review" expands (only when JS is on; full text otherwise) */
.js .review-text:not(.open) { max-height: 10.5rem; overflow: hidden; position: relative; }
.js .review-text:not(.open)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4rem; background: linear-gradient(rgba(255,255,255,0), var(--white)); }
.review-toggle { display: inline-flex; align-items: center; gap: .4em; margin: .5rem 0 1.5rem; padding: .5em 0; min-height: 2.75rem; background: none; border: 0; font: 700 .9375rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-dark); cursor: pointer; }
.review-toggle:hover { color: var(--navy); }
.review-toggle::after { content: ""; width: .5em; height: .5em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.15em) rotate(45deg); transition: transform .2s; }
.review-toggle[aria-expanded="true"]::after { transform: translateY(.1em) rotate(-135deg); }
.review figcaption { margin-top: 0; }
.js .review-toggle[hidden] { display: inline-flex; } /* show the button as soon as the text is collapsed */
/* Home: tighter gap between the intro paragraph and the pillars heading */
.home-intro { padding-bottom: 2.5rem; }
.home-intro .lead { margin-bottom: 0; }
@media (max-width: 767px) { .home-intro { padding-bottom: 1.5rem; } }
.cta-wide { max-width: 66rem; } /* lets the "Bring Bill…" line fit on one line on desktop */
.home-cta { padding-block: 6.5rem; } /* more breathing room in the navy "Bring Bill…" band */
@media (max-width: 767px) { .home-cta { padding-block: 4.5rem; } }

/* Home hero: fixed minimum height so the web fonts swapping in can't push the page down (layout shift) */
.hero .container { min-height: 45rem; display: flex; align-items: center; padding-block: 5rem; }
@media (max-width: 767px) { .hero .container { min-height: 37rem; padding-block: 3.5rem; } }
