:root {
    color-scheme: dark;
    --page: #050806;
    --page-raised: #0a0f0c;
    --surface: rgba(12, 18, 14, 0.88);
    --surface-hover: rgba(15, 23, 18, 0.96);
    --text: #f5f7f5;
    --muted: #a9b0ab;
    --quiet: #78817b;
    --line: rgba(135, 230, 108, 0.32);
    --line-soft: rgba(255, 255, 255, 0.1);
    --green: #83e66d;
    --green-strong: #63cf4f;
    --coffee: #f0ad55;
    --error: #ff887d;
    --focus: #b9f6aa;
    --max-width: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(180deg, rgba(8, 15, 10, 0.2), rgba(3, 5, 4, 0.82)),
        var(--page);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    letter-spacing: 0;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.coffee-page {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

#matrixCanvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0.28;
    pointer-events: none;
    z-index: 0;
}

.site-header,
main,
.coffee-footer {
    position: relative;
    z-index: 1;
}

.site-header {
    width: min(calc(100% - 48px), var(--max-width));
    min-height: 74px;
    margin: 0 auto;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.back-link {
    text-decoration: none;
}

.brand {
    color: var(--green);
    font-size: 18px;
    font-weight: 750;
}

.back-link {
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--text);
}

main {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    flex: 1;
}

.coffee-hero {
    max-width: 820px;
    margin: 0 auto;
    padding: 64px 0 48px;
    text-align: center;
}

.coffee-hero h1 {
    margin: 0;
    font-size: 60px;
    line-height: 1.08;
    font-weight: 780;
}

.hero-intro,
.hero-detail {
    margin-right: auto;
    margin-left: auto;
    color: var(--muted);
}

.hero-intro {
    max-width: 760px;
    margin-top: 26px;
    margin-bottom: 0;
    font-size: 19px;
    line-height: 1.65;
}

.hero-detail {
    max-width: 680px;
    margin-top: 18px;
    margin-bottom: 0;
    color: #c6cbc7;
    font-size: 16px;
}

.support-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    padding-bottom: 32px;
}

.support-card {
    min-height: 376px;
    padding: 28px 24px 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.support-card:hover {
    border-color: rgba(135, 230, 108, 0.58);
    background: var(--surface-hover);
    transform: translateY(-3px);
}

.support-card h2 {
    min-height: 54px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
}

.coffee-mark {
    height: 54px;
    margin-top: 10px;
    color: var(--coffee);
    font-size: 38px;
    line-height: 54px;
    filter: saturate(0.88);
}

.price {
    min-height: 66px;
    margin: 12px 0 0;
    font-size: 46px;
    line-height: 1.2;
    font-weight: 780;
}

.description {
    min-height: 58px;
    margin: 12px 0 24px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.support-card button {
    width: 100%;
    min-height: 52px;
    margin-top: auto;
    border: 1px solid var(--green-strong);
    border-radius: 6px;
    background: transparent;
    color: var(--green);
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.support-card button:hover:not(:disabled) {
    background: var(--green);
    color: #071006;
}

.support-card button:disabled {
    border-color: rgba(169, 176, 171, 0.22);
    color: rgba(169, 176, 171, 0.5);
    cursor: not-allowed;
}

.support-card button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 4px;
}

.checkout-meta {
    min-height: 76px;
    padding: 0 0 34px;
    text-align: center;
}

.trust-line {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.trust-line span,
.trust-line strong {
    color: var(--green);
}

.trust-line span {
    display: inline-block;
    margin-right: 8px;
}

.checkout-status {
    max-width: 620px;
    margin: 10px auto 0;
    color: var(--quiet);
    font-size: 14px;
}

.checkout-status[data-tone="error"] {
    color: var(--error);
}

.checkout-status[data-tone="notice"] {
    color: #c4cbc6;
}

.coffee-footer {
    width: 100%;
    border-top: 1px solid var(--line-soft);
    background: rgba(3, 6, 4, 0.72);
}

.coffee-footer {
    min-height: 82px;
    padding: 22px max(24px, calc((100vw - var(--max-width)) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}

.coffee-footer a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.coffee-footer a:hover {
    color: var(--text);
}

.coffee-footer .footer-primary {
    color: var(--green);
}

.coffee-footer nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 18px 28px;
}

.policy-page main,
.thanks-page main {
    width: min(calc(100% - 48px), 860px);
}

.policy-content,
.thanks-content {
    padding: 72px 0 96px;
}

.policy-content h1,
.thanks-content h1 {
    margin: 0;
    font-size: 46px;
    line-height: 1.15;
}

.policy-content .effective-date {
    margin: 14px 0 42px;
    color: var(--quiet);
    font-size: 14px;
}

.policy-content section + section {
    margin-top: 36px;
}

.policy-content h2 {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.35;
}

.policy-content p,
.policy-content li,
.thanks-content p {
    color: var(--muted);
}

.policy-content p {
    margin: 0;
}

.policy-content p + p {
    margin-top: 12px;
}

.policy-content ul {
    margin: 12px 0 0;
    padding-left: 22px;
}

.policy-content li + li {
    margin-top: 8px;
}

.policy-content a {
    color: var(--green);
}

.thanks-content {
    max-width: 700px;
    margin: auto;
    text-align: center;
}

.thanks-icon {
    margin-bottom: 24px;
    font-size: 56px;
}

.thanks-content p {
    margin: 24px auto 0;
    font-size: 18px;
}

.thanks-actions {
    margin-top: 36px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.text-button {
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--green);
    font-weight: 700;
    text-decoration: none;
}

.text-button-secondary {
    border-color: var(--line-soft);
    color: var(--muted);
}

@media (max-width: 980px) {
    .support-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .support-card {
        min-height: 350px;
    }
}

@media (max-width: 640px) {
    #matrixCanvas {
        opacity: 0.2 !important;
    }

    .site-header,
    main {
        width: min(calc(100% - 32px), var(--max-width));
    }

    .site-header {
        min-height: 66px;
    }

    .brand {
        font-size: 17px;
    }

    .back-link {
        font-size: 14px;
    }

    .coffee-hero {
        padding: 48px 0 36px;
    }

    .coffee-hero h1 {
        font-size: 36px;
    }

    .hero-intro {
        margin-top: 22px;
        font-size: 17px;
    }

    .hero-detail {
        font-size: 15px;
    }

    .support-options {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .support-card {
        min-height: 334px;
        padding: 24px 20px 20px;
    }

    .coffee-footer {
        padding: 24px 16px;
        flex-direction: column;
        text-align: center;
    }

    .coffee-footer nav {
        justify-content: center;
        gap: 16px 20px;
    }

    .policy-page main,
    .thanks-page main {
        width: min(calc(100% - 32px), 860px);
    }

    .policy-content,
    .thanks-content {
        padding: 52px 0 72px;
    }

    .policy-content h1,
    .thanks-content h1 {
        font-size: 36px;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
