/**
 * Typography System
 * Font configuration for Datura Rendering Theme
 * Sans-serif for body, Serif for headings
 */

/* ===== FONT FACE DEFINITIONS ===== */
:root {
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Arvo", Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, Monaco,
    "Courier New", monospace;
}

/* ===== BASE TYPOGRAPHY ===== */
* {
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* ===== HEADINGS (SERIF) ===== */
h1,
h2,
h3,
h4,
h5,
h6,
.font-serif,
.section-title,
.hero-title,
.page-title,
.post-title,
.entry-title,
.widget-title {
  font-family: var(--font-serif) !important;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  /* color: #1f2937; */
}

/* Specific heading sizes with serif */
h1,
.text-6xl,
.text-5xl,
.text-4xl {
  font-family: var(--font-serif) !important;
  font-weight: 600;
}

h2,
.text-3xl {
  font-family: var(--font-serif) !important;
  font-weight: 600;
}

h3,
.text-2xl {
  font-family: var(--font-serif) !important;
  font-weight: 600;
}

h4,
.text-xl {
  font-family: var(--font-serif) !important;
  font-weight: 600;
}

h5,
.text-lg {
  font-family: var(--font-serif) !important;
  font-weight: 600;
}

h6,
.text-base {
  font-family: var(--font-serif) !important;
  font-weight: 600;
}

/* ===== BODY TEXT (SANS-SERIF) ===== */
p,
.prose,
.text-base,
.text-sm,
.text-xs,
body,
input,
textarea,
select,
button,
.font-sans {
  font-family: var(--font-sans) !important;
}

/* ===== SPECIALIZED ELEMENTS ===== */

/* Navigation */
nav a,
.nav-link,
.menu-item a {
  font-family: var(--font-sans) !important;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Buttons */
.btn,
button,
input[type="submit"],
input[type="button"],
.wp-block-button__link,
.button {
  font-family: var(--font-sans) !important;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: none;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
textarea,
select {
  font-family: var(--font-sans) !important;
  font-weight: 400;
}

/* Code elements */
code,
pre,
.code,
.font-mono,
kbd,
samp {
  font-family: var(--font-mono) !important;
  font-feature-settings: "liga" 0, "calt" 0;
}

/* ===== COMPONENT-SPECIFIC STYLES ===== */

/* Hero Section */
.hero-title {
  font-family: var(--font-serif) !important;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-family: var(--font-sans) !important;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Cards */
.card-title,
.portfolio-title {
  font-family: var(--font-serif) !important;
  font-weight: 700;
}

.card-description,
.portfolio-description {
  font-family: var(--font-sans) !important;
  font-weight: 400;
}

/* Footer */
.footer-title {
  font-family: var(--font-serif) !important;
  font-weight: 700;
}

.footer-text,
.footer-link {
  font-family: var(--font-sans) !important;
  font-weight: 400;
}

/* FAQ */
.faq-question {
  font-family: var(--font-serif) !important;
  font-weight: 600;
}

.faq-answer {
  font-family: var(--font-sans) !important;
  font-weight: 400;
  line-height: 1.7;
}

/* Contact Form */
.contact-form label {
  font-family: var(--font-sans) !important;
  font-weight: 500;
}

/* ===== WORDPRESS SPECIFIC ===== */

/* Gutenberg Editor */
.wp-block-heading {
  font-family: var(--font-serif) !important;
}

.wp-block-paragraph {
  font-family: var(--font-sans) !important;
}

.wp-block-quote {
  font-family: var(--font-serif) !important;
  font-style: italic;
}

.wp-block-code,
.wp-block-preformatted {
  font-family: var(--font-mono) !important;
}

/* Post Content */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-family: var(--font-serif) !important;
}

.entry-content p,
.entry-content li,
.entry-content blockquote {
  font-family: var(--font-sans) !important;
}

/* Comments */
.comment-author .fn {
  font-family: var(--font-serif) !important;
  font-weight: 600;
}

.comment-content {
  font-family: var(--font-sans) !important;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    line-height: 1.3;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  * {
    font-family: Georgia, serif !important;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: Georgia, serif !important;
    /* color: #000 !important; */
  }

}

/* ===== ACCESSIBILITY ===== */

/* High contrast mode */
@media (prefers-contrast: high) {
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 800;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ===== UTILITY CLASSES ===== */

/* Force font families when needed */
.force-sans {
  font-family: var(--font-sans) !important;
}

.force-serif {
  font-family: var(--font-serif) !important;
}

.force-mono {
  font-family: var(--font-mono) !important;
}

/* Weight utilities with proper font stacks */
.font-light {
  font-weight: 300;
}

.font-normal {
  font-weight: 400;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.font-extrabold {
  font-weight: 600;
}

.font-black {
  font-weight: 600;
}
