/* ---------- Ahaan's Books — shared styles ---------- */

:root {
  --cream: #fdf6ec;
  --cream-2: #f7ede0;
  --ink: #33313d;
  --coral: #e8734a;
  --coral-dark: #cc5c37;
  --teal: #2f6f6a;
  --gold: #f2b544;
  --white: #ffffff;
  --border: #e9ddc9;
  --shadow: 0 12px 30px rgba(51, 49, 61, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Fredoka', 'Nunito Sans', sans-serif;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  padding: 22px 0;
  background: var(--cream);
}

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

.logo {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
}

.logo svg {
  display: block;
  height: 28px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.site-nav a:hover,
.site-nav a.active {
  opacity: 1;
  color: var(--coral-dark);
}

/* ---------- Hero ---------- */

.hero {
  padding: 40px 0 70px;
}

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

.hero-eyebrow {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--coral-dark);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 0.35em;
}

.hero h1 span {
  color: var(--coral);
}

.hero p.lead {
  font-size: 1.15rem;
  max-width: 46ch;
  opacity: 0.85;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-photo-frame {
  position: relative;
}

.hero-photo-frame img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
}

.hero-photo-frame::after {
  content: "";
  position: absolute;
  inset: 16px -16px -16px 16px;
  background: var(--gold);
  opacity: 0.35;
  border-radius: var(--radius-lg);
  z-index: -1;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--coral);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(232, 115, 74, 0.35);
}

.btn-primary:hover { background: var(--coral-dark); }

.btn-secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-ghost {
  background: var(--white);
  border-color: var(--border);
  color: var(--ink);
}

.btn[disabled],
.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

/* ---------- Sections ---------- */

section { padding: 56px 0; }

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 { font-size: 2rem; }

.section-title p {
  opacity: 0.75;
  max-width: 56ch;
  margin: 10px auto 0;
}

.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow);
}

/* About / bio grid */

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.about-grid img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.fact-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 12px;
}

.fact-list li {
  display: flex;
  gap: 10px;
  font-weight: 700;
}

.fact-list li span.label {
  color: var(--coral-dark);
  min-width: 110px;
}

/* Book cards */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.book-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
}

.book-card:hover { transform: translateY(-4px); }

.book-cover {
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, var(--gold) 0%, var(--coral) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  position: relative;
}

.book-cover .cover-title {
  font-family: 'Fredoka', sans-serif;
  color: var(--white);
  font-size: 1.5rem;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.book-cover.has-image {
  background-image: url('images/book-cover.jpg');
  background-size: cover;
  background-position: center;
}

.book-cover.has-image .cover-title {
  display: none;
}

.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--white);
  color: var(--coral-dark);
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 999px;
}

.book-card-body {
  padding: 22px 24px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.book-card-body h3 { font-size: 1.2rem; margin-bottom: 6px; }

.book-card-body p {
  opacity: 0.8;
  font-size: 0.95rem;
  flex: 1;
}

.book-card-body .cta {
  margin-top: 14px;
  font-weight: 800;
  color: var(--coral-dark);
  font-size: 0.9rem;
}

/* Book detail page */

.book-hero {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.book-hero .book-cover {
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
}

.status-note {
  background: var(--cream-2);
  border: 1px dashed var(--coral);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--coral-dark);
  margin: 20px 0;
}

.excerpt {
  background: var(--cream-2);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 24px 28px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  margin: 24px 0;
}

.excerpt p { margin: 0 0 0.6em; }
.excerpt p:last-child { margin-bottom: 0; }

.breadcrumb {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 24px;
  text-decoration: none;
  display: inline-block;
}

/* ---------- Contact form ---------- */

.contact-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: left;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--coral);
  outline-offset: 1px;
}

.contact-form textarea { resize: vertical; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  opacity: 0.75;
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .hero .wrap,
  .about-grid,
  .book-hero {
    grid-template-columns: 1fr;
  }

  .hero-photo-frame { order: -1; }

  .hero h1 { font-size: 2.1rem; }

  .site-nav { gap: 16px; }

  .logo svg { height: 24px; }

  .panel { padding: 28px; }
}
