:root {
    --bg: #09111d;
    --bg-soft: #111d2e;
    --panel: rgba(14, 28, 45, 0.84);
    --panel-light: #f1eadf;
    --line: rgba(255, 255, 255, 0.1);
    --text: #ecf0f5;
    --text-dark: #172336;
    --muted: #99aac0;
    --accent: #d88a43;
    --accent-soft: #f0c59d;
    --accent-2: #71c6bc;
    --success: #92d1a5;
    --danger: #f0a0a0;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(113, 198, 188, 0.22), transparent 28%),
        radial-gradient(circle at bottom left, rgba(216, 138, 67, 0.2), transparent 30%),
        linear-gradient(180deg, #07101a 0%, #09111d 100%);
}

a {
    color: inherit;
}

.page-backdrop {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    opacity: 0.28;
}

.site-shell {
    position: relative;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.25rem 0 3rem;
}

.site-header,
.site-footer,
.hero,
.card,
.page-intro,
.message,
.auth-card,
.hero-panel {
    backdrop-filter: blur(18px);
}

.site-header,
.site-footer {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 1px solid var(--line);
    background: rgba(10, 20, 33, 0.72);
    border-radius: var(--radius-md);
}

.site-header {
    position: sticky;
    top: 1rem;
    z-index: 10;
    margin-bottom: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
}

.brand strong,
h1,
h2,
h3 {
    font-family: "Fraunces", Georgia, serif;
    letter-spacing: -0.03em;
}

.brand small {
    display: block;
    color: var(--muted);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #08111c;
    font-weight: 700;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-nav a,
.nav-button {
    text-decoration: none;
    color: var(--text);
    font-size: 0.96rem;
}

.nav-button,
.button {
    border: 0;
    border-radius: 999px;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
}

.inline-form {
    margin: 0;
}

.hero,
.split-section,
.card-grid,
.metric-grid,
.section-heading,
.stack-list,
.billing-actions {
    display: grid;
    gap: 1.2rem;
}

.hero {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: stretch;
    gap: 1.5rem;
    padding: 2.2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(13, 24, 39, 0.85), rgba(18, 35, 56, 0.65));
    box-shadow: var(--shadow);
}

.hero h1,
.page-intro h1,
.auth-card h1 {
    margin: 0.2rem 0 1rem;
    font-size: clamp(2.5rem, 7vw, 4.8rem);
    line-height: 0.96;
}

.hero .lead,
.page-intro .lead {
    max-width: 52rem;
    font-size: 1.1rem;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.hero-panel,
.card,
.page-intro,
.auth-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hero-panel,
.card,
.page-intro,
.auth-card,
.message,
.site-footer {
    padding: 1.5rem;
}

.section,
.page-intro,
.split-section,
.card-grid,
.table-wrap,
.auth-shell {
    margin-top: 1.5rem;
}

.page-intro.narrow,
.auth-shell {
    max-width: 760px;
}

.section-light,
.card-light {
    background: linear-gradient(180deg, rgba(241, 234, 223, 0.96), rgba(232, 223, 210, 0.92));
    color: var(--text-dark);
}

.accent-card {
    background: linear-gradient(135deg, rgba(216, 138, 67, 0.22), rgba(113, 198, 188, 0.18));
}

.section-heading {
    align-items: end;
    grid-template-columns: 1fr auto;
    margin-bottom: 1rem;
}

.section-heading.compact-heading {
    margin-bottom: 0;
}

.eyebrow,
.pill,
.meta,
.muted-note {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.74rem;
}

.eyebrow,
.meta,
.muted-note {
    color: var(--muted);
}

.pill {
    display: inline-flex;
    width: fit-content;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(216, 138, 67, 0.16);
    color: var(--accent-soft);
}

.card-light .pill {
    color: #6c4315;
    background: rgba(216, 138, 67, 0.22);
}

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

.metric-grid article {
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.metric-grid article span {
    display: block;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.metric-grid article strong {
    font-size: 1.15rem;
}

.compact article strong,
.portal-grid article strong {
    font-size: 1.05rem;
}

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

.card-grid.three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card h2,
.card h3,
.auth-card h1 {
    margin-top: 0;
}

.detail-stack,
.stack-list,
.feature-list,
.billing-summary,
.stack-form {
    display: grid;
    gap: 0.9rem;
}

.feature-list {
    padding-left: 1.2rem;
}

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

.billing-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 1rem;
}

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

thead {
    background: rgba(255, 255, 255, 0.03);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    text-decoration: none;
}

.button-primary,
.nav-button {
    background: linear-gradient(135deg, var(--accent), #e5a566);
    color: #0d1520;
}

.button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
}

.message-stack {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.message {
    border: 1px solid rgba(146, 209, 165, 0.3);
    background: rgba(146, 209, 165, 0.12);
    border-radius: var(--radius-sm);
}

.message.error {
    border-color: rgba(240, 160, 160, 0.3);
    background: rgba(240, 160, 160, 0.12);
}

label {
    display: inline-block;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    font: inherit;
}

.card-light input,
.card-light textarea,
.card-light select,
.auth-card input,
.auth-card textarea,
.auth-card select {
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-dark);
    border-color: rgba(23, 35, 54, 0.12);
}

.error-text {
    display: block;
    color: #ffd3d3;
}

.site-footer {
    margin-top: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .hero,
    .split-section,
    .card-grid,
    .card-grid.three-up,
    .metric-grid,
    .billing-card,
    .section-heading,
    .site-footer {
        grid-template-columns: 1fr;
    }

    .site-header,
    .site-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav {
        gap: 0.75rem;
    }

    .hero h1,
    .page-intro h1,
    .auth-card h1 {
        font-size: clamp(2rem, 11vw, 3.4rem);
    }
}