/* ===== DESIGN TOKENS — Hybrid Reality Brand ===== */
:root {
    /* Brand colours */
    --black: #0a0a0a;
    --white: #ffffff;
    --green: #5cdb5c;
    /* Hybrid Reality chartreuse-green accent */
    --green-dark: #3ab83a;
    --green-glow: rgba(92, 219, 92, 0.22);

    /* Accento rosso: leggibile sia su sfondo nero che bianco */
    --tech-blue: #ac0003;
    --tech-blue-glow: rgba(172, 0, 3, 0.22);

    /* Backgrounds */
    --bg: var(--white);
    --bg-card: var(--white);
    --bg-glass: rgba(255, 255, 255, 0.7);

    /* Borders */
    --border: #e5e7eb;
    --border-strong: #1a1a1a;

    /* Text */
    --text-primary: var(--black);
    --text-secondary: #555555;
    --text-muted: #999999;

    /* Accent aliases (previously blue/purple) */
    --blue: var(--black);
    --blue-light: var(--black);
    --blue-glow: rgba(0, 0, 0, 0.12);

    --purple: var(--black);
    --purple-light: var(--black);
    --purple-glow: rgba(0, 0, 0, 0.10);

    --pink: var(--black);
    --pink-light: var(--black);
    --pink-glow: rgba(0, 0, 0, 0.08);

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ===== AMBIENT ORBS (hidden) ===== */
.orb {
    display: none;
    pointer-events: none;
}

/* ===== SCREEN SYSTEM ===== */
.screen {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.screen.active {
    display: flex;
    animation: screenIn 0.32s var(--transition) both;
}

@keyframes screenIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HOME HEADER ===== */
.home-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 56px 24px 18px;
    border-bottom: 1px solid var(--border);
}

/* Hybrid Reality logo mark — triangle/chevron in SVG */
.logo-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text {
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.logo-text span {
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--tech-blue);
}

.home-subtitle {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 400;
    margin-top: 5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ===== HOME HERO STRIP ===== */
.home-hero {
    background: var(--black);
    color: var(--white);
    padding: 32px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-hero-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--tech-blue);
}

.home-hero-title {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.home-hero-title em {
    font-style: normal;
    font-weight: 300;
    display: block;
    letter-spacing: 0.08em;
}

/* ===== MODE GRID (HOME) ===== */
.mode-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 20px 40px;
    flex: 1;
}

/* Fasce: banda scura, immagine ben definita a sinistra che sfuma verso destra */
.mode-card {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 170px;
    padding: 26px;
    background: var(--black);
    border: none;
    border-radius: 18px;
    cursor: pointer;
    text-align: right;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
}

.mode-card:not(.mode-card-disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.mode-card:not(.mode-card-disabled):active {
    transform: scale(0.99);
}

.mode-card-disabled {
    cursor: default;
    opacity: 0.55;
}

/* Immagine a sinistra: nitida all'inizio, dissolve nel nero verso destra */
.card-img {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 68%;
    background-size: cover;
    background-position: center;
    -webkit-mask-image: linear-gradient(to right, #000 35%, transparent 98%);
    mask-image: linear-gradient(to right, #000 35%, transparent 98%);
    pointer-events: none;
}

/* Icone delle schermate interne (option cards) */
.icon-blue,
.icon-purple,
.icon-pink {
    background: var(--black);
    color: var(--white);
}

/* Card text: a destra, sopra la parte scura della fascia */
.card-text {
    position: relative;
    z-index: 2;
    margin-left: auto;
    max-width: 55%;
    min-width: 0;
}

.card-text h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-text p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.5;
}

/* Badge di avviso sulla card (es. "Al momento solo per iPhone") */
.card-badge {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 30px;
    background: var(--tech-blue);
    color: var(--white);
}

/* Card arrow */
.card-arrow {
    position: relative;
    z-index: 2;
    color: var(--tech-blue);
    flex-shrink: 0;
    margin-left: 14px;
}

/* Coming soon badge */
.coming-soon-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 9px;
    border-radius: 30px;
    background: var(--black);
    color: var(--white);
}

/* ===== BACK BUTTON ===== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 52px 22px 16px;
    background: none;
    border: none;
    color: var(--black);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: opacity var(--transition);
}

.back-btn:active {
    opacity: 0.5;
}

/* ===== SCREEN HEADER ===== */
.screen-header {
    padding: 4px 22px 28px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.screen-tag {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 4px 12px;
    border-radius: 30px;
    margin-bottom: 12px;
    background: var(--tech-blue);
    color: var(--white);
    border: none;
}

.tag-blue,
.tag-purple {
    background: var(--tech-blue);
    color: var(--white);
    border: none;
}

.screen-title {
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.screen-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== 3D MODEL VIEWER ===== */
.viewer-wrap {
    flex: 1 1 auto;
    min-height: 45vh;
    margin: 16px 20px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
}

model-viewer {
    flex: 1 1 auto;
    width: 100%;
    min-height: 280px;
    height: 100%;
    --poster-color: transparent;
}

/* AR Launch button */
.ar-button {
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    transition: all var(--transition);
    white-space: nowrap;
}

.ar-button:active {
    transform: translateX(-50%) scale(0.96);
    background: #222;
}

/* Progress Bar */
#progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    pointer-events: none;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: var(--green);
    border-radius: 0 3px 3px 0;
    transition: width 0.3s ease;
}

/* ===== MODEL SELECTOR ===== */
.model-selector-panel {
    margin: 16px 20px 32px;
    border-radius: var(--radius-md);
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--border);
}

.selector-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.selector-carousel::-webkit-scrollbar {
    display: none;
}

.model-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    min-width: 86px;
    transition: all var(--transition);
    flex-shrink: 0;
    color: var(--text-primary);
}

.model-btn.active {
    background: var(--black);
    border-color: var(--black);
    color: var(--white);
}

.model-btn.active span {
    color: var(--white);
}

.model-btn:active {
    transform: scale(0.95);
}

.model-btn span {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-primary);
}

.thumb {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    max-width: 46px;
    max-height: 46px;
    background: transparent;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.thumb model-viewer {
    width: 100%;
    height: 100%;
}

/* ===== IMAGE TARGET OPTION CARDS ===== */
.option-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 16px 20px 40px;
    flex: 1;
}

/* Fascia scura con immagine a sinistra, come le card della home */
.option-card {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 170px;
    padding: 26px;
    background: var(--black);
    border: none;
    border-radius: 18px;
    text-decoration: none;
    color: var(--white);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    margin-bottom: 12px;
}

.option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.option-card:active {
    transform: scale(0.99);
}

.option-text {
    position: relative;
    z-index: 2;
    margin-left: auto;
    max-width: 55%;
    min-width: 0;
    text-align: right;
}

.option-text h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.option-text p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.55;
}

.option-meta {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 2px;
    margin-left: 14px;
    color: var(--tech-blue);
}

.option-tag {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 30px;
    background: var(--tech-blue);
    color: var(--white);
    white-space: nowrap;
}

.option-tag-purple {
    background: var(--black);
    color: var(--white);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ===== GLASS PANEL UTIL ===== */
.glass-panel {
    background: var(--white);
    border: 1px solid var(--border);
}