*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.yw {
    margin: 0;
    min-height: 100%;
    font-family: var(--yw-font-body);
    font-size: var(--yw-text-md);
    line-height: 1.65;
    color: var(--yw-ink-body);
    background-color: var(--yw-bg);
    background-image:
        radial-gradient(1100px 520px at 8% -8%, var(--yw-bg-wash), transparent 58%),
        radial-gradient(900px 480px at 96% 4%, rgba(59, 130, 246, 0.08), transparent 52%),
        radial-gradient(800px 500px at 70% 100%, var(--yw-bg-wash-green), transparent 55%),
        linear-gradient(180deg, #F7FAFD 0%, var(--yw-bg) 32%, #EEF3F9 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

body.yw-nav-open {
    overflow: hidden;
}

.yw img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Scoped to main so the dark footer is not forced into primary blue. */
.yw main a:not(.yw-btn):not(.yw-lockup):not(.yw-nav__link) {
    color: var(--yw-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.yw main a:not(.yw-btn):not(.yw-lockup):not(.yw-nav__link):hover {
    color: var(--yw-primary-hover);
}

.yw h1,
.yw h2,
.yw h3,
.yw h4 {
    font-family: var(--yw-font-display);
    color: var(--yw-ink);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 var(--yw-space-4);
}

.yw h1 { font-size: var(--yw-text-3xl); }
.yw h2 { font-size: var(--yw-text-2xl); }
.yw h3 { font-size: var(--yw-text-xl); }

.yw p {
    margin: 0 0 var(--yw-space-4);
}

.yw p:last-child {
    margin-bottom: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.yw-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    padding: var(--yw-space-3) var(--yw-space-4);
    background: var(--yw-dark);
    color: #fff;
    border-radius: var(--yw-radius-sm);
}

.yw-skip:focus {
    left: var(--yw-space-3);
    top: var(--yw-space-3);
}

.yw-container {
    width: min(100% - (var(--yw-pad) * 2), var(--yw-container));
    margin-inline: auto;
}

.yw-section {
    padding: var(--yw-space-8) 0;
}

.yw-section--tint {
    background:
        radial-gradient(700px 280px at 20% 0%, rgba(37, 99, 235, 0.06), transparent 65%),
        color-mix(in srgb, var(--yw-bg-soft) 88%, white);
}

.yw-section--soft {
    background:
        radial-gradient(720px 300px at 85% 10%, rgba(16, 185, 129, 0.05), transparent 60%),
        #FFFFFF;
}

.yw-eyebrow--on-dark {
    color: #93C5FD;
}

.yw-section__intro {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto var(--yw-space-7);
}

/* Keep page-head copy tight; space sits on the white section below, not inside the tint. */
.yw-page-head .yw-section__intro {
    margin-bottom: 0;
}

/* Standard gap under the blue page-head on every page that uses it. */
.yw-page-head + .yw-section,
.yw-section--after-head {
    padding-top: var(--yw-space-7);
}

.yw-section__lead {
    max-width: 38rem;
    color: var(--yw-ink-muted);
    font-size: var(--yw-text-lg);
    line-height: 1.55;
}

.yw-section__intro .yw-section__lead {
    margin-inline: auto;
}

.yw-eyebrow {
    display: inline-block;
    margin: 0 0 var(--yw-space-3);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--yw-primary);
}

.yw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 50px;
    padding: 0.75rem 1.4rem;
    border-radius: var(--yw-radius-sm);
    border: 1.5px solid transparent;
    font-family: var(--yw-font-body);
    font-size: var(--yw-text-sm);
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.yw-btn--sm {
    min-height: 42px;
    padding: 0.55rem 1.05rem;
    font-size: 0.875rem;
}

.yw-btn--primary,
a.yw-btn--primary {
    background: var(--yw-cta);
    color: var(--yw-cta-ink);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
    text-decoration: none;
}

.yw-btn--primary:hover,
a.yw-btn--primary:hover {
    background: var(--yw-cta-hover);
    color: var(--yw-cta-ink);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
}

.yw-btn--secondary,
a.yw-btn--secondary {
    background: #fff;
    color: var(--yw-primary);
    border-color: color-mix(in srgb, var(--yw-primary) 55%, white);
    text-decoration: none;
}

.yw-btn--secondary:hover,
a.yw-btn--secondary:hover {
    background: var(--yw-primary-soft);
    color: var(--yw-primary-hover);
    border-color: var(--yw-primary);
}

.yw-btn__play {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    position: relative;
}

.yw-btn__play::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-35%, -50%);
    border-style: solid;
    border-width: 0.28rem 0 0.28rem 0.45rem;
    border-color: transparent transparent transparent currentColor;
}

.yw-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--yw-space-3);
}

.yw-btn-row--centre {
    justify-content: center;
}

:focus-visible {
    outline: 2px solid var(--yw-focus);
    outline-offset: 2px;
}

/* Scroll-triggered entrance — only when JS opts in with .yw-enhance. */
html.yw-enhance [data-yw-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--yw-reveal-delay, 0ms);
}

html.yw-enhance [data-yw-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .yw-btn,
    .yw-example,
    .yw-showcase,
    .yw-hero__copy,
    .yw-note,
    html.yw-enhance [data-yw-reveal] {
        transition: none !important;
        animation: none !important;
    }

    html.yw-enhance [data-yw-reveal] {
        opacity: 1;
        transform: none;
    }

    html.yw-enhance .yw-showcase[data-yw-motion] .yw-note {
        opacity: 1;
        animation: none !important;
        transform: rotate(var(--yw-note-tilt, 0deg));
    }
}
