/* ============================================================
   S.K. Media — Global Stylesheet
   Color palette: navy #1a1a2e, warm white #fafaf9, gold #d4a853
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,700;1,500&display=swap');

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

:root {
  --navy:       #1a1a2e;
  --navy-light: #252544;
  --navy-mid:   #2e2e52;
  --white:      #fafaf9;
  --white-dim:  #f0efe9;
  --gold:       #d4a853;
  --gold-hover: #e0bb6e;
  --gold-dim:   #b8923f;
  --text:       #2c2c2c;
  --text-light: #6b6b6b;
  --text-inv:   #e0dfd8;
  --radius:     8px;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.12);
  --max-w:      1200px;
  --transition: .25s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a   { color: var(--gold-dim); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: var(--navy);
  line-height: 1.25;
}

/* ---------- Utility ---------- */
.container  { width: 90%; max-width: var(--max-w); margin: 0 auto; }
.sr-only    { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .02em;
}
.logo span { color: var(--gold); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}
.nav-links a {
  color: var(--text-inv);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .02em;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--gold); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.menu-toggle svg { width: 24px; height: 24px; stroke: var(--white); }

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 1rem 5%;
    gap: .75rem;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .5rem 0; font-size: 1.05rem; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 5rem 0 4.5rem;
  text-align: center;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.25rem);
  max-width: 720px;
  margin: 0 auto .75rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}
.hero p {
  color: var(--text-inv);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto;
  opacity: .85;
}

/* ---------- Section Headings ---------- */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: .5rem;
}
.section-title p {
  color: var(--text-light);
  max-width: 540px;
  margin: 0 auto;
}
.section-title .rule {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold);
  margin: .75rem auto 0;
  border-radius: 2px;
}

/* ---------- Book Grid ---------- */
.books-section {
  padding: 4.5rem 0 5rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
}

.book-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.book-card__cover {
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--navy-light);
}
.book-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.book-card:hover .book-card__cover img {
  transform: scale(1.03);
}

.book-card__body {
  padding: 1.1rem 1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.book-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .25rem;
  line-height: 1.3;
}
.book-card__subtitle {
  font-size: .82rem;
  color: var(--text-light);
  line-height: 1.4;
  margin-bottom: .5rem;
}
.book-card__author {
  margin-top: auto;
  font-size: .8rem;
  color: var(--gold-dim);
  font-weight: 500;
}

.book-card a {
  color: inherit;
  text-decoration: none;
}
.book-card a:hover { color: inherit; }

/* ---------- Book Detail Page ---------- */
.breadcrumb {
  padding: 1rem 0;
  font-size: .85rem;
  color: var(--text-light);
}
.breadcrumb a { color: var(--gold-dim); }
.breadcrumb span { margin: 0 .4rem; color: #ccc; }

.book-detail {
  padding: 2rem 0 4rem;
}
.book-detail__layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.book-detail__cover {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 380px;
}
.book-detail__cover img {
  width: 100%;
  display: block;
}

.book-detail__info h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  margin-bottom: .35rem;
}
.book-detail__subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: .75rem;
}
.book-detail__author-line {
  font-size: .95rem;
  color: var(--gold-dim);
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.book-detail__author-line a { color: var(--gold-dim); }
.book-detail__author-line a:hover { color: var(--gold); }

.book-detail__description {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: var(--text);
}

.btn-amazon {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  padding: .85rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: background var(--transition), transform var(--transition);
  box-shadow: 0 2px 8px rgba(212,168,83,.3);
}
.btn-amazon:hover {
  background: var(--gold-hover);
  color: var(--navy);
  transform: translateY(-2px);
}
.btn-amazon svg {
  width: 18px;
  height: 18px;
}

.book-detail__author-box {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--white-dim);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
}
.book-detail__author-box h3 {
  font-size: 1.1rem;
  margin-bottom: .5rem;
}
.book-detail__author-box p {
  font-size: .95rem;
  color: var(--text-light);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .book-detail__layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .book-detail__cover {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* ---------- About Page ---------- */
.about-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 4rem 0 3.5rem;
  text-align: center;
}
.about-hero h1 {
  color: var(--white);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: .5rem;
}
.about-hero p {
  color: var(--text-inv);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
  opacity: .85;
}

.about-mission {
  padding: 4rem 0 3rem;
}
.about-mission__content {
  max-width: 720px;
  margin: 0 auto;
}
.about-mission__content h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.about-mission__content p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text);
}

.authors-section {
  padding: 3rem 0 5rem;
  background: var(--white-dim);
}

.author-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--gold);
}
.author-card h3 {
  font-size: 1.3rem;
  margin-bottom: .15rem;
}
.author-card .author-card__niche {
  font-size: .85rem;
  color: var(--gold-dim);
  font-weight: 500;
  margin-bottom: .75rem;
}
.author-card p {
  font-size: .97rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: .75rem;
}
.author-card__books {
  font-size: .9rem;
}
.author-card__books strong {
  color: var(--navy);
}
.author-card__books a {
  color: var(--gold-dim);
}
.author-card__books a:hover {
  color: var(--gold);
}

/* ---------- Contact Page ---------- */
.contact-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 4rem 0 3.5rem;
  text-align: center;
}
.contact-hero h1 {
  color: var(--white);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: .5rem;
}
.contact-hero p {
  color: var(--text-inv);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
  opacity: .85;
}

.contact-section {
  padding: 4rem 0 5rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.contact-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
}
.contact-box h3 {
  font-size: 1.2rem;
  margin-bottom: .5rem;
}
.contact-box p {
  font-size: .95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: .75rem;
}
.contact-box a.email-link {
  display: inline-block;
  color: var(--gold-dim);
  font-weight: 600;
  font-size: 1rem;
}
.contact-box a.email-link:hover {
  color: var(--gold);
}

.social-note {
  text-align: center;
  margin-top: 3rem;
  color: var(--text-light);
  font-size: .95rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--text-inv);
  padding: 3rem 0 2rem;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-brand .logo {
  margin-bottom: .5rem;
  display: inline-block;
}
.footer-brand p {
  font-size: .85rem;
  color: var(--text-inv);
  opacity: .6;
  max-width: 280px;
}
.footer-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.footer-nav a {
  color: var(--text-inv);
  font-size: .9rem;
  opacity: .7;
  transition: opacity var(--transition);
}
.footer-nav a:hover { opacity: 1; color: var(--gold); }

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .8rem;
  opacity: .5;
}

/* ---------- Books index page ---------- */
.books-index-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 4rem 0 3.5rem;
  text-align: center;
}
.books-index-hero h1 {
  color: var(--white);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: .5rem;
}
.books-index-hero p {
  color: var(--text-inv);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
  opacity: .85;
}

/* ---------- Animations ---------- */
@media (prefers-reduced-motion: no-preference) {
  .book-card {
    animation: fadeUp .5s ease both;
  }
  .book-card:nth-child(1)  { animation-delay: .05s; }
  .book-card:nth-child(2)  { animation-delay: .10s; }
  .book-card:nth-child(3)  { animation-delay: .15s; }
  .book-card:nth-child(4)  { animation-delay: .20s; }
  .book-card:nth-child(5)  { animation-delay: .25s; }
  .book-card:nth-child(6)  { animation-delay: .30s; }
  .book-card:nth-child(7)  { animation-delay: .35s; }
  .book-card:nth-child(8)  { animation-delay: .40s; }
  .book-card:nth-child(9)  { animation-delay: .45s; }
  .book-card:nth-child(10) { animation-delay: .50s; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
