:root {
    --deep-navy: #10253f;
    --warm-cream: #f5efe2;
    --dark-charcoal: #11151c;
    --muted-red: #a64f4f;
    --steel-gray: #93a0ad;
    --ink-light: #e8e3d8;
    --panel: #1a2230;
    --line: #2d3a4d;
    --shadow: 0 14px 30px rgba(5, 9, 14, 0.45);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Public Sans', sans-serif;
    background: radial-gradient(circle at 10% -10%, #1d2d42 0%, #121a28 45%, #0d121b 100%);
    color: var(--ink-light);
    line-height: 1.55;
}

a {
    color: #dfcab0;
}

a:hover {
    color: #f2dfc4;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(166, 79, 79, 0.85);
    outline-offset: 2px;
}

.site-wrap {
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

.site-wrap::before,
.site-wrap::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
}

.site-wrap::before {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(166, 79, 79, 0.28) 0%, rgba(166, 79, 79, 0) 70%);
    top: -170px;
    right: -150px;
}

.site-wrap::after {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(109, 131, 155, 0.2) 0%, rgba(16, 37, 63, 0) 72%);
    left: -190px;
    bottom: -200px;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(147, 160, 173, 0.28);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand strong {
    font-family: 'Fraunces', serif;
    color: var(--warm-cream);
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    letter-spacing: 0.01em;
}

.brand span {
    color: var(--steel-gray);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--ink-light);
    font-size: 0.95rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 600;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    background: rgba(147, 160, 173, 0.14);
    color: #ffffff;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    padding: clamp(2.2rem, 5vw, 4rem) 0;
}

.hero-about {
    padding-bottom: clamp(1.4rem, 3vw, 2.4rem);
}

.hero-copy,
.hero-panel,
.inventory-card,
.service-list,
.about,
.contact-panel,
.story-card,
.badge-card,
.cta {
    animation: rise-in 0.7s ease both;
}

.hero-panel {
    animation-delay: 0.12s;
}

.hero-copy h1 {
    font-family: 'Fraunces', serif;
    color: var(--warm-cream);
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.1;
    margin: 0;
    max-width: 16ch;
}

.hero-copy p {
    margin: 1.1rem 0 1.5rem;
    max-width: 52ch;
    color: #c3ccd6;
    font-size: clamp(1rem, 1.5vw, 1.1rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.button {
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-radius: 0.75rem;
    padding: 0.8rem 1.1rem;
    transition: transform 0.16s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    display: inline-block;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.button.primary {
    background: #e4d6be;
    color: #0f1f33;
    box-shadow: 0 9px 20px rgba(0, 0, 0, 0.3);
}

.button.secondary {
    background: transparent;
    color: var(--warm-cream);
    border: 1px solid rgba(232, 227, 216, 0.35);
}

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

.button.primary:hover {
    background: #f1e4cb;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.35);
}

.button.secondary:hover {
    background: rgba(232, 227, 216, 0.1);
}

.hero-panel {
    background: linear-gradient(140deg, #1f3552 0%, #15263b 65%, #101c2d 100%);
    color: var(--warm-cream);
    border-radius: 1.2rem;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    position: relative;
    isolation: isolate;
    border: 1px solid rgba(147, 160, 173, 0.26);
}

.hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(245, 239, 226, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(245, 239, 226, 0.08) 1px, transparent 1px);
    background-size: 22px 22px;
    z-index: -1;
    border-radius: inherit;
}

.hero-panel h2 {
    margin-top: 0.2rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-family: 'Fraunces', serif;
}

.hero-panel ul {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.6rem;
}

.section {
    margin: 0 0 clamp(2.6rem, 5vw, 4rem);
}

.section h3 {
    font-family: 'Fraunces', serif;
    color: var(--warm-cream);
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    margin: 0 0 1rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-head p {
    max-width: 53ch;
    margin: 0;
    color: #b1bdc9;
}

.section-head .counter {
    color: #d7c8ad;
    font-weight: 700;
    font-size: 0.95rem;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 0.9rem 0 1.1rem;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip-label {
    color: #b1bdc9;
    font-size: 0.9rem;
    font-weight: 600;
}

.chip {
    border: 1px solid rgba(147, 160, 173, 0.33);
    background: rgba(26, 34, 48, 0.8);
    color: #d8e0e8;
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    font-size: 0.86rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover {
    border-color: rgba(245, 239, 226, 0.45);
    color: #ffffff;
}

.chip.active {
    background: rgba(166, 79, 79, 0.32);
    border-color: rgba(166, 79, 79, 0.8);
    color: #ffe7e7;
}

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

.inventory-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1.15rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease, border-color 0.2s ease;
}

.inventory-card:hover {
    transform: translateY(-2px);
    border-color: rgba(166, 79, 79, 0.6);
}

.inventory-card.hidden {
    display: none;
}

.inventory-card h4,
.badge-card h4 {
    margin: 0.2rem 0 0.45rem;
    color: #f2e8d8;
    font-size: 1.05rem;
}

.inventory-card p {
    margin: 0.45rem 0;
    color: #bac3ce;
}

.inventory-card .price {
    color: #f3e4ca;
    font-weight: 700;
}

.tag {
    display: inline-block;
    background: rgba(166, 79, 79, 0.2);
    border: 1px solid rgba(166, 79, 79, 0.42);
    color: #f2c7c7;
    padding: 0.16rem 0.56rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.service-layout,
.contact-layout,
.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.service-list,
.about,
.contact-panel,
.story-card,
.badge-card {
    background: #151f2d;
    border-radius: 1rem;
    border: 1px solid var(--line);
    padding: 1.2rem;
}

.service-list p,
.service-list li,
.about p,
.contact-panel p,
.story-card p {
    color: #bbc6d1;
}

.service-list ul {
    margin: 0.3rem 0 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.52rem;
}

.about p {
    margin-bottom: 0;
}

.contact-panel h4 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    color: var(--warm-cream);
    font-size: 1.14rem;
}

.call-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

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

.field label {
    font-size: 0.84rem;
    color: #bdc8d2;
    font-weight: 600;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid rgba(147, 160, 173, 0.35);
    background: #101722;
    color: #e7edf3;
    border-radius: 0.6rem;
    padding: 0.62rem 0.72rem;
    font: inherit;
}

.field textarea {
    min-height: 100px;
    resize: vertical;
}

.form-note {
    grid-column: 1 / -1;
    margin: 0;
    color: #9fb0be;
    font-size: 0.84rem;
}

.form-status {
    margin: 0 0 0.8rem;
    padding: 0.6rem 0.7rem;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.form-status.success {
    background: rgba(77, 128, 88, 0.2);
    border-color: rgba(111, 191, 129, 0.5);
    color: #bbf5c7;
}

.form-status.error {
    background: rgba(166, 79, 79, 0.22);
    border-color: rgba(207, 117, 117, 0.5);
    color: #ffd2d2;
}

.auth-shell {
    display: flex;
    justify-content: center;
}

.auth-card {
    width: min(560px, 100%);
    background: #151f2d;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1.3rem;
}

.auth-card h1 {
    font-family: 'Fraunces', serif;
    color: var(--warm-cream);
    margin: 0;
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
}

.auth-card p {
    color: #bbc6d1;
}

.auth-form {
    grid-template-columns: 1fr;
}

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

.admin-progress-card p {
    margin: 0.3rem 0;
}

.admin-users-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 1rem;
    align-items: start;
}

.users-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.9rem;
}

.users-table-wrap {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.users-table th,
.users-table td {
    border-bottom: 1px solid rgba(147, 160, 173, 0.28);
    padding: 0.52rem 0.45rem;
    text-align: left;
    color: #c2ccd6;
    font-size: 0.9rem;
    vertical-align: middle;
}

.users-table th {
    color: #e8e3d8;
    font-weight: 700;
}

.line-items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.line-items-grid > * {
    min-width: 0;
}

.line-items-grid .users-table {
    min-width: 460px;
}

.technician-order-card {
    padding: 0;
    overflow: hidden;
}

.technician-order-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 0.75rem;
    align-items: center;
    padding: 1rem 1rem 0.9rem;
    cursor: pointer;
    list-style: none;
}

.technician-order-summary::-webkit-details-marker {
    display: none;
}

.technician-order-arrow {
    grid-row: 1 / span 3;
    align-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3rem;
    height: 1.3rem;
    font-size: 1rem;
    color: var(--muted-gold);
    transition: transform 0.2s ease;
}

.technician-order-card[open] .technician-order-arrow {
    transform: rotate(90deg);
}

.technician-order-summary h4,
.technician-order-summary p {
    margin: 0;
}

.technician-order-summary h4 {
    grid-column: 2;
    color: var(--warm-cream);
}

.technician-order-summary .tag {
    grid-column: 2;
    justify-self: start;
}

.technician-order-customer {
    grid-column: 2;
    color: #c2ccd6;
}

.technician-order-body {
    border-top: 1px solid rgba(147, 160, 173, 0.24);
    padding: 1rem;
}

.cta {
    background: linear-gradient(110deg, #7e3c3c 0%, #4d2424 100%);
    color: var(--warm-cream);
    border-radius: 1.1rem;
    padding: clamp(1.2rem, 3.5vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.cta h3 {
    color: var(--warm-cream);
    margin-bottom: 0.4rem;
}

.cta p {
    margin: 0;
    color: #f0e4d2;
}

footer {
    margin: 2.5rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(147, 160, 173, 0.28);
    color: var(--steel-gray);
    font-size: 0.92rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 960px) {
    .hero,
    .service-layout,
    .contact-layout,
    .story-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-users-layout {
        grid-template-columns: 1fr;
    }

    .line-items-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .nav {
        justify-content: center;
        text-align: center;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .inventory-grid,
    .badge-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .admin-progress-grid {
        grid-template-columns: 1fr;
    }

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

    .cta .button {
        width: 100%;
        text-align: center;
    }
}
