/* ================================================================
   Truffle Theme — style.css
   Smoked charcoal, bone, and rust editorial luxury
   ================================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
  --bg:          #0b0908;
  --fg:          #efe5d6;
  --primary:     #c7431f;
  --accent:      #8d7a62;
  --card-bg:     #15110f;
  --muted:       #a99885;
  --secondary-bg:#1b1512;
  --border:      rgba(239, 229, 214, 0.14);
  --radius:      0.25rem;
  --max-w:       1280px;
  --font-heading:'Oswald', sans-serif;
  --font-body:   'Outfit', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top right, rgba(199, 67, 31, 0.14), transparent 30%),
    radial-gradient(circle at 20% 10%, rgba(228, 201, 161, 0.08), transparent 25%),
    linear-gradient(180deg, #120f0d 0%, #0b0908 100%);
  color: var(--fg);
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
}
body::before { display: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-heading);
  line-height: 1.05;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

/* ── Utility ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.section-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}
.section-sub {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease, background 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--primary);
  color: #fff4ea;
  box-shadow: 0 12px 22px rgba(199, 67, 31, 0.18);
}
.btn-primary:hover { background: #d35631; filter: saturate(1.06); }
.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: rgba(239,229,214,0.24); background: rgba(255,255,255,0.03); box-shadow: 0 12px 22px rgba(199, 67, 31, 0.12); }

/* ── Navbar ── */
.navbar {
  height: 4.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 9, 8, 0.88);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.navbar-links {
  display: flex;
  gap: 2rem;
}
.navbar-links a {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.navbar-links a:hover,
.navbar-links a.active { color: #fff; }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; color: var(--fg); cursor: pointer; }
.nav-toggle svg { width: 24px; height: 24px; }

/* ── Footer ── */
.footer {
  border-top: 4px solid var(--primary);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent 22%),
    var(--card-bg);
  padding: 2.5rem 0;
  margin-top: 5rem;
}
.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary);
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--muted); font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--fg); }
.footer-copy { color: var(--muted); font-size: 0.8rem; }

/* ── Theme Switcher ── */
.theme-switcher {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
}
.theme-switcher-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: background 0.2s, border-color 0.2s;
}
.theme-switcher-btn:hover { border-color: var(--primary); background: var(--secondary-bg); }
.theme-switcher-dropdown {
  display: none;
  position: absolute;
  bottom: 56px;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  min-width: 160px;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.theme-switcher-dropdown.open { display: block; }
.theme-switcher-dropdown a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 0.375rem;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.theme-switcher-dropdown a:hover { background: var(--secondary-bg); color: var(--fg); }
.theme-switcher-dropdown a.current { color: var(--primary); font-weight: 600; }

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: box-shadow 0.3s, transform 0.2s;
}
.card:hover {
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: 8.5rem 0 7.5rem;
  min-height: 44rem;
  overflow: hidden;
  text-align: center;
  display: flex;
  align-items: center;
}
.hero-darkveil {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 110%, rgba(11, 9, 8, 0.92), rgba(11, 9, 8, 0.28) 42%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}
.hero h1 .highlight { color: var(--primary); }
.hero h1 .muted-word { color: var(--fg); }
.hero p {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 2rem;
}
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Logo bar ── */
.logo-bar {
  padding: 3rem 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.logo-bar p { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 0.1em; }
.logo-bar-logos {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.logo-bar-logos span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--muted);
  opacity: 0.5;
}

/* ── Stats bar ── */
.stats-bar {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}
.stats-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.stat {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}
.stat-label { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }

/* ── Features ── */
.features { padding: 5rem 0; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--secondary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary);
}
.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-desc { color: var(--muted); font-size: 0.9rem; }

/* ── Code Preview ── */
.code-preview {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}
.code-preview .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.code-left .checklist { margin-top: 1.5rem; }
.code-left .checklist li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.code-left .checklist li::before {
  content: '\2713';
  color: var(--primary);
  font-weight: 700;
}
.code-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.75rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.75;
}
.code-block .kw { color: var(--muted); }
.code-block .str { color: #d7b189; }
.code-block .val { color: #f0dfc8; }
.code-block .cm { color: #8d7a68; }

/* ── Showcase ── */
.showcase {
  padding: 5rem 0;
  background: linear-gradient(180deg, #16110d 0%, #1b1510 48%, #201914 100%);
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.showcase-card {
  background: rgba(24, 18, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(201, 149, 107, 0.2);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.showcase-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 42px rgba(103, 72, 44, 0.22);
}
.showcase-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.showcase-card p { color: var(--muted); font-size: 0.9rem; }

/* ── Testimonials ── */
.testimonials { padding: 5rem 0; }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testimonial-card { text-align: center; }
.testimonial-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  background: var(--secondary-bg);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.testimonial-quote {
  color: var(--muted);
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}
.testimonial-name { font-weight: 700; font-size: 0.9rem; }
.testimonial-role { color: var(--muted); font-size: 0.8rem; }

/* ── Pricing ── */
.pricing {
  padding: 5rem 0;
  background: var(--secondary-bg);
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}
.pricing-card { text-align: center; }
.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 4px 24px rgba(103, 72, 44, 0.2);
  position: relative;
}
.pricing-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 36px rgba(103, 72, 44, 0.22);
}
.pricing-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 1rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.pricing-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.pricing-price {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.pricing-features {
  margin: 1.5rem 0;
  text-align: left;
}
.pricing-features li {
  padding: 0.4rem 0;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pricing-features li::before {
  content: '\2713';
  color: var(--primary);
  font-weight: 700;
}
.pricing-card .btn { width: 100%; justify-content: center; }

/* ── Blog cards ── */
.blog-preview { padding: 5rem 0; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.blog-card .card { display: flex; flex-direction: column; gap: 0.75rem; }
.blog-tag {
  display: inline-block;
  background: rgba(201, 149, 107, 0.14);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.blog-card h3 { font-size: 1.1rem; }
.blog-card p { color: var(--muted); font-size: 0.9rem; }
.blog-card .meta { color: var(--muted); font-size: 0.8rem; }

/* ── FAQ ── */
.faq-section { padding: 5rem 0; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: var(--card-bg);
  border: none;
  color: var(--fg);
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.faq-question:hover { background: var(--secondary-bg); }
.faq-question .icon {
  font-size: 1.25rem;
  transition: transform 0.3s;
  color: var(--primary);
}
.faq-item.open .faq-question .icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  background: var(--card-bg);
}
.faq-item.open .faq-answer {
  max-height: 300px;
}
.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── CTA ── */
.cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  text-align: center;
}
.cta h2 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 1rem; color: #fff; }
.cta p { color: rgba(255,255,255,0.8); margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta .btn-primary { background: #fff; color: var(--primary); }
.cta .btn-primary:hover { background: #f5f3f8; }
.cta .btn-outline { border-color: rgba(255,255,255,0.4); color: #fff; }
.cta .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

/* ── Page sections ── */
.page-header {
  padding: 4rem 0 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.75rem; }
.page-header p { color: var(--muted); max-width: 560px; margin: 0 auto; }
.page-body { padding: 4rem 0; }

/* ── Blog page ── */
.blog-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* ── About ── */
.about-story { max-width: 700px; margin: 0 auto 3rem; color: var(--muted); text-align: center; line-height: 1.75; }
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}
.team-card { text-align: center; }
.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  background: var(--secondary-bg);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}
.team-card h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.team-card p { color: var(--muted); font-size: 0.85rem; }
.mission {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}
.mission h2 { margin-bottom: 1rem; }
.mission p { color: var(--muted); max-width: 600px; margin: 0 auto; }

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.5rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--fg);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--secondary-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(201, 149, 107, 0.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.office-sidebar .card { margin-bottom: 1rem; }
.office-sidebar h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.office-sidebar p { color: var(--muted); font-size: 0.9rem; }

/* ── KB ── */
.kb-search {
  max-width: 500px;
  margin: 0 auto 2.5rem;
  position: relative;
}
.kb-search input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 0.95rem;
}
.kb-search input:focus { outline: none; border-color: var(--primary); }
.kb-search input:focus { box-shadow: 0 0 0 3px rgba(201, 149, 107, 0.12); }
.kb-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.kb-category h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.kb-category + .kb-category { margin-top: 2.5rem; }
.kb-articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.kb-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.kb-card p { color: var(--muted); font-size: 0.85rem; }
.kb-card:hover,
.office-sidebar .card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 34px rgba(103, 72, 44, 0.2);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .navbar-links { display: none; }
  .navbar-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-bottom: 2px solid var(--primary);
    padding: 1rem 1.5rem;
    gap: 1rem;
    z-index: 99;
  }
  .nav-toggle { display: block; }

  .stats-bar .container { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .code-preview .container { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-grid-4 { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .kb-articles { grid-template-columns: 1fr; }
  .footer .container { flex-direction: column; text-align: center; }
}
