/* ==========================================================
   WebMason Marketing Components
   Shared typography, sections, buttons, grids, cards, forms
   ========================================================== */

/* ==========================================================
   Typography
   ========================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.65em;
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.12;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.7rem, 6vw, 5.5rem);
    letter-spacing: -0.045em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    letter-spacing: -0.035em;
}

h3 {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    letter-spacing: -0.02em;
}

h4 {
    font-size: 1.2rem;
}

p {
    margin: 0 0 1.25em;
}

p:last-child {
    margin-bottom: 0;
}

strong {
    color: var(--color-heading);
}

small {
    font-size: 0.875rem;
}

.lead {
    max-width: 780px;
    color: var(--color-text-muted);
    font-size: clamp(1.12rem, 1.5vw, 1.35rem);
    line-height: 1.7;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--color-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.text-muted {
    color: var(--color-text-muted);
}

.text-center {
    text-align: center;
}

.text-center .lead {
    margin-inline: auto;
}

/* ==========================================================
   Sections
   ========================================================== */

section,
.section {
    padding-block: var(--section-spacing);
}

.section-compact {
    padding-block: calc(var(--section-spacing) * 0.65);
}

.section-surface {
    background: var(--color-surface);
}

.section-dark {
    background: var(--color-dark-surface);
    color: var(--color-dark-surface-text);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark strong {
    color: var(--color-dark-surface-heading);
}

.section-dark .lead,
.section-dark .text-muted {
    color: var(--color-dark-surface-muted);
}

.section-heading {
    max-width: 850px;
    margin-bottom: 48px;
}

.section-heading.text-center {
    margin-inline: auto;
}

/* ==========================================================
   Hero
   ========================================================== */

.hero {
    position: relative;
    min-height: min(760px, calc(100vh - var(--header-height)));
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding-block: clamp(90px, 12vw, 160px);
}

.hero .lead {
    max-width: 700px;
    margin-bottom: 34px;
}

.hero-actions,
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        rgba(10, 16, 23, 0.9) 0%,
        rgba(10, 16, 23, 0.72) 48%,
        rgba(10, 16, 23, 0.28) 100%
    );
}

.hero.has-background {
    color: white;
}

.hero.has-background h1,
.hero.has-background h2,
.hero.has-background strong {
    color: white;
}

.hero.has-background .lead {
    color: rgba(255, 255, 255, 0.82);
}

/* ==========================================================
   Buttons
   ========================================================== */

.button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 13px 26px;
    border: 1px solid transparent;
    border-radius: var(--border-radius-small);
    background: var(--color-accent);
    color: var(--color-accent-text);
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
}

.button:hover,
.button:focus-visible,
.btn:hover,
.btn:focus-visible {
    background: var(--color-accent-hover);
    color: var(--color-accent-text);
    transform: translateY(-1px);
}

.button-secondary {
    border-color: var(--color-border);
    background: transparent;
    color: var(--color-heading);
}

.button-secondary:hover,
.button-secondary:focus-visible {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
    color: var(--color-heading);
}

.section-dark .button-secondary,
.hero.has-background .button-secondary {
    border-color: rgba(255, 255, 255, 0.45);
    color: white;
}

.section-dark .button-secondary:hover,
.hero.has-background .button-secondary:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================
   Grids
   ========================================================== */

.grid {
    display: grid;
    gap: var(--grid-gap);
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(40px, 7vw, 96px);
}

.split-media img {
    width: 100%;
    min-height: 420px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/* ==========================================================
   Cards
   ========================================================== */

.card {
    height: 100%;
    padding: clamp(26px, 3vw, 40px);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-card-background);
    box-shadow: var(--shadow-card);
}

.card-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.card h3 {
    margin-bottom: 14px;
}

.card p {
    color: var(--color-text-muted);
}

.link-card {
    display: block;
}

.link-card:hover,
.link-card:focus-visible {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

/* ==========================================================
   Statistics
   ========================================================== */

.stat {
    padding: 28px 0;
    border-top: 1px solid var(--color-border);
}

.stat-value {
    display: block;
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-size: clamp(2.3rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1;
}

.stat-label {
    display: block;
    margin-top: 12px;
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

/* ==========================================================
   Lists
   ========================================================== */

.check-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding: 10px 0 10px 32px;
    border-bottom: 1px solid var(--color-border);
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    width: 10px;
    height: 6px;
    border-left: 2px solid var(--color-accent);
    border-bottom: 2px solid var(--color-accent);
    transform: rotate(-45deg);
}

/* ==========================================================
   Callout / CTA
   ========================================================== */

.cta-panel {
    padding: clamp(36px, 6vw, 72px);
    border-radius: var(--border-radius-large);
    background: var(--color-dark-surface);
    color: var(--color-dark-surface-text);
}

.cta-panel h2,
.cta-panel h3 {
    color: var(--color-dark-surface-heading);
}

.cta-panel .lead {
    color: var(--color-dark-surface-muted);
}

/* ==========================================================
   Forms
   ========================================================== */

.form-group {
    margin-bottom: 22px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-heading);
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-small);
    background: var(--color-input-background);
    color: var(--color-text);
}

textarea {
    min-height: 160px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-accent-soft);
}

/* ==========================================================
   Utility Classes
   ========================================================== */

.container-narrow {
    max-width: 820px;
    margin-inline: auto;
}

.surface {
    padding: clamp(28px, 4vw, 48px);
    border-radius: var(--border-radius);
    background: var(--color-surface);
}

.rounded {
    border-radius: var(--border-radius);
}

.shadow {
    box-shadow: var(--shadow-card);
}

.no-margin {
    margin: 0 !important;
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 900px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split {
        grid-template-columns: 1fr;
    }

    .split-media {
        order: -1;
    }
}

@media (max-width: 640px) {
    section,
    .section {
        padding-block: calc(var(--section-spacing) * 0.72);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero-content {
        padding-block: 90px;
    }

    .hero-actions,
    .button-row {
        flex-direction: column;
        align-items: stretch;
    }

    .button,
    .btn {
        width: 100%;
    }

    .split-media img {
        min-height: 300px;
    }
}