@import url('./utils/variables.css');
@import url('./utils/animations.css');

@import url('./components/header.css');
@import url('./components/features.css');
@import url('./components/agents.css');
@import url('./components/usage.css');
@import url('./components/modal.css');
@import url('./components/footer.css');
@import url('./components/music-player.css');

:root {
    --modal-viewport-height: 100dvh;
    --modal-viewport-width: 100vw;
    --modal-viewport-offset-top: 0px;
    --modal-viewport-keyboard-offset: 0px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-surface-ink);
    background:
        radial-gradient(circle at top left, rgba(141, 0, 19, 0.08), transparent 26%),
        radial-gradient(circle at 85% 18%, rgba(0, 73, 101, 0.07), transparent 28%),
        linear-gradient(180deg, #fbfcff 0%, var(--color-surface) 42%, #eef4ff 100%);
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: auto;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    z-index: -1;
}

body::before {
    top: -6rem;
    right: -8rem;
    background: rgba(141, 0, 19, 0.12);
}

body::after {
    bottom: -10rem;
    left: -8rem;
    background: rgba(0, 73, 101, 0.12);
}

body.modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

body.keyboard-open {
    overscroll-behavior: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
}

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

[hidden] {
    display: none !important;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: 500;
    font-style: normal;
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga';
}

.material-symbols-outlined svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-container {
    min-height: 100vh;
}

.main-content {
    padding: 0 0 5rem;
}

.container {
    width: min(calc(100% - 2rem), var(--container-width));
    margin: 0 auto;
}

.main-content .container {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-pill);
    background: rgba(141, 0, 19, 0.08);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-kicker--light {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.section-heading h2 {
    margin-top: 1rem;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-heading p,
.section-heading__note {
    max-width: 42rem;
    color: var(--color-secondary);
    font-size: 0.98rem;
}

.section-heading__note {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-ambient);
}

.section-heading__action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-primary);
    font-weight: 700;
}

.section-heading--centered {
    text-align: center;
    justify-content: center;
}

.section-heading--centered > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3.3rem;
    padding: 0.9rem 1.4rem;
    border-radius: var(--radius-md);
    transition: var(--transition-standard);
    font-weight: 700;
    white-space: nowrap;
}

.button-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
    color: var(--color-white);
    box-shadow: var(--shadow-primary);
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 40px rgba(141, 0, 19, 0.22);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.82);
    color: var(--color-surface-ink);
    box-shadow: var(--shadow-ambient);
}

.button-secondary:hover {
    transform: translateY(-2px);
    background: var(--color-surface-lowest);
}

.button-secondary--inverse {
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-white);
    box-shadow: none;
}

.button-secondary--inverse:hover {
    background: rgba(255, 255, 255, 0.2);
}

.app-toast {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    z-index: 2000;
    min-width: min(24rem, calc(100vw - 2rem));
    max-width: min(32rem, calc(100vw - 2rem));
    padding: 0.95rem 1.15rem;
    border-radius: var(--radius-md);
    color: var(--color-white);
    box-shadow: var(--shadow-soft);
    transform: translateX(-50%);
    animation: toastIn 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.app-toast--success {
    background: linear-gradient(135deg, var(--color-success), #2b8b56);
}

.app-toast--error {
    background: linear-gradient(135deg, var(--color-danger), #d92b2b);
}

.app-toast--warning {
    background: linear-gradient(135deg, var(--color-warning), #d98a00);
}

.app-toast--info {
    background: linear-gradient(135deg, var(--color-tertiary), #1a7293);
}

.app-toast.is-hiding {
    animation: toastOut 180ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@media (max-width: 900px) {
    .main-content {
        padding-bottom: 4rem;
    }

    .main-content .container {
        gap: 4rem;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1.5rem;
    }

    .section-heading__note {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(calc(100% - 1.25rem), var(--container-width));
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .app-toast {
        bottom: 1rem;
    }
}
