:root {
    --bg-main: #ece8e1;
    --bg-deep: #e1ddd3;
    --panel-bg: rgba(255, 255, 255, 0.74);
    --panel-border: rgba(27, 38, 59, 0.16);
    --text-main: #1b2434;
    --text-dim: #536072;
    --accent-main: #0f766e;
    --accent-soft: #73b9b3;
    --accent-warm: #b7791f;
    --danger-main: #b53b5d;
    --shadow-soft: 0 24px 60px rgba(23, 31, 46, 0.12);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    color: var(--text-main);
    font-family: "Avenir Next", "Gill Sans MT", "Trebuchet MS", sans-serif;
    line-height: 1.58;
    background:
        radial-gradient(circle at 4% 12%, #f9f4e8 0%, transparent 30%),
        radial-gradient(circle at 92% 84%, #d3e5e0 0%, transparent 34%),
        linear-gradient(145deg, var(--bg-main), var(--bg-deep));
    overflow-x: hidden;
}

h1,
h2,
h3 {
    margin: 0;
    color: #111826;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
    letter-spacing: 0.01em;
}

p {
    margin: 0;
}

a {
    color: inherit;
}

.ambient-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.65;
}

.orb-a {
    width: min(40vw, 560px);
    height: min(40vw, 560px);
    left: -12vw;
    top: -16vh;
    background: radial-gradient(circle, rgba(188, 143, 81, 0.32) 0%, rgba(188, 143, 81, 0) 70%);
}

.orb-b {
    width: min(34vw, 430px);
    height: min(34vw, 430px);
    right: -10vw;
    top: 8vh;
    background: radial-gradient(circle, rgba(39, 112, 157, 0.3) 0%, rgba(39, 112, 157, 0) 74%);
}

.orb-c {
    width: min(44vw, 620px);
    height: min(44vw, 620px);
    right: 18vw;
    bottom: -22vh;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.25) 0%, rgba(15, 118, 110, 0) 72%);
}

.grid-wash {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(52, 70, 96, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 70, 96, 0.08) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.1));
}

.page-wrap {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: clamp(1.2rem, 2.8vw, 2.8rem);
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.kicker {
    color: var(--accent-main);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0 0 0.8rem;
}

.lead {
    color: var(--text-dim);
    font-size: 1rem;
}

.btn {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.84rem 1.5rem;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

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

.btn:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.32);
    outline-offset: 2px;
}

.btn-primary {
    color: #f4fbfa;
    background: linear-gradient(120deg, #1c7f76, #2b9f95);
    box-shadow: 0 14px 28px rgba(28, 127, 118, 0.24);
}

.btn-primary:hover {
    box-shadow: 0 16px 34px rgba(28, 127, 118, 0.28);
}

.btn-ghost {
    color: #1f3045;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(37, 53, 78, 0.18);
}

.btn-danger {
    color: #fff7f9;
    background: linear-gradient(120deg, var(--danger-main), #d26477);
    box-shadow: 0 14px 28px rgba(181, 59, 93, 0.24);
}

.btn-block {
    width: 100%;
}

.landing-main {
    display: grid;
    gap: 1.15rem;
}

.hero-panel {
    padding: clamp(1.25rem, 3.3vw, 2.6rem);
}

.hero-panel h1 {
    font-size: clamp(2rem, 4.8vw, 3.35rem);
    line-height: 1.08;
    margin-bottom: 0.95rem;
    max-width: 14ch;
}

.hero-panel .lead {
    font-size: clamp(1.03rem, 2.3vw, 1.18rem);
    max-width: 64ch;
}

.hero-actions {
    margin-top: 1.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.72rem;
}

.insight-row {
    margin-top: 1.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.insight-row span {
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.26);
    background: rgba(255, 255, 255, 0.45);
    color: #254861;
    padding: 0.44rem 0.78rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.benefit-card {
    border-radius: var(--radius-md);
    padding: 1rem 1.05rem;
}

.benefit-card h2 {
    font-size: 1.14rem;
    margin-bottom: 0.46rem;
}

.benefit-card p {
    color: var(--text-dim);
}

.benefit-card:nth-child(2n) h2 {
    color: #2b5d96;
}

.benefit-card:nth-child(2n + 1) h2 {
    color: var(--accent-warm);
}

.login-body,
.home-body {
    display: grid;
    place-items: center;
    padding: 1rem;
}

.auth-shell {
    width: min(520px, 100%);
}

.auth-panel {
    padding: clamp(1.2rem, 3.5vw, 2rem);
}

.auth-panel h1 {
    font-size: clamp(1.75rem, 5vw, 2.35rem);
    margin-bottom: 0.55rem;
}

.auth-form {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.4rem;
}

.auth-form label {
    color: #2f3f54;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-form input {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(24, 41, 64, 0.22);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-main);
    font-size: 0.96rem;
    padding: 0.78rem 0.9rem;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.65);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.status-message {
    color: #7c4f0a;
    min-height: 1.25rem;
    margin: 0.8rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-note {
    color: var(--text-dim);
    margin-top: 0.3rem;
    font-size: 0.9rem;
}

.inline-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: #1f4f73;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
}

.inline-link:hover {
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.home-shell {
    width: min(1080px, 100%);
    display: grid;
    gap: 1rem;
}

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    padding: 1.25rem 1.3rem;
}

.home-header h1 {
    font-size: clamp(1.65rem, 4vw, 2.45rem);
    margin-bottom: 0.4rem;
}

.home-header .lead {
    max-width: 58ch;
}

.home-card {
    border-radius: var(--radius-md);
    padding: 1.05rem 1.2rem;
}

.home-card h2 {
    color: #1e3a5b;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.profile-grid {
    margin: 0;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0.46rem 0.8rem;
}

.profile-grid dt {
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.profile-grid dd {
    margin: 0;
    color: #15253a;
    font-weight: 600;
}

.split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.pill-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.56rem;
}

.pill-list li {
    border-radius: 999px;
    border: 1px solid rgba(36, 60, 88, 0.2);
    background: rgba(255, 255, 255, 0.62);
    color: #1d3551;
    font-size: 0.83rem;
    font-weight: 700;
    padding: 0.45rem 0.8rem;
}

.home-status {
    margin-top: -0.2rem;
}

.reveal {
    animation: slide-in 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.landing-main .benefit-grid {
    animation-delay: 0.1s;
}

.home-shell > :nth-child(2) {
    animation-delay: 0.06s;
}

.home-shell > :nth-child(3) {
    animation-delay: 0.12s;
}

.home-shell > :nth-child(4) {
    animation-delay: 0.16s;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 920px) {
    .home-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .split-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .page-wrap {
        padding: 0.95rem;
    }

    .hero-panel,
    .auth-panel,
    .home-header,
    .home-card {
        padding: 1rem;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .btn {
        width: 100%;
    }

    .hero-actions .btn {
        width: auto;
    }
}

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