/**
 * Hero product composition — layered practice illustration.
 * Scoped to .hpc* ; marketing pages only.
 */

.hpc {
    --hpc-ink: #152525;
    --hpc-ink-soft: #3d5252;
    --hpc-muted: #6a7d7d;
    --hpc-line: #d9e5e3;
    --hpc-surface: #fffdfb;
    --hpc-canvas: #f4f8f7;
    --hpc-teal: #2d6a6a;
    --hpc-teal-deep: #1f5252;
    --hpc-mint: #d9efe9;
    --hpc-mint-strong: #b7dfd4;
    --hpc-lavender: #e6e0f4;
    --hpc-peach: #f5e0d2;
    --hpc-blue: #d7e8f5;
    --hpc-ok: #2f7d57;
    --hpc-radius: 1rem;
    --hpc-radius-sm: 0.7rem;
    --hpc-shadow-1: 0 10px 28px rgba(21, 37, 37, 0.08), 0 1px 2px rgba(21, 37, 37, 0.04);
    --hpc-shadow-2: 0 18px 44px rgba(21, 37, 37, 0.14), 0 4px 12px rgba(21, 37, 37, 0.06);
    --hpc-shadow-3: 0 26px 60px rgba(21, 37, 37, 0.18), 0 8px 18px rgba(21, 37, 37, 0.08);
    --hpc-track-h: 30rem;
    --hpc-hour-span: 10; /* 08:00–18:00 */

    margin: 0;
    font-family: 'DM Sans', system-ui, sans-serif;
    color: var(--hpc-ink);
}

.hpc-stage {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 74rem; /* ~1184px */
    margin-inline: auto;
    padding: 1.75rem 1.25rem 2.25rem;
    min-height: 40rem;
    box-sizing: border-box;
}

.hpc-glow {
    position: absolute;
    inset: 8% 6% 12%;
    z-index: 0;
    border-radius: 50%;
    background:
        radial-gradient(ellipse 55% 50% at 48% 48%, rgba(183, 223, 212, 0.75), transparent 70%),
        radial-gradient(ellipse 40% 35% at 70% 30%, rgba(45, 106, 106, 0.12), transparent 65%);
    pointer-events: none;
}

.hpc-caption {
    margin: 0.35rem 0 0;
    text-align: center;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--hpc-muted);
}

/* —— Calendar shell (depth 1) —— */
.hpc-calendar {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 10.25rem minmax(0, 1fr);
    width: min(100%, 60rem);
    margin: 0.75rem auto 0;
    overflow: hidden;
    border-radius: calc(var(--hpc-radius) + 0.15rem);
    border: 1px solid rgba(45, 106, 106, 0.12);
    background: var(--hpc-surface);
    box-shadow: var(--hpc-shadow-2);
}

.hpc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.1rem 0.75rem;
    background: linear-gradient(180deg, #f7fbfa 0%, #eef5f3 100%);
    border-right: 1px solid var(--hpc-line);
}

.hpc-sidebar__brand img {
    display: block;
    width: auto;
    height: 1.85rem;
}

.hpc-sidebar__nav {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.3rem;
}

.hpc-sidebar__nav li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.65rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--hpc-ink-soft);
}

.hpc-sidebar__nav li.is-active {
    background: rgba(45, 106, 106, 0.1);
    color: var(--hpc-teal-deep);
    font-weight: 600;
}

.hpc-sidebar__icon {
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
    color: currentColor;
}

.hpc-sidebar__icon svg {
    width: 100%;
    height: 100%;
}

.hpc-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--hpc-surface);
}

.hpc-main__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.1rem 0.85rem;
    border-bottom: 1px solid var(--hpc-line);
}

.hpc-main__title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.hpc-main__title-icon {
    display: inline-flex;
    width: 1.15rem;
    height: 1.15rem;
    color: var(--hpc-teal);
}

.hpc-main__title-icon svg {
    width: 100%;
    height: 100%;
}

.hpc-main__week {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--hpc-line);
    background: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hpc-ink-soft);
}

.hpc-icon-btn {
    display: inline-flex;
    width: 1.35rem;
    height: 1.35rem;
    align-items: center;
    justify-content: center;
    color: var(--hpc-muted);
}

.hpc-icon-btn svg {
    width: 0.95rem;
    height: 0.95rem;
}

/* —— Week grid —— */
.hpc-grid {
    display: grid;
    grid-template-columns: 3.25rem repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 0.55rem 0.75rem 0.85rem 0.35rem;
    min-width: 0;
}

.hpc-hours {
    display: grid;
    grid-template-rows: 2.6rem repeat(6, 1fr);
    height: calc(2.6rem + var(--hpc-track-h));
}

.hpc-hours__label {
    position: relative;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--hpc-muted);
}

.hpc-hours__label span {
    position: absolute;
    top: -0.45em;
    right: 0.35rem;
}

.hpc-day {
    min-width: 0;
    display: grid;
    grid-template-rows: 2.6rem var(--hpc-track-h);
}

.hpc-day__head {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.1rem;
    padding: 0.2rem;
}

.hpc-day__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hpc-teal);
}

.hpc-day__date {
    font-size: 0.6875rem;
    color: var(--hpc-muted);
}

.hpc-day__track {
    position: relative;
    margin: 0 0.2rem;
    border-radius: var(--hpc-radius-sm);
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent calc(100% / 6 - 1px),
            rgba(45, 106, 106, 0.08) calc(100% / 6 - 1px),
            rgba(45, 106, 106, 0.08) calc(100% / 6)
        ),
        #fbfcfb;
    border: 1px solid rgba(45, 106, 106, 0.08);
}

.hpc-appt {
    position: absolute;
    left: 0.28rem;
    right: 0.28rem;
    top: calc(var(--start) / var(--hpc-hour-span) * 100%);
    height: calc(var(--dur) / var(--hpc-hour-span) * 100%);
    min-height: 2.65rem;
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
    padding: 0.45rem 0.5rem;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(21, 37, 37, 0.05);
}

.hpc-appt--mint { background: var(--hpc-mint); border-color: #b5d9cf; }
.hpc-appt--lavender { background: var(--hpc-lavender); border-color: #d0c8e8; }
.hpc-appt--peach { background: var(--hpc-peach); border-color: #e8cbb8; }
.hpc-appt--blue { background: var(--hpc-blue); border-color: #bdd4e8; }
.hpc-appt--lunch {
    background: #f1f3f2;
    border-color: #d8dedc;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--hpc-muted);
    font-size: 0.75rem;
}

.hpc-appt.is-selected {
    border-color: rgba(45, 106, 106, 0.45);
    box-shadow: 0 0 0 2px rgba(45, 106, 106, 0.12), 0 6px 14px rgba(45, 106, 106, 0.12);
    z-index: 2;
}

.hpc-appt__avatar {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5625rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.85);
    color: var(--hpc-teal-deep);
}

.hpc-appt__copy {
    min-width: 0;
    display: grid;
    gap: 0.05rem;
}

.hpc-appt__copy strong {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hpc-appt__copy span {
    display: none; /* five-day columns: name only for readability */
    font-size: 0.6875rem;
    line-height: 1.25;
    color: var(--hpc-ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hpc-appt__lunch-icon {
    display: inline-flex;
    width: 0.95rem;
    height: 0.95rem;
}

.hpc-appt__lunch-icon svg {
    width: 100%;
    height: 100%;
}

/* —— Phone (depth 0) —— */
.hpc-phone {
    position: absolute;
    z-index: 1;
    left: 0.15rem;
    top: 4.5rem;
    width: 12.5rem;
    transform: rotate(-6deg);
    filter: drop-shadow(0 18px 30px rgba(21, 37, 37, 0.18));
}

.hpc-phone__bezel {
    border-radius: 1.55rem;
    padding: 0.55rem 0.45rem 0.7rem;
    background: linear-gradient(160deg, #1b2c2c 0%, #0f1a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hpc-phone__notch {
    width: 3.2rem;
    height: 0.35rem;
    margin: 0 auto 0.55rem;
    border-radius: 999px;
    background: #2a3b3b;
}

.hpc-phone__screen {
    display: grid;
    gap: 0.45rem;
    padding: 0.85rem 0.7rem 0.9rem;
    border-radius: 1.05rem;
    background: linear-gradient(180deg, #fff 0%, #f3f8f7 62%, var(--hpc-teal) 62%, var(--hpc-teal-deep) 100%);
    min-height: 17.5rem;
}

.hpc-phone__eyebrow {
    margin: 0;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hpc-muted);
}

.hpc-phone__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hpc-phone__field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.55rem;
    border: 1px solid var(--hpc-line);
    background: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hpc-ink);
}

.hpc-phone__field svg {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--hpc-muted);
}

.hpc-phone__field--active {
    border-color: rgba(45, 106, 106, 0.35);
    box-shadow: 0 0 0 2px rgba(45, 106, 106, 0.08);
}

.hpc-phone__wave {
    height: 2.4rem;
    margin-top: 0.35rem;
    border-radius: 0.75rem 0.75rem 0 0;
    background:
        radial-gradient(ellipse 80% 90% at 20% 120%, rgba(255, 255, 255, 0.25), transparent 55%),
        linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.08));
}

.hpc-phone__cta {
    justify-self: center;
    margin-top: -0.35rem;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    background: #fff;
    color: var(--hpc-teal-deep);
    font-size: 0.75rem;
    font-weight: 700;
}

/* —— Floating panels (depth 2) —— */
.hpc-client,
.hpc-notes,
.hpc-deposit {
    position: absolute;
    z-index: 3;
    background: var(--hpc-surface);
    border: 1px solid rgba(45, 106, 106, 0.12);
    box-shadow: var(--hpc-shadow-3);
}

.hpc-client {
    left: 1.5rem;
    bottom: 1.1rem;
    width: 16.5rem;
    padding: 0.95rem 1rem;
    border-radius: var(--hpc-radius);
    display: grid;
    gap: 0.75rem;
}

.hpc-client__top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hpc-client__avatar {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--hpc-teal-deep);
    background:
        linear-gradient(145deg, #e8f4f1 0%, #c5dfd8 100%);
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(45, 106, 106, 0.15);
}

.hpc-client__name {
    margin: 0 0 0.35rem;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hpc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.hpc-badge svg {
    width: 0.75rem;
    height: 0.75rem;
}

.hpc-badge--ok {
    background: #e4f4ec;
    color: var(--hpc-ok);
}

.hpc-client__next {
    padding: 0.7rem 0.75rem;
    border-radius: var(--hpc-radius-sm);
    background: #f7faf9;
    border: 1px solid var(--hpc-line);
}

.hpc-label {
    margin: 0 0 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--hpc-muted);
}

.hpc-client__service {
    margin: 0 0 0.2rem;
    font-size: 0.875rem;
    font-weight: 700;
}

.hpc-meta {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--hpc-muted);
}

.hpc-notes {
    right: 0.35rem;
    top: 0.85rem;
    width: 17.25rem;
    padding: 0.95rem 1rem 1rem;
    border-radius: var(--hpc-radius);
    display: grid;
    gap: 0.55rem;
    background: linear-gradient(180deg, #f7fbfa 0%, #fff 28%);
}

.hpc-notes__head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.65rem;
    margin: -0.15rem -0.15rem 0.15rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--hpc-teal) 0%, var(--hpc-teal-deep) 100%);
    color: #fff;
}

.hpc-notes__head strong {
    font-size: 0.8125rem;
    font-weight: 700;
}

.hpc-notes__icon {
    display: inline-flex;
    width: 1.05rem;
    height: 1.05rem;
}

.hpc-notes__icon svg {
    width: 100%;
    height: 100%;
}

.hpc-notes__wave {
    color: var(--hpc-teal);
    opacity: 0.75;
    padding: 0.15rem 0;
}

.hpc-notes__wave svg {
    display: block;
    width: 100%;
    height: 1.4rem;
}

.hpc-notes__block {
    display: grid;
    gap: 0.25rem;
}

.hpc-notes__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hpc-teal-deep);
}

.hpc-notes__label svg {
    width: 0.9rem;
    height: 0.9rem;
}

.hpc-notes__block p {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--hpc-ink-soft);
}

.hpc-notes__hint {
    margin: 0.15rem 0 0;
    font-size: 0.6875rem;
    line-height: 1.4;
    color: var(--hpc-muted);
}

.hpc-deposit {
    right: 1.75rem;
    bottom: 1.35rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 14.5rem;
    padding: 0.85rem 0.95rem;
    border-radius: var(--hpc-radius);
}

.hpc-deposit__icon {
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e4f4ec;
    color: var(--hpc-ok);
}

.hpc-deposit__icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.hpc-deposit__title {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hpc-muted);
}

.hpc-deposit__amount {
    margin: 0.1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--hpc-ink);
}

.hpc-deposit__meta {
    margin: 0;
    font-size: 0.6875rem;
    color: var(--hpc-muted);
}

/* Subtle optional motion */
@media (prefers-reduced-motion: no-preference) {
    .hpc-client,
    .hpc-notes,
    .hpc-deposit {
        animation: hpc-float 7s ease-in-out infinite;
    }

    .hpc-notes { animation-delay: -1.4s; }
    .hpc-deposit { animation-delay: -3.1s; }
    .hpc-phone { animation: hpc-float 8.5s ease-in-out infinite; animation-delay: -2s; }

    @keyframes hpc-float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-4px); }
    }

    .hpc-phone {
        animation-name: hpc-phone-float;
    }

    @keyframes hpc-phone-float {
        0%, 100% { transform: rotate(-6deg) translateY(0); }
        50% { transform: rotate(-6deg) translateY(-5px); }
    }
}

/* —— Tablet: 3-day calendar, reposition panels —— */
@media (max-width: 1099px) {
    .hpc-stage {
        min-height: 32rem;
        padding: 1.5rem 0.85rem 2rem;
    }

    .hpc-calendar {
        width: min(100%, 46rem);
        grid-template-columns: 9.5rem minmax(0, 1fr);
        margin-left: 4.5rem;
    }

    .hpc-sidebar__nav li span:last-child {
        font-size: 0.75rem;
    }

    .hpc-grid {
        grid-template-columns: 3rem repeat(3, minmax(0, 1fr));
    }

    .hpc-day--mon,
    .hpc-day--tue {
        display: none;
    }

    .hpc-phone {
        left: -0.25rem;
        top: 5.5rem;
        width: 10.75rem;
    }

    .hpc-notes {
        width: 15rem;
        right: 0;
        top: 0.5rem;
    }

    .hpc-client {
        left: 0.5rem;
        bottom: 0.65rem;
        width: 15rem;
    }

    .hpc-deposit {
        right: 0.5rem;
        bottom: 0.85rem;
        width: 13.5rem;
    }

    .hpc-track-h {
        --hpc-track-h: 20.5rem;
    }
}

/* Override custom property properly for tablet */
@media (max-width: 1099px) {
    .hpc {
        --hpc-track-h: 26rem;
    }

    .hpc-stage {
        min-height: 36rem;
    }

    .hpc-appt__copy span {
        display: block; /* three-day columns have room for service line */
    }

    .hpc-appt[style*="--dur: 0.75"] .hpc-appt__copy span {
        display: none;
    }
}

/* —— Narrow tablet / large phone —— */
@media (max-width: 860px) {
    .hpc-stage {
        min-height: 0;
        padding: 0.75rem 0.25rem 1.25rem;
        display: grid;
        gap: 0.85rem;
    }

    .hpc-glow {
        inset: 0 0 40%;
        opacity: 0.85;
    }

    .hpc-phone,
    .hpc-notes {
        display: none;
    }

    .hpc-calendar,
    .hpc-client,
    .hpc-deposit {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        transform: none;
        animation: none;
        width: 100%;
        margin: 0;
        filter: none;
    }

    .hpc-calendar {
        z-index: 1;
        grid-template-columns: 1fr;
        box-shadow: var(--hpc-shadow-2);
    }

    .hpc-sidebar {
        display: none;
    }

    .hpc-grid {
        grid-template-columns: 2.75rem minmax(0, 1fr);
        padding: 0.45rem 0.65rem 0.75rem 0.25rem;
    }

    .hpc-day--wed,
    .hpc-day--fri {
        display: none;
    }

    .hpc-day--thu {
        display: grid;
    }

    .hpc {
        --hpc-track-h: 24rem;
    }

    .hpc-stage {
        min-height: 0;
    }

    .hpc-appt {
        min-height: 3.1rem;
        padding: 0.55rem 0.65rem;
    }

    .hpc-appt__avatar {
        width: 1.55rem;
        height: 1.55rem;
        font-size: 0.625rem;
    }

    .hpc-appt__copy strong {
        font-size: 0.875rem;
    }

    .hpc-appt__copy span {
        display: block;
        font-size: 0.75rem;
        white-space: normal;
    }

    .hpc-client {
        z-index: 2;
        box-shadow: var(--hpc-shadow-2);
        margin-top: -1.75rem;
        width: calc(100% - 1.5rem);
        margin-inline: 0.75rem;
    }

    .hpc-deposit {
        z-index: 2;
        box-shadow: var(--hpc-shadow-2);
        width: calc(100% - 1.5rem);
        margin-inline: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hpc-main__bar {
        flex-wrap: wrap;
        gap: 0.55rem;
    }

    .hpc-client,
    .hpc-deposit {
        width: 100%;
        margin-inline: 0;
    }

    .hpc-client {
        margin-top: -1.25rem;
    }
}
