/* Provide.io Shared Theme for MkDocs Material
 *
 * This theme provides consistent styling across all provide.io documentation.
 * Based on the mature provide-foundation theme with professional typography
 * and interactive elements.
 *
 * Usage in mkdocs.yml:
 *   extra_css:
 *     - ../../provide-foundry/shared-theme/stylesheets/provide-theme.css
 */

/* Import Google Fonts matching provide.io */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=IBM+Plex+Serif:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* Override Material theme fonts with provide.io fonts */
:root {
  --md-text-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  --md-code-font: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
}

/* Body text uses system font stack like provide.io */
body, .md-typeset, .md-typeset p, .md-typeset li {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif !important;
}

/* ========================================================================== */
/* PROFESSIONAL HEADER SPACING & TYPOGRAPHY */
/* ========================================================================== */

/* Main headers (h1-h3) use Chakra Petch like provide.io */
h1, h2, h3,
.md-typeset h1, .md-typeset h2, .md-typeset h3 {
  font-family: "Chakra Petch", sans-serif !important;
  font-weight: bold !important;
}

/* H1 - Large headers with optimal spacing */
.md-typeset h1 {
  font-size: 2.25em !important;
  margin-top: 2.5rem !important;
  margin-bottom: 1.25rem !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
}

/* H2 - Section headers */
.md-typeset h2 {
  font-size: 1.75em !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
}

/* H3 - Subsection headers */
.md-typeset h3 {
  font-size: 1.375em !important;
  margin-top: 1.75rem !important;
  margin-bottom: 0.875rem !important;
  line-height: 1.4 !important;
}

/* First header after content - reduce top margin */
.md-typeset > h1:first-child,
.md-typeset > h2:first-child,
.md-typeset > h3:first-child {
  margin-top: 0 !important;
}

/* Smaller headers (h4-h6) use IBM Plex Serif like provide.io */
h4, h5, h6,
.md-typeset h4, .md-typeset h5, .md-typeset h6 {
  font-family: "IBM Plex Serif", serif !important;
  font-weight: 600 !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.75rem !important;
  line-height: 1.5 !important;
}

/* ========================================================================== */
/* SITE HEADER & NAVIGATION */
/* ========================================================================== */

/* Site title uses Chakra Petch with better sizing */
.md-header__title {
  font-family: "Chakra Petch", sans-serif !important;
  font-weight: 600 !important;
  font-size: 1.125rem !important;
  letter-spacing: -0.01em !important;
}

.md-nav__title {
  font-family: "Chakra Petch", sans-serif !important;
  font-weight: 600 !important;
}

/* Navigation tabs with smooth transitions */
.md-tabs__link {
  transition: background-color 200ms ease, color 200ms ease !important;
}

.md-tabs__link:hover {
  opacity: 0.9 !important;
}

/* Sidebar navigation */
.md-nav__link {
  transition: color 150ms ease !important;
}

.md-nav__link:hover {
  color: var(--md-accent-fg-color) !important;
}

/* Code blocks use monospace stack */
code, pre, kbd, samp,
.md-typeset code, .md-typeset pre {
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace !important;
}

/* ========================================================================== */
/* INTERACTIVE HOVER STATES & TRANSITIONS */
/* ========================================================================== */

/* Smooth transitions for all interactive elements */
.md-typeset a,
.md-typeset h1 a,
.md-typeset h2 a,
.md-typeset h3 a {
  transition: color 200ms ease, opacity 200ms ease, transform 200ms ease !important;
}

/* Header link hover effects */
.md-typeset h1 a:hover,
.md-typeset h2 a:hover,
.md-typeset h3 a:hover {
  opacity: 0.8 !important;
  text-decoration: underline !important;
  text-decoration-color: var(--md-primary-fg-color) !important;
  text-underline-offset: 0.25em !important;
}

/* Permalink hover (the # icon) - fade in on hover */
.md-typeset .headerlink {
  opacity: 0 !important;
  transition: opacity 200ms ease !important;
  margin-left: 0.5rem !important;
  color: var(--md-default-fg-color--lighter) !important;
}

.md-typeset h1:hover .headerlink,
.md-typeset h2:hover .headerlink,
.md-typeset h3:hover .headerlink,
.md-typeset h4:hover .headerlink,
.md-typeset h5:hover .headerlink,
.md-typeset h6:hover .headerlink {
  opacity: 0.5 !important;
}

.md-typeset .headerlink:hover {
  opacity: 1 !important;
  color: var(--md-primary-fg-color) !important;
}

/* Regular link hovers with accent color */
.md-typeset a:not(.headerlink):hover {
  color: var(--md-accent-fg-color) !important;
}

/* ========================================================================== */
/* CONTENT SPACING & RHYTHM */
/* ========================================================================== */

/* Paragraph spacing for better readability */
.md-typeset p {
  margin-bottom: 1rem !important;
  line-height: 1.7 !important;
}

/* List spacing */
.md-typeset ul, .md-typeset ol {
  margin-top: 0.5rem !important;
  margin-bottom: 1rem !important;
}

.md-typeset li {
  margin-bottom: 0.375rem !important;
  line-height: 1.6 !important;
}

/* Code block spacing */
.md-typeset pre {
  margin-top: 1rem !important;
  margin-bottom: 1.5rem !important;
}

/* Table spacing */
.md-typeset table {
  margin-top: 1rem !important;
  margin-bottom: 1.5rem !important;
}

/* Content block spacing */
.md-content__inner {
  padding-top: 2rem !important;
}

/* Better hr spacing */
.md-typeset hr {
  margin-top: 2rem !important;
  margin-bottom: 2rem !important;
  border: none !important;
  border-top: 1px solid var(--md-default-fg-color--lightest) !important;
}

/* Feature grids for landing pages */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    padding: 1.5rem;
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 0.5rem;
    background: var(--md-code-bg-color);
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease !important;
}

.feature-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--md-primary-fg-color) !important;
}

.feature-card h3 {
    margin-top: 0;
    color: var(--md-primary-fg-color);
}

.feature-card a {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    transition: background-color 200ms ease, transform 150ms ease !important;
}

.feature-card a:hover {
    transform: scale(1.02) !important;
}

/* Getting started grid */
.getting-started-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.getting-started-card {
    padding: 1.5rem;
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 0.5rem;
    background: var(--md-code-bg-color);
    text-align: center;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease !important;
}

.getting-started-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--md-primary-fg-color) !important;
}

.getting-started-card h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

.getting-started-card p {
    margin: 0.5rem 0 1rem;
    color: var(--md-default-fg-color--light);
}

.getting-started-card a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--md-primary-fg-color);
    color: white;
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 200ms ease, transform 150ms ease !important;
}

.getting-started-card a:hover {
    opacity: 0.9;
    transform: scale(1.02) !important;
}

/* Code blocks improvements */
.md-typeset code {
    border-radius: 0.25rem;
}

/* Tables */
.md-typeset table:not([class]) {
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 0.25rem;
}

.md-typeset table:not([class]) th {
    background: var(--md-code-bg-color);
    font-weight: 700;
}

/* Admonitions */
.md-typeset .admonition,
.md-typeset details {
    border-radius: 0.5rem;
}

/* Better spacing for lists */
.md-typeset ul,
.md-typeset ol {
    margin-bottom: 1rem;
}

/* Improve readability */
.md-typeset p {
    line-height: 1.7;
}

/* Bold for better hierarchy */
.md-typeset strong {
    font-weight: 700;
    color: var(--md-default-fg-color);
}

/* Emoji alignment */
.md-typeset .twemoji {
    vertical-align: middle;
}
