/* ============================================
   Red Wisdom — Main Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --clr-primary: #0b1622;
  --clr-primary-light: #1a2d44;
  --clr-secondary: #1c3854;
  --clr-accent: #d4892a;
  --clr-accent-light: #e8a84c;
  --clr-accent-dark: #a8691a;
  --clr-accent-glow: #f0c878;
  --clr-bg: #f9f7f4;
  --clr-bg-alt: #f0ede6;
  --clr-surface: #ffffff;
  --clr-text: #1c1c1c;
  --clr-text-heading: #0b1622;
  --clr-text-muted: #5c5c5c;
  --clr-text-light: #787878;
  --clr-border: #dbd5cb;
  --clr-border-light: #e8e4dc;
  --clr-success: #2d7d46;
  --clr-error: #c0392b;

  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: Georgia, 'Times New Roman', Times, serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

  --shadow-sm: 0 1px 3px rgba(11, 22, 34, 0.06);
  --shadow-md: 0 4px 16px rgba(11, 22, 34, 0.08);
  --shadow-lg: 0 8px 32px rgba(11, 22, 34, 0.12);
  --shadow-xl: 0 16px 48px rgba(11, 22, 34, 0.16);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --max-width: 1200px;
  --nav-height: 76px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--clr-accent-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--clr-accent);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--clr-text-heading);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1.2rem; }

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

li { margin-bottom: 0.4rem; }

strong { color: var(--clr-text-heading); }

/* --- Focus --- */
:focus-visible {
  outline: 3px solid var(--clr-accent);
  outline-offset: 3px;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--clr-primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 10000;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}

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

/* --- Header + Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--clr-surface);
  border-bottom: 3px solid var(--clr-primary);
  height: var(--nav-height);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--clr-primary);
  text-decoration: none;
  white-space: nowrap;
}
.logo:hover {
  text-decoration: none;
  color: var(--clr-primary);
}
.logo-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.logo-icon rect { fill: var(--clr-primary); }
.logo-icon circle { fill: var(--clr-accent); }

/* Desktop Nav */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
  padding: 0;
  margin: 0;
}

.main-nav a {
  display: block;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--clr-text-heading);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--clr-bg-alt);
  color: var(--clr-accent-dark);
  text-decoration: none;
}
.main-nav a[aria-current="page"] {
  background: var(--clr-primary);
  color: #ffffff;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--clr-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

@media (max-width: 800px) {
  .nav-toggle {
    display: flex;
  }
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--clr-primary);
    padding: 100px 32px 32px;
    transition: right 0.35s ease;
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
  }
  .main-nav.open {
    right: 0;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 4px;
  }
  .main-nav a {
    color: #ffffff;
    font-size: 1.05rem;
    padding: 14px 16px;
  }
  .main-nav a:hover,
  .main-nav a:focus-visible {
    background: rgba(255,255,255,0.1);
    color: var(--clr-accent-glow);
  }
  .main-nav a[aria-current="page"] {
    background: var(--clr-accent);
    color: var(--clr-primary);
  }
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,22,34,0.6);
  z-index: 999;
}
.nav-overlay.open {
  display: block;
}

/* --- Footer --- */
.site-footer {
  background: var(--clr-primary);
  color: #c4c9d0;
  padding: 64px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 48px;
}
.footer-col h4 {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.footer-col p,
.footer-col li {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #b0b7c0;
  margin-bottom: 6px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col a {
  color: #b0b7c0;
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--clr-accent-glow);
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: #8a9098;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  background: var(--clr-primary);
  color: #ffffff;
  padding: 100px 0 120px;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: var(--clr-accent);
  border-radius: 50%;
  opacity: 0.12;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -60px;
  width: 300px;
  height: 300px;
  background: var(--clr-accent-light);
  border-radius: 50%;
  opacity: 0.08;
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero h1 {
  color: #ffffff;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  max-width: 750px;
  line-height: 1.15;
  margin-bottom: 24px;
}
.hero h1 span {
  color: var(--clr-accent-glow);
}
.hero-sub {
  font-size: 1.2rem;
  max-width: 600px;
  line-height: 1.7;
  color: #c8cdd5;
  margin-bottom: 36px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.25s ease;
  line-height: 1.2;
}
.btn-primary {
  background: var(--clr-accent);
  color: var(--clr-primary);
  border-color: var(--clr-accent);
}
.btn-primary:hover {
  background: var(--clr-accent-light);
  border-color: var(--clr-accent-light);
  text-decoration: none;
  color: var(--clr-primary);
}
.btn-outline {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: #ffffff;
  color: var(--clr-primary);
  border-color: #ffffff;
  text-decoration: none;
}
.btn-secondary {
  background: var(--clr-primary);
  color: #ffffff;
  border-color: var(--clr-primary);
}
.btn-secondary:hover {
  background: var(--clr-primary-light);
  border-color: var(--clr-primary-light);
  color: #ffffff;
  text-decoration: none;
}

/* --- Page Header (inner pages) --- */
.page-header {
  background: var(--clr-primary);
  color: #ffffff;
  padding: 72px 0 64px;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  text-align: center;
}
.page-header h1 {
  color: #ffffff;
  margin-bottom: 12px;
}
.page-header p {
  color: #b8c0c8;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Section Styles --- */
.section {
  padding: 80px 0;
}
.section-alt {
  background: var(--clr-bg-alt);
}
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-accent-dark);
  margin-bottom: 12px;
}
.section-intro {
  max-width: 650px;
  margin-bottom: 48px;
}
.section-intro h2 {
  margin-bottom: 16px;
}
.section-intro p {
  color: var(--clr-text-muted);
  font-size: 1.08rem;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  border: 1px solid var(--clr-border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--clr-accent);
  transition: width 0.25s;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.card:hover::before {
  width: 7px;
}
.card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  color: var(--clr-accent);
}
.card h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}
.card p {
  color: var(--clr-text-muted);
  font-size: 0.97rem;
  margin-bottom: 0;
}

/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  text-align: center;
}
.stat-item {
  padding: 24px;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--clr-accent);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.95rem;
  color: var(--clr-text-muted);
  font-weight: 500;
}

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.two-col-image {
  border-radius: var(--radius-lg);
  height: 380px;
  background: var(--clr-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--clr-border);
  overflow: hidden;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .two-col-image {
    height: 240px;
  }
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--clr-primary);
  color: #ffffff;
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -80px;
  width: 350px;
  height: 350px;
  background: var(--clr-accent);
  border-radius: 50%;
  opacity: 0.1;
}
.cta-banner .container {
  position: relative;
  z-index: 1;
}
.cta-banner h2 {
  color: #ffffff;
  margin-bottom: 16px;
}
.cta-banner p {
  color: #c4c9d0;
  max-width: 550px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
}

/* --- Content Page Layout --- */
.content-page {
  padding: 64px 0;
}
.content-page .container {
  max-width: 860px;
}
.content-body {
  background: var(--clr-surface);
  padding: 48px 52px;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border-light);
  box-shadow: var(--shadow-sm);
  line-height: 1.8;
}
.content-body h2 {
  margin-top: 40px;
  margin-bottom: 16px;
  padding-top: 20px;
  border-top: 2px solid var(--clr-border-light);
}
.content-body h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.content-body h3 {
  margin-top: 28px;
  margin-bottom: 10px;
}
.content-body ul,
.content-body ol {
  margin-bottom: 1.5rem;
}
.content-body li {
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .content-body {
    padding: 28px 22px;
  }
}

/* --- Contact Form --- */
.contact-form {
  display: grid;
  gap: 20px;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--clr-text-heading);
  font-size: 0.95rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: var(--font-body);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-sm);
  background: var(--clr-surface);
  color: var(--clr-text);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--clr-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(212,137,42,0.15);
}
.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* --- Contact Info List --- */
.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-info-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--clr-border-light);
  font-size: 0.98rem;
}
.contact-info-list li:last-child {
  border-bottom: none;
}
.contact-info-list strong {
  min-width: 100px;
}

/* --- Timeline / Process --- */
.process-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.process-steps li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--clr-border-light);
}
.process-steps li:last-child {
  border-bottom: none;
}
.process-steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--clr-primary);
  color: var(--clr-accent-glow);
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}
.process-steps h3 {
  margin-bottom: 6px;
}
.process-steps p {
  color: var(--clr-text-muted);
  margin: 0;
}

/* --- Service Detail Cards --- */
.service-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}
.service-detail .card {
  border-top: 4px solid var(--clr-accent);
}
.service-detail .card::before {
  display: none;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.mt-lg { margin-top: 60px; }
.mb-lg { margin-bottom: 60px; }

/* --- Responsive --- */
@media (max-width: 600px) {
  .hero {
    padding: 64px 0 80px;
  }
  .section {
    padding: 48px 0;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .page-header {
    padding: 48px 0 44px;
  }
}
