@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
    --snow: #f7f6f2;
    --ink: #101820;
    --sky: #cfe8f3;
    --glacier: #b7d9ea;
    --cranberry: #d1495b;
    --pine: #1b6f5d;
    --gold: #f2b705;
    --shadow: rgba(16, 24, 32, 0.12);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --page-bg: radial-gradient(circle at top, var(--sky) 0%, var(--snow) 55%, #fff 100%);
    --text: var(--ink);
    --text-muted: rgba(16, 24, 32, 0.6);
    --surface: #fff;
    --hero-bg: linear-gradient(135deg, #ffffff 0%, #f1f8fb 60%, #fef7e4 100%);
    --border: rgba(16, 24, 32, 0.12);
    --border-strong: rgba(16, 24, 32, 0.2);
    --card-shadow: 0 18px 36px rgba(16, 24, 32, 0.08);
    --glass: rgba(255, 255, 255, 0.9);
    --highlight-bg: linear-gradient(145deg, rgba(27, 111, 93, 0.12), rgba(242, 183, 5, 0.16));
    --tag-bg: rgba(27, 111, 93, 0.12);
    --tag-color: var(--pine);
    --tag-accent-bg: rgba(209, 73, 91, 0.12);
    --tag-accent-color: var(--cranberry);
    --toggle-active-bg: var(--ink);
    --toggle-active-text: #fff;
}

[data-theme='dark'] {
    --page-bg: radial-gradient(circle at top, #1c2430 0%, #0f141c 60%, #0b0f14 100%);
    --text: #f4f6fb;
    --text-muted: rgba(244, 246, 251, 0.7);
    --surface: #141a22;
    --hero-bg: linear-gradient(135deg, #151c26 0%, #1b2432 60%, #141c27 100%);
    --border: rgba(244, 246, 251, 0.16);
    --border-strong: rgba(244, 246, 251, 0.26);
    --shadow: rgba(0, 0, 0, 0.5);
    --card-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
    --glass: rgba(18, 24, 32, 0.9);
    --highlight-bg: linear-gradient(145deg, rgba(27, 111, 93, 0.25), rgba(242, 183, 5, 0.2));
    --tag-bg: rgba(27, 111, 93, 0.3);
    --tag-color: #b7f4e5;
    --tag-accent-bg: rgba(209, 73, 91, 0.3);
    --tag-accent-color: #f8c3cb;
    --toggle-active-bg: #f4f6fb;
    --toggle-active-text: #101820;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    background: var(--page-bg);
    color: var(--text);
    min-height: 100vh;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.top-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.top-nav__logo {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--text);
    text-decoration: none;
}

.top-nav__links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.top-nav__links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.top-nav__links a:hover {
    text-decoration: underline;
}

.utility-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.policy {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.policy h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
}

.policy h2 {
    margin: 12px 0 0;
    font-size: 18px;
}

.policy ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.8;
}

.policy a {
    color: inherit;
}

.policy__updated {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 13px;
}

.theme-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 10px 20px var(--shadow);
}

.theme-toggle__btn {
    border: none;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.theme-toggle__btn.is-active {
    background: var(--toggle-active-bg);
    color: var(--toggle-active-text);
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    align-items: center;
    background: var(--hero-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 20%, rgba(209, 73, 91, 0.18), transparent 55%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 12px;
    color: var(--pine);
    font-weight: 600;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 52px);
    margin: 0;
}

.hero__lead {
    font-size: 18px;
    line-height: 1.6;
    max-width: 520px;
    margin: 0;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-btn,
.ghost-btn {
    border: none;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    background: var(--cranberry);
    color: #fff;
    box-shadow: 0 12px 20px rgba(209, 73, 91, 0.3);
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.ghost-btn {
    border: 1px solid var(--border-strong);
    color: var(--text);
    background: transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.hero__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.meta__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.meta__value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-top: 6px;
}

.hero__visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.hero__shape {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: linear-gradient(160deg, rgba(27, 111, 93, 0.2), rgba(242, 183, 5, 0.2));
    filter: blur(1px);
    top: -20px;
    right: -10px;
}

.snow-globe {
    background: var(--glass);
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 20px 40px var(--shadow);
    text-align: left;
    backdrop-filter: blur(6px);
}

.snow-globe__title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    display: block;
    margin-bottom: 8px;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 18px 34px var(--shadow);
}

.control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control label {
    font-weight: 600;
    font-size: 14px;
}

.control select {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
}

.control select option {
    color: var(--text);
    background: var(--surface);
}

.results__header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, 4vw, 34px);
    margin: 0 0 6px;
}

.results__header p {
    margin: 0;
    color: var(--text-muted);
}

.cards {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: rise 0.7s ease both;
    animation-delay: var(--delay, 0s);
}

.card__media {
    height: 120px;
    border-radius: var(--radius-sm);
    padding: 14px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card__media span {
    font-weight: 600;
    letter-spacing: 0.08em;
    font-size: 12px;
    text-transform: uppercase;
}

.card__title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.card__details {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: var(--tag-bg);
    color: var(--tag-color);
    font-weight: 600;
}

.tag--accent {
    background: var(--tag-accent-bg);
    color: var(--tag-accent-color);
}

.empty-state {
    display: none;
    margin-top: 20px;
    text-align: center;
    color: var(--text-muted);
}

.tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.tips__card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.tips__card ul {
    margin: 16px 0 0;
    padding-left: 18px;
    line-height: 1.8;
}

.tips__card--highlight {
    background: var(--highlight-bg);
}

form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

form label {
    font-weight: 600;
}

form input,
form textarea {
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
}

form button {
    justify-self: start;
}

.site-footer {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-footer p {
    margin: 6px 0 0;
    color: var(--text-muted);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.site-footer__links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.site-footer__links a:hover {
    text-decoration: underline;
}

.site-footer__note {
    color: var(--text-muted);
    font-size: 12px;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 720px) {
    .page {
        padding: 32px 18px 60px;
    }

    .hero {
        padding: 28px;
    }

    .hero__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .utility-bar {
        justify-content: flex-start;
    }
}
