/*
Theme Name: Brian Blackwell Books
Theme URI: https://brianblackwellbooks.com/
Author: Blackwell Web Works
Author URI: https://blackwellwebworks.com/
Description: A refined coming-soon author theme for children's fantasy and adult urban fiction. Includes editable Gutenberg page layouts, book landing pages, built-in email and contact forms, and automatic starter-page setup.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: brian-blackwell-books
*/

:root {
  --bbb-ink: #07142c;
  --bbb-ink-2: #0d2045;
  --bbb-ink-3: #162e5c;
  --bbb-gold: #d59b3a;
  --bbb-gold-light: #f3ca72;
  --bbb-paper: #f8f1e3;
  --bbb-cream: #fffaf0;
  --bbb-violet: #6c3fb4;
  --bbb-muted: #b8c1d6;
  --bbb-white: #ffffff;
  --bbb-border: rgba(213, 155, 58, 0.45);
  --bbb-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --bbb-radius: 22px;
  --bbb-content: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bbb-ink);
  color: var(--bbb-white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

a { color: var(--bbb-gold-light); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--bbb-white); }

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.08;
}

h1 { font-size: clamp(3rem, 7vw, 6.7rem); letter-spacing: -0.045em; }
h2 { font-size: clamp(2.2rem, 4.5vw, 4.4rem); letter-spacing: -0.035em; }
h3 { font-size: clamp(1.45rem, 2.3vw, 2rem); }

p { margin-top: 0; }

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

.screen-reader-text:focus {
  z-index: 100000;
  display: block;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 0.7rem 1rem;
  clip: auto;
  background: var(--bbb-white);
  color: var(--bbb-ink);
}

.site-shell,
.bbb-content-width,
.wp-block-group.bbb-content-width,
.wp-block-columns.bbb-content-width {
  width: min(calc(100% - 40px), var(--bbb-content));
  margin-right: auto;
  margin-left: auto;
}

.alignwide { width: min(calc(100% - 40px), var(--bbb-content)); max-width: var(--bbb-content); margin-right: auto; margin-left: auto; }
.alignfull { width: 100%; max-width: none; margin-right: 0; margin-left: 0; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(213, 155, 58, 0.18);
  background: rgba(4, 13, 32, 0.9);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-branding { display: flex; align-items: center; }
.site-branding .custom-logo-link { display: flex; align-items: center; }
.site-branding .custom-logo { width: auto; max-height: 54px; }

.bbb-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--bbb-white);
  text-decoration: none;
}

.bbb-brand-link img { width: 45px; height: 45px; }
.bbb-brand-name { display: grid; line-height: 1; }
.bbb-brand-name strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.18rem; font-weight: 600; letter-spacing: 0.02em; }
.bbb-brand-name span { margin-top: 0.35rem; color: var(--bbb-gold-light); font-size: 0.63rem; font-weight: 800; letter-spacing: 0.24em; text-transform: uppercase; }

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--bbb-border);
  border-radius: 50%;
  background: transparent;
  color: var(--bbb-white);
  font-size: 1.4rem;
}

.primary-navigation ul,
.footer-navigation ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-navigation a,
.footer-navigation a {
  color: var(--bbb-white);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a,
.footer-navigation a:hover { color: var(--bbb-gold-light); }

.primary-navigation .menu-item:last-child a {
  display: inline-flex;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--bbb-gold);
  border-radius: 999px;
}

.bbb-home-hero,
.bbb-fantasy-hero,
.bbb-urban-hero,
.bbb-page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.bbb-home-hero {
  min-height: 760px;
  padding: clamp(5rem, 9vw, 8.5rem) 0;
  background:
    radial-gradient(circle at 76% 30%, rgba(112, 65, 190, 0.38), transparent 32%),
    radial-gradient(circle at 14% 15%, rgba(24, 87, 157, 0.42), transparent 36%),
    linear-gradient(130deg, #050d20 0%, #0a1d41 45%, #1a1644 100%);
}

.bbb-home-hero::before,
.bbb-fantasy-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.85) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(243,202,114,.75) 0 1px, transparent 1.5px);
  background-position: 0 0, 46px 72px;
  background-size: 120px 120px, 160px 160px;
  opacity: 0.18;
  content: "";
}

.bbb-home-hero::after {
  position: absolute;
  z-index: -1;
  right: -10%;
  bottom: -32%;
  width: 760px;
  height: 760px;
  border: 1px solid rgba(213,155,58,.18);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(213,155,58,.025), 0 0 0 170px rgba(213,155,58,.018);
  content: "";
}

.bbb-hero-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.bbb-eyebrow {
  margin-bottom: 1rem !important;
  color: var(--bbb-gold-light) !important;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.bbb-home-hero h1 { max-width: 780px; margin-bottom: 1.4rem; }
.bbb-home-hero .bbb-lead { max-width: 680px; color: #d8deeb; font-size: clamp(1.08rem, 2vw, 1.3rem); }

.wp-block-buttons { gap: 0.8rem; }
.wp-block-button__link,
.bbb-button,
button,
input[type="submit"] {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.35rem;
  border: 1px solid var(--bbb-gold);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--bbb-gold-light), var(--bbb-gold));
  box-shadow: 0 12px 30px rgba(213, 155, 58, 0.18);
  color: var(--bbb-ink) !important;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.wp-block-button__link:hover,
.bbb-button:hover,
button:hover,
input[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(213,155,58,.25); }

.wp-block-button.is-style-outline .wp-block-button__link {
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.04);
  box-shadow: none;
  color: var(--bbb-white) !important;
}

.bbb-book-stack { position: relative; min-height: 520px; }

.bbb-cover {
  position: absolute;
  display: flex !important;
  width: min(300px, 74vw);
  aspect-ratio: 0.67;
  margin: 0 !important;
  padding: 2.2rem 1.5rem !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(243,202,114,.66);
  border-radius: 8px 18px 18px 8px;
  box-shadow: -14px 18px 0 #050b18, var(--bbb-shadow);
  text-align: center;
  transform-origin: center bottom;
}

.bbb-cover::before {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(243,202,114,.32);
  border-radius: 4px 12px 12px 4px;
  content: "";
}

.bbb-cover h3 { position: relative; z-index: 1; margin: 0; color: var(--bbb-gold-light); font-size: clamp(1.7rem, 4vw, 2.65rem); text-shadow: 0 2px 14px rgba(0,0,0,.5); }
.bbb-cover p { position: relative; z-index: 1; margin: 1rem 0 0; color: rgba(255,255,255,.82); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.bbb-cover--deemu {
  z-index: 2;
  right: 15%;
  top: 20px;
  background:
    radial-gradient(circle at 50% 38%, rgba(132,75,255,.65), transparent 28%),
    linear-gradient(150deg, #112a63, #1b0e3d 60%, #f0782c 130%);
  transform: rotate(4deg);
}

.bbb-cover--deemu::after {
  position: absolute;
  bottom: 8%;
  width: 72%;
  height: 32%;
  border-radius: 50% 50% 10% 10%;
  background: radial-gradient(ellipse at bottom, rgba(246,119,49,.62), transparent 62%);
  filter: blur(3px);
  content: "";
}

.bbb-cover--unlucky {
  z-index: 1;
  left: 0;
  bottom: 2px;
  background:
    linear-gradient(155deg, rgba(255,255,255,.05), transparent 42%),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255,255,255,.025) 34px 35px),
    linear-gradient(145deg, #5a1d29, #11111b 67%);
  transform: rotate(-7deg) scale(.86);
}

.bbb-cover--unlucky h3 { color: #f1dfcc; }

.bbb-cover-image {
  overflow: hidden;
  padding: 0 !important;
  background: #111d45;
}

.bbb-cover-image img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px 18px 18px 8px;
  object-fit: cover;
}

.bbb-feature-cover {
  width: min(390px, 78vw);
  margin: 0 auto !important;
  transform: rotate(2deg);
}

.bbb-feature-cover img {
  display: block;
  width: 100%;
  border: 1px solid rgba(243,202,114,.62);
  border-radius: 8px 18px 18px 8px;
  box-shadow: -16px 20px 0 rgba(2,7,18,.9), 0 30px 80px rgba(0,0,0,.46);
}

.bbb-status-pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .8rem;
  border: 1px solid rgba(213,155,58,.35);
  border-radius: 999px;
  background: rgba(213,155,58,.09);
  color: var(--bbb-gold-light);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.bbb-status-pill::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 15px currentColor; content: ""; }

.bbb-section { padding: clamp(4.5rem, 8vw, 8rem) 0; }
.bbb-section--paper { background: var(--bbb-paper); color: var(--bbb-ink); }
.bbb-section--deep { background: #050d20; }
.bbb-section--glow { background: linear-gradient(145deg, #0b1c3b, #17103d); }

.bbb-section-heading { max-width: 760px; margin-bottom: 2.4rem !important; }
.bbb-section-heading p { color: #aeb9ce; }
.bbb-section--paper .bbb-section-heading p { color: #48536b; }

.bbb-card-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }

.bbb-book-card,
.bbb-info-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.5rem) !important;
  border: 1px solid var(--bbb-border);
  border-radius: var(--bbb-radius);
  background: linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.025));
  box-shadow: 0 18px 48px rgba(0,0,0,.18);
}

.bbb-book-card::after {
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(112,65,190,.32), transparent 68%);
  content: "";
}

.bbb-book-card > *, .bbb-info-card > * { position: relative; z-index: 1; }
.bbb-book-card h3 { margin: .9rem 0 .75rem; font-size: clamp(2rem, 3.8vw, 3rem); }
.bbb-book-card p { color: #c4cbdb; }

.bbb-book-card--urban { border-color: rgba(184,93,87,.45); background: linear-gradient(145deg, rgba(106,35,49,.3), rgba(255,255,255,.025)); }
.bbb-book-card--urban::after { background: radial-gradient(circle, rgba(184,68,78,.3), transparent 68%); }

.bbb-author-panel {
  display: grid !important;
  grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.bbb-author-photo {
  overflow: hidden;
  min-height: 430px;
  border: 1px solid rgba(7,20,44,.2);
  border-radius: var(--bbb-radius);
  background: linear-gradient(135deg, #d9c29a, #7f96ac);
  box-shadow: 0 22px 50px rgba(7,20,44,.18);
}

.bbb-author-photo img { display: block; width: 100%; height: 100%; min-height: 430px; object-fit: cover; }
.bbb-author-copy p { color: #33415d; }

.bbb-newsletter {
  padding: clamp(2rem, 5vw, 3.5rem) !important;
  border: 1px solid var(--bbb-border);
  border-radius: var(--bbb-radius);
  background:
    radial-gradient(circle at 12% 10%, rgba(213,155,58,.16), transparent 24%),
    linear-gradient(135deg, #102451, #231249);
  box-shadow: var(--bbb-shadow);
}

.bbb-newsletter-grid { display: grid !important; grid-template-columns: 1fr 1.25fr; align-items: center; gap: 2rem; }
.bbb-newsletter h2 { margin-bottom: .5rem; font-size: clamp(2rem, 4vw, 3.4rem); }

.bbb-form { width: 100%; }
.bbb-form-row { display: flex; gap: .7rem; }
.bbb-field { margin-bottom: 1rem; }
.bbb-field label { display: block; margin-bottom: .38rem; font-size: .78rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.bbb-field input,
.bbb-field textarea,
.bbb-form-row input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: .8rem 1rem;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 12px;
  outline: none;
  background: rgba(255,255,255,.96);
  color: var(--bbb-ink);
  font: inherit;
}

.bbb-field textarea { min-height: 160px; resize: vertical; }
.bbb-field input:focus, .bbb-field textarea:focus, .bbb-form-row input:focus { border-color: var(--bbb-gold); box-shadow: 0 0 0 3px rgba(213,155,58,.18); }
.bbb-form-note { margin: .65rem 0 0; color: #bfc8dc; font-size: .76rem; }
.bbb-form-status { margin-bottom: 1rem; padding: .75rem 1rem; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; }
.bbb-form-status--success { border-color: #66d7a3; background: rgba(35,143,98,.18); }
.bbb-form-status--error { border-color: #ff9d99; background: rgba(176,58,58,.18); }
.bbb-honeypot { position: absolute !important; left: -9999px !important; }

.bbb-page-hero { padding: clamp(5rem, 9vw, 8rem) 0; background: linear-gradient(145deg, #08142e, #162d59); }
.bbb-page-hero::after { position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 80% 20%, rgba(213,155,58,.15), transparent 28%); content: ""; }
.bbb-page-hero h1 { max-width: 900px; font-size: clamp(3rem, 6vw, 5.8rem); }
.bbb-page-hero p { max-width: 720px; color: #c4ccdb; font-size: 1.17rem; }

.bbb-fantasy-hero { padding: clamp(6rem, 12vw, 11rem) 0; background: radial-gradient(circle at 73% 44%, rgba(121,72,223,.48), transparent 28%), linear-gradient(145deg,#071433,#171149 65%,#311453); }
.bbb-fantasy-hero h1 { color: var(--bbb-gold-light); text-shadow: 0 3px 28px rgba(0,0,0,.45); }

.bbb-urban-hero { padding: clamp(6rem, 12vw, 10rem) 0; background: linear-gradient(125deg, rgba(65,17,26,.84), rgba(5,7,14,.96)), repeating-linear-gradient(90deg, transparent 0 74px, rgba(255,255,255,.02) 75px 76px); }
.bbb-urban-hero::after { position: absolute; inset: auto 0 0; height: 45%; z-index: -1; background: linear-gradient(160deg, transparent 35%, rgba(213,155,58,.11)); content: ""; }

.bbb-prose { width: min(calc(100% - 40px), 820px); margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) 0; }
.bbb-prose > * + * { margin-top: 1.35rem; }
.bbb-prose h2, .bbb-prose h3 { margin-top: 2.4rem; }

.bbb-contact-grid { display: grid !important; grid-template-columns: .75fr 1.25fr; gap: clamp(2rem, 6vw, 5rem); }

.site-footer { border-top: 1px solid rgba(213,155,58,.18); background: #030a18; }
.site-footer__main { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 3rem; padding: 3.5rem 0 2rem; }
.site-footer__copy { color: #aab4ca; font-size: .9rem; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 2rem; padding: 1.25rem 0 2rem; border-top: 1px solid rgba(255,255,255,.08); color: #8491aa; font-size: .78rem; }

.bbb-default-page { background: var(--bbb-paper); color: var(--bbb-ink); }
.bbb-default-page .bbb-page-content { width: min(calc(100% - 40px), 900px); margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) 0; }
.bbb-default-page .bbb-page-content a { color: #875509; }

.post-card { padding: 1.5rem; border: 1px solid var(--bbb-border); border-radius: 16px; background: rgba(255,255,255,.05); }
.post-card + .post-card { margin-top: 1rem; }

.error404 .site-main { display: grid; min-height: 65vh; place-items: center; padding: 5rem 1.5rem; text-align: center; }

@media (max-width: 880px) {
  body.admin-bar .site-header { top: 46px; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .primary-navigation { position: absolute; top: 100%; right: 20px; left: 20px; display: none; padding: 1rem; border: 1px solid var(--bbb-border); border-radius: 16px; background: #07142c; box-shadow: var(--bbb-shadow); }
  .primary-navigation.is-open { display: block; }
  .primary-navigation ul { align-items: stretch; flex-direction: column; gap: .25rem; }
  .primary-navigation a { display: block; padding: .7rem .5rem; }
  .primary-navigation .menu-item:last-child a { display: block; padding: .7rem .5rem; border: 0; }
  .bbb-hero-grid, .bbb-author-panel, .bbb-newsletter-grid, .bbb-contact-grid { grid-template-columns: 1fr; }
  .bbb-book-stack { width: min(100%, 560px); min-height: 500px; margin: 0 auto !important; }
  .bbb-card-grid { grid-template-columns: 1fr; }
  .site-footer__main { grid-template-columns: 1fr; }
  .footer-navigation ul { flex-wrap: wrap; gap: 1rem 1.5rem; }
}

@media (max-width: 600px) {
  .site-shell, .bbb-content-width, .wp-block-group.bbb-content-width, .wp-block-columns.bbb-content-width, .alignwide { width: min(calc(100% - 28px), var(--bbb-content)); }
  .bbb-brand-name strong { font-size: 1rem; }
  .bbb-brand-name span { font-size: .54rem; letter-spacing: .18em; }
  .bbb-home-hero { min-height: auto; padding-top: 4.5rem; }
  .bbb-book-stack { min-height: 410px; }
  .bbb-cover { width: 230px; }
  .bbb-cover--deemu { right: 4%; }
  .bbb-cover--unlucky { left: -4%; }
  .bbb-form-row { flex-direction: column; }
  .bbb-form-row input[type="submit"] { width: 100%; }
  .site-footer__bottom { flex-direction: column; gap: .5rem; }
}

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