/* ===================================================================
   GLOBAL.CSS - Jeevan Kanuni Sewa Design System
   Tokens · Reset · Typography · Buttons · Cards · FAQ · Footer
   =================================================================== */

/* ----- Design Tokens ----- */
:root {
  /* Brand Colors */
  --gold: #c9a84c;
  --gold-light: #f0e0a0;
  --gold-dark: #a07828;
  --gold-soft: #fbf6e9;

  --navy: #0d1b3e;
  --navy-mid: #1a2f5e;
  --navy-light: #e8edf7;

  --white: #ffffff;
  --off-white: #f7f5f0;

  /* Text */
  --text-primary: #0d1b3e;
  --text-secondary: #3d4b6b;
  --text-muted: #7a849e;
  --text-inverse: #f5f2ea;
  --text-gold: #c9a84c;

  /* Borders */
  --border: rgba(13, 27, 62, 0.1);
  --border-gold: rgba(201, 168, 76, 0.35);
  --border-dark: rgba(245, 242, 234, 0.1);

  /* Backgrounds */
  --bg-page: #ffffff;
  --bg-warm: #f7f5f0;
  --bg-gold-soft: #fbf6e9;
  --bg-navy: #0d1b3e;
  --bg-header: rgba(255, 255, 255, 0.96);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Typography */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(13, 27, 62, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(13, 27, 62, 0.07), 0 2px 4px -2px rgba(13, 27, 62, 0.05);
  --shadow-lg:
    0 10px 15px -3px rgba(13, 27, 62, 0.08),
    0 4px 6px -4px rgba(13, 27, 62, 0.05);
  --shadow-xl:
    0 20px 25px -5px rgba(13, 27, 62, 0.1),
    0 8px 10px -6px rgba(13, 27, 62, 0.05);

  /* Radius */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.3s ease;
  --transition-fast: all 0.15s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
  border: none;
  outline: none;
}

/* ----- Typography ----- */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: var(--text-4xl);
  letter-spacing: -0.02em;
}
h2 {
  font-size: var(--text-3xl);
  letter-spacing: -0.01em;
}
h3 {
  font-size: var(--text-2xl);
}
h4 {
  font-size: var(--text-xl);
}
h5 {
  font-size: var(--text-lg);
}
h6 {
  font-size: var(--text-base);
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--text-5xl);
  }
  h2 {
    font-size: var(--text-4xl);
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: var(--text-6xl);
  }
}

.lead {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-secondary);
}

@media (min-width: 768px) {
  .lead {
    font-size: var(--text-xl);
  }
}

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-8);
  }
}

.section {
  padding: var(--space-16) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-20) 0;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: var(--space-24) 0;
  }
}

.section-dark {
  background: var(--bg-navy);
}

.section-warm {
  background: var(--bg-warm);
}

.section-gold {
  background: var(--bg-gold-soft);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-12);
}

.section-header .lead {
  margin-top: var(--space-4);
}

/* ----- Eyebrow ----- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 2px;
  background: var(--gold);
}

.section-dark .eyebrow {
  color: var(--gold);
}

.section-dark .eyebrow::before {
  background: var(--gold);
}

/* ----- Section dark text overrides ----- */
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark p,
.section-dark .lead {
  color: var(--text-inverse);
}

/* ----- Badges ----- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
}

.badge-gold {
  background: var(--gold-soft);
  color: var(--navy);
  border: 1px solid var(--border-gold);
}

.badge-navy {
  background: var(--navy-light);
  color: var(--navy);
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ----- Grid Utilities ----- */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  grid-template-columns: 1fr;
}
.grid-3 {
  grid-template-columns: 1fr;
}
.grid-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--text-inverse);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  background: transparent;
  color: var(--text-inverse);
  border-color: var(--border-dark);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-icon {
  font-size: var(--text-lg);
  transition: transform 0.2s ease;
}

.btn:hover .btn-icon {
  transform: translateX(3px);
}

/* ----- Cards ----- */
.card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-elevated {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.card-elevated:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card-featured {
  background: var(--bg-page);
  border: 1px solid var(--border-gold);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: var(--transition);
}

.card-featured:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card-stat {
  text-align: center;
  padding: var(--space-6);
}

.card-stat-number {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.card-stat-label {
  font-size: var(--text-sm);
  color: var(--text-inverse);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ----- Practice Area Card ----- */
.practice-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.practice-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-top-color: var(--gold-dark);
}

.practice-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-soft);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  color: var(--gold-dark);
  font-size: var(--text-2xl);
}

.practice-card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.practice-card-nepali {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.practice-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.practice-card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy);
  transition: var(--transition-fast);
}

.practice-card-link:hover {
  color: var(--gold-dark);
  gap: var(--space-2);
}

/* ----- Attorney Card ----- */
.attorney-card {
  text-align: center;
  padding: var(--space-6);
}

.attorney-img {
  border-radius: 50%;
  border: 3px solid var(--gold);
  width: 120px;
  height: 120px;
  object-fit: cover;
  margin: 0 auto var(--space-4);
  background: var(--navy-light);
}

.attorney-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.attorney-title {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.attorney-bar {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ----- Testimonial Card ----- */
.testimonial-card {
  border-left: 4px solid var(--gold);
  background: var(--bg-warm);
  padding: var(--space-6);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
}

.testimonial-quote {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-4);
  font-style: italic;
}

.testimonial-quote::before {
  content: "\201C";
  font-size: var(--text-4xl);
  color: var(--gold);
  line-height: 0;
  vertical-align: -0.4em;
  margin-right: var(--space-1);
}

.testimonial-author {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.testimonial-case {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ----- Blog Post Card ----- */
.blog-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--navy-light);
}

.blog-card-body {
  padding: var(--space-5);
}

.blog-card-category {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  background: var(--gold-soft);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}

.blog-card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.blog-card-excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ----- Tool Card ----- */
.tool-card {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.tool-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-soft);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  font-size: var(--text-2xl);
}

.tool-card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.tool-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-5);
  flex: 1;
}

/* ----- FAQ ----- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--border-gold);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-5);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  gap: var(--space-4);
}

.faq-question:hover {
  color: var(--navy);
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  color: var(--gold);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 400px;
}

.faq-answer-inner {
  padding: 0 var(--space-5) var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ----- Footer ----- */
.footer {
  background: var(--bg-navy);
  color: var(--text-inverse);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border-dark);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
  }
}

.footer-logo {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-inverse);
  margin-bottom: var(--space-2);
}

.footer-logo-accent {
  color: var(--gold);
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--gold-light);
  margin-bottom: var(--space-3);
}

.footer-about p {
  font-size: var(--text-sm);
  color: rgba(245, 242, 234, 0.7);
  line-height: 1.7;
}

.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-inverse);
  margin-bottom: var(--space-4);
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  font-size: var(--text-sm);
  color: rgba(245, 242, 234, 0.7);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--gold-light);
  padding-left: var(--space-1);
}

.footer-contact li {
  font-size: var(--text-sm);
  color: rgba(245, 242, 234, 0.7);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.footer-bottom {
  padding: var(--space-6) 0;
  text-align: center;
}

.legal-disclaimer {
  font-size: var(--text-xs);
  color: rgba(245, 242, 234, 0.5);
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto var(--space-4);
}

.footer-copyright {
  font-size: var(--text-xs);
  color: rgba(245, 242, 234, 0.4);
}

/* ----- Breadcrumb ----- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.breadcrumb a {
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--gold-dark);
}

.breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.5;
}

/* ----- Form Elements ----- */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

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

.form-error {
  font-size: var(--text-xs);
  color: #c0392b;
  margin-top: var(--space-1);
  display: none;
}

.form-group.error .form-input,
.form-group.error .form-textarea,
.form-group.error .form-select {
  border-color: #c0392b;
}

.form-group.error .form-error {
  display: block;
}

/* ----- Utility ----- */
.text-center {
  text-align: center;
}
.text-gold {
  color: var(--text-gold);
}
.mb-0 {
  margin-bottom: 0;
}
.mt-4 {
  margin-top: var(--space-4);
}
.mt-8 {
  margin-top: var(--space-8);
}

/* ----- Animations ----- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.animate-in:nth-child(2) {
  transition-delay: 0.1s;
}
.animate-in:nth-child(3) {
  transition-delay: 0.2s;
}
.animate-in:nth-child(4) {
  transition-delay: 0.3s;
}
.animate-in:nth-child(5) {
  transition-delay: 0.4s;
}
.animate-in:nth-child(6) {
  transition-delay: 0.5s;
}
.animate-in:nth-child(7) {
  transition-delay: 0.6s;
}
.animate-in:nth-child(8) {
  transition-delay: 0.7s;
}

/* ----- Skip Link (Accessibility) ----- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  border-radius: var(--radius);
  z-index: 10000;
}

.skip-link:focus {
  top: var(--space-4);
}
