/* ==========================================================================
   UNNIRAVEENDRA OFFICIAL AUTHOR WEBSITE - MASTER STYLESHEET
   Design System: Epic Dark Fantasy & Literary Luxury
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800;900&family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Noto+Serif+Malayalam:wght@400;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-dark: #090b0e;
  --bg-surface: #11141b;
  --bg-surface-elevated: #181d27;
  --bg-glass: rgba(17, 20, 27, 0.75);
  --bg-glass-card: rgba(24, 29, 39, 0.65);
  
  /* Brand Accent: Mythic Gold & Amber Glow */
  --gold-primary: #e2c082;
  --gold-light: #f5e4bc;
  --gold-dark: #b8934b;
  --gold-gradient: linear-gradient(135deg, #f5e4bc 0%, #e2c082 50%, #9e7935 100%);
  --gold-glow: rgba(226, 192, 130, 0.18);
  --gold-glow-strong: rgba(226, 192, 130, 0.35);

  /* Deep Cosmic Accent */
  --accent-cosmic: rgba(94, 138, 201, 0.15);
  --accent-cosmic-border: rgba(110, 160, 230, 0.3);

  /* Neutral Text Colors */
  --text-main: #f3f1ec;
  --text-muted: #a6aab5;
  --text-dim: #6c7280;
  
  /* Borders & Lines */
  --border-subtle: rgba(226, 192, 130, 0.12);
  --border-strong: rgba(226, 192, 130, 0.3);
  --border-glass: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-heading: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-malayalam: 'Noto Serif Malayalam', Georgia, serif;

  /* Layout & Shadows */
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 30px var(--gold-glow);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(226, 192, 130, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(70, 95, 135, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

/* Layout Wrap Container */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* Typography Helpers */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  background: linear-gradient(180deg, #ffffff 0%, #e2c082 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  margin-bottom: 18px;
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  margin-bottom: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-primary);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 14px;
}

.eyebrow::before, .eyebrow::after {
  content: "✧";
  font-size: 0.75rem;
  color: var(--gold-dark);
}

.lead {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: #dedad3;
  line-height: 1.6;
  font-weight: 400;
}

.lang-ml {
  font-family: var(--font-malayalam);
  letter-spacing: 0;
  color: var(--gold-light);
}

/* Header & Glass Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 3px;
  color: var(--text-main);
}

.brand-icon {
  color: var(--gold-primary);
  font-size: 1.4rem;
  text-shadow: 0 0 10px var(--gold-glow-strong);
}

.brand span {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.links a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  position: relative;
  padding: 8px 0;
}

.links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gold-gradient);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.links a:hover, .links a[aria-current="page"] {
  color: var(--gold-light);
}

.links a[aria-current="page"]::after, .links a:hover::after {
  width: 100%;
}

.menu {
  display: none;
  background: rgba(226, 192, 130, 0.08);
  border: 1px solid var(--border-strong);
  color: var(--gold-light);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

/* Button Component */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: var(--gold-gradient);
  color: #0b0d10;
  box-shadow: 0 4px 20px var(--gold-glow);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--gold-glow-strong);
  color: #000;
}

.btn.alt {
  background: rgba(255, 255, 255, 0.03);
  color: var(--gold-light);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.btn.alt:hover {
  background: rgba(226, 192, 130, 0.12);
  border-color: var(--gold-primary);
  color: #ffffff;
  transform: translateY(-3px);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  padding: 90px 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 70% 30%, rgba(226, 192, 130, 0.12) 0%, transparent 60%);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg-dark), transparent);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(226, 192, 130, 0.08);
  border: 1px solid var(--border-strong);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.hero-badge span {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-primary);
  font-weight: 700;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 50px;
  padding-top: 36px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item .stat-num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold-primary);
  line-height: 1;
}

.stat-item .stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

.hero-book-showcase {
  position: relative;
  display: flex;
  justify-content: center;
}

.book-card-3d {
  position: relative;
  width: 100%;
  max-width: 340px;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px var(--gold-glow);
  transition: transform var(--transition-smooth);
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.book-card-3d:hover {
  transform: translateY(-10px) rotateY(-5deg) scale(1.02);
}

.book-card-3d img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  object-fit: cover;
}

/* General Sections */
.section {
  padding: 100px 0;
  position: relative;
}

.section.alt {
  background: rgba(18, 22, 30, 0.6);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.page-head {
  padding: 100px 0 60px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(226, 192, 130, 0.1) 0%, transparent 70%);
  border-bottom: 1px solid var(--border-subtle);
}

.page-head .lead {
  max-width: 680px;
  margin: 16px auto 0;
}

/* Two Column Layout */
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* Three Column Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

/* Glass Card Component */
.card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 36px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 20px var(--gold-glow);
}

.card:hover::before {
  opacity: 1;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 12px 0 20px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-link:hover {
  color: #ffffff;
  gap: 10px;
}

/* Feature Book Spotlight Section */
.book-spotlight {
  background: linear-gradient(135deg, rgba(24, 29, 39, 0.9) 0%, rgba(12, 15, 21, 0.95) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 50px;
  box-shadow: var(--shadow-lg);
}

.book-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.spec-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.spec-item strong {
  font-size: 0.98rem;
  color: var(--gold-light);
}

/* Notice & Quote Box */
.notice {
  border-left: 3px solid var(--gold-primary);
  padding: 20px 24px;
  background: rgba(226, 192, 130, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--gold-light);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  margin: 24px 0;
}

/* Author Portrait Framing */
.author-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-strong);
}

.author-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.author-frame:hover img {
  transform: scale(1.03);
}

/* Gallery Grid & Lightbox */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 11, 14, 0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--gold-light);
}

.gallery-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Modal Lightbox & Excerpt Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(6, 8, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.modal.open {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--gold-light);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.modal-img-container img {
  max-height: 75vh;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Excerpt Reader Styling */
.excerpt-box {
  background: rgba(12, 14, 18, 0.8);
  border-left: 2px solid var(--gold-primary);
  padding: 30px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.8;
  color: #e5e2da;
  margin: 20px 0;
}

.excerpt-box p {
  margin-bottom: 16px;
}

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

.dropcap::first-letter {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  float: left;
  line-height: 0.8;
  padding-right: 12px;
  color: var(--gold-primary);
}

/* Form Controls */
.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-primary);
  margin-bottom: 8px;
}

.field {
  width: 100%;
  background: rgba(17, 20, 27, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 14px 18px;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.field:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px var(--gold-glow);
  background: rgba(24, 29, 39, 0.9);
}

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

/* Newsletter Bar */
.newsletter-card {
  background: radial-gradient(ellipse at 50% 0%, rgba(226, 192, 130, 0.15) 0%, rgba(18, 22, 30, 0.9) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 540px;
  margin: 28px auto 0;
}

.newsletter-form .field {
  border-radius: var(--radius-sm);
}

/* Footer Styling */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 40px;
  background: rgba(7, 9, 12, 0.95);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 30px;
}

.footer-socials {
  display: flex;
  gap: 18px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background: var(--gold-primary);
  color: #0b0d10;
  border-color: var(--gold-primary);
  transform: translateY(-3px);
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-primary);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.back-to-top:hover {
  color: #ffffff;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-grid, .two {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero {
    padding: 60px 0;
    text-align: center;
  }
  .eyebrow {
    justify-content: center;
  }
  .btn-group {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .book-spotlight {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .menu {
    display: block;
  }
  .links {
    display: none;
    position: absolute;
    top: 86px;
    left: 0;
    right: 0;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-strong);
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow-lg);
  }
  .links.open {
    display: flex;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .footer-top, .foot {
    flex-direction: column;
    text-align: center;
  }
}