:root {
    --gold: #dea225;
    --gold-dark: #dea225;
    --black: #111112;
    --black-soft: #222224;
    --white: #ffffff;
    --cream: #ffffff;
    --muted: #6f6e69;
    --line: rgba(17, 17, 18, 0.14);
    --success: #176b45;
    --danger: #a42a2a;
    --warning: #8a6200;
    --shadow: 0 24px 70px rgba(17, 17, 18, 0.11);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--black);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

body,
button,
input,
textarea,
select {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

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

button,
input,
textarea,
select {
    border-radius: 0;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    transform: translateY(-160%);
    background: var(--gold);
    color: var(--black);
    padding: 10px 16px;
    font-weight: 800;
}

.skip-link:focus {
    transform: translateY(0);
}

.announcement {
    min-height: 36px;
    display: grid;
    place-items: center;
    padding: 8px 20px;
    background: var(--gold);
    color: var(--black);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    color: var(--black);
    backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.site-logo {
    width: 92px;
    flex: 0 0 auto;
}

.site-logo img {
    width: 100%;
    max-height: 94px;
    object-fit: contain;
    filter: none;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 14px;
    font-weight: 750;
}

.main-nav > a:not(.nav-cta) {
    padding-block: 10px;
    border-bottom: 2px solid transparent;
}

.main-nav > a:not(.nav-cta):hover {
    color: var(--gold);
    border-color: var(--gold);
}

.nav-cta {
    padding: 12px 19px;
    background: var(--gold);
    color: var(--black);
    border: 1px solid var(--gold);
}

.nav-cta:hover {
    background: var(--white);
    border-color: var(--white);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid rgba(17, 17, 18, 0.28);
    background: transparent;
    color: var(--black);
    cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: currentColor;
}

.hero {
    overflow: hidden;
    background: var(--cream);
}

.hero-grid {
    min-height: 690px;
    display: grid;
    grid-template-columns: 1.03fr 0.97fr;
    align-items: stretch;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 88px 70px 80px 0;
}

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

.eyebrow-light {
    color: var(--gold);
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    margin-top: 0;
    letter-spacing: -0.035em;
    line-height: 1.06;
}

.hero h1 {
    max-width: 680px;
    margin-bottom: 26px;
    font-size: clamp(48px, 5.4vw, 82px);
    font-weight: 850;
}

.hero h1 em {
    display: block;
    color: var(--gold-dark);
    font-style: normal;
}

.hero-lead {
    max-width: 600px;
    margin: 0;
    color: rgba(17, 17, 18, 0.72);
    font-size: 18px;
    line-height: 1.78;
}

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

.button {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 850;
    transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    transform: none;
}

.button-primary {
    background: var(--gold);
    color: var(--black);
    border-color: var(--gold);
}

.button-primary:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.button-secondary {
    background: transparent;
    color: var(--black);
    border-color: var(--black);
}

.button-secondary:hover {
    background: var(--black);
    color: var(--white);
}

.button-full {
    width: 100%;
}

.trust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin: 46px 0 0;
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
    list-style: none;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.trust-list li::before {
    content: "✓";
    margin-right: 7px;
    color: var(--gold-dark);
}

.hero-image-wrap {
    min-height: 690px;
    position: relative;
    background: var(--black);
}

.hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 17, 18, 0.16), transparent 40%);
    pointer-events: none;
}

.hero-image-note {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 1;
    min-width: 190px;
    padding: 17px 20px;
    background: var(--black);
    color: var(--white);
    border-left: 5px solid var(--gold);
}

.hero-image-note span,
.hero-image-note strong {
    display: block;
}

.hero-image-note span {
    margin-bottom: 3px;
    color: var(--gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section {
    padding: 104px 0;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    align-items: end;
    gap: 60px;
    margin-bottom: 44px;
}

.section-heading h2,
.services-section h2,
.about-section h2 {
    margin-bottom: 0;
    font-size: clamp(38px, 4.7vw, 65px);
    font-weight: 830;
}

.section-heading > p {
    margin: 0 0 4px;
    color: var(--muted);
}

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

.category-card {
    min-height: 410px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    border: 1px solid var(--black);
}

.category-card-1 {
    background: var(--black);
    color: var(--white);
}

.category-card-2 {
    background: var(--gold);
    color: var(--black);
    border-color: var(--gold);
}

.category-card-3 {
    background: var(--white);
    color: var(--black);
}

.category-number {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.category-card h3 {
    margin-bottom: 16px;
    font-size: 38px;
}

.category-card p {
    min-height: 115px;
    margin: 0;
    opacity: 0.82;
}

.category-link {
    display: block;
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid currentColor;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.services-section {
    background: var(--black);
    color: var(--white);
}

.service-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 70px;
}

.services-section h2 {
    color: var(--white);
}

.service-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.service-list span {
    padding: 11px 16px;
    border: 1px solid rgba(222, 162, 37, 0.75);
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
}

.about-section {
    background: var(--cream);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.about-copy {
    color: rgba(17, 17, 18, 0.75);
    font-size: 18px;
    line-height: 1.85;
}

.about-copy p:first-child {
    margin-top: 0;
}

.site-footer {
    padding: 72px 0 22px;
    background: var(--black);
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1.1fr;
    gap: 65px;
}

.footer-logo {
    width: 150px;
    max-height: 160px;
    object-fit: contain;
    padding: 10px;
    background: var(--white);
}

.footer-grid h2 {
    margin-bottom: 18px;
    color: var(--gold);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-grid a,
.footer-grid p {
    display: block;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.75);
}

.footer-grid a:hover {
    color: var(--gold);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 55px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

.alert {
    margin: 18px 0;
    padding: 15px 17px;
    border-left: 5px solid currentColor;
    background: var(--white);
    box-shadow: 0 6px 24px rgba(17, 17, 18, 0.06);
}

.alert ul {
    margin-bottom: 0;
}

.alert-error {
    color: var(--danger);
    background: #fff5f5;
}

.alert-success {
    color: var(--success);
    background: #f2fff8;
}

.alert-warning {
    color: var(--warning);
    background: #fff9e8;
}

code {
    padding: 2px 5px;
    background: rgba(17, 17, 18, 0.08);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
}

/* Authentication */
.auth-body {
    min-height: 100vh;
    background: var(--black);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
}

.auth-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px clamp(28px, 7vw, 110px);
}

.auth-brand-panel {
    align-items: center;
    background: var(--gold);
    color: var(--black);
    text-align: center;
}

.auth-brand-panel img {
    width: min(340px, 100%);
    padding: 24px;
    background: var(--white);
}

.auth-brand-panel p {
    font-weight: 800;
}

.auth-brand-panel a {
    margin-top: 18px;
    padding-bottom: 3px;
    border-bottom: 2px solid currentColor;
    font-weight: 800;
}

.auth-form-panel {
    background: var(--cream);
}

.auth-card {
    width: min(500px, 100%);
    margin-inline: auto;
}

.auth-card h1 {
    margin-bottom: 12px;
    font-size: clamp(42px, 5vw, 68px);
}

.auth-card > p:not(.eyebrow) {
    color: var(--muted);
}

.form-stack {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

label > span {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 850;
}

label small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

input,
textarea,
select {
    width: 100%;
    min-height: 50px;
    padding: 11px 13px;
    border: 1px solid rgba(17, 17, 18, 0.32);
    background: var(--white);
    color: var(--black);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 3px rgba(222, 162, 37, 0.2);
    outline: none;
}

/* Installer */
.installer-body {
    min-height: 100vh;
    padding: 48px 20px;
    background:
        linear-gradient(135deg, rgba(222, 162, 37, 0.18), transparent 42%),
        var(--black);
}

.installer-shell {
    width: min(980px, 100%);
    margin-inline: auto;
}

.installer-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 28px;
    color: var(--white);
}

.installer-header img {
    width: 130px;
    max-height: 135px;
    object-fit: contain;
    padding: 8px;
    background: var(--white);
}

.installer-header h1 {
    margin-bottom: 5px;
    font-size: clamp(38px, 6vw, 66px);
}

.installer-header p:not(.eyebrow) {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
}

.installer-card {
    margin-bottom: 22px;
    padding: clamp(24px, 4vw, 42px);
    background: var(--cream);
    box-shadow: var(--shadow);
}

.installer-card h2 {
    margin-bottom: 22px;
    font-size: 30px;
}

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

.requirement {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--white);
    font-size: 13px;
    font-weight: 750;
}

.requirement span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    font-weight: 900;
}

.requirement.passed span {
    background: var(--success);
}

.requirement.failed span {
    background: var(--danger);
}

.installer-form fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 32px;
    padding: 0;
    border: 0;
}

.installer-form legend {
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 2px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--gold);
    font-size: 17px;
    font-weight: 900;
}

.full-field {
    grid-column: 1 / -1;
}

.success-mark {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--black);
    font-size: 38px;
    font-weight: 900;
}

.installer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

/* Admin */
.admin-body {
    min-height: 100vh;
    background: rgba(17, 17, 18, 0.045);
}

.admin-header {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 24px;
    background: var(--black);
    color: var(--white);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 850;
}

.admin-brand img {
    width: 58px;
    height: 52px;
    object-fit: contain;
    padding: 4px;
    background: var(--white);
}

.admin-brand span {
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.26);
}

.admin-account {
    display: flex;
    align-items: center;
    gap: 17px;
    font-size: 13px;
}

.admin-account a,
.link-button {
    color: var(--gold);
    font-weight: 800;
}

.admin-account form {
    margin: 0;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.admin-shell {
    min-height: calc(100vh - 74px);
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
}

.admin-sidebar {
    padding: 28px 18px;
    background: var(--white);
    border-right: 1px solid var(--line);
}

.admin-sidebar a,
.admin-sidebar > span {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 750;
}

.admin-sidebar .is-active {
    background: var(--gold);
    color: var(--black);
}

.coming-soon {
    color: rgba(17, 17, 18, 0.48);
}

.coming-soon small {
    font-size: 10px;
    font-weight: 800;
}

.admin-main {
    min-width: 0;
    padding: clamp(24px, 4vw, 52px);
}

.admin-page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 30px;
}

.admin-page-heading h1 {
    margin-bottom: 8px;
    font-size: clamp(40px, 5vw, 62px);
}

.admin-page-heading p:last-child {
    margin: 0;
    color: var(--muted);
}

.version-badge {
    flex: 0 0 auto;
    padding: 9px 12px;
    background: var(--black);
    color: var(--gold);
    font-size: 12px;
    font-weight: 850;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card,
.admin-card {
    background: var(--white);
    border-top: 4px solid var(--gold);
    box-shadow: 0 10px 30px rgba(17, 17, 18, 0.06);
}

.stat-card {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.stat-card strong {
    margin-block: auto;
    font-size: 48px;
    line-height: 1;
}

.stat-card small {
    color: var(--muted);
}

.admin-card {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 40px;
    padding: 30px;
}

.admin-card h2 {
    margin-bottom: 0;
    font-size: 32px;
}

.status-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.status-list li {
    padding: 11px 0 11px 28px;
    position: relative;
    border-bottom: 1px solid var(--line);
}

.status-list li::before {
    content: "○";
    position: absolute;
    left: 0;
    color: var(--muted);
}

.status-list .is-complete::before {
    content: "✓";
    color: var(--success);
    font-weight: 900;
}

@media (max-width: 980px) {
    .hero-grid,
    .section-heading,
    .service-layout,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding: 72px 0;
    }

    .hero-image-wrap {
        min-height: 480px;
        margin-inline: -20px;
    }

    .section-heading,
    .service-layout,
    .about-grid {
        gap: 28px;
    }

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

    .category-card {
        min-height: 330px;
    }

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

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }

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

@media (max-width: 760px) {
    .header-inner {
        min-height: 78px;
    }

    .site-logo {
        width: 92px;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 20px 22px;
        background: var(--white);
        border-top: 1px solid var(--line);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 13px 5px !important;
    }

    .nav-cta {
        margin-top: 8px;
        padding-inline: 14px !important;
        text-align: center;
    }

    .section {
        padding: 76px 0;
    }

    .auth-shell,
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        min-height: auto;
        padding: 50px 24px;
    }

    .auth-brand-panel {
        padding-block: 32px;
    }

    .auth-brand-panel img {
        width: 190px;
    }

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

    .admin-account {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-sidebar {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .admin-sidebar a,
    .admin-sidebar > span {
        flex: 0 0 auto;
        margin-bottom: 0;
    }

    .admin-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 32px, 1180px);
    }

    .announcement {
        justify-items: start;
        overflow: hidden;
        white-space: nowrap;
        text-align: left;
    }

    .hero h1 {
        font-size: 46px;
    }

    .hero-lead {
        font-size: 16px;
    }

    .hero-actions,
    .hero-actions .button {
        width: 100%;
    }

    .hero-image-wrap {
        min-height: 360px;
        margin-inline: -16px;
    }

    .hero-image-note {
        right: 16px;
        bottom: 16px;
    }

    .section-heading h2,
    .services-section h2,
    .about-section h2 {
        font-size: 38px;
    }

    .footer-grid,
    .requirement-grid,
    .installer-form fieldset,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid > div:first-child,
    .full-field,
    .installer-form legend {
        grid-column: auto;
    }

    .footer-bottom,
    .installer-header,
    .admin-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .installer-body {
        padding: 24px 12px;
    }

    .installer-header img {
        width: 95px;
    }

    .admin-main {
        padding: 24px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
