/* Explain: Styles for various UI components like cards, buttons, and galleries. */
.site-header {
    background: linear-gradient(180deg, rgba(250, 249, 246, 0.9), rgba(250, 249, 246, 0.55));
    backdrop-filter: blur(18px);
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--sage-dark);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.section-kicker::before {
    display: inline-block;
    width: 2.4rem;
    height: 1px;
    background: var(--accent-color);
    content: "";
}

.glass-panel {
    border: 1px solid var(--glass-border);
    background: linear-gradient(145deg, rgba(250, 249, 246, 0.8), rgba(255, 255, 255, 0.5));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.arch-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(88, 129, 87, 0.38);
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.arch-frame::after {
    position: absolute;
    inset: 1.1rem;
    border: 1px solid rgba(250, 249, 246, 0.55);
    border-radius: inherit;
    content: "";
    pointer-events: none;
}

.arch-frame-large {
    height: min(72vh, 700px);
    min-height: 470px;
    border-radius: 999px 999px 2.5rem 2.5rem;
}

.arch-frame-medium {
    height: 560px;
    max-width: 460px;
    border-radius: 999px 999px 2.1rem 2.1rem;
}

.story-frame {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0.9rem;
}

@media (min-width: 1024px) {
    .story-frame {
        aspect-ratio: 5 / 4;
        min-height: 520px;
    }
}

.floating-note {
    position: absolute;
    right: -1.5rem;
    bottom: 4rem;
    display: flex;
    max-width: 268px;
    align-items: center;
    gap: 0.85rem;
    border-radius: 999px;
    padding: 1rem 1.2rem;
    color: var(--text-color);
    font-size: 0.82rem;
    font-weight: 600;
}

.stat-card {
    border: 1px solid var(--glass-border);
    border-radius: 1.6rem;
    background: rgba(250, 249, 246, 0.6);
    padding: 1.25rem 1.35rem;
}

.stat-card strong {
    display: block;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.1;
}

.stat-card span {
    display: block;
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.check-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
}

.check-dot {
    display: inline-flex;
    width: 1.7rem;
    height: 1.7rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--sage-soft);
    color: var(--sage-dark);
    font-size: 0.65rem;
}

.service-card {
    min-height: 310px;
    border-radius: 2rem;
    padding: 1.9rem;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.service-card:hover {
    border-color: rgba(88, 129, 87, 0.58);
    box-shadow: 0 26px 80px rgba(31, 46, 35, 0.11);
    transform: translateY(-6px);
}

.service-icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 1.1rem;
    background: var(--terracotta-soft);
    color: var(--sage-dark);
    font-size: 1.1rem;
}

.step-card {
    border: 1px solid var(--glass-border);
    border-radius: 1.8rem;
    background: rgba(250, 249, 246, 0.62);
    padding: 1.6rem;
}

.step-number {
    display: inline-flex;
    margin-bottom: 0.9rem;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.project-card {
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    background: rgba(250, 249, 246, 0.7);
    box-shadow: var(--shadow-soft);
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 80px rgba(31, 46, 35, 0.12);
}

.project-photo-turn {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--surface-color);
}

.project-photo-turn img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 75%;
    height: 133.3334%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    transform: translate(-50%, -50%) rotate(90deg);
}

.review-card {
    display: flex;
    height: 100%;
    flex-direction: column;
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    background: rgba(250, 249, 246, 0.68);
    padding: 1.9rem;
}

.contact-note {
    border: 1px solid var(--glass-border);
    border-radius: 1.4rem;
    background: rgba(250, 249, 246, 0.6);
    padding: 0.95rem 1.15rem;
}

.quote-form,
.estimate-overlay-panel {
    border-radius: 2.4rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.form-label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--text-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.form-status.success {
    color: var(--sage-dark);
}

.form-status.error {
    color: #9B4A3D;
}

.mobile-action-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    border-top: 1px solid var(--glass-border);
    background: rgba(250, 249, 246, 0.9);
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
    backdrop-filter: blur(18px);
}

.estimate-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    overflow-y: auto;
    background: rgba(31, 46, 35, 0.32);
    padding: 1rem;
}

.estimate-overlay.is-open {
    display: block;
}

.estimate-overlay-panel {
    min-height: calc(100vh - 2rem);
    background: var(--background-color);
    box-shadow: 0 30px 90px rgba(31, 46, 35, 0.22);
}

.hero-image-frame {
    position: relative;
    width: 100%;
    height: clamp(320px, 56vh, 620px);
    overflow: hidden;
    border: 1px solid rgba(88, 129, 87, 0.38);
    border-radius: 0.9rem;
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.hero-gallery-slide {
    position: absolute;
    inset: 0;
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-gallery-slide.is-active {
    display: block;
    animation: gallery-fade 420ms ease;
}

.hero-gallery-slide.hero-slide-contained {
    object-fit: contain;
    object-position: center;
}

.hero-slide-pan-right {
    object-position: 94% center;
    transform-origin: 94% 50%;
    scale: 1.34;
}

@media (max-width: 767px) {
    .hero-slide-pan-right {
        object-position: 92% center;
        transform-origin: 92% 50%;
        scale: 1.16;
    }

    .hero-image-frame {
        height: clamp(230px, 34vh, 330px);
    }
}

@keyframes gallery-fade {
    from {
        opacity: 0;
        transform: scale(1.02);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-thumb {
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 0.85rem;
    background: var(--surface-color);
    padding: 0;
    transition: border-color 300ms ease, box-shadow 300ms ease, transform 300ms ease;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.gallery-thumb:hover {
    border-color: rgba(88, 129, 87, 0.6);
    transform: translateY(-2px);
}

.gallery-thumb:hover img {
    transform: scale(1.06);
}

.gallery-thumb.is-active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(88, 129, 87, 0.3);
}

@media (max-width: 767px) {
    .section-kicker::before {
        width: 1.6rem;
    }

    .arch-frame-large,
    .arch-frame-medium {
        height: 510px;
        min-height: 0;
    }

    .arch-frame-large {
        margin-right: auto;
        margin-left: auto;
        width: min(100%, 450px);
    }

    .floating-note {
        position: relative;
        right: auto;
        bottom: auto;
        margin: -2.5rem auto 0;
        max-width: 320px;
    }
}

.login-card {
    --s123-auth-btn-height: 3rem;
    --s123-auth-btn-radius: 999px;
}

.login-card .s123-auth-provider-btn {
    display: flex;
    width: 100%;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--field-bg);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 300ms ease, border-color 300ms ease;
}

.login-card .s123-auth-provider-btn:hover {
    border-color: var(--accent-color);
    background: var(--surface-color);
}

.login-code-input {
    letter-spacing: 0.5em;
    text-align: center;
    font-weight: 600;
}

.login-step-link {
    border: 0;
    background: none;
    padding: 0;
    color: var(--sage-dark);
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 300ms ease;
}

.login-step-link:hover {
    color: var(--accent-color);
}

.gallery-thumb {
    position: relative;
}

.rotated-photo {
    position: absolute;
    inset: auto;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    rotate: -90deg;
    object-fit: cover;
}

.hero-gallery-slide.turned-180,
.gallery-thumb img.turned-180 {
    rotate: 180deg;
}

.story-mini {
    position: relative;
    overflow: hidden;
    margin: 0;
    aspect-ratio: 1 / 1;
    border: 1px solid rgba(88, 129, 87, 0.3);
    border-radius: 1rem;
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.story-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.story-mini:hover img {
    transform: scale(1.06);
}