:root {
    --blue: #0066ff;
    --blue-dark: #0052cc;
    --ink: #0a0a0a;
    --ink-light: #555;
    --ink-muted: #999;
    --line: #e5e5e5;
    --bg: #fafafa;
    --white: #fff;
    --radius: 12px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --blue: #3388ff;
        --blue-dark: #2277ee;
        --ink: #e8e8e8;
        --ink-light: #aaa;
        --ink-muted: #777;
        --line: #2a2a2a;
        --bg: #161616;
        --white: #111;
    }
}

[data-theme="dark"] {
    --blue: #3388ff;
    --blue-dark: #2277ee;
    --ink: #e8e8e8;
    --ink-light: #aaa;
    --ink-muted: #777;
    --line: #2a2a2a;
    --bg: #161616;
    --white: #111;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- NAV ---- */

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--line);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) #navbar.scrolled {
        background: rgba(17, 17, 17, 0.92);
    }
}

[data-theme="dark"] #navbar.scrolled {
    background: rgba(17, 17, 17, 0.92);
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    font-size: 18px;
}

.brand img {
    border-radius: 8px;
}

/* ---- THEME TOGGLE ---- */

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    color: var(--ink);
    font-size: 18px;
    line-height: 1;
    transition: border-color 0.2s;
    font-family: var(--font);
}

.theme-toggle:hover {
    border-color: var(--ink);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---- BUTTONS ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--white);
    background: var(--ink);
    border: none;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 14px;
    border-radius: 8px;
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--line);
}

.btn-ghost:hover {
    border-color: var(--ink);
    opacity: 1;
}

/* ---- HERO ---- */

.hero {
    padding: 200px 24px 100px;
    text-align: center;
}

.hero-tag {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero-sub {
    font-size: 18px;
    color: var(--ink-light);
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- FEATURES ---- */

.features {
    padding: 100px 24px;
    border-top: 1px solid var(--line);
}

.features h2 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 56px;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 64px;
}

.feature-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
}

.feature h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.feature p {
    font-size: 15px;
    color: var(--ink-light);
    line-height: 1.6;
}

/* ---- PRICING ---- */

.pricing {
    padding: 100px 24px;
    background: var(--bg);
}

.pricing h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.pricing-note {
    font-size: 15px;
    color: var(--ink-muted);
    margin-bottom: 48px;
}

.plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.plan {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 28px;
    position: relative;
}

.plan-header {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.plan-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.plan-price {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.plan-price span {
    font-size: 15px;
    font-weight: 400;
    color: var(--ink-muted);
}

.plan ul {
    list-style: none;
}

.plan li {
    font-size: 14px;
    color: var(--ink-light);
    padding: 6px 0;
}

.plan li::before {
    content: "\2713";
    margin-right: 10px;
    font-weight: 600;
    color: var(--ink);
}

/* ---- WINNER ---- */

.winner {
    padding: 100px 24px;
    text-align: center;
    background: var(--bg);
    border-top: 1px solid var(--line);
}

.winner h2 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 40px;
}

.winner-quote {
    font-family: 'Times New Roman', Times, Georgia, serif;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    font-style: italic;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--ink);
    max-width: 720px;
    margin: 0 auto 32px;
    border: none;
    padding: 0;
}

.winner-congrats {
    font-size: 17px;
    color: var(--ink-light);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---- ENDORSEMENT ---- */

.endorsement {
    padding: 100px 24px;
    text-align: center;
    border-top: 1px solid var(--line);
}

.endorsement h2 {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.endorsement-desc {
    font-size: 18px;
    color: var(--ink-light);
    max-width: 560px;
    margin: 0 auto 24px;
    line-height: 1.7;
}

.endorsement-note {
    font-family: 'Times New Roman', Times, Georgia, serif;
    font-style: italic;
    font-size: 15px;
    color: var(--ink-muted);
}

.endorsement-img {
    margin-top: 32px;
    max-width: 600px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

/* ---- TIP ---- */

.tip-section {
    padding: 100px 24px;
    text-align: center;
    border-top: 1px solid var(--line);
}

.tip-section h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.tip-sub {
    font-size: 17px;
    color: var(--ink-light);
    margin-bottom: 36px;
}

.tip-amounts {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 14px 24px;
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--ink);
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.tip-btn:hover {
    border-color: var(--ink);
    transform: translateY(-1px);
}

.tip-btn.active {
    border-color: var(--blue);
    color: var(--blue);
    box-shadow: 0 0 0 1px var(--blue);
}

.tip-btn-pop {
    border-color: var(--ink);
}

.tip-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 28px;
}

.tip-currency {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink-muted);
}

.tip-input {
    width: 160px;
    padding: 12px 16px;
    font-size: 16px;
    font-family: var(--font);
    color: var(--ink);
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}

.tip-input::-webkit-outer-spin-button,
.tip-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tip-input:focus {
    border-color: var(--blue);
}

.tip-error {
    margin-top: 12px;
    font-size: 14px;
    color: #e53e3e;
}

/* ---- CTA ---- */

.cta {
    padding: 100px 24px;
    text-align: center;
    border-top: 1px solid var(--line);
}

.cta h2 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.cta p {
    font-size: 17px;
    color: var(--ink-light);
    margin-bottom: 32px;
}

/* ---- FOOTER ---- */

.footer {
    padding: 40px 24px;
    border-top: 1px solid var(--line);
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
}

.footer-brand img {
    border-radius: 6px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 14px;
    color: var(--ink-light);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--ink);
}

.footer-copy {
    font-size: 13px;
    color: var(--ink-muted);
}

/* ---- FOCUS ---- */

a:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- MOTION ---- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
    .hero {
        padding: 170px 24px 72px;
    }

    .hero-sub br {
        display: none;
    }

    .feature-list {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .plans {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .cta h2 {
        font-size: 28px;
    }

    .winner-quote {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 160px 20px 56px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero h1 br {
        display: none;
    }

    .hero-sub {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .features,
    .pricing,
    .cta {
        padding: 72px 20px;
    }

    .pricing h2 {
        font-size: 26px;
    }

    .footer-wrap {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}
