﻿:root {
  --author-navy: #101b35;
  --author-navy-light: #1c2c4e;
  --author-gold: #d6ad60;
  --author-gold-light: #f5e9ce;
  --author-text: #263248;
  --author-muted: #697386;
  --author-background: #f7f7f5;
  --author-border: #e7e8ec;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--author-background);
  color: var(--author-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.65;
}

h1, h2, h3, .font-display {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  transition: background-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(214, 173, 96, 0.65);
  outline-offset: 3px;
}

input,
textarea,
select {
  border-color: #d8dce5;
  border-radius: 10px;
}

main,
section {
  scroll-margin-top: 100px;
}

main h1,
main h2,
section h1,
section h2 {
  color: var(--author-navy);
  letter-spacing: -0.035em;
}

#books-container > div {
  border-radius: 18px;
}

#cart-modal > div {
  border-left: 3px solid var(--author-gold);
}

#preview-modal > div {
  border-top: 4px solid var(--author-gold);
}

#ebook-login-panel,
#ebook-library-panel,
#ebook-reader-panel,
#order-lookup-form {
  border-radius: 18px;
}

#ebook-email-form {
  background: #fff;
  border: 1px solid var(--author-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 12px 35px rgba(16, 27, 53, 0.06);
}

#ebook-login-button,
#lookup-submit {
  background: var(--author-navy) !important;
  border-radius: 10px;
}

#ebook-login-button:hover,
#lookup-submit:hover {
  background: var(--author-navy-light) !important;
}

#about .rounded-full {
  border-color: var(--author-gold-light);
}

#reviews .rounded-xl,
#reviews .rounded-2xl {
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(16, 27, 53, 0.045);
}

#order-status {
  background: #f1f3f7;
}

@media (max-width: 640px) {
  #ebook-email-form {
    padding: 18px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Premium book collection */
#books {
  max-width: 1240px;
}

#books-container {
  align-items: stretch;
  gap: 30px;
}

.premium-book-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5dfd2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(16, 27, 53, .07);
  transition: transform .25s ease, box-shadow .25s ease;
}

.premium-book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(16, 27, 53, .13);
}

.book-cover-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 28px;
  overflow: hidden;
  background: radial-gradient(ellipse at top, #33476b, #101b35 72%);
}

.book-cover {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 14px 14px rgba(0, 0, 0, .35));
}

.cover-fallback {
  position: absolute;
  color: #d6ad60;
  font-size: 56px;
  opacity: 0;
}

.cover-missing .cover-fallback {
  opacity: 1;
}

.book-number {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  border: 1px solid rgba(214, 173, 96, .6);
  border-radius: 30px;
  padding: 5px 10px;
  color: #f5e9ce;
  background: rgba(16, 27, 53, .7);
  font-size: 10px;
  letter-spacing: .15em;
}

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

.book-eyebrow {
  margin: 0 0 8px;
  color: #a77a2d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .17em;
}

.book-title {
  margin: 0 0 12px;
  color: #101b35;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.2;
}

.book-description {
  flex: 1;
  margin: 0 0 20px;
  color: #697386;
  font-size: 14px;
  line-height: 1.8;
}

.trailer-actions {
  display: grid;
  gap: 9px;
  margin: 0 0 14px;
}

.trailer-button {
  border: 1px solid #101b35;
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  background: #101b35;
  font-size: 13px;
  font-weight: 700;
}

.trailer-button:hover {
  background: #243758;
}

.trailer-button-secondary {
  border-color: #d6ad60;
  color: #73511b;
  background: #fffaf0;
}

.trailer-button-secondary:hover {
  background: #f5e9ce;
}

.preview-button {
  width: 100%;
  margin-bottom: 12px;
  border: 1px solid #ded6c7;
  border-radius: 10px;
  padding: 11px;
  color: #34415b;
  background: #fff;
  font-size: 13px;
  font-weight: 650;
}

.book-purchase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.purchase-button {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  border-radius: 10px;
  padding: 10px 7px;
  color: #fff;
  background: #a77a2d;
  font-size: 12px;
  font-weight: 700;
}

.purchase-button span {
  font-size: 16px;
}

.ebook-purchase {
  color: #f5e9ce;
  background: #1c2c4e;
}

.catalog-error {
  grid-column: 1 / -1;
  border: 1px solid #e5c8c8;
  border-radius: 12px;
  padding: 20px;
  color: #8b2525;
  background: #fff7f7;
  text-align: center;
}

/* Cinematic video modal */
.trailer-modal[hidden] {
  display: none !important;
}

.trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
  background: rgba(5, 10, 22, .88);
  backdrop-filter: blur(8px);
}

.trailer-dialog {
  width: min(900px, 100%);
  overflow: hidden;
  border: 1px solid rgba(214, 173, 96, .45);
  border-radius: 18px;
  padding: 20px;
  color: #fff;
  background: #101b35;
  box-shadow: 0 25px 90px rgba(0, 0, 0, .5);
}

.trailer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

.trailer-heading h2 {
  margin: 0;
  color: #f5e9ce;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 4vw, 32px);
}

.trailer-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid #52607b;
  border-radius: 50%;
  color: #fff;
  background: #1c2c4e;
  font-size: 28px;
}

#trailer-video {
  display: block;
  width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  background: #000;
}

.trailer-note {
  margin: 14px 0 0;
  color: #c4ccda;
  font-size: 12px;
}

body.trailer-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  #books-container {
    gap: 20px;
  }

  .book-cover-wrap {
    min-height: 250px;
  }

  .book-cover {
    height: 250px;
  }

  .book-card-content {
    padding: 20px;
  }

  .trailer-modal {
    padding: 10px;
  }

  .trailer-dialog {
    padding: 14px;
  }
}

/* Book pricing */
.book-price {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: 8px;
}


.book-mrp {
  color: #ffffff !important;
  opacity: 1 !important;
  text-decoration: line-through;
  font-size: 12px;
  font-weight: 500;
  margin-right: 5px;
}

.author-image {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
}

.book-selling-price {
  color: inherit;
  font-weight: 700;
}

.book-selling-price:where(:not(:empty)) {
  letter-spacing: 0.01em;
}

@media (max-width: 480px) {
  .book-purchase-row {
    gap: 8px;
  }

  .book-price {
    margin-left: 4px;
    gap: 4px;
  }
}
/* About Author layout */
.about-container {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 55px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
    align-items: start;
}

/* Large photo that stays visible while reading */
.author-photo {
    position: sticky;
    top: 110px;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.author-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Biography text */
.author-content {
    min-width: 0;
    line-height: 1.9;
    text-align: justify;
    color: #344054;
    font-size: 17px;
}

.author-content h1,
.author-content h2,
.author-content h3 {
    text-align: left;
    line-height: 1.3;
    color: #152238;
}

/* Mobile layout */
@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px;
    }

    .author-photo {
        position: relative;
        top: auto;
        width: 100%;
        max-width: 420px;
        height: 480px;
        margin: 0 auto;
    }

    .author-content {
        font-size: 16px;
    }
}

/* ==========================================================
   Shared site chrome: header, navigation, footer
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--author-border);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  color: var(--author-navy);
  text-decoration: none;
}

.site-brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--author-gold-light);
  background: var(--author-navy);
  font-family: "Fraunces", Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: "Fraunces", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-brand__text small {
  margin-top: 3px;
  color: #a77a2d;
  font-family: Inter, system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  position: relative;
  border-radius: 10px;
  padding: 8px 12px;
  color: #4b5568;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav a:hover {
  color: var(--author-navy);
  background: #f3f1eb;
}

.site-nav a[aria-current="page"] {
  color: var(--author-navy);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--author-gold);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--author-border);
  border-radius: 12px;
  color: var(--author-navy);
  background: #fff;
  font-size: 20px;
  line-height: 1;
}

.nav-toggle:hover {
  transform: none;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 9px 14px;
  color: #fff;
  background: var(--author-navy);
  font-size: 14px;
  font-weight: 700;
}

.cart-button:hover {
  background: var(--author-navy-light);
}

.cart-button__count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 6px;
  color: var(--author-navy);
  background: var(--author-gold);
  font-size: 12px;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: grid;
    place-items: center;
    order: 3;
  }

  .site-header__inner {
    flex-wrap: wrap;
  }

  .site-nav {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 6px;
    border-top: 1px solid var(--author-border);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 10px;
    font-size: 16px;
  }

  .site-nav a[aria-current="page"] {
    background: #f6f1e6;
  }

  .site-nav a[aria-current="page"]::after {
    display: none;
  }
}

@media (max-width: 420px) {
  .site-brand__text {
    font-size: 17px;
  }

  .cart-button__label {
    display: none;
  }
}

.site-footer {
  color: #c9d1e0;
  background: var(--author-navy);
  border-top: 3px solid var(--author-gold);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 20px 28px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--author-gold);
  font-family: Inter, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.site-footer__brand {
  color: #fff;
  font-family: "Fraunces", Georgia, serif;
  font-size: 24px;
  font-weight: 600;
}

.site-footer__tagline {
  max-width: 340px;
  margin-top: 10px;
  color: #a9b3c6;
  font-size: 14px;
  line-height: 1.7;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.site-footer a {
  color: #d8deea;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--author-gold);
}

.site-footer__bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #8f9ab0;
  font-size: 13px;
}

@media (min-width: 761px) {
  .site-footer__inner--four {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding-top: 44px;
  }

  .site-footer__about {
    grid-column: 1 / -1;
  }
}

/* ==========================================================
   Shared page building blocks
   ========================================================== */
.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 60% 80% at 85% 0%, rgba(214, 173, 96, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 70% at 0% 100%, rgba(99, 102, 241, 0.16), transparent 60%),
    linear-gradient(135deg, #0b1428, #101b35 55%, #17264a);
}

.page-hero__inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 20px 72px;
}

.page-hero--center .page-hero__inner {
  text-align: center;
}

.page-hero h1 {
  max-width: 820px;
  margin: 12px 0 0;
  color: #fff;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.page-hero--center h1,
.page-hero--center .lede {
  margin-left: auto;
  margin-right: auto;
}

.page-hero .lede {
  max-width: 640px;
  margin-top: 16px;
  color: #b9c2d4;
  font-size: 17px;
  line-height: 1.75;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #a77a2d;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.page-hero .eyebrow {
  color: var(--author-gold);
}

.eyebrow::before,
.page-hero--center .eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.section-title {
  color: var(--author-navy);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 13px 22px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

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

.btn-gold {
  color: var(--author-navy);
  background: var(--author-gold);
}

.btn-gold:hover {
  background: #e2bd77;
}

.btn-navy {
  color: #fff;
  background: var(--author-navy);
}

.btn-navy:hover {
  background: var(--author-navy-light);
}

.btn-outline {
  border: 1px solid #d5cfc2;
  color: var(--author-navy);
  background: #fff;
}

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

.btn-ghost-light {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.12);
}

.surface-card {
  border: 1px solid #ebe6db;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(16, 27, 53, 0.06);
}

.form-card {
  border: 1px solid #ebe6db;
  border-radius: 20px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(16, 27, 53, 0.08);
}

.form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--author-navy);
  font-size: 14px;
  font-weight: 650;
}

.form-input {
  width: 100%;
  border: 1px solid #d8dce5;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fbfbfa;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.form-input:focus {
  border-color: var(--author-gold);
  background: #fff;
  outline: none;
}

.page-overlap {
  position: relative;
  margin-top: -40px;
}

@media (max-width: 640px) {
  .page-hero__inner {
    padding: 44px 20px 56px;
  }

  .form-card {
    padding: 20px;
  }
}

/* Series filter chips on the Books page */
#series-filters button {
  border: 1px solid #ddd6c6 !important;
  border-radius: 999px;
  padding: 8px 18px;
  color: var(--author-navy) !important;
  background: #fff !important;
}

#series-filters button[aria-pressed="true"] {
  border-color: var(--author-navy) !important;
  color: #fff !important;
  background: var(--author-navy) !important;
}

/* Loading placeholder cards */
.skeleton-card {
  min-height: 560px;
  border-radius: 20px;
  background: linear-gradient(100deg, #eceae4 30%, #f6f5f1 50%, #eceae4 70%);
  background-size: 300% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
}

@keyframes skeleton {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

/* Reviews */
.review-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
}

.review-card blockquote {
  flex: 1;
  margin: 0;
  color: #2e3a52;
  font-family: "Fraunces", Georgia, serif;
  font-size: 19px;
  line-height: 1.55;
}

.review-card blockquote.review-card__text {
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.review-stars {
  color: var(--author-gold);
  letter-spacing: 3px;
}

/* Star rating picker (radios in reverse order so ~ selects lower stars) */
.star-input {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
}

.star-input input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.star-input label {
  cursor: pointer;
  color: #d9d4c7;
  font-size: 34px;
  line-height: 1;
  transition: color 0.15s ease, transform 0.15s ease;
}

.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label {
  color: var(--author-gold);
}

.star-input label:hover {
  transform: scale(1.1);
}

.star-input input:focus-visible + label {
  outline: 3px solid rgba(214, 173, 96, 0.65);
  outline-offset: 2px;
  border-radius: 4px;
}

.review-tag {
  align-self: flex-start;
  border-radius: 999px;
  padding: 4px 12px;
  color: #73511b;
  background: #faf3e3;
  font-size: 12px;
  font-weight: 700;
}

/* Home page cover strip */
.hero-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s ease;
}

.hero-cover-link:hover .hero-cover {
  transform: translateY(-6px) rotate(-1deg);
}