:root {
    --bg: #f6efe4;
    --bg-accent: #efe0ca;
    --surface: rgba(255, 251, 245, 0.94);
    --surface-strong: #fffaf2;
    --text: #1f1a17;
    --muted: #6f655c;
    --line: rgba(49, 37, 28, 0.12);
    --primary: #a5482f;
    --primary-dark: #7a301d;
    --accent: #17313e;
    --shadow: 0 14px 34px rgba(56, 34, 14, 0.08);
    --shadow-soft: 0 8px 20px rgba(56, 34, 14, 0.05);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Aptos", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 22%),
        linear-gradient(135deg, #f8f2e8 0%, #eddac0 52%, #e7cfb5 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.site-header,
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #d97742);
    color: #fff;
    font-family: "Bahnschrift", "Arial Narrow", sans-serif;
    font-weight: 700;
}

.brand-name,
.brand-subtitle,
.footer-title,
.footer-copy,
.plan-name,
.price-points,
.hero-metrics,
.site-nav {
    margin: 0;
}

.brand-name,
.footer-title {
    font-weight: 800;
}

.brand-subtitle,
.footer-copy,
.footer-company,
.site-nav a,
.legal-intro,
.legal-section p,
.section-heading p,
.feature-card p,
.pricing-copy p,
.document-card p {
    color: var(--muted);
}

.site-nav {
    display: flex;
    gap: 24px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.header-link {
    color: var(--text);
    font-weight: 700;
}

.nav-cta-secondary {
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
    border: 1px solid var(--line);
}

.site-nav a:hover,
.footer-links a:hover,
.document-card:hover h3 {
    color: var(--primary);
}

.nav-cta,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-cta,
.button-primary {
    background: var(--primary);
    color: #fff;
}

.nav-cta {
    padding: 12px 18px;
}

.button {
    min-height: 48px;
    padding: 12px 20px;
    font-weight: 700;
}

.button:hover,
.nav-cta:hover {
    transform: translateY(-1px);
}

.button-secondary {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
}

.button-block {
    width: 100%;
}

.hero,
.pricing {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    margin-top: 26px;
}

.hero,
.features,
.pricing,
.documents {
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 32px;
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
}

.hero h1,
.section-heading h2,
.pricing-copy h2,
.legal-shell h1 {
    margin: 0;
    font-family: "Bahnschrift", "Arial Narrow", sans-serif;
    line-height: 1.05;
}

.hero h1 {
    font-size: clamp(42px, 7vw, 74px);
    max-width: 11ch;
}

.hero-text {
    max-width: 60ch;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

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

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 0;
    margin-top: 28px;
    list-style: none;
}

.hero-metrics li,
.feature-card,
.price-card,
.document-card,
.panel-card {
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
}

.hero-metrics li {
    padding: 18px;
}

.hero-metrics strong,
.price,
.document-card h3,
.feature-card h3,
.legal-section h2 {
    display: block;
    font-family: "Bahnschrift", "Arial Narrow", sans-serif;
}

.panel-card {
    padding: 22px;
    background: linear-gradient(180deg, rgba(23, 49, 62, 0.96), rgba(33, 31, 27, 0.96));
    color: #f8f1e5;
    min-height: 100%;
    box-shadow: var(--shadow-soft);
}

.panel-header,
.chat-line {
    display: flex;
    gap: 12px;
}

.panel-header {
    align-items: center;
    margin-bottom: 22px;
    color: rgba(248, 241, 229, 0.84);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #59d58a;
    box-shadow: 0 0 8px rgba(89, 213, 138, 0.45);
}

.chat-line {
    flex-direction: column;
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 18px;
}

.chat-line.user {
    background: rgba(255, 255, 255, 0.08);
}

.chat-line.ai {
    background: rgba(165, 72, 47, 0.22);
}

.label,
.document-tag {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chat-line p {
    margin: 0;
    line-height: 1.6;
}

.mini-grid,
.feature-grid,
.document-grid {
    display: grid;
    gap: 18px;
}

.mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 22px;
}

.mini-grid article {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.mini-grid span {
    color: rgba(248, 241, 229, 0.74);
}

.hero-metrics span {
    color: var(--muted);
}

.mini-grid strong {
    display: block;
    margin-top: 8px;
}

.features,
.documents {
    margin-top: 26px;
}

.section-heading {
    max-width: 700px;
}

.section-heading h2,
.pricing-copy h2,
.legal-shell h1 {
    font-size: clamp(32px, 5vw, 54px);
}

.feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 26px;
}

.feature-card,
.document-card,
.price-card {
    padding: 24px;
}

.pricing-copy {
    max-width: 620px;
}

.price-card {
    background: linear-gradient(180deg, #fff9f0 0%, #f8ead9 100%);
    box-shadow: var(--shadow-soft);
}

.price-line {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin: 12px 0 16px;
}

.price {
    font-size: 64px;
    line-height: 1;
}

.period {
    padding-bottom: 10px;
    color: var(--muted);
}

.price-points {
    padding-left: 18px;
    line-height: 1.9;
    color: var(--text);
}

.document-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 24px;
}

.document-card {
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.document-card:hover {
    transform: translateY(-4px);
    border-color: rgba(165, 72, 47, 0.38);
}

.site-footer {
    margin-top: 26px;
}

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

.footer-company {
    margin: 8px 0 0;
    font-size: 14px;
}

.footer-company a {
    color: inherit;
}

.legal-body {
    min-height: 100vh;
    padding: 32px 16px;
}

.legal-shell {
    width: min(860px, 100%);
    margin: 0 auto;
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.register-shell {
    width: min(640px, 100%);
}

.page-content {
    margin-top: 26px;
}

.legal-back {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--primary);
    font-weight: 700;
}

.legal-intro {
    margin-top: 18px;
    font-size: 18px;
    line-height: 1.7;
}

.legal-section + .legal-section {
    margin-top: 26px;
}

.register-form {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field span {
    font-weight: 700;
}

.form-field input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font: inherit;
    outline: none;
}

.form-field input:focus {
    border-color: rgba(165, 72, 47, 0.5);
    box-shadow: 0 0 0 3px rgba(165, 72, 47, 0.12);
}

.auth-switch {
    margin: 18px 0 0;
    color: var(--muted);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 700;
}

.alert {
    margin-top: 26px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.alert-success {
    background: rgba(112, 194, 125, 0.14);
    border-color: rgba(71, 150, 85, 0.3);
}

.alert-error {
    background: rgba(204, 86, 86, 0.12);
    border-color: rgba(169, 56, 56, 0.28);
}

.account-card {
    margin-top: 28px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
}

.account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
}

.account-row + .account-row {
    border-top: 1px solid var(--line);
}

.account-row span {
    color: var(--muted);
}

.account-actions {
    display: flex;
    gap: 14px;
    margin-top: 22px;
    flex-wrap: wrap;
}

@media (max-width: 980px) {
    .site-header,
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero,
    .pricing {
        grid-template-columns: 1fr;
    }

    .feature-grid,
    .document-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero h1 {
        max-width: 14ch;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 20px, 1180px);
        padding: 14px 0 24px;
    }

    .hero-metrics,
    .feature-grid,
    .document-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

    .site-header,
    .site-footer {
        padding: 16px;
        gap: 16px;
    }

    .site-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .header-actions {
        width: 100%;
    }

    .nav-cta,
    .nav-cta-secondary,
    .hero-actions .button,
    .button-block,
    .account-actions .button {
        width: 100%;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero,
    .features,
    .pricing,
    .documents,
    .legal-shell {
        padding: 22px;
        border-radius: 24px;
    }

    .hero h1 {
        max-width: none;
        font-size: clamp(34px, 11vw, 48px);
    }

    .hero-text,
    .legal-intro {
        font-size: 16px;
    }

    .price {
        font-size: 52px;
    }

    .price-line {
        align-items: baseline;
        flex-wrap: wrap;
    }

    .footer-links {
        width: 100%;
        gap: 12px 18px;
    }

    .account-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .document-card,
    .feature-card,
    .price-card,
    .hero-metrics li {
        border-radius: 20px;
    }

    .legal-body {
        padding: 16px 10px;
    }
}

@media (max-width: 560px) {
    .brand {
        width: 100%;
    }

    .brand-mark {
        flex-shrink: 0;
    }

    .site-nav {
        width: 100%;
        justify-content: space-between;
    }

    .site-nav a {
        font-size: 14px;
    }

    .hero,
    .features,
    .pricing,
    .documents {
        gap: 22px;
    }

    .hero-metrics {
        gap: 12px;
    }

    .feature-grid,
    .document-grid,
    .mini-grid {
        gap: 14px;
    }

    .section-heading h2,
    .pricing-copy h2,
    .legal-shell h1 {
        font-size: clamp(28px, 9vw, 38px);
    }
}
