:root {
    color-scheme: light;
    --bg: #eef3ef;
    --paper: #fbfdf9;
    --text: #0c1411;
    --muted: #5d6b64;
    --line: #d1ddd6;
    --accent: #087a70;
    --accent-dark: #065c55;
    --accent-soft: #dff2ef;
    --blue: #244b8f;
    --blue-soft: #e7edf8;
    --shadow: 0 18px 46px rgba(26, 43, 36, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

.site-header {
    align-items: center;
    background: rgba(251, 253, 249, 0.94);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 16px clamp(20px, 4vw, 56px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand,
.top-nav,
.hero-actions,
.estimate-input-row {
    align-items: center;
    display: flex;
}

.brand {
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    background: var(--accent);
    border-radius: 8px;
    color: white;
    display: grid;
    font-weight: 900;
    height: 44px;
    place-items: center;
    width: 44px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 20px;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.top-nav {
    gap: 16px;
}

.top-nav a {
    color: var(--muted);
    font-weight: 800;
    text-decoration: none;
}

main {
    margin: 0 auto;
    max-width: 1180px;
    padding: 48px clamp(20px, 4vw, 56px) 80px;
}

.hero {
    align-items: stretch;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    margin-bottom: 42px;
}

.hero-copy,
.hero-system,
.market-estimate {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: clamp(28px, 5vw, 56px);
}

.eyebrow {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

h1,
h2 {
    letter-spacing: 0;
    line-height: 1.02;
    margin: 0;
}

h1 {
    font-size: clamp(44px, 7vw, 76px);
    max-width: 780px;
}

h2 {
    font-size: clamp(32px, 4vw, 48px);
}

.hero-text,
.estimate-copy p,
.policy-note,
.server-note {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.hero-text {
    max-width: 680px;
}

.hero-actions {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-link,
.secondary-link,
.estimate-input-row button {
    border-radius: 8px;
    font-size: 16px;
    font-weight: 900;
    min-height: 48px;
    padding: 13px 18px;
    text-decoration: none;
}

.primary-link,
.estimate-input-row button {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: white;
}

.primary-link:hover,
.estimate-input-row button:hover {
    background: var(--accent-dark);
}

.secondary-link {
    background: white;
    border: 1px solid var(--line);
}

.hero-system {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 460px;
    overflow: hidden;
    padding: 24px;
}

.system-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.system-row span,
.system-proof {
    background: #0c1411;
    border: 1px solid rgba(8, 122, 112, 0.38);
    border-radius: 8px;
    color: white;
    min-height: 96px;
    padding: 16px;
}

.system-row span {
    align-content: end;
    display: grid;
    font-weight: 900;
}

.system-proof {
    background: var(--accent-soft);
    color: var(--text);
    min-height: 160px;
}

.system-proof strong,
.system-proof span {
    display: block;
}

.system-proof strong {
    font-size: 32px;
    margin-bottom: 12px;
}

.system-proof span {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.45;
}

.market-estimate {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1fr);
    padding: clamp(24px, 4vw, 40px);
}

.estimate-copy p {
    max-width: 560px;
}

.server-note {
    background: var(--blue-soft);
    border-radius: 8px;
    color: #1e3a70;
    font-size: 15px;
    margin-top: 22px;
    padding: 14px 16px;
}

.estimate-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}

.estimate-card label {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.estimate-input-row {
    gap: 10px;
}

.estimate-input-row input {
    border: 2px solid var(--text);
    border-radius: 8px;
    color: var(--text);
    flex: 1;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    min-height: 56px;
    min-width: 0;
    padding: 0 16px;
}

.estimate-status {
    color: var(--muted);
    font-weight: 800;
    margin: 14px 0 0;
    min-height: 22px;
}

.estimate-result {
    margin-top: 20px;
}

.matched-market,
.tariff-box,
.estimate-total,
.budget-grid div {
    border-radius: 8px;
    padding: 16px;
}

.matched-market {
    background: var(--accent-soft);
}

.matched-market span,
.tariff-box span,
.estimate-total span,
.budget-grid span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.07em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.matched-market strong,
.tariff-box strong,
.estimate-total strong,
.budget-grid strong {
    display: block;
    font-size: 24px;
}

.tariff-box {
    background: #edf7f5;
    margin-top: 12px;
}

.tariff-box strong {
    color: var(--accent-dark);
}

.budget-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
}

.budget-grid div {
    border: 1px solid var(--line);
}

.estimate-total {
    background: var(--text);
    color: white;
    margin-top: 12px;
}

.estimate-total span {
    color: rgba(255, 255, 255, 0.72);
}

.policy-note {
    font-size: 14px;
    margin: 14px 0 0;
}

@media (max-width: 920px) {
    .hero,
    .market-estimate {
        grid-template-columns: 1fr;
    }

    .hero-system {
        min-height: 320px;
    }
}

@media (max-width: 620px) {
    .site-header,
    .top-nav,
    .estimate-input-row {
        align-items: stretch;
        flex-direction: column;
    }

    .site-header {
        position: static;
    }

    .top-nav {
        width: 100%;
    }

    .top-nav a {
        background: white;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 10px 12px;
    }

    .system-row,
    .budget-grid {
        grid-template-columns: 1fr;
    }
}
