/*
 Theme Name:   Child Author Page
 Theme URI:    https://wpastra.com/
 Description:  Becky Troup author page child theme for Astra
 Author:       Becky Troup
 Author URI:   https://beckytroup.com
 Template:     astra
 Version:      2.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  child-author-page
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Archivo:wght@400;500;600;700&family=Pinyon+Script&display=swap');

:root {
  --ink: #131f36;
  --navy: #223752;
  --deep: #1b2c49;
  --slate: #3c4f6b;
  --slate-2: #5e708a;
  --mist: #aec2cf;
  --fog: #d7e2e4;
  --fog-2: #e8eeee;
  --paper: #f6f1e6;
  --paper-deep: #ece6d8;
  --surface: #fcfaf3;
  --white: #ffffff;
  --ember: #bc6a3c;
  --ember-soft: #d2895c;
  --gold: #c49a4a;
  --rose: #a96a6e;
  --bg: var(--paper);
  --bg-alt: var(--paper-deep);
  --bg-dark: var(--navy);
  --bg-darkest: var(--ink);
  --text: var(--ink);
  --text-muted: var(--slate);
  --text-faint: var(--slate-2);
  --text-on-dark: var(--paper);
  --text-on-dark-muted: #a8b6c4;
  --border: #ded7c6;
  --border-cool: var(--fog);
  --accent: var(--ember);
  --accent-hover: var(--ember-soft);
  --focus-ring: rgba(188, 106, 60, 0.45);
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'EB Garamond', Georgia, serif;
  --font-ui: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-script: 'Pinyon Script', 'Snell Roundhand', cursive;
  --fs-h1: clamp(3rem, 5.2vw, 5rem);
  --fs-h2: clamp(2rem, 3.4vw, 3rem);
  --fs-h3: 1.85rem;
  --fs-lead: clamp(1.25rem, 1.6vw, 1.5rem);
  --fs-body: 1.15rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-10: 8rem;
  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 16px;
  --r-full: 999px;
  --shadow-sm: 0 1px 2px rgba(19, 31, 54, 0.06), 0 2px 6px rgba(19, 31, 54, 0.05);
  --shadow-md: 0 6px 18px rgba(19, 31, 54, 0.1), 0 2px 6px rgba(19, 31, 54, 0.06);
  --shadow-lg: 0 18px 50px rgba(19, 31, 54, 0.18), 0 6px 16px rgba(19, 31, 54, 0.1);
  --shadow-book: 0 26px 60px rgba(19, 31, 54, 0.34), 0 8px 18px rgba(19, 31, 54, 0.22);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur: 420ms;
  --dur-slow: 800ms;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0 !important;
  padding: 0 !important;
}

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

body.bt-author-body {
  background: var(--paper);
}

.home {
  --pg-bg: var(--paper);
  --pg-text: var(--ink);
  --pg-muted: var(--slate);
  --pg-faint: var(--slate-2);
  --pg-border: var(--border);
  --pg-nav-bg: rgba(246, 241, 230, 0.86);
  --pg-nav-text: var(--ink);
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--pg-text);
  background: var(--pg-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.home a {
  color: inherit;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ember);
}

.serif {
  font-family: var(--font-display);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--pg-nav-bg);
  border-bottom: 1px solid var(--pg-border);
  backdrop-filter: blur(12px);
}

.nav .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav .brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--pg-nav-text);
  text-decoration: none;
  white-space: nowrap;
}

.nav .links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav .links a {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--pg-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

.nav .links a:hover {
  color: var(--ember);
}

.nav .links .cta {
  padding: 10px 18px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0;
  background: var(--ember);
  border-radius: var(--r-full);
}

.nav .links .cta:hover {
  color: var(--white);
  background: var(--ember-soft);
}

.btn {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 15px 30px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn-primary {
  color: var(--white);
  background: var(--ember);
}

.btn-primary:hover {
  color: var(--white);
  background: var(--ember-soft);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline {
  color: var(--ember);
  background: transparent;
  border-color: var(--ember);
}

.btn-outline:hover {
  color: var(--white);
  background: var(--ember);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-sm {
  min-height: 40px;
  padding: 11px 22px;
  font-size: 0.76rem;
}

.btn-text {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ember);
  text-decoration: none;
  text-transform: uppercase;
  background: none;
  border: 0;
  transition: gap var(--dur) var(--ease), color var(--dur-fast) var(--ease);
}

.btn-text:hover {
  gap: 12px;
  color: var(--ember-soft);
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-paper {
  padding: 90px 0 70px;
}

.hero-paper .grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-paper h1 {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: 0;
  color: var(--ink);
}

.hero-paper h1 em {
  font-style: italic;
  color: var(--ember);
}

.hero-paper .lead {
  max-width: 42ch;
  margin: 24px 0 34px;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--slate);
}

.hero-paper .actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-paper .portrait {
  position: relative;
}

.hero-paper .portrait::before {
  position: absolute;
  inset: -26px -26px 26px 26px;
  content: "";
  background: radial-gradient(80% 80% at 50% 30%, var(--fog), transparent 72%);
  border-radius: var(--r-xl);
}

.hero-paper .portrait img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 25%;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.hero-paper .sig {
  position: absolute;
  right: 18px;
  bottom: -14px;
  font-family: var(--font-script);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--ember);
  text-shadow: 0 2px 12px rgba(246, 241, 230, 0.9);
}

.section {
  padding: var(--space-10) 0;
}

.section-head {
  margin-bottom: var(--space-8);
}

.section-head.center {
  text-align: center;
}

.section-head h2 {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--pg-text);
}

.section-head .sub {
  max-width: 56ch;
  margin: 14px 0 0;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--pg-muted);
}

.section-head.center .sub {
  margin-right: auto;
  margin-left: auto;
}

.books {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.book {
  display: flex;
  flex-direction: column;
}

.book .coverwrap {
  position: relative;
  align-self: flex-start;
  margin-bottom: 26px;
  perspective: 1200px;
}

.book img {
  display: block;
  width: 100%;
  max-width: 280px;
  border-radius: 4px;
  box-shadow: var(--shadow-book);
  transition: transform var(--dur-slow) var(--ease), box-shadow var(--dur-slow) var(--ease);
}

.book:hover img {
  box-shadow: 0 34px 70px rgba(19, 31, 54, 0.4);
  transform: translateY(-8px) rotateY(-6deg);
}

.book .k {
  margin: 0 0 9px;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ember);
  text-transform: uppercase;
}

.book h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--pg-text);
}

.book .d {
  flex: 1;
  margin: 0 0 16px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--pg-muted);
}

.book-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.about .grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.about img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.about .body p {
  max-width: 56ch;
  margin: 0 0 18px;
  font-size: 1.2rem;
  line-height: 1.62;
  color: var(--pg-muted);
}

.about .body p strong {
  font-weight: 600;
  color: var(--pg-text);
}

.about .pull {
  max-width: 22ch;
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
  color: var(--pg-text);
}

.about .pull .em {
  color: var(--ember);
}

.news {
  text-align: center;
}

.news .card {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 56px;
  overflow: hidden;
  color: var(--paper);
  background: var(--navy);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.news .card .glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 50% 0%, rgba(188, 106, 60, 0.22), transparent 70%);
}

.news h2,
.news p,
.news form {
  position: relative;
}

.news h2 {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--paper);
}

.news p {
  max-width: 44ch;
  margin: 14px auto 28px;
  font-size: 1.15rem;
  line-height: 1.55;
  color: #c7d2de;
}

.news form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}

.news input {
  flex: 1;
  min-width: 0;
  padding: 15px 18px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-md);
}

.news input::placeholder {
  color: #8595a8;
}

.news input:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.news .note {
  position: relative;
  margin-top: 16px;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  letter-spacing: 0;
  color: #8595a8;
}

.news .ok {
  min-height: 1.4em;
  margin: 8px 0 0;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ember-soft);
}

.foot {
  padding: 56px 0 40px;
  border-top: 1px solid var(--pg-border);
}

.foot .inner {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.foot .brand {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--pg-text);
}

.foot .tag {
  max-width: 30ch;
  margin: 0;
  font-style: italic;
  color: var(--pg-muted);
}

.foot .cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.foot .col h4 {
  margin: 0 0 14px;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--pg-faint);
  text-transform: uppercase;
}

.foot .col a {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--pg-muted);
  text-decoration: none;
}

.foot .col a:hover {
  color: var(--ember);
}

.foot .foot-legal-row {
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
}

.foot .legal {
  margin-top: 40px;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: var(--pg-faint);
}

.foot .foot-legal-row a {
  color: var(--pg-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.foot .foot-legal-row a:hover {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 860px) {
  .wrap {
    padding: 0 24px;
  }

  .hero-paper {
    padding: 48px 0 64px;
  }

  .hero-paper .grid,
  .about .grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-paper .portrait {
    order: -1;
    max-width: 360px;
  }

  .books {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .nav .links {
    gap: 16px;
  }

  .nav .links a:not(.cta) {
    display: none;
  }

  .section {
    padding: var(--space-8) 0;
  }

  .news .card {
    padding: 48px 24px;
  }

  .news form {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .hero-paper h1 {
    font-size: clamp(2.6rem, 14vw, 3.5rem);
  }

  .book .coverwrap {
    align-self: center;
  }

  .book .meta {
    text-align: center;
  }

  .book-actions {
    justify-content: center;
  }

  .foot .cols {
    gap: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .book img,
  .btn,
  .btn-text {
    transition: none;
  }
}
