/* ============================================================
   HTML Workspace Design System — Component Classes Template
   Copy this file into css/components.css and link after styles.css:
   <link rel="stylesheet" href="css/components.css">

   These are pre-built utility + component classes that sit on top
   of the design tokens. They implement the "Lego blocks" pattern:
   drop sections in, replace copy/images, done. No per-site styling
   decisions needed.

   Adapted from the Elementor v4 agency framework — ported to plain
   CSS with our token system.
   ============================================================ */

/* ===== Section Padding Utilities ===== */

.section-sm {
    padding-block: var(--space-300);    /* 24px */
}

.section {
    padding-block: var(--space-600);    /* 48px */
}

.section-lg {
    padding-block: var(--space-1000);   /* 80px */
}

/* Mobile overrides — em breakpoints, not px (user-zoom aware) */
@media (max-width: 47.9375em) {
    .section-lg { padding-block: var(--space-600); }   /* 80px → 48px */
    .section    { padding-block: var(--space-300); }   /* 48px → 24px */
    .section-sm { padding-block: var(--space-300); }   /* keep 24px */
}

/* ===== Content Container ===== */

.content-container {
    width: 100%;
    max-width: min(90%, 1280px);
    margin-inline: auto;
    padding-inline: var(--space-200);  /* 16px edge padding */
}

/* ===== Hero ===== */

.hero {
    min-height: 70dvh;
    display: flex;
    align-items: center;
    padding-block: var(--space-1000);
    background-size: cover;
    background-position: center;
}

.hero__inner {
    width: 100%;
    max-width: min(90%, 1280px);
    margin-inline: auto;
    padding-inline: var(--space-200);
}

.hero__heading {
    font-size: var(--text-hero-fluid);
    line-height: var(--leading-tight);
    font-weight: 700;
    color: var(--color-text);
    margin-block: 0 var(--space-300);
}

.hero__body {
    font-size: var(--text-body-fluid);
    line-height: var(--leading-loose);
    color: var(--color-text-secondary);
    max-width: 65ch;
    margin-block: 0 var(--space-400);
}

/* Mobile: relax the 70dvh to auto so content isn't cramped */
@media (max-width: 47.9375em) {
    .hero {
        min-height: auto;
        padding-block: var(--space-600);
    }
}

/* ===== Heading Classes ===== */

.heading-hero {
    font-size: var(--text-hero-fluid);
    line-height: var(--leading-tight);
    font-weight: 700;
}

.heading-section {
    font-size: var(--text-h2-fluid);
    line-height: var(--leading-section);
    font-weight: 700;
}

.heading-sub {
    font-size: var(--text-h3-fluid);
    line-height: var(--leading-snug);
    font-weight: 600;
}

.heading-detail {
    font-size: var(--text-h4-fluid);
    line-height: var(--leading-heading);
    font-weight: 600;
}

.heading-minor {
    font-size: var(--text-h5-fluid);
    line-height: var(--leading-snug);
    font-weight: 500;
}

.heading-label {
    font-size: var(--text-h6-fluid);
    line-height: var(--leading-snug);
    font-weight: 500;
}

.text-body {
    font-size: var(--text-body-fluid);
    line-height: var(--leading-loose);
    font-weight: 400;
}

/* ===== Buttons ===== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-100);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-base);
    line-height: 1;
    padding: 0.875em 1.75em;    /* em-based: scales with font-size */
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition-fast), background-color var(--transition-fast);
    will-change: transform;
}

.btn:where(:hover, :focus-visible) {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

.btn--primary:where(:hover, :focus-visible) {
    background-color: var(--color-primary-dark);
}

.btn--secondary {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn--secondary:where(:hover, :focus-visible) {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

.btn--lg {
    font-size: var(--text-lg);
    padding: var(--space-300) var(--space-600);  /* 24px 48px */
}

/* Focus ring — meets WCAG 3:1 contrast */
.btn:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

/* ===== Utilities ===== */

.text-center { text-align: center; }
.text-left   { text-align: left; }

.text-bold     { font-weight: 700; }
.text-semibold { font-weight: 600; }

.text-muted {
    color: var(--color-text-muted);
    opacity: 0.75;
}

/* ===== Reduced Motion ===== */

@media (prefers-reduced-motion: reduce) {
    .btn,
    .btn:where(:hover, :focus-visible, :active) {
        transition: none;
        transform: none;
    }
}