/* =================================================================
   BASE STYLES
   ================================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family-sans);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-normal);
    font-variation-settings: var(--font-settings);
    font-optical-sizing: auto;
    font-style: normal;
    color: var(--text-primary);
    background-color: var(--bg-page);
    transition: background-color 0.6s cubic-bezier(0.16, 1, 0.3, 1), color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

p {
    line-height: var(--line-height-normal);
}

strong, b {
    font-weight: var(--font-weight-bold);
}

a {
    color: var(--link-color);
    text-decoration: underline;
    font-weight: var(--font-weight-regular);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover);
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

.footer-divider {
    border: none;
    border-top: 1px solid #999999;
    margin-bottom: 80px;
}

[data-theme="dark"] .footer-divider {
    border-top-color: rgba(255, 255, 255, 0.25);
}

.site-footer {
    padding-bottom: 32px;
    font-size: var(--font-size-sm);
    color: #666666;
    display: flex;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

[data-theme="dark"] .site-footer {
    color: #999999;
}

.site-footer__credits {
    margin-left: auto;
}

.site-footer__tool-inline {
    position: relative;
    display: inline;
}

.site-footer__lottie {
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 90px;
}

/* ── Hero accent color ────────────────────────────────────────────── */
.hero-accent {
    color: inherit;
    padding: 10px 30px 12px;
    transform: translateX(-28px);
    background-image: url("../images/black-line.png");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

[data-theme="dark"] .hero-accent {
    color: inherit;
    background-image: url("../images/white-line.png");
}

/* ── Hero second line (typed text) ───────────────────────────────── */
.hero-line2 {
    display: block;
    padding-top: 24px;
}

@media (max-width: 1279px) {
    .hero-accent,
    [data-theme="dark"] .hero-accent {
        padding: 0;
        transform: none;
        background-image: none;
    }
}

@media (max-width: 768px) {
    .hero-accent {
        padding: 6px 16px 8px;
        transform: translateX(-14px);
    }
    .hero-line2 {
        padding-top: 14px;
    }
}

/* ── Hero typewriter cursor ───────────────────────────────────────── */
.hero-cursor {
    display: inline-block;
}

.hero-cursor.is-blinking {
    animation: cursorBlink 0.7s step-end infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ── Entrance animations ──────────────────────────────────────────── */
.hero-statement,
.card {
    opacity: 0;
    transform: translateY(10px);
    will-change: opacity, transform;
    transition:
        opacity  0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-statement.is-visible,
.card.is-visible {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
