/* Story Bora — Clean & Understated Design System */

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Variables */
:root {
  --dark: #2C2C2A;
  --accent: #8FA2C8;
  --accent-dark: #1F2E4A;
  --accent-light: #ECEEF3;
  --muted: #D3D1C7;
  --offwhite: #FAFAF8;
  --warm-gray: #888780;
  --light-border: rgba(0, 0, 0, 0.08);
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--offwhite);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.25;
}

h1 { font-size: 2.75rem; letter-spacing: -0.5px; }
h2 { font-size: 1.75rem; letter-spacing: -0.3px; }
h3 { font-size: 1.25rem; }

p { max-width: 640px; }

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--dark); }

/* Layout */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.site-nav {
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  background: var(--accent-light);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav .logo {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--dark);
  letter-spacing: -0.3px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-nav .logo span {
  color: var(--accent-dark);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--warm-gray);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--dark);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  transition: 0.3s;
}

/* Hero */
.hero {
  padding: 6rem 0 5rem;
  text-align: center;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--warm-gray);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Section */
.section {
  padding: 4rem 0;
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
  margin-bottom: 0.75rem;
}

.section h2 {
  margin-bottom: 1rem;
}

.section p {
  color: #5F5E5A;
}

/* Author Cards (home page) */
.author-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.author-card {
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  transition: border-color 0.2s, transform 0.2s;
}

.author-card:hover {
  border-color: var(--muted);
  transform: translateY(-2px);
}

.author-card .author-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.author-card .author-genre {
  font-size: 0.85rem;
  color: var(--warm-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.author-card .series-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.author-card .teaser {
  font-size: 0.95rem;
  color: #5F5E5A;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.author-card .card-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.author-card .card-link::after {
  content: '\2192';
  transition: transform 0.2s;
}

.author-card:hover .card-link::after {
  transform: translateX(3px);
}

/* Newsletter */
.newsletter {
  background: var(--accent-light);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  margin: 2rem 0;
}

.newsletter h2 {
  margin-bottom: 0.5rem;
}

.newsletter p {
  color: #5F5E5A;
  margin: 0 auto 1.5rem;
  max-width: 440px;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--muted);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--accent);
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background: var(--accent-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.newsletter-form button:hover {
  background: var(--dark);
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--light-border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--warm-gray);
}

/* ---- Author Page Styles ---- */

.author-hero {
  padding: 4rem 0 3rem;
}

.author-hero .author-name-large {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 0.35rem;
}

.author-hero .author-genre-label {
  font-size: 0.85rem;
  color: var(--warm-gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.author-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent-dark);
  color: #fff;
  border: 1px solid var(--accent-dark);
}

.btn-primary:hover {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 1px solid var(--muted);
}

.btn-outline:hover {
  border-color: var(--dark);
}

/* Author bio section */
.author-bio {
  padding: 3rem 0;
}

.author-bio .bio-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #5F5E5A;
  max-width: 680px;
}

.author-bio .bio-text p + p {
  margin-top: 1.25rem;
}

/* Series section */
.series-section {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--light-border);
}

.series-section .series-name {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.series-section .series-status {
  font-size: 0.85rem;
  color: var(--accent-dark);
  margin-bottom: 1.25rem;
}

.series-section .series-description {
  font-size: 1rem;
  color: #5F5E5A;
  max-width: 680px;
  line-height: 1.75;
}

/* Status badge */
.status-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

/* Image Placeholders */
.img-placeholder {
  background: #EEEDEC;
  border: 2px dashed var(--muted);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warm-gray);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
}

.img-placeholder::before {
  content: '\2715';
  position: absolute;
  font-size: 2rem;
  color: var(--muted);
  opacity: 0.6;
}

.img-placeholder span {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
}

/* Home page: author card with headshot */
.author-card .card-headshot {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 1.25rem;
}

.author-card .card-headshot::before {
  font-size: 1.2rem;
}

.author-card .card-headshot span {
  margin-top: 1.8rem;
  font-size: 0.65rem;
}

/* Author page: bio layout with headshot */
.bio-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.bio-headshot {
  width: 180px;
  min-width: 180px;
  height: 220px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* Series section: book cover */
.series-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}

.book-cover-placeholder {
  width: 160px;
  min-width: 160px;
  height: 240px;
  border-radius: 6px;
  flex-shrink: 0;
}

.series-layout .series-info {
  flex: 1;
}

/* Logo placeholder in nav */
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  margin-right: 10px;
  display: inline-flex;
  vertical-align: middle;
}

.logo-icon::before { font-size: 0.9rem; }
.logo-icon span { display: none; }

/* Author Page Accent Overrides */
[data-author="rusty"] {
  --accent: #7BA99A;
  --accent-dark: #2E6B55;
  --accent-light: #E4F0EB;
}

[data-author="leia"] {
  --accent: #C99AA8;
  --accent-dark: #8A4A5C;
  --accent-light: #F3E8EC;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--light-border);
  margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }

  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3rem 0; }

  .newsletter { padding: 2rem 1.5rem; }
  .newsletter-form {
    flex-direction: column;
  }

  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--offwhite);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  background: var(--accent-light);
    gap: 1rem;
  }

  .site-nav .container {
    position: relative;
  }

  .author-links {
    flex-direction: column;
  }

  .btn { justify-content: center; }

  .bio-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bio-headshot {
    width: 140px;
    min-width: 140px;
    height: 170px;
  }

  .bio-layout .bio-text { text-align: left; }

  .series-layout {
    flex-direction: column;
    align-items: center;
  }

  .book-cover-placeholder {
    width: 130px;
    min-width: 130px;
    height: 195px;
  }
}

/* Nav logo image */
.site-nav .logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

/* Hero logo */
.hero-logo {
  display: block;
  width: 340px;
  max-width: 80%;
  height: auto;
  margin: 0 auto 2rem;
}

/* Author photos (replacing placeholders) */
img.card-headshot {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.25rem;
}

img.bio-headshot {
  width: 180px;
  min-width: 180px;
  height: 180px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  img.bio-headshot {
    width: 140px;
    min-width: 140px;
    height: 140px;
  }
}
