/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Formular', 'Inter', -apple-system, sans-serif;
    background: #F6F7F9;
    color: #1B2541;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    width: 100%;
    max-width: 1512px;
    margin: 0 auto;
    padding: 80px 100px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.hero__glow {
    position: absolute;
    width: 1312px;
    height: 1312px;
    left: 50%;
    top: 260px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse 50% 50% at 50% 50%,
            rgba(235, 234, 240, 0.48) 0%,
            rgba(0, 75, 255, 0.15) 2%,
            rgba(135, 135, 138, 0) 100%);
    border-radius: 9999px;
    pointer-events: none;
    z-index: 0;
}

.hero>*:not(.hero__glow) {
    position: relative;
    z-index: 1;
}

/* ===== Title ===== */
.hero__title {
    max-width: 645px;
    text-align: center;
    font-size: 52px;
    font-weight: 500;
    line-height: 1;
    color: #1B2541;
    margin-bottom: 24px;
}

/* ===== Subtitle ===== */
.hero__subtitle {
    max-width: 495px;
    text-align: center;
    font-size: 16px;
    font-weight: 300;
    color: #475983;
    line-height: 1.5;
    margin-bottom: 40px;
}

/* ===== Store Buttons ===== */
.store-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 50px;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px 12px 12px;
    background: #F8F8F8;
    border-radius: 20px;
    border: 1px solid #B4BFD3;
    text-decoration: none;
    color: black;
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.store-btn:hover {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 75, 255, 0.1);
}

.store-btn__icon {
    flex-shrink: 0;
}

.store-btn__text {
    display: flex;
    flex-direction: column;
}

.store-btn__label {
    font-size: 14px;
    font-weight: 400;
}

.store-btn__name {
    font-size: 20px;
    font-weight: 500;
}

/* ===== Showcase =====
   Figma frame: 1512×982
   We use a 1100px wide container. Phone is centered.
   Figma phone center X = 756 (left:621 + 270/2)
   Figma phone top relative to showcase area ≈ top:555 minus ~500 offset = ~55
   All floating card positions are calculated relative to phone center.
*/
.showcase {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 755px;
}

/* ===== Phone ===== */
.phone {
    position: absolute;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    width: 270px;
    height: 569px;
    background: black;
    border-radius: 28px;
    padding: 6px;
    z-index: 2;
}

.phone__screen {
    background: #F9F9FB;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.phone__statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 11px;
    position: relative;
    flex-shrink: 0;
}

.phone__time {
    font-family: 'SF Pro Text', -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #171717;
}

.phone__notch {
    position: absolute;
    left: 50%;
    top: 7px;
    transform: translateX(-50%);
    width: 55px;
    height: 20px;
    background: black;
    border-radius: 66px;
}

.phone__content {
    padding: 0 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    flex: 1;
}

/* ===== Printer Card (inside phone) ===== */
.printer-card {
    width: 100%;
    padding: 40px 11px 11px;
    background: white;
    border-radius: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.printer-card__name {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
}

.printer-card__status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    background: #E9FAE3;
    border-radius: 7px;
}

.printer-card__status-dot {
    width: 5px;
    height: 5px;
}

.printer-card__status-text {
    font-size: 9px;
    font-weight: 400;
    color: #5FB43C;
}

.printer-card__image {
    width: 158px;
    height: 158px;
    object-fit: contain;
}

.printer-card__info {
    width: 100%;
}

.printer-card__info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.printer-card__info-label {
    font-size: 9px;
    color: #858B96;
}

.printer-card__info-value {
    font-size: 9px;
    font-weight: 500;
    color: black;
}

.cartridge {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cartridge__bar {
    width: 41px;
    height: 7px;
    background: #F0F1F3;
    border-radius: 13px;
    overflow: hidden;
}

.cartridge__fill {
    width: 75%;
    height: 100%;
    background: #535C68;
    border-radius: 13px;
}

.switch-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 11px;
    background: #F9F9FB;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.switch-btn__icon {
    width: 13px;
    height: 13px;
}

.switch-btn__text {
    font-size: 9px;
    font-weight: 500;
    color: black;
}

/* ===== Phone Action Buttons ===== */
.phone__actions {
    display: flex;
    gap: 7px;
    width: 100%;
}

.phone__action-card {
    flex: 1;
    padding: 13px;
    background: white;
    border-radius: 13px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.phone__action-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.phone__action-icon {
    width: 16px;
    height: 16px;
}

.phone__action-chevron {
    padding: 3px;
    background: #F9F9FB;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone__action-chevron img {
    width: 11px;
    height: 11px;
}

.phone__action-label {
    font-size: 11px;
    font-weight: 500;
    color: black;
}

/* ===== Phone Bottom Nav ===== */
.phone__nav {
    display: flex;
    padding: 4px 5px 0;
    background: #F9F9FB;
    border-top: 0.33px solid #E2E3E9;
    margin-top: auto;
    flex-shrink: 0;
}

.phone__nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 0;
}

.phone__nav-icon {
    width: 16px;
    height: 16px;
}

.phone__nav-label {
    font-size: 7px;
    font-weight: 500;
    text-align: center;
}

.phone__nav-item--active .phone__nav-label {
    color: black;
}

.phone__nav-item--disabled .phone__nav-label {
    color: #ADB3BD;
}

.phone__home-indicator {
    padding: 7px 16px;
    background: #F9F9FB;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.phone__home-bar {
    width: 71px;
    height: 3px;
    background: black;
    border-radius: 8px;
}

/* ===== Floating Cards =====
   Figma absolute coords (1512px canvas):
   Phone: left:621, top:555, w:270 → center X=756, right edge=891
   Settings: left:442, top:478, w:252 → right edge=694 (overlaps phone by 73px)
   Print: left:462, top:796, w:174 → right edge=636 (overlaps phone by 15px)
   Scan: left:842, top:551, w:174 → left edge=842 (phone right=891, overlap 49px)
   Printer select: left:259, top:664, w:266
   Photo: left:975, top:740, w:113

   Showcase is 1100px wide, centered. Phone centered in showcase.
   Showcase center = 550px. Phone left in showcase = 550-135 = 415.
   Phone right in showcase = 550+135 = 685.
   
   Figma offset from canvas to showcase: phone figma left=621, showcase phone left=415
   So figma_to_showcase_x = 415 - 621 = -206
   Figma showcase top offset: phone figma top=555, showcase phone top=30
   So figma_to_showcase_y = 30 - 555 = -525
   
   Settings: left = 442 + (-206) = 236, top = 478 + (-525) = -47 → clamp to ~0
   Print: left = 462 + (-206) = 256, top = 796 + (-525) = 271
   Scan: left = 842 + (-206) = 636, top = 551 + (-525) = 26
   Printer select: left = 259 + (-206) = 53, top = 664 + (-525) = 139
   Photo: left = 975 + (-206) = 769, top = 740 + (-525) = 215
*/

.floating-card {
    position: absolute;
    background: white;
    box-shadow: 0 0 15px 7px rgba(211, 221, 244, 0.30);
    overflow: hidden;
    z-index: 3;
}

/* Settings (overlaps phone left side) */
.card-settings {
    left: 236px;
    top: 0px;
    width: 252px;
    padding: 14px;
    border-radius: 14px;
}

.card-settings__field {
    margin-bottom: 11px;
}

.card-settings__field:last-child {
    margin-bottom: 0;
}

.card-settings__label {
    font-size: 10px;
    font-weight: 500;
    color: #ADB3BD;
    margin-bottom: 7px;
}

.card-settings__select {
    width: 100%;
    padding: 10px 11px;
    border-radius: 7px;
    border: 0.7px solid #E2E3E9;
    background: white;
    font-size: 11px;
    font-family: inherit;
    color: black;
}

/* Printer selection (far left) */
.card-printer-select {
    left: 53px;
    top: 190px;
    width: 266px;
    padding: 10px;
    border-radius: 15px;
}

.card-printer-select__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.card-printer-select__thumb {
    width: 60px;
    height: 60px;
    background: #F0F1F3;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-printer-select__thumb img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.card-printer-select__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-printer-select__name {
    font-size: 14px;
    font-weight: 400;
    color: black;
}

.card-printer-select__ip {
    font-size: 10px;
    color: #858B96;
}

.card-printer-select__badge {
    padding: 6px 11px;
    background: #F0F1F3;
    border-radius: 10px;
    font-size: 12px;
    color: black;
    flex-shrink: 0;
}

/* Print action (overlaps phone bottom-left) */
.card-action {
    width: 174px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 36px;
    border-radius: 20px;
}

.card-action--print {
    left: 256px;
    top: 321px;
}

/* Scan action (overlaps phone top-right) */
.card-action--scan {
    left: 636px;
    top: 26px;
}

.card-action__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-action__icon {
    width: 24px;
    height: 24px;
}

.card-action__chevron {
    padding: 4px;
    background: #F9F9FB;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-action__chevron img {
    width: 16px;
    height: 16px;
}

.card-action__label {
    font-size: 16px;
    font-weight: 500;
    color: black;
}

/* Photo preview (far right) */
.card-photo {
    left: 769px;
    top: 215px;
    width: 113px;
    padding: 6px;
    border-radius: 10px;
    background: #F9F9FB;
}

.card-photo__preview {
    width: 100%;
    aspect-ratio: 101 / 142;
    background: #EBEBEB;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.card-photo__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-photo__count {
    width: 20px;
    height: 20px;
    background: #F0F1F3;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: black;
    margin: 0 auto 4px;
}

.card-photo__actions {
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.card-photo__action-btn {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.card-photo__action-btn--default {
    background: #F0F1F3;
}

.card-photo__action-btn--danger {
    background: #FBE1E0;
}

/* ===== Responsive: Mobile (<=768px) ===== */
@media (max-width: 768px) {
    .hero {
        padding: 60px 24px 0;
    }

    .hero__glow {
        width: 760px;
        height: 760px;
        top: 400px;
    }

    .hero__title {
        font-size: 36px;
        max-width: 325px;
    }

    .hero__subtitle {
        font-size: 14px;
        max-width: 311px;
    }

    .store-buttons {
        margin-bottom: 40px;
    }

    .showcase {
        max-width: 420px;
        height: 560px;
    }

    .phone {
        width: 241px;
        height: 508px;
        border-radius: 25px;
        top: 40px;
    }

    .phone__screen {
        border-radius: 21px;
    }

    /* Hide desktop-only cards */
    .card-settings,
    .card-photo,
    .card-printer-select {
        display: none;
    }

    /* Reposition action cards for mobile */
    .card-action {
        width: 115px;
        padding: 13px;
        gap: 24px;
        border-radius: 13px;
    }

    .card-action--print {
        left: 10px;
        top: 260px;
    }

    .card-action--scan {
        left: auto;
        right: 10px;
        top: 80px;
    }

    .card-action__icon {
        width: 16px;
        height: 16px;
    }

    .card-action__label {
        font-size: 11px;
    }

    .card-action__chevron img {
        width: 11px;
        height: 11px;
    }
}

@media (max-width: 480px) {
    .store-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .store-btn {
        width: 100%;
        max-width: 340px;
        justify-content: center;
    }

    .showcase {
        height: 500px;
    }

    .card-action--print {
        left: 0;
        top: 240px;
    }

    .card-action--scan {
        right: 0;
        top: 70px;
    }
}

/* ===== Tablet (769–1200px) ===== */
@media (min-width: 769px) and (max-width: 1200px) {
    .hero {
        padding: 60px 40px 0;
    }

    .hero__title {
        font-size: 44px;
    }

    .showcase {
        max-width: 900px;
        height: 600px;
    }

    /* Scale down positions proportionally for smaller showcase */
    .card-settings {
        left: 170px;
    }

    .card-printer-select {
        left: 10px;
    }

    .card-action--print {
        left: 190px;
    }

    .card-action--scan {
        left: auto;
        right: 100px;
    }

    .card-photo {
        left: auto;
        right: 30px;
    }
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(27, 37, 65, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay--active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 460px;
    width: 90%;
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 75, 255, 0.12);
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.modal-overlay--active .modal {
    transform: translateY(0);
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #F0F1F3;
    border-radius: 8px;
    font-size: 20px;
    color: #858B96;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal__close:hover {
    background: #E2E3E9;
}

.modal__title {
    font-size: 24px;
    font-weight: 500;
    color: #1B2541;
    margin-bottom: 8px;
}

.modal__subtitle {
    font-size: 14px;
    color: #475983;
    margin-bottom: 28px;
}

.modal__buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal__buttons .store-btn {
    width: 100%;
    justify-content: flex-start;
}

/* Store button as <button> reset */
button.store-btn {
    font-family: inherit;
    font-size: inherit;
}