:root {
  /* Light Mode Colors (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f3f4f6;
  --bg-card: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border-color: #e5e7eb;
  --header-bg: rgba(255, 255, 255, 0.8);
  --hero-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(243, 244, 246, 1) 100%);
  
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

[data-theme="dark"] {
  /* Dark Mode Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --border-color: #334155;
  --header-bg: rgba(15, 23, 42, 0.8);
  --hero-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(15, 23, 42, 1) 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
}

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

a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  padding: 1rem 0;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.site-logo {
  height: 70px;
  width: auto;
  border-radius: 4px;
}

.site-logo-dark {
  display: none;
}

[data-theme="dark"] .site-logo-light {
  display: none;
}

[data-theme="dark"] .site-logo-dark {
  display: block;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
}

/* Button */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  border: none;
  font-family: var(--font-body);
  text-align: center;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: white;
  transform: translateY(-2px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background-color: var(--bg-secondary);
}

/* Hero Section */
.hero {
  padding: 8rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Features Section */
.features {
  padding: 6rem 0;
  background-color: var(--bg-secondary);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-desc {
  color: var(--text-muted);
}

/* Solutions Section */
.solutions {
  padding: 6rem 0;
}

.solution-row {
  display: flex;
  align-items: center;
  gap: 4rem;
  margin-bottom: 6rem;
}

.solution-row:nth-child(even) {
  flex-direction: row-reverse;
}

.solution-content {
  flex: 1;
}

.solution-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.solution-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.solution-list {
  list-style: none;
}

.solution-list li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.solution-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: bold;
}

.solution-image {
  flex: 1;
  background-color: var(--bg-secondary);
  border-radius: 12px;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
  overflow: hidden;
}

.solution-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* FAQ Section */
.faq {
  padding: 6rem 0;
  background-color: var(--bg-secondary);
}

.faq .section-title {
  margin-bottom: 1rem;
}

.faq-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem auto;
}

.faq-subtitle a {
  color: var(--accent);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.faq-item summary {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  margin-top: 1rem;
  color: var(--text-muted);
}

.faq-answer p {
  margin-bottom: 0.75rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* CTA Section */
.cta-section {
  padding: 6rem 0;
  text-align: center;
  background: var(--bg-secondary);
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-brand {
   font-family: var(--font-heading);
   font-weight: 700;
   font-size: 1.25rem;
   margin-bottom: 1rem;
}

.footer-col h4 {
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: var(--text-muted);
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .solution-row { flex-direction: column !important; gap: 2rem;}
  .header-inner { flex-direction: column; gap: 1rem; }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ─── Prose styles for single pages (markdown content) ─── */
.page-content {
  color: var(--text-main);
  font-size: 1.05rem;
  line-height: 1.8;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4 {
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.page-content h1 { font-size: 2rem; }
.page-content h2 { font-size: 1.5rem; }
.page-content h3 { font-size: 1.25rem; }

.page-content p {
  margin-bottom: 1.25rem;
}

.page-content ul,
.page-content ol {
  margin: 1rem 0 1.25rem 1.75rem;
}

.page-content li {
  margin-bottom: 0.4rem;
}

.page-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-content a:hover {
  color: var(--accent-hover);
}

.page-content code {
  background: var(--bg-secondary);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  font-size: 0.9em;
  font-family: monospace;
}

.page-content pre {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.page-content pre code {
  background: none;
  padding: 0;
}

.page-content blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1.25rem;
  color: var(--text-muted);
  margin: 1.5rem 0;
  font-style: italic;
}

.page-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}

.page-content strong { font-weight: 700; }
.page-content em { font-style: italic; }

/* Contact Page */
.contact-page {
  padding: 5rem 0;
}

.contact-shell {
  max-width: 900px;
}

.contact-title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.contact-intro {
  text-align: center;
  margin-bottom: 2.5rem;
}

.contact-prefill-panel {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-secondary);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.contact-prefill-button {
  width: 100%;
  min-height: 3.5rem;
  font-size: 1rem;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-field span {
  font-weight: 600;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--text-main);
  background-color: var(--bg-primary);
}

.contact-field select {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.7rem 2.4rem 0.7rem 0.85rem;
  font: inherit;
  color: var(--text-main);
  background-color: var(--bg-primary);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) calc(50% - 0.15rem), calc(100% - 0.8rem) calc(50% - 0.15rem);
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
}

.contact-field select:focus,
.contact-field input:focus,
.contact-field textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.contact-field input[type="file"] {
  padding: 0.45rem;
}

.contact-field input[type="file"]::file-selector-button {
  margin-right: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: var(--bg-secondary);
  color: var(--text-main);
  font: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.contact-field input[type="file"]::file-selector-button:hover {
  background: color-mix(in srgb, var(--bg-secondary) 70%, var(--accent) 30%);
  border-color: color-mix(in srgb, var(--border-color) 60%, var(--accent) 40%);
}

.contact-field input[type="file"]::file-selector-button:active {
  transform: translateY(1px);
}

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

.contact-field small {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.contact-field-full {
  grid-column: 1 / -1;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.contact-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.contact-status-success {
  background: color-mix(in srgb, #16a34a 12%, var(--bg-card));
  border-color: color-mix(in srgb, #16a34a 35%, var(--border-color));
}

.contact-status-error {
  background: color-mix(in srgb, #dc2626 12%, var(--bg-card));
  border-color: color-mix(in srgb, #dc2626 35%, var(--border-color));
}

@media (max-width: 768px) {
  .contact-page {
    padding: 3.5rem 0;
  }

  .contact-title {
    font-size: 2.3rem;
  }

  .contact-form {
    padding: 1.2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}
