:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #20352c;
    background: #f5f7f2;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
}

.site-header {
    padding: 0 clamp(1rem, 5vw, 4rem);
    border-bottom: 1px solid #e5ebe4;
    background: rgb(255 255 255 / 94%);
}

.site-header-inner {
    display: flex;
    width: min(100%, 1500px);
    min-height: 5.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 0.75rem;
    color: #20352c;
    text-decoration: none;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border-radius: 0.8rem;
    background: #20352c;
}

.brand-mark::before,
.brand-mark::after {
    position: absolute;
    width: 0.85rem;
    height: 1.3rem;
    border: 2px solid #c9dfc8;
    border-radius: 100% 0 100% 0;
    content: "";
}

.brand-mark::before {
    transform: translate(-0.2rem, 0.12rem) rotate(-35deg);
}

.brand-mark::after {
    transform: translate(0.22rem, -0.12rem) rotate(145deg);
}

.home-logo {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 0.15rem;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.brand-caption {
    color: #758279;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid #e7ece6;
    border-radius: 0.85rem;
    background: #f7f9f6;
}

.site-nav-link {
    display: inline-flex;
    min-height: 2.6rem;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: 0.6rem;
    color: #526258;
    font-size: 0.92rem;
    font-weight: 650;
    text-decoration: none;
    transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.site-nav-link:hover {
    background: #eaf0e9;
    color: #20352c;
}

.site-nav-link.is-current {
    background: #20352c;
    color: #fff;
    box-shadow: 0 2px 6px rgb(32 53 44 / 16%);
}

.site-nav-link.is-current:hover {
    background: #294a38;
    color: #fff;
}

.hero {
    display: grid;
    min-height: 75vh;
    align-content: center;
    justify-items: start;
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.home-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
}

.home-hero {
    display: grid;
    min-height: 55vh;
    align-content: center;
    justify-items: start;
    padding: 4rem clamp(1.5rem, 7vw, 5rem);
    border-radius: 1rem;
    background: #dfe9d8;
}

.home-hero h1 {
    max-width: 800px;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.home-actions .button {
    margin-top: 0;
}

.contact-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.contact-page h1 {
    font-size: clamp(2.5rem, 7vw, 4rem);
}

.contact-card {
    display: grid;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: clamp(1.5rem, 5vw, 3rem);
    border: 1px solid #dce5dc;
    border-radius: 0.75rem;
    background: #fff;
}

.contact-card p {
    display: grid;
    gap: 0.25rem;
    margin: 0 0 1rem;
    color: #53645a;
}

.contact-card a:not(.button) {
    color: #315c43;
    font-weight: 600;
}

.contact-card .button {
    justify-self: start;
}

.eyebrow {
    color: #47745a;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    max-width: 700px;
    margin: 0.5rem 0 1rem;
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1.05;
}

.intro {
    max-width: 560px;
    color: #53645a;
    font-size: 1.15rem;
    line-height: 1.7;
}

.button {
    display: inline-block;
    margin-top: 1.25rem;
    padding: 0.85rem 1.2rem;
    border-radius: 0.5rem;
    background: #315c43;
    color: white;
    font-weight: 600;
    text-decoration: none;
}

.button:hover {
    background: #244833;
}

.interest-trigger {
    background: #b83232;
    color: #fff;
}

.interest-trigger:hover {
    background: #962727;
}

.catalog {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.catalog h1 {
    font-size: clamp(2.25rem, 6vw, 4rem);
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.device-category + .device-category {
    margin-top: 3rem;
}

.device-category-title {
    margin: 0;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #dce5dc;
    color: #315c43;
    font-size: 1.6rem;
}

.device-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: visible;
    border: 1px solid #dce5dc;
    border-radius: 0.75rem;
    background: white;
}

.device-card:hover,
.device-card:focus-within {
    z-index: 1;
}

.device-photo {
    display: block;
    width: 100%;
    height: 24rem;
    border-radius: 0.75rem 0.75rem 0 0;
    object-fit: contain;
}

.device-info-tooltip {
    position: relative;
    display: inline-block;
}

.device-info-tooltip-trigger {
    cursor: help;
}

.device-info-tooltip-trigger:focus-visible {
    border-radius: 0.15rem;
    outline: 2px solid #315c43;
    outline-offset: 2px;
}

.device-info-tooltip-content {
    position: absolute;
    z-index: 2;
    bottom: calc(100% + 0.5rem);
    left: 0;
    visibility: hidden;
    width: max-content;
    max-width: min(80ch, calc(100vw - 3rem));
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #20352c;
    box-shadow: 0 0.5rem 1.25rem rgb(0 0 0 / 18%);
    color: white;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
}

.device-info-tooltip:hover .device-info-tooltip-content,
.device-info-tooltip:focus-within .device-info-tooltip-content {
    visibility: visible;
    opacity: 1;
}

.device-card h2 {
    margin: 1.5rem 1.5rem 0;
}

.device-card .device-status {
    display: inline-block;
    margin-top: 0.75rem;
    margin-right: 1.5rem;
    margin-left: 1.5rem;
    margin-bottom: 0;
    padding: 0.55rem 0.85rem;
    border-radius: 0.5rem;
    background: #f2cf55;
    color: #202018;
    font-size: 0.95rem;
    font-weight: 700;
}

.device-card p {
    margin-right: 1.5rem;
    margin-left: 1.5rem;
    color: #53645a;
    line-height: 1.6;
}

.device-card .device-price {
    margin-bottom: 0;
    color: #244833;
    font-size: 1.25rem;
    font-weight: 700;
    padding-bottom: 1.5rem;
}

.device-price span {
    font-size: 0.9rem;
    font-weight: 400;
}

.interest-form {
    display: grid;
    gap: 0.75rem;
    margin: 0 1.5rem 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #dce5dc;
}

.device-actions {
    display: grid;
    gap: 0.75rem;
    margin: auto 1.5rem 1.5rem;
    padding-top: 1rem;
}

.reservation-trigger {
    display: block;
    margin-top: 0;
}

.interest-trigger {
    margin-top: 0;
    background: #b83232;
}

.interest-trigger:hover {
    background: #962727;
}

.reservation-trigger {
    background: #20352c;
}

.reservation-trigger:hover {
    background: #14251d;
}

.device-dialog {
    width: min(36rem, calc(100vw - 2rem));
    max-width: none;
    max-height: min(90vh, 52rem);
    max-height: min(90dvh, 52rem);
    padding: 1.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #d6e0d6;
    border-radius: 1rem;
    background: #fff;
    color: #20352c;
    box-shadow: 0 1.5rem 5rem rgb(15 31 22 / 25%);
}

.device-dialog--reservation {
    width: min(64rem, calc(100vw - 3rem));
}

.device-dialog[open] {
    display: grid;
    gap: 1.25rem;
}

.device-dialog::backdrop {
    background: rgb(20 37 29 / 58%);
    backdrop-filter: blur(2px);
}

.device-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.device-dialog-header h2 {
    margin: 0;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
}

.dialog-close {
    display: grid;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border: 1px solid #d6e0d6;
    border-radius: 50%;
    background: #f5f7f2;
    color: #20352c;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.dialog-close:hover {
    background: #e7eee5;
}

.device-dialog .interest-form {
    margin: 0;
    padding: 0;
    border: 0;
}

.reservation-dialog-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1.1fr);
    align-items: start;
    gap: 1.5rem;
}

.reservation-contact-fields,
.calendar-panel {
    display: grid;
    min-width: 0;
    gap: 0.75rem;
}

.reservation-form > .button {
    margin-top: 1rem;
}

.interest-form h3,
.interest-form p {
    margin: 0;
}

.interest-note {
    color: #53645a;
    font-size: 0.9rem;
    line-height: 1.5;
}

.contact-choice-note {
    padding: 0.75rem;
    border-left: 3px solid #315c43;
    border-radius: 0.25rem;
    background: #f0f3ed;
    color: #20352c;
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-field {
    display: grid;
    gap: 0.35rem;
}

.form-field label {
    font-size: 0.9rem;
    font-weight: 600;
}

.form-field input:not([type="checkbox"]),
.form-field textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #aebcaf;
    border-radius: 0.35rem;
    font: inherit;
}

.calendar-widget {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.65rem;
    padding: 0.9rem;
    border: 1px solid #d6e0d6;
    border-radius: 0.65rem;
    background: #f8faf8;
}

.calendar-selection {
    margin: 0;
    color: #20352c;
    font-weight: 700;
}

.calendar-hint {
    margin: 0;
    color: #53645a;
    font-size: 0.9rem;
}

.calendar-heading {
    display: grid;
    grid-template-columns: 2rem 1fr 2rem;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.calendar-heading button {
    min-height: 2.25rem;
    border: 1px solid #cbd6cc;
    border-radius: 0.45rem;
    background: #fff;
    color: #20352c;
    font: inherit;
    cursor: pointer;
}

.calendar-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    text-align: center;
}

.calendar-table th,
.calendar-table td {
    border: 1px solid #cbd6cc;
}

.calendar-table th {
    padding: 0.5rem 0.1rem;
    background: #eef2ed;
    color: #53645a;
    font-size: 0.75rem;
    font-weight: 700;
}

.calendar-weekday-compact {
    display: none;
}

.calendar-table th.calendar-saturday,
.calendar-table td.calendar-saturday {
    background: #e8eff3;
}

.calendar-table th.calendar-sunday,
.calendar-table td.calendar-sunday {
    background: #f4ece5;
}

.calendar-table td {
    height: 2.65rem;
    padding: 0;
    background: #fff;
}

.calendar-day {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 2.5rem;
    place-items: center;
    min-width: 0;
    padding: 0.2rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #20352c;
    font: inherit;
    cursor: pointer;
}

.calendar-day--saturday {
    background: #e8eff3;
}

.calendar-day--sunday {
    background: #f4ece5;
}

.calendar-day[aria-pressed="true"] {
    outline: 2px solid #20352c;
    outline-offset: -3px;
    font-weight: 700;
}

.calendar-day:hover:not(:disabled) {
    border-color: #78927f;
}

.calendar-day--rented,
.calendar-day--rented:hover:not(:disabled) {
    background: #b83232;
    color: #fff;
}

.calendar-day:disabled {
    cursor: not-allowed;
}

.calendar-day:disabled:not(.calendar-day--rented) {
    color: #aebcaf;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    color: #53645a;
    font-size: 0.8rem;
}

.calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.calendar-legend-swatch {
    flex: 0 0 auto;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 0.2rem;
}

.calendar-legend-swatch--rented {
    background: #b83232;
}

@media (max-width: 380px) {
    .calendar-widget {
        padding: 0.55rem;
    }

    .calendar-table th {
        font-size: 0.7rem;
    }

    .calendar-weekday-full {
        display: none;
    }

    .calendar-weekday-compact {
        display: inline;
    }
}

@media (max-width: 760px) {
    .site-header {
        padding: 1rem;
    }

    .site-header-inner {
        min-height: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.9rem;
    }

    .site-nav {
        width: 100%;
    }

    .site-nav-link {
        flex: 1 1 auto;
        padding-right: 0.65rem;
        padding-left: 0.65rem;
    }

    .catalog {
        padding: 2rem 1rem 3rem;
    }

    .device-grid {
        gap: 0.9rem;
    }

    .device-card h2 {
        margin: 1.1rem 1rem 0;
    }

    .device-card p {
        margin-right: 1rem;
        margin-left: 1rem;
    }

    .device-card .device-price {
        padding-bottom: 1.1rem;
    }

    .device-actions {
        margin-right: 1rem;
        margin-left: 1rem;
    }

    .device-dialog {
        width: calc(100vw - 1rem);
        max-height: min(90vh, 52rem);
        max-height: min(90dvh, 52rem);
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .reservation-dialog-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 360px) {
    .device-dialog {
        width: calc(100vw - 0.75rem);
        padding: 0.75rem;
    }

    .calendar-table th {
        font-size: 0.65rem;
    }
}

.form-field:has(input[type="checkbox"]) {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.5rem;
}

.form-field:has(input[type="checkbox"]) label {
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.5;
}

.interest-form .button {
    justify-self: start;
    margin-top: 0;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.errorlist {
    margin: 0;
    padding-left: 1.25rem;
    color: #9c2f2f;
    font-size: 0.85rem;
}

.form-message {
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
}

.form-message-success {
    background: #e3f0e5;
    color: #244833;
}

.form-message-warning {
    background: #f3ead0;
    color: #70551b;
}

.empty-state {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: white;
    color: #53645a;
}
