/* =========================================================
   Terms pages — plain legal text
   File: /css/pages/terms.css
   ========================================================= */

:root {
    --am-page: #f3efe8;
    --am-paper: #fffaf2;
    --am-ink: #151918;
    --am-muted: #68706a;
    --am-line: rgba(31, 37, 36, 0.14);
    --am-line-soft: rgba(31, 37, 36, 0.08);
    --am-accent: #9c5a3f;
    --am-container: 1080px;
}

html {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    background: var(--am-page);
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body.terms-page {
    margin: 0;
    background: var(--am-page);
    color: var(--am-ink);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.terms-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(31, 37, 36, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 37, 36, 0.026) 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: 0.42;
    pointer-events: none;
}

.terms-main {
    display: block;
    width: min(var(--am-container), calc(100% - 72px));
    margin: 0 auto;
    padding: clamp(64px, 8vw, 120px) 0 clamp(72px, 9vw, 136px);
}

.terms-header {
    padding-bottom: clamp(42px, 5vw, 76px);
    border-bottom: 1px solid var(--am-line);
}

.terms-kicker {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 22px;
    color: var(--am-accent);
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.terms-kicker::before {
    content: "";
    width: 38px;
    height: 1px;
    background: currentColor;
}

.terms-title {
    max-width: 860px;
    margin: 0;
    color: var(--am-ink);
    font-size: clamp(3.2rem, 6vw, 7.2rem);
    font-weight: 940;
    line-height: 0.9;
    letter-spacing: -0.068em;
    text-wrap: balance;
}

.terms-meta {
    margin: clamp(22px, 2.4vw, 34px) 0 0;
    color: var(--am-muted);
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.terms-content {
    max-width: 820px;
    padding-top: clamp(44px, 6vw, 78px);
}

.terms-section {
    padding: clamp(28px, 4vw, 52px) 0;
    border-bottom: 1px solid var(--am-line-soft);
}

.terms-section:first-child {
    padding-top: 0;
}

.terms-section:last-child {
    border-bottom: 0;
}

.terms-section h2 {
    margin: 0 0 18px;
    color: var(--am-ink);
    font-size: clamp(1.72rem, 2.7vw, 3.18rem);
    font-weight: 930;
    line-height: 1;
    letter-spacing: -0.048em;
    text-wrap: balance;
}

.terms-section p {
    margin: 0 0 18px;
    color: var(--am-muted);
    font-size: clamp(1rem, 1.08vw, 1.14rem);
    line-height: 1.78;
    letter-spacing: -0.006em;
}

.terms-section p:last-child {
    margin-bottom: 0;
}

.terms-link {
    color: var(--am-accent);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

@media (max-width: 760px) {
    .terms-main {
        width: min(100% - 32px, var(--am-container));
        padding-top: 56px;
    }

    .terms-title {
        font-size: clamp(2.72rem, 14vw, 4.8rem);
        line-height: 0.94;
        letter-spacing: -0.052em;
    }

    .terms-content {
        padding-top: 38px;
    }
}

@media (max-width: 460px) {
    .terms-main {
        width: min(100% - 24px, var(--am-container));
    }

    .terms-kicker {
        display: block;
    }

    .terms-kicker::before {
        display: block;
        margin-bottom: 13px;
    }
}
