/* ======================================================
   Chief Justice Shree Chandrashekhar — Official Website
   Design System: "Modern Judicial Archive"
   ====================================================== */

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

/* --- Custom Properties --- */
:root {
  /* Colors */
  --c-navy: #0C1A2E;
  --c-navy-light: #162840;
  --c-charcoal: #1A202C;
  --c-slate: #2D3748;
  --c-muted: #4A5568;
  --c-subtle: #718096;
  --c-border: #CBD5E0;
  --c-border-light: #E2E8F0;
  --c-ivory: #F9FAFC;
  --c-white: #FFFFFF;
  --c-gold: #C8A97E;
  --c-gold-light: #D4BA94;
  --c-gold-dark: #B8956A;
  --c-error: #C53030;
  --c-error-bg: #FFF5F5;

  /* Typography */
  --f-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --s-xs: 0.25rem;
  --s-sm: 0.5rem;
  --s-md: 1rem;
  --s-lg: 1.5rem;
  --s-xl: 2rem;
  --s-2xl: 3rem;
  --s-3xl: 4rem;
  --s-4xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 0.3s;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--f-body); color: var(--c-charcoal); background-color: var(--c-ivory); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; border: none; outline: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-family: var(--f-heading); font-weight: 600; line-height: 1.25; color: var(--c-navy); }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p { margin-bottom: var(--s-md); color: var(--c-muted); }
.text-gold { color: var(--c-gold); }
.text-navy { color: var(--c-navy); }

/* --- Container --- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--s-xl); }

/* --- Section --- */
.section { padding: var(--s-4xl) 0; }
.section-header { text-align: center; margin-bottom: var(--s-3xl); }
.section-header h2 { margin-bottom: var(--s-md); }
.section-header .section-line { display: block; width: 60px; height: 3px; background: var(--c-gold); margin: var(--s-lg) auto 0; }
.section-header p { max-width: 640px; margin: var(--s-lg) auto 0; color: var(--c-subtle); }

/* ===========================
   NAVIGATION
   =========================== */
.site-nav {
  position: fixed; top: 0; left: 0; width: 100%;
  height: var(--nav-height);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border-light);
  z-index: 1000;
  transition: box-shadow var(--duration) var(--ease);
}
.site-nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.06); }
.nav-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 var(--s-xl);
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-brand {
  font-family: var(--f-heading); font-size: 1.1rem; font-weight: 600;
  color: var(--c-navy); white-space: nowrap;
}
.nav-brand span { color: var(--c-gold); }
.nav-links { display: flex; gap: var(--s-lg); align-items: center; }
.nav-links a {
  font-size: 0.85rem; font-weight: 500; color: var(--c-slate);
  letter-spacing: 0.02em; text-transform: uppercase;
  position: relative; padding: var(--s-xs) 0;
  transition: color var(--duration) var(--ease);
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px; background: var(--c-gold);
  transition: width var(--duration) var(--ease);
}
.nav-links a:hover { color: var(--c-navy); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--c-navy); }

/* Hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-navy); transition: all var(--duration) var(--ease); }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===========================
   GATEWAY
   =========================== */
.gateway {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--c-navy);
  position: relative; overflow: hidden;
}
.gateway::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(200,169,126,0.06) 0%, transparent 65%);
}
.gateway-card {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(200,169,126,0.15);
  border-radius: 4px;
  padding: var(--s-3xl) var(--s-3xl);
  width: 100%; max-width: 420px;
  text-align: center;
}
.gateway-card .emblem {
  font-family: var(--f-heading); font-size: 2.5rem; color: var(--c-gold);
  margin-bottom: var(--s-lg); letter-spacing: 0.05em; opacity: 0.7;
}
.gateway-card h1 {
  font-family: var(--f-heading); font-size: 1.4rem;
  color: var(--c-ivory); font-weight: 500; margin-bottom: var(--s-sm);
}
.gateway-card .subtitle {
  font-size: 0.8rem; color: var(--c-subtle); letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: var(--s-2xl);
}
.gateway-input-group { position: relative; margin-bottom: var(--s-lg); }
.gateway-input-group input {
  width: 100%; padding: 14px 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(200,169,126,0.2);
  border-radius: 3px; color: var(--c-ivory);
  font-size: 0.95rem; letter-spacing: 0.15em;
  text-align: center; text-transform: uppercase;
  transition: border-color var(--duration) var(--ease);
}
.gateway-input-group input::placeholder { color: rgba(255,255,255,0.25); letter-spacing: 0.15em; }
.gateway-input-group input:focus { border-color: var(--c-gold); }
.gateway-error {
  font-size: 0.8rem; color: var(--c-error);
  margin-top: var(--s-sm); min-height: 1.2em;
  transition: opacity var(--duration) var(--ease);
}
.gateway-btn {
  display: inline-block; padding: 12px 48px;
  background: transparent; color: var(--c-gold);
  border: 1px solid var(--c-gold); border-radius: 3px;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.gateway-btn:hover { background: var(--c-gold); color: var(--c-navy); }

/* ===========================
   HERO
   =========================== */
.hero {
  position: relative; padding: calc(var(--nav-height) + var(--s-4xl)) 0 var(--s-4xl);
  background: var(--c-navy);
  color: var(--c-ivory); overflow: hidden;
  min-height: 70vh; display: flex; align-items: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(200,169,126,0.04) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-label {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  color: var(--c-gold); letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: var(--s-lg);
  padding-bottom: var(--s-sm);
  border-bottom: 2px solid rgba(200,169,126,0.3);
}
.hero h1 { color: var(--c-ivory); margin-bottom: var(--s-lg); }
.hero p { color: rgba(249,250,252,0.7); font-size: 1.05rem; max-width: 600px; margin-bottom: var(--s-xl); }
.hero-meta {
  display: flex; gap: var(--s-2xl); flex-wrap: wrap;
  padding-top: var(--s-xl);
  border-top: 1px solid rgba(200,169,126,0.15);
}
.hero-meta-item { }
.hero-meta-item .label {
  font-size: 0.7rem; font-weight: 600; color: var(--c-gold);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: var(--s-xs);
}
.hero-meta-item .value { font-size: 0.95rem; color: rgba(249,250,252,0.85); }

/* ===========================
   CARDS / GRID
   =========================== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--s-xl); }
.card {
  background: var(--c-white);
  border: 1px solid var(--c-border-light);
  border-radius: 4px;
  padding: var(--s-2xl);
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.06); transform: translateY(-2px); }
.card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(200,169,126,0.08);
  border-radius: 4px; margin-bottom: var(--s-lg);
  color: var(--c-gold); font-size: 1.2rem;
}
.card h3 { margin-bottom: var(--s-md); }
.card p { font-size: 0.92rem; color: var(--c-subtle); }
.card-img {
  width: 100%; height: 200px; object-fit: cover;
  border-radius: 3px; margin-bottom: var(--s-lg);
}

/* ===========================
   TIMELINE
   =========================== */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; left: 15px; top: 0; bottom: 0;
  width: 2px; background: var(--c-border-light);
}
.timeline-item { position: relative; margin-bottom: var(--s-2xl); }
.timeline-item::before {
  content: ''; position: absolute; left: -33px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--c-ivory); border: 3px solid var(--c-gold);
}
.timeline-item .year {
  font-family: var(--f-heading); font-size: 0.85rem;
  color: var(--c-gold); font-weight: 600; margin-bottom: var(--s-xs);
  letter-spacing: 0.05em;
}
.timeline-item h3 { font-size: 1.15rem; margin-bottom: var(--s-sm); }
.timeline-item p { font-size: 0.9rem; color: var(--c-subtle); }

/* ===========================
   TABLE
   =========================== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { background: var(--c-navy); }
.data-table th {
  padding: 14px 20px; font-size: 0.8rem; font-weight: 600;
  color: var(--c-ivory); text-align: left; text-transform: uppercase;
  letter-spacing: 0.08em;
}
.data-table td {
  padding: 16px 20px; font-size: 0.92rem;
  border-bottom: 1px solid var(--c-border-light); color: var(--c-muted);
}
.data-table tbody tr:hover { background: rgba(200,169,126,0.03); }

/* ===========================
   ACCORDION
   =========================== */
.accordion-item {
  background: var(--c-white);
  border: 1px solid var(--c-border-light);
  border-radius: 4px; margin-bottom: var(--s-md);
  overflow: hidden;
}
.accordion-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-lg) var(--s-xl);
  cursor: pointer; transition: background var(--duration) var(--ease);
  background: none; width: 100%; text-align: left;
}
.accordion-header:hover { background: rgba(200,169,126,0.03); }
.accordion-header h4 { font-family: var(--f-heading); font-weight: 500; }
.accordion-header .tag {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--c-gold);
  padding: 4px 12px; background: rgba(200,169,126,0.08);
  border-radius: 2px; margin-left: var(--s-md);
}
.accordion-chevron {
  width: 20px; height: 20px; flex-shrink: 0; color: var(--c-subtle);
  transition: transform var(--duration) var(--ease);
}
.accordion-item.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.accordion-body-inner { padding: 0 var(--s-xl) var(--s-xl); }
.accordion-body-inner p { font-size: 0.9rem; color: var(--c-subtle); }

/* ===========================
   DOCUMENT LIST
   =========================== */
.doc-list { display: flex; flex-direction: column; gap: var(--s-md); }
.doc-item {
  background: var(--c-white);
  border: 1px solid var(--c-border-light);
  border-radius: 4px; padding: var(--s-lg) var(--s-xl);
  display: flex; align-items: center; gap: var(--s-lg);
  transition: box-shadow var(--duration) var(--ease);
}
.doc-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.04); }
.doc-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(200,169,126,0.08); border-radius: 4px;
  color: var(--c-gold); font-size: 1.1rem;
}
.doc-info h4 { margin-bottom: var(--s-xs); }
.doc-info p { font-size: 0.85rem; color: var(--c-subtle); margin-bottom: 0; }
.doc-info .meta {
  font-size: 0.75rem; color: var(--c-border);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* ===========================
   CONTACT FORM
   =========================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3xl); }
.form-group { margin-bottom: var(--s-lg); }
.form-group label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: var(--c-navy); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: var(--s-sm);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px;
  background: var(--c-white);
  border: 1px solid var(--c-border-light);
  border-radius: 3px; color: var(--c-charcoal);
  transition: border-color var(--duration) var(--ease);
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--c-gold);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.btn-submit {
  display: inline-block; padding: 14px 40px;
  background: var(--c-navy); color: var(--c-ivory);
  border: none; border-radius: 3px;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}
.btn-submit:hover { background: var(--c-slate); }

.contact-info-block {
  background: var(--c-navy); border-radius: 4px;
  padding: var(--s-2xl); color: var(--c-ivory);
}
.contact-info-block h3 { color: var(--c-ivory); margin-bottom: var(--s-xl); }
.info-row { display: flex; align-items: flex-start; gap: var(--s-md); margin-bottom: var(--s-lg); }
.info-row .icon { color: var(--c-gold); font-size: 1rem; flex-shrink: 0; margin-top: 2px; }
.info-row .detail h4 { color: var(--c-ivory); font-size: 0.95rem; margin-bottom: var(--s-xs); }
.info-row .detail p { color: rgba(249,250,252,0.65); font-size: 0.9rem; margin-bottom: 0; }
.social-links { display: flex; gap: var(--s-md); margin-top: var(--s-xl); padding-top: var(--s-xl); border-top: 1px solid rgba(200,169,126,0.15); }
.social-links a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(200,169,126,0.2); border-radius: 4px;
  color: var(--c-gold);
  transition: all var(--duration) var(--ease);
}
.social-links a:hover { background: var(--c-gold); color: var(--c-navy); }

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  background: var(--c-navy);
  border-top: 3px solid var(--c-gold);
  padding: var(--s-2xl) 0;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 var(--s-xl);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--s-lg);
}
.footer-left p { font-size: 0.82rem; color: rgba(249,250,252,0.5); margin-bottom: var(--s-xs); }
.footer-left a { color: var(--c-gold); transition: opacity var(--duration); }
.footer-left a:hover { opacity: 0.8; }
.footer-right { display: flex; align-items: center; gap: var(--s-lg); }
.footer-social { display: flex; gap: var(--s-sm); }
.footer-social a {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(200,169,126,0.2); border-radius: 3px;
  color: var(--c-gold);
  transition: all var(--duration) var(--ease);
}
.footer-social a:hover { background: var(--c-gold); color: var(--c-navy); }
.footer-social svg { width: 16px; height: 16px; }

/* ===========================
   PAGE HEADER (inner pages)
   =========================== */
.page-header {
  padding: calc(var(--nav-height) + var(--s-3xl)) 0 var(--s-2xl);
  background: var(--c-navy); color: var(--c-ivory);
  position: relative;
}
.page-header::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--c-gold);
}
.page-header h1 { color: var(--c-ivory); margin-bottom: var(--s-sm); }
.page-header p { color: rgba(249,250,252,0.6); margin-bottom: 0; }
.breadcrumb {
  font-size: 0.75rem; color: rgba(249,250,252,0.4);
  margin-bottom: var(--s-lg); text-transform: uppercase;
  letter-spacing: 0.1em;
}
.breadcrumb a { color: var(--c-gold); }
.breadcrumb span { margin: 0 var(--s-sm); }

/* ===========================
   MEDIA / NEWS
   =========================== */
.media-list { display: flex; flex-direction: column; gap: var(--s-xl); }
.media-item {
  display: flex; gap: var(--s-xl);
  padding-bottom: var(--s-xl);
  border-bottom: 1px solid var(--c-border-light);
}
.media-date {
  flex-shrink: 0; width: 80px; text-align: center;
  padding-top: 4px;
}
.media-date .day { font-family: var(--f-heading); font-size: 1.8rem; color: var(--c-navy); line-height: 1; }
.media-date .month { font-size: 0.75rem; color: var(--c-gold); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.media-content h3 { font-size: 1.1rem; margin-bottom: var(--s-sm); }
.media-content p { font-size: 0.9rem; color: var(--c-subtle); margin-bottom: var(--s-sm); }
.media-content .source { font-size: 0.75rem; color: var(--c-border); text-transform: uppercase; letter-spacing: 0.08em; }

/* ===========================
   HIGHLIGHTS BENTO
   =========================== */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-xl);
}
.highlight-card {
  background: var(--c-white);
  border: 1px solid var(--c-border-light);
  border-radius: 4px;
  padding: var(--s-2xl);
  text-align: center;
  transition: box-shadow var(--duration) var(--ease);
}
.highlight-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.05); }
.highlight-card .number {
  font-family: var(--f-heading); font-size: 2.5rem;
  color: var(--c-gold); margin-bottom: var(--s-sm); line-height: 1;
}
.highlight-card h4 { margin-bottom: var(--s-sm); }
.highlight-card p { font-size: 0.85rem; color: var(--c-subtle); margin-bottom: 0; }

/* ===========================
   FADE-UP ANIMATION
   =========================== */
.fade-up {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 992px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: var(--nav-height); right: -100%;
    width: 280px; height: calc(100vh - var(--nav-height));
    background: var(--c-white);
    flex-direction: column; padding: var(--s-xl);
    border-left: 1px solid var(--c-border-light);
    transition: right var(--duration) var(--ease);
    gap: var(--s-md);
  }
  .nav-links.open { right: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 60vh; }
  .hero-meta { gap: var(--s-lg); }
  .media-item { flex-direction: column; gap: var(--s-md); }
  .media-date { width: auto; text-align: left; display: flex; gap: var(--s-sm); align-items: baseline; }
}

@media (max-width: 600px) {
  .container { padding: 0 var(--s-md); }
  .section { padding: var(--s-2xl) 0; }
  .card-grid { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .gateway-card { padding: var(--s-2xl) var(--s-lg); margin: var(--s-md); }
  .hero { min-height: auto; padding-top: calc(var(--nav-height) + var(--s-2xl)); padding-bottom: var(--s-2xl); }
}
