/**
 * SmartWave — Global theme & typography
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html.anchor-smooth {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    font-family: var(--swb-font);
    font-size: var(--swb-text-base);
    font-weight: var(--swb-weight-normal);
    line-height: var(--swb-leading-normal);
    color: var(--swb-text);
    background: var(--swb-bg);
    padding-top: var(--swb-header-h);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.page-error,
body.page-home {
    padding-top: 0;
}

#main-content {
    min-height: 50vh;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--swb-font-display);
    font-weight: var(--swb-weight-bold);
    letter-spacing: -0.025em;
    line-height: var(--swb-leading-tight);
    color: var(--swb-text);
    margin-top: 0;
}

p {
    margin-top: 0;
    margin-bottom: var(--swb-space-2);
}

.lead {
    font-size: var(--swb-text-lg);
    font-weight: var(--swb-weight-medium);
    color: var(--swb-text-muted);
    line-height: var(--swb-leading-relaxed);
}

.text-muted {
    color: var(--swb-text-muted) !important;
}

a {
    color: var(--swb-primary);
    text-decoration: none;
    transition: color var(--swb-duration) var(--swb-ease);
}

a:hover {
    color: var(--swb-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Sections */
.section {
    padding-top: var(--swb-section-y);
    padding-bottom: var(--swb-section-y);
}

.section-alt {
    background: var(--swb-surface);
}

.section-header {
    margin-bottom: var(--swb-space-6);
}

.section-eyebrow {
    display: inline-block;
    font-size: var(--swb-text-xs);
    font-weight: var(--swb-weight-bold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--swb-secondary);
    margin-bottom: var(--swb-space-2);
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: var(--swb-weight-extrabold);
    margin-bottom: var(--swb-space-2);
}

.section-lead {
    font-size: var(--swb-text-lg);
    color: var(--swb-text-muted);
    max-width: 40rem;
    line-height: var(--swb-leading-relaxed);
    margin-bottom: 0;
}

/* Page heroes */
.page-hero {
    position: relative;
    background: var(--swb-gradient-soft);
    padding: var(--swb-space-8) 0 var(--swb-space-6);
    overflow: visible;
    --page-hero-wave: #F8F9FF;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(25, 194, 240, 0.12), transparent 60%),
        radial-gradient(500px 280px at 0% 100%, rgba(42, 57, 190, 0.08), transparent 55%);
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero-gradient {
    background: var(--swb-gradient-hero);
    color: var(--swb-white);
}

.page-hero-gradient .page-hero-title,
.page-hero-gradient .page-hero-lead,
.page-hero-gradient .page-hero-eyebrow,
.page-hero-gradient .breadcrumb-item,
.page-hero-gradient .breadcrumb-item a,
.page-hero-gradient .blog-card-date {
    color: var(--swb-white);
}

.page-hero-gradient .page-hero-eyebrow {
    color: var(--swb-accent);
}

.page-hero-inner {
    padding: calc(var(--swb-header-h) + 48px) 0 88px;
}

.page-hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
    z-index: 2;
    color: var(--page-hero-wave);
    transform: translateY(1px);
    pointer-events: none;
}

.page-hero-wave svg {
    width: 100%;
    height: 72px;
    display: block;
    vertical-align: bottom;
}

.page-hero + .page-content {
    margin-top: -1px;
}

.page-content {
    padding: 80px 0;
    background: #FFFFFF;
}

.page-content--alt {
    background: #F8F9FF;
}

@media (max-width: 767.98px) {
    .page-content {
        padding: 48px 0;
    }

    .page-hero-inner {
        padding: calc(var(--swb-header-h) + 32px) 0 56px;
    }
}

.page-hero-gradient .page-hero-lead {
    opacity: 0.9;
}

.page-hero-sustain {
    background: var(--swb-gradient-sustain);
}

.page-hero-eyebrow {
    display: inline-block;
    font-size: var(--swb-text-xs);
    font-weight: var(--swb-weight-bold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--swb-accent);
}

.page-hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: var(--swb-weight-extrabold);
    margin-bottom: var(--swb-space-2);
    color: var(--swb-primary);
}

.page-hero-lead {
    font-size: var(--swb-text-lg);
    color: var(--swb-text-muted);
    max-width: 42rem;
    margin-bottom: 0;
}

/* Scroll reveal */
.reveal,
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible,
.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.text-gradient {
    background: var(--swb-gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-gradient-swb {
    background: var(--swb-gradient-brand);
}

/* Article */
.article-body {
    font-size: var(--swb-text-lg);
    line-height: var(--swb-leading-relaxed);
}

.article-body p {
    margin-bottom: 0;
}

.article-body p + p {
    margin-top: 1.35em;
}

@media (max-width: 767.98px) {
    body {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.625rem;
    }
}
