/* =========================================================
   Sharp Mind Press — Main Stylesheet
   Design System: Minimalist, Academic, Brain-Training Brand
   ========================================================= */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
  --color-bg:         #fafaf8;
  --color-surface:    #ffffff;
  --color-border:     #e8e6e0;
  --color-text:       #1c1c1e;
  --color-text-muted: #6b6b70;
  --color-accent:     #1a3a5c;       /* deep navy */
  --color-accent-2:   #b8972e;       /* muted gold */
  --color-accent-light: #eef2f7;
  --color-coming-soon-bg: #f5f3ee;
  --color-coming-soon-border: #d4c89a;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius:    6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.09);

  --max-width: 1100px;
  --section-gap: 5rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

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

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

p { color: var(--color-text); }

.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-gold   { color: var(--color-accent-2); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: var(--section-gap) 0; }

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent-2);
  margin-bottom: 0.75rem;
}

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

.section-intro {
  max-width: 600px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* --- Navigation --- */
.site-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.01em;
}

.nav-brand span {
  color: var(--color-accent-2);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.2s;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1.5px solid transparent;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: #122a45;
  border-color: #122a45;
}

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

.btn-outline:hover {
  background: var(--color-accent-light);
}

.btn-gold {
  background: var(--color-accent-2);
  color: #fff;
  border-color: var(--color-accent-2);
}

.btn-gold:hover {
  background: #9e7e22;
}

.btn-disabled {
  background: var(--color-coming-soon-bg);
  color: var(--color-text-muted);
  border-color: var(--color-coming-soon-border);
  cursor: default;
  pointer-events: none;
}

/* --- Hero Section --- */
.hero {
  background: var(--color-surface);
  padding: 6rem 0 5rem;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent-2);
  margin-bottom: 1rem;
}

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

.hero-sub {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Divider --- */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 auto 3rem;
  max-width: 200px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.divider-icon {
  width: 28px;
  height: 28px;
  opacity: 0.45;
}

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

.book-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.book-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.book-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--color-accent-light);
}

.book-cover-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, var(--color-accent) 0%, #2a5a8c 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: #fff;
}

.book-cover-placeholder .cover-series {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.75;
  margin-bottom: 0.5rem;
}

.book-cover-placeholder .cover-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.book-cover-placeholder .cover-author {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: auto;
}

.book-cover-placeholder .cover-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.book-info {
  padding: 1.25rem;
}

.book-info h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.book-info p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.book-info .btn {
  width: 100%;
  justify-content: center;
  font-size: 0.82rem;
  padding: 0.5rem 1rem;
}

/* --- Coming Soon Badge --- */
.badge-coming-soon {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: var(--color-coming-soon-bg);
  color: var(--color-accent-2);
  border: 1px solid var(--color-coming-soon-border);
  margin-bottom: 0.5rem;
}

/* --- Coming Soon Section --- */
.coming-soon-section {
  background: var(--color-coming-soon-bg);
  border: 1px solid var(--color-coming-soon-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.coming-soon-section .section-label {
  color: var(--color-accent-2);
}

/* --- Feature Strip --- */
.feature-strip {
  background: var(--color-accent);
  color: #fff;
  padding: 3rem 0;
}

.feature-strip h2 {
  color: #fff;
}

.feature-strip p {
  color: rgba(255,255,255,0.75);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.feature-item {
  text-align: center;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.feature-item h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.feature-item p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.3;
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
}

/* --- About Page --- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.about-sidebar h4 {
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.category-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.category-list li:last-child { border-bottom: none; }

.category-list .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-2);
  flex-shrink: 0;
}

.category-list .dot-soon {
  background: var(--color-border);
}

/* --- Books Page --- */
.series-block {
  margin-bottom: 4rem;
}

.series-block:last-child { margin-bottom: 0; }

.series-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-border);
}

.series-header h2 {
  font-size: 1.6rem;
}

/* --- Contact Page --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.contact-detail svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

/* Form */
.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.08);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.65);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand .nav-brand {
  color: #fff;
  display: block;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: rgba(255,255,255,0.85);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: rgba(255,255,255,0.9);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .about-content,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  :root { --section-gap: 3.5rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
  }

  .nav-links.open { display: flex; }

  .nav-toggle { display: flex; }

  .site-nav { position: relative; }

  .hero { padding: 4rem 0 3.5rem; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
  }
}

@media (max-width: 400px) {
  .books-grid {
    grid-template-columns: 1fr 1fr;
  }
}
