/* ============================================
   Screen 1 (Hero) — extracted from styles.css
   Includes: hero-*, tw-*, metric-f-*, btn-hero,
             backed-by-*, hero-bottom-*
   Excludes: metric variants A, B, C, D, E, G, H
   ============================================ */

/* ---- Mobile screen1 default: hidden on desktop ---- */
.mobile-screen1 {
    display: none;
}

/* ---- Hero base ---- */
.hero {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0;
}

.hero-container {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: var(--container-width);
    padding: 0 40px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Screen 1: Title + Button */
.hero-left {
    height: calc(100svh - var(--nav-height, 56px));
    max-height: calc(100svh - var(--nav-height, 56px));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
}

/* Hero badge — Variant C */
.hero-badge {
    display: inline-block;
    padding: 10px 0;
    border: none;
    background: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 16px;
    margin-bottom: 48px;
}

.hero-badge strong {
    color: #57f357;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(20, 204, 20, 0.4);
}

/* Screen 2: Dialog */
.hero-visual {
    min-height: 100svh;
    margin-top: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    box-sizing: border-box;
}

/* Screen 3: Dashboard */
.hero-dashboard-screen {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    padding: 40px 0;
    box-sizing: border-box;
}

.hero-dashboard-screen .cafe-earnings,
.hero-dashboard-screen .cafe-dashboard,
.hero-dashboard-screen .cafe-growth {
    opacity: 1 !important;
    display: flex !important;
}

.hero-dashboard-screen .cafe-dashboard {
    display: block !important;
}

/* ---- Typewriter ---- */
.tw-lines {
    width: 100%;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tw-line-spacer {
    height: 0.5em;
}

.tw-line {
    font-size: clamp(2.25rem, 3.6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    word-break: normal;
    overflow-wrap: normal;
}

.tw-prefix {
    color: var(--text-primary);
}

.tw-typed {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tw-cursor {
    display: inline-block;
    color: var(--accent-light);
    font-weight: 300;
    margin-left: 1px;
    opacity: 0;
}

.tw-cursor.active {
    opacity: 1;
    animation: tw-blink 0.7s step-end infinite;
}

.tw-cursor.active::after {
    content: '|';
}

@keyframes tw-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ---- Hero split layout ---- */
.hero-split {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 30px;
    flex: 1;
    min-height: 0;
}

.hero-split-left {
    flex: 1.7;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 5% 0;
}

.hero-split-right {
    flex: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 5% 0;
}

/* ---- Metric cards (base) ---- */
.hero-metrics {
    display: flex;
    flex-direction: column;
    gap: 26px;
    width: 100%;
    max-width: none;
}

.hero-metric-card {
    position: relative;
    padding: 28px 32px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.hero-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    opacity: 0.6;
    border-radius: 20px 20px 0 0;
}

.hero-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}

.hero-metric-card:nth-child(1) .hero-metric-value {
    color: #34d399;
}

.hero-metric-card:nth-child(1)::before {
    background: linear-gradient(90deg, #34d399, #6ee7b7);
}

.hero-metric-card:nth-child(1) .hero-metric-fill {
    background: linear-gradient(90deg, #34d399, #6ee7b7);
}

.hero-metric-card:nth-child(2) .hero-metric-value {
    color: #818cf8;
}

.hero-metric-card:nth-child(2)::before {
    background: linear-gradient(90deg, #818cf8, #a78bfa);
}

.hero-metric-card:nth-child(2) .hero-metric-fill {
    background: linear-gradient(90deg, #818cf8, #a78bfa);
}

.hero-metric-card:nth-child(3) .hero-metric-value {
    color: #f472b6;
}

.hero-metric-card:nth-child(3)::before {
    background: linear-gradient(90deg, #f472b6, #fb7185);
}

.hero-metric-card:nth-child(3) .hero-metric-fill {
    background: linear-gradient(90deg, #f472b6, #fb7185);
}

.hero-metric-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.hero-metric-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.hero-metric-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 14px;
}

.hero-metric-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.hero-metric-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Variant F: Neon glow boxes (active) ---- */
.var-f {
    gap: 29px;
}

.metric-f {
    padding: 20px 24px;
    border-radius: 16px;
    border: 1px solid rgba(var(--glow-rgb), 0.2);
    background: rgba(var(--glow-rgb), 0.04);
    box-shadow: 0 0 30px rgba(var(--glow-rgb), 0.08), inset 0 0 30px rgba(var(--glow-rgb), 0.03);
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
    transition: box-shadow 0.4s ease, transform 0.3s ease;
}

.metric-f:hover {
    box-shadow: 0 0 50px rgba(var(--glow-rgb), 0.2), inset 0 0 40px rgba(var(--glow-rgb), 0.06);
    transform: scale(1.03);
}

.metric-f-num {
    font-size: 3rem;
    font-weight: 900;
    color: var(--glow);
    line-height: 1;
    text-shadow: 0 0 20px var(--glow), 0 0 60px rgba(var(--glow-rgb), 0.3);
    letter-spacing: -0.02em;
}

.metric-f-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 0;
    font-weight: 600;
}

.metric-f-text .emoji {
    font-size: 2.2rem;
    vertical-align: middle;
    line-height: 1;
}

/* ---- Hero bottom: CTA ---- */
.hero-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-bottom-mobile {
    display: none;
}

.hero-bottom-desktop {
    display: flex;
}

.btn-hero {
    padding: 18px 40px;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    border-radius: 14px;
    background: linear-gradient(180deg, #2ee02e, #10aa10) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 8px 32px rgba(20, 204, 20, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-decoration: none;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.btn-hero.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.btn-hero:hover {
    box-shadow: 0 10px 40px rgba(20, 204, 20, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Neon underline button (variant 4) */
.btn-hero-neon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0 8px;
    color: #57f357;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    text-shadow: 0 0 12px rgba(87, 243, 87, 0.6), 0 0 35px rgba(87, 243, 87, 0.25);
    border-bottom: 1px solid transparent;
    background-image: linear-gradient(90deg, #57f357, transparent);
    background-size: 100% 1px;
    background-position: bottom;
    background-repeat: no-repeat;
    transition: text-shadow 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.btn-hero-neon:hover {
    text-shadow: 0 0 15px rgba(87, 243, 87, 0.8), 0 0 45px rgba(87, 243, 87, 0.4);
    filter: brightness(1.15);
}

.btn-hero-neon .btn-arrows {
    font-weight: 200;
    opacity: 0.6;
}

/* ---- Backed by ---- */
.backed-by {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.backed-by-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.backed-by-logos {
    display: flex;
    align-items: center;
    gap: 20px;
}

.backed-logo {
    height: 28px;
    max-width: 100%;
    opacity: 0.6;
    filter: grayscale(100%) brightness(1.8);
    transition: all var(--transition-fast);
}

.backed-logo:hover {
    opacity: 1;
    filter: grayscale(0%) brightness(1);
}

/* ============================================
   Responsive: Mobile first @media (max-width: 768px)
   — hero-container + hero-visual (early block)
   ============================================ */
@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
    }

    .hero-visual {
        display: flex;
        align-items: stretch;
        padding-top: 0;
        padding-bottom: 20px;
        width: 100%;
    }
}

/* ============================================
   Mobile (≤768px) — hero/screen1 rules
   ============================================ */
@media (max-width: 768px) {

    /* --- Hero — 3 full-screen sections --- */
    .hero {
        padding: 0;
        min-height: auto;
        height: auto;
    }

    .hero-container {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 16px;
        width: 100%;
        box-sizing: border-box;
        height: auto;
        min-height: auto;
    }

    /* Mobile: stack split vertically */
    .hero-split {
        flex-direction: column;
        gap: 12px;
        flex: 1;
        min-height: 0;
    }

    .hero-split-left {
        flex: 0 0 auto;
    }

    .hero-split-right {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .hero-metrics {
        max-width: 100%;
        gap: 10px !important;
    }

    .metric-f {
        padding: 12px 18px !important;
        display: flex !important;
        flex-direction: row-reverse !important;
        align-items: center;
        justify-content: space-between !important;
        gap: 12px;
        text-align: left !important;
    }

    .metric-f-num {
        font-size: 1.8rem !important;
        flex-shrink: 0;
        text-align: right;
    }

    .metric-f-text {
        font-size: 0.9rem !important;
        margin-top: 0 !important;
        color: rgba(255, 255, 255, 0.95) !important;
    }

    .hero-left {
        align-items: stretch;
        padding: 0 !important;
        justify-content: flex-start !important;
        min-height: auto !important;
    }

    .hero-split {
        display: none !important;
    }

    .mobile-screen1 {
        display: flex !important;
        flex-direction: column;
        height: calc(100svh - 56px);
        max-height: calc(100svh - 56px);
        box-sizing: border-box;
        padding: 0;
        overflow: hidden;
    }

    .mobile-s1-title {
        flex: 0 0 40%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .mobile-s1-title .tw-lines {
        margin: 10px 0;
    }

    .mobile-s1-title .hero-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
        margin-top: 8px;
        margin-bottom: 0;
    }

    .mobile-s1-metrics {
        flex: 0 0 40%;
        display: flex;
        align-items: center;
        margin-top: 26px;
    }

    .mobile-s1-metrics .hero-metrics {
        width: 85%;
        margin: 0 auto;
    }

    .mobile-s1-cta {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: auto;
    }

    .mobile-s1-cta .btn-hero {
        padding: 14px 32px;
        font-size: 1rem;
        text-align: center;
    }

    .hero-bottom-desktop {
        display: none !important;
    }

    .hero-bottom-mobile {
        display: flex !important;
        flex-shrink: 0;
        margin-top: 12px !important;
        padding: 0 !important;
        padding-bottom: 0 !important;
    }

    .hero-bottom-mobile .btn-hero {
        padding: 14px 28px !important;
    }

    .hero-bottom {
        padding: 0 0 calc(20px + env(safe-area-inset-bottom, 0px));
    }

    .btn-hero {
        align-self: stretch;
        justify-content: center;
    }

    .tw-line {
        font-size: clamp(2.1rem, 8.4vw, 2.9rem);
    }

    .hero-dashboard-screen {
        justify-content: center;
        align-items: stretch;
        gap: 16px;
        padding: 20px 0;
        box-sizing: border-box;
    }

    .hero-dashboard-screen .cafe-earnings,
    .hero-dashboard-screen .cafe-dashboard,
    .hero-dashboard-screen .cafe-growth {
        opacity: 1 !important;
        display: flex !important;
    }

    .hero-dashboard-screen .cafe-dashboard {
        display: block !important;
    }

    /* Backed-by mobile */
    .backed-by {
        align-self: center;
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .backed-logo {
        height: 22px;
    }

    /* Hero bottom on mobile */
    .hero-bottom {
        flex-shrink: 0;
        align-items: stretch;
        gap: 16px;
    }
}

/* ============================================
   Short viewports (iPhone SE in Safari with toolbar)
   ============================================ */
@media (max-height: 600px) and (max-width: 768px) {
    .mobile-s1-title .tw-line {
        font-size: clamp(1.1rem, 5.5vw, 1.5rem) !important;
        line-height: 1.05;
    }

    .metric-f {
        padding: 6px 12px !important;
    }

    .metric-f-num {
        font-size: 1.3rem !important;
    }

    .metric-f-text {
        font-size: 0.7rem !important;
        margin-top: 0 !important;
    }

    .hero-metrics.var-f {
        gap: 4px !important;
    }

    .mobile-s1-cta .btn-hero {
        padding: 6px 16px !important;
        font-size: 0.85rem !important;
    }

    .mobile-screen1 {
        padding: 4px 0 !important;
    }
}

/* ============================================
   Small phones (≤400px) — screen1 rules only
   ============================================ */
@media (max-width: 400px) {
    .tw-line {
        font-size: clamp(1.6rem, 9vw, 2.5rem);
    }

    .mobile-s1-title .tw-line {
        font-size: clamp(1.4rem, 7vw, 2rem) !important;
    }

    .metric-f {
        padding: 10px 16px !important;
    }

    .metric-f-num {
        font-size: 1.6rem !important;
    }

    .metric-f-text {
        font-size: 0.8rem !important;
    }

    .mobile-s1-cta .btn-hero {
        padding: 12px 24px !important;
        font-size: 0.95rem !important;
    }
}

/* ============================================
   DEV MODE — screen1 elements
   ============================================ */
body.dev-mode .hero-left {
    outline: 2px solid cyan !important;
}

body.dev-mode .hero-split {
    outline: 2px solid yellow !important;
}

body.dev-mode .hero-split-left {
    outline: 2px dashed #ff0 !important;
}

body.dev-mode .hero-split-right {
    outline: 2px dashed #0ff !important;
}

body.dev-mode .mobile-screen1 {
    outline: 2px solid magenta !important;
}

body.dev-mode .mobile-s1-title {
    outline: 2px dashed #f0f !important;
}

body.dev-mode .mobile-s1-metrics {
    outline: 2px dashed #0f0 !important;
}

body.dev-mode .mobile-s1-cta {
    outline: 2px dashed #ff0 !important;
}

body.dev-mode .hero-badge {
    outline: 2px solid #f80 !important;
}

body.dev-mode .tw-lines {
    outline: 2px solid #0af !important;
}

body.dev-mode .hero-metrics {
    outline: 2px solid lime !important;
}

body.dev-mode .metric-f {
    outline: 1px solid #0f0 !important;
}

body.dev-mode .hero-bottom {
    outline: 2px solid #f0f !important;
}

body.dev-mode .btn-hero {
    outline: 2px solid red !important;
}
