/* Perry Chafe | perrychafe.com */
:root {
  --bg: #f4f8f9;
  --white: #fff;
  --ink: #4a4a4a;
  --head: #5f6272;
  --teal: #4e7b86;
  --teal-dark: #3d636c;
  --coral: #d3616d;
  --coral-dark: #bb4f5b;
  --gold: #e4a541;
  --gold-dark: #cf9130;
  --navy: #071a1f;
  --line: #dfe7ea;
  --radius: 10px;
  --pill: 26px;
  --shadow: 0 10px 30px rgba(7, 26, 31, .08);
  --wrap: 1180px;
  --font: 'Poppins', 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: 400 15px/1.75 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
a:hover { color: var(--coral); }
h1, h2, h3, h4 { color: var(--head); line-height: 1.25; margin: 0 0 .6em; }
h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 500; }
h3 { font-size: 18px; font-weight: 600; }
h4, .h4 { font-size: 18px; font-weight: 600; color: var(--head); }
p { margin: 0 0 1.1em; }
blockquote { margin: 0; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hp { position: absolute; left: -9999px; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

/* Type helpers */
.display { font-size: clamp(36px, 5vw, 54px); font-weight: 900; color: var(--teal); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .1em; line-height: 1.05; }
.kicker { text-transform: uppercase; letter-spacing: 3px; font-weight: 700; font-size: 14px; color: var(--head); margin-bottom: 1.2em; }
.section-title { font-size: clamp(28px, 3.4vw, 36px); font-weight: 300; color: var(--head); }
.section-title strong { font-weight: 600; color: var(--teal); }
.sub { color: #8a93a0; font-size: 14px; }
.sub a { color: inherit; }
.lead { font-size: 16px; font-weight: 400; color: var(--head); }
.text-link { font-weight: 600; text-decoration: none; }
.buy-label { font-weight: 600; color: var(--head); margin-bottom: .6em; font-size: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 10px 30px; border-radius: var(--pill); border: 0; font: 600 13px/1 var(--font); color: #fff; text-decoration: none; cursor: pointer; transition: background-color .2s, transform .2s; }
.btn:hover { color: #fff; transform: translateY(-1px); }
.btn--coral { background: var(--coral); } .btn--coral:hover { background: var(--coral-dark); }
.btn--teal { background: var(--teal); } .btn--teal:hover { background: var(--teal-dark); }
.btn--gold { background: var(--gold); } .btn--gold:hover { background: var(--gold-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244, 248, 249, .94); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.logo img { width: clamp(200px, 22vw, 290px); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.site-nav a { display: block; padding: 7px 16px; border: 1px solid var(--teal); border-radius: var(--pill); font-size: 13px; font-weight: 600; color: var(--teal); text-decoration: none; line-height: 1.4; transition: background-color .2s, color .2s; white-space: nowrap; }
.site-nav a:hover, .site-nav a.is-current { background: var(--teal); color: #fff; }
.site-nav a.is-accent { background: var(--coral); border-color: var(--coral); color: #fff; }
.site-nav a.is-accent:hover { background: var(--coral-dark); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--teal); margin: 5px 0; transition: transform .25s, opacity .25s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { padding: 80px 0 70px; }
.hero-card { display: grid; grid-template-columns: minmax(200px, 28%) 1fr; gap: 64px; align-items: center; max-width: 1040px; margin-inline: auto; }
.hero-copy .section-title { margin-bottom: .3em; }
.hero-copy .book-title { font-size: clamp(24px, 3vw, 30px); margin-bottom: .2em; }
.hero-cover img, .available-cover img { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .28)); }
.hero-copy blockquote, .available-copy blockquote { font-size: 13.5px; margin-bottom: 1.4em; }
.hero-copy blockquote p, .available-copy blockquote p { font-style: italic; margin-bottom: .4em; }
cite { font-style: normal; font-size: 13px; }

/* Fogtown (new novel) */
.fogtown { padding: 40px 0 0; }
.fog-card { position: relative; display: grid; grid-template-columns: minmax(220px, 30%) 1fr; gap: 56px; align-items: center; padding: 56px; border-radius: 14px; overflow: hidden; color: #cfe9df; background: radial-gradient(ellipse at 30% 40%, #1f5f52 0%, #0d3029 45%, #04120f 100%); box-shadow: var(--shadow); }
.fog-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .18; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); }
.fog-card > * { position: relative; z-index: 1; }
.fog-cover img { border-radius: 3px; box-shadow: 0 0 60px rgba(92, 242, 178, .22), 0 20px 40px rgba(0, 0, 0, .5); }
.fog-date { text-transform: uppercase; letter-spacing: 6px; font-weight: 700; font-size: 14px; color: #5cf2b2; margin-bottom: 1em; }
.fog-title { font-size: clamp(48px, 7vw, 84px); font-weight: 900; text-transform: uppercase; letter-spacing: .14em; line-height: 1; color: #5cf2b2; text-shadow: 0 0 24px rgba(92, 242, 178, .45); margin-bottom: .15em; }
.fog-sub { font-style: italic; font-size: 18px; color: #e6f7f0; margin-bottom: 1.2em; }
.fog-copy p:not(.fog-date):not(.fog-sub) { max-width: 46ch; }
.btn--fog { background: #5cf2b2; color: #062019; } .btn--fog:hover { background: #8af7c9; color: #062019; }

/* German feature */
.feature { padding: 30px 0 80px; }
.feature-inner { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: center; max-width: 1000px; margin-inline: auto; padding: 48px 56px; background: var(--white); border-radius: 14px; box-shadow: var(--shadow); }
.feature-copy h2 { font-weight: 300; }
.feature-img img { border-radius: 6px; box-shadow: var(--shadow); }

/* About teaser and bio */
.about-teaser { padding: 80px 0; background: var(--white); }
.about-inner { display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: center; }
.portrait { margin: 0; }
.portrait img { border-radius: var(--radius); border: 8px solid #fff; box-shadow: var(--shadow); width: 100%; }
.portrait figcaption { font-size: 12px; color: #8a93a0; margin-top: 8px; }
.bio { padding: 20px 0 90px; }
.bio-inner { display: grid; grid-template-columns: 320px 1fr; gap: 64px; align-items: start; }
.bio .portrait { position: sticky; top: 110px; }
.connect { margin-top: 28px; }
.connect .h4 { font-size: 16px; }

/* Social */
.social { list-style: none; display: flex; gap: 10px; padding: 0; margin: 0 0 20px; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; transition: background-color .2s; }
.social a:hover { background: var(--coral); color: #fff; }
.social li:last-child a { background: var(--gold); color: var(--navy); }
.social--dark a { background: var(--teal); }

/* Page banner */
.page-banner { padding: 60px 0 40px; background: linear-gradient(180deg, #e6eef1, var(--bg)); }
.page-banner h1 { margin-bottom: .2em; }

/* Section head */
.section-head { margin-bottom: 36px; }

/* Praise slider */
.praise { padding: 90px 0; }
.slider { position: relative; }
.slider-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 6px 4px 24px; scrollbar-width: none; }
.slider-track::-webkit-scrollbar { display: none; }
.quote-card { margin: 0; scroll-snap-align: start; background: var(--white); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.quote-card figcaption { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.quote-card figcaption img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.quote-card strong { display: block; color: var(--head); font-size: 15px; }
.quote-card small { display: block; font-size: 12px; line-height: 1.45; color: #8a93a0; font-style: italic; }
.quote-card blockquote p { font-size: 14px; margin: 0; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.quote-card.is-open blockquote p { -webkit-line-clamp: unset; }
.read-more { align-self: flex-start; margin-top: 10px; background: none; border: 0; padding: 0; font: 600 12px var(--font); color: var(--teal); cursor: pointer; }
.slider-btn { position: absolute; top: 45%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--white); color: var(--teal); font-size: 28px; line-height: 1; box-shadow: var(--shadow); cursor: pointer; }
.slider-btn:hover { background: var(--teal); color: #fff; }
.slider-btn.prev { left: -22px; } .slider-btn.next { right: -22px; }

/* News */
.news { padding: 80px 0; background: var(--white); }
.news--page { background: transparent; padding-top: 20px; }
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.news-card { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; background: var(--bg); border-radius: var(--radius); padding: 20px; }
.news--page .news-card { background: var(--white); box-shadow: var(--shadow); }
.news-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.news-body h3 { margin-bottom: .4em; }
.news-body p { font-size: 14px; }
.news-grid--list { grid-template-columns: 1fr; max-width: 920px; }
.news-grid--list .news-card { grid-template-columns: 280px 1fr; padding: 24px; }

/* Book club */
.bookclub { padding: 90px 0; }
.bookclub-inner { display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.bookclub-copy { padding: 56px; }
.bookclub-img { background: url(../img/R-1.jpeg) center / cover; min-height: 340px; }

/* Available now (stacked) */
.available { padding: 80px 0; }
.available-inner { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }
.available--stack .available-inner { grid-template-columns: 1fr; text-align: center; max-width: 820px; }
.available--stack .available-cover { max-width: 240px; margin-inline: auto; }
.available--stack .btn-row { justify-content: center; }

/* Subscribe */
.subscribe { padding: 0 0 90px; }
.subscribe-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; background: var(--teal); color: #e8f1f3; border-radius: 14px; padding: 44px 52px; }
.subscribe-inner .kicker { color: #fff; margin-bottom: .5em; }
.subscribe-inner p { margin: 0; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 10px; }
.subscribe-form input[type=email] { flex: 1 1 220px; }
.subscribe-form .btn { background: var(--coral); }
.subscribe-form .btn:hover { background: var(--coral-dark); }
.subscribe-form .form-msg { flex-basis: 100%; color: #fff; }

/* Forms */
input, select, textarea { width: 100%; font: 400 14px var(--font); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-height: 46px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(78, 123, 134, .15); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--head); margin-bottom: 6px; }
.form-msg { margin: 10px 0 0; font-size: 14px; min-height: 1em; }
.form-msg.is-error { color: var(--coral); }
.form-msg.is-ok { color: var(--teal); }

/* Contact */
.contact { padding: 20px 0 90px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-card { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); padding: 32px 28px 28px; box-shadow: var(--shadow); scroll-margin-top: 110px; }
.contact-kicker { text-transform: uppercase; letter-spacing: 2px; font-size: 12px; font-weight: 700; color: #8a93a0; margin-bottom: .4em; }
.contact-card .h4 { color: var(--head); margin-bottom: .8em; }
.contact-card p { font-size: 14px; }
.contact-mail { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 600; font-size: 14px; text-decoration: none; overflow-wrap: anywhere; }
.contact-follow { margin-top: 56px; text-align: center; }
.contact-follow .kicker { margin-bottom: .8em; }
.contact-follow .social { justify-content: center; }

/* Books page */
.book { padding: 30px 0 90px; }
.book-inner { display: grid; grid-template-columns: 1fr 360px; gap: 64px; align-items: start; }
.book-title { font-size: clamp(30px, 4vw, 42px); font-weight: 700; color: var(--coral); text-transform: uppercase; }
.book-copy .kicker { margin-bottom: .4em; }
.book-side { position: sticky; top: 104px; }
.book-cover { border-radius: 4px; box-shadow: 0 18px 40px rgba(0, 0, 0, .2); margin-bottom: 24px; }
.buy-box { background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.buy-box .h4 { color: var(--teal); text-transform: uppercase; font-weight: 800; }
.store-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.store-grid a { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; transition: border-color .2s, transform .2s; }
.store-grid a:hover { border-color: var(--teal); transform: translateY(-1px); }
.store-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: #8a93a0; margin: 16px 0 8px; }

/* Books index cards */
.book-cards { padding: 30px 0 90px; }
.book-cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; max-width: 1000px; }
.book-card { display: flex; flex-direction: column; background: var(--white); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .25s, box-shadow .25s; }
.book-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px rgba(7, 26, 31, .16); color: var(--ink); }
.book-card-media { display: grid; place-items: center; padding: 44px 32px; }
.book-card-media img { width: auto; max-height: 340px; border-radius: 3px; box-shadow: 0 18px 36px rgba(0, 0, 0, .35); transition: transform .25s; }
.book-card:hover .book-card-media img { transform: scale(1.02); }
.book-card--fog .book-card-media { background: radial-gradient(ellipse at 50% 40%, #1f5f52 0%, #0d3029 55%, #04120f 100%); }
.book-card--sea .book-card-media { background: linear-gradient(180deg, #efe7d3, #e2d6b8); }
.book-card-body { display: flex; flex-direction: column; flex: 1; padding: 28px 32px 32px; }
.book-card-body .kicker { margin-bottom: .5em; font-size: 12px; }
.book-card-title { font-size: 28px; font-weight: 700; text-transform: uppercase; color: var(--coral); line-height: 1.1; margin-bottom: .4em; }
.book-card--fog .book-card-title { color: #17765e; }
.book-card-text { font-size: 15px; margin-bottom: 1.2em; }
.book-card-cta { margin-top: auto; font-weight: 600; font-size: 14px; color: var(--teal); }
.btn--block { width: 100%; }
.more-link { margin-top: 1.2em; font-size: 14px; }

/* Tabs */
.tabs { margin-top: 40px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tab-list { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tab-list button { flex: 1 1 auto; border: 0; background: none; padding: 16px 18px; font: 600 13px var(--font); color: #8a93a0; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-list button[aria-selected=true] { color: var(--teal); border-color: var(--teal); }
.tab-panel { padding: 28px; }
.tabs .tab-panel p { font-size: 14px; }
.tab-list--pills { border: 0; gap: 8px; margin-bottom: 14px; }
.tab-list--pills button { flex: 1; border: 1px solid var(--teal); border-radius: var(--pill); padding: 9px; margin: 0; color: var(--teal); }
.tab-list--pills button[aria-selected=true] { background: var(--teal); color: #fff; }
.buy-box .tab-panel { padding: 0; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; font-size: 14px; }
.details dt { font-weight: 600; color: var(--head); }
.details dd { margin: 0; }
.res-list { padding-left: 18px; font-size: 14px; margin: 0 0 24px; }
.res-list li { margin-bottom: 10px; }

/* Footer */
.site-footer { position: relative; background: var(--navy); color: #c9d4d7; padding: 90px 0 50px; font-size: 14px; }
.footer-wave { position: absolute; left: 0; right: 0; top: -1px; height: 60px; background: var(--bg); clip-path: ellipse(70% 100% at 50% 0); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
.footer-logo { width: min(340px, 100%); margin-bottom: 24px; }
.site-footer h4 { color: #fff; font-size: 17px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #c9d4d7; text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.copyright { text-transform: uppercase; letter-spacing: 2px; font-size: 12px; margin-bottom: .4em; }
.fine { font-size: 11px; opacity: .7; }
.publisher { width: 150px; margin-top: 18px; filter: brightness(0) invert(1); opacity: .85; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Tablet */
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: 16px 24px 24px; display: none; }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 10px; }
  .site-nav a { text-align: center; padding: 11px 16px; font-size: 14px; }
  .slider-track { grid-auto-columns: calc((100% - 24px) / 2); }
  .slider-btn.prev { left: -10px; } .slider-btn.next { right: -10px; }
  .book-inner { grid-template-columns: 1fr 300px; gap: 40px; }
  .news-card, .news-grid--list .news-card { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .hero { padding: 56px 0 40px; }
  .fogtown { padding-top: 16px; }
  .fog-card { grid-template-columns: 1fr; gap: 28px; padding: 32px 24px; text-align: center; }
  .fog-cover { max-width: 230px; margin-inline: auto; }
  .fog-copy p:not(.fog-date):not(.fog-sub) { margin-inline: auto; }
  .fog-copy .btn-row { justify-content: center; }
  .hero-card { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .hero-cover { max-width: 220px; margin-inline: auto; }
  .hero-card .btn-row { justify-content: center; }
  .feature-inner, .about-inner, .bio-inner, .available-inner, .bookclub-inner, .subscribe-inner, .contact-grid, .book-inner, .book-cards-grid { grid-template-columns: 1fr; }
  .feature-inner { gap: 32px; padding: 32px 24px; text-align: center; }
  .feature-img { margin-inline: auto; }
  .feature-inner .btn-row { justify-content: center; }
  .feature-img { max-width: 240px; }
  .about-inner .portrait { max-width: 320px; order: -1; }
  .bio .portrait, .book-side { position: static; }
  .bio .portrait { max-width: 320px; }
  .book-side { max-width: 420px; }
  .available-inner { text-align: center; }
  .available-cover { max-width: 220px; margin-inline: auto; }
  .available .btn-row { justify-content: center; }
  .bookclub-copy { padding: 36px 28px; }
  .bookclub-img { min-height: 220px; order: -1; }
  .subscribe-inner { padding: 36px 28px; gap: 24px; }
  .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Phone */
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 70px; }
  .slider-track { grid-auto-columns: 88%; gap: 14px; }
  .slider-btn { display: none; }
  .praise, .news, .bookclub, .about-teaser, .available { padding: 60px 0; }
  .tab-list button { flex-basis: 100%; text-align: left; }
  .tab-list--pills button { flex-basis: auto; text-align: center; }
  .tab-panel { padding: 22px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
