/* ============================================================
   Tex Software + Hedges - Cigars & Scotch Check-In
   CONEXPO 2026 | Davidoff of Geneva Cigar Bar, Las Vegas
   Design: Premium dark. Black + Gold + Warm.
   Target: iPad (768x1024 portrait, 1024x768 landscape)
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --red: #b50201;
    --black: #000000;
    --white: #ffffff;
    --gold: #d4a847;
    --gold-dim: rgba(212, 168, 71, 0.6);
    --yellow: #ffcc02;
    --warm-black: #0a0806;
    --warm-dark: #141210;
    --warm-border: rgba(212, 168, 71, 0.15);
    --warm-input: rgba(212, 168, 71, 0.06);
    --warm-input-border: rgba(212, 168, 71, 0.18);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-dim: rgba(255, 255, 255, 0.35);
}

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--warm-black);
    color: var(--white);
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--gold);
    color: var(--black);
}

/* --- Brand Bar (top stripe) --- */
.brand-bar {
    background: var(--black);
    border-bottom: 1px solid var(--warm-border);
    display: flex;
    align-items: center;
    padding: 10px 32px;
    gap: 12px;
}

.brand-bar-text {
    font-family: "Cairo", sans-serif;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.15em;
    color: var(--white);
}

.brand-bar-plus {
    font-family: "Cairo", sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: var(--gold);
}

.brand-bar-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.15);
    margin-left: 4px;
}

.brand-bar-event {
    font-family: "Cairo", sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* --- Main Layout: side-by-side on iPad landscape, stacked on portrait --- */
main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: calc(100% - 38px);
}

/* --- Hero (left panel) --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    border-right: 1px solid var(--warm-border);
    position: relative;
    overflow: hidden;
    background: var(--warm-black);
}

/* Subtle warm ambient glow */
.hero::before {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 140%;
    height: 80%;
    background: radial-gradient(ellipse at center, rgba(212, 168, 71, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    text-align: left;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    font-family: "Cairo", sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--gold-dim);
    margin-bottom: 24px;
}

/* --- Bars (Tex signature element) --- */
.bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 28px;
}

.bars-bottom {
    margin-bottom: 0;
    margin-top: 28px;
}

.bar {
    background: var(--gold);
}

.bar-1 { height: 1px; width: 50%; opacity: 0.4; }
.bar-2 { height: 2px; width: 70%; opacity: 0.6; }
.bar-3 { height: 3px; width: 100%; opacity: 0.8; }

/* --- Hero Title --- */
.hero-title {
    font-family: "Cairo", sans-serif;
    line-height: 0.85;
    margin-bottom: 24px;
}

.hero-title-line {
    display: block;
    font-weight: 900;
    font-size: 72px;
    letter-spacing: -0.02em;
    color: var(--white);
}

.hero-title-amp {
    display: block;
    font-weight: 400;
    font-size: 48px;
    color: var(--gold-dim);
    line-height: 1.1;
    margin: 4px 0;
}

.hero-title-accent {
    display: block;
    font-weight: 900;
    font-size: 72px;
    letter-spacing: -0.02em;
    color: var(--gold);
}

/* --- Hero Details --- */
.hero-details {
    margin-bottom: 0;
}

.hero-detail-line {
    font-family: "Cairo", sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.hero-subtitle {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-dim);
    line-height: 1.5;
    margin-top: 16px;
}

/* --- Form Panel (right side) --- */
.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 40px;
    position: relative;
    background: var(--warm-dark);
}

.form-heading {
    font-family: "Cairo", sans-serif;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--warm-border);
}

#checkin-form {
    width: 100%;
    max-width: 440px;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    font-family: "Cairo", sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

input:not([type="checkbox"]), select {
    width: 100%;
    padding: 14px 16px;
    font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--white);
    background: var(--warm-input);
    border: 1px solid var(--warm-input-border);
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

input::placeholder {
    color: var(--text-dim);
}

input:focus, select:focus {
    border-color: var(--gold);
    background: rgba(212, 168, 71, 0.1);
}

input.invalid, select.invalid {
    border-color: var(--red);
    background: rgba(181, 2, 1, 0.08);
}

/* Select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='rgba(212,168,71,0.5)' stroke-width='1.5' stroke-linecap='square' stroke-linejoin='square'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

select option {
    background: #111;
    color: var(--white);
}

/* --- Submit Button --- */
button[type="submit"] {
    width: 100%;
    padding: 16px 24px;
    font-family: "Cairo", sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--black);
    background: var(--yellow);
    border: none;
    border-radius: 0;
    cursor: pointer;
    margin-top: 12px;
    transition: background 0.2s;
}

button[type="submit"]:hover {
    background: #ffd83d;
}

button[type="submit"]:active {
    background: #e6b800;
}

button[type="submit"]:disabled {
    background: rgba(212, 168, 71, 0.2);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

/* --- Success State --- */
.hidden {
    display: none;
}

#success-message {
    width: 100%;
    max-width: 440px;
}

.success-inner {
    text-align: center;
    padding: 40px 0;
}

.success-icon {
    width: 72px;
    height: 72px;
    border: 2px solid var(--gold);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    animation: checkPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes checkPop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-inner h2 {
    font-family: "Cairo", sans-serif;
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: 8px;
}

.success-inner p {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 36px;
}

#reset-btn {
    padding: 14px 36px;
    font-family: "Cairo", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-dim);
    background: transparent;
    border: 1px solid var(--warm-border);
    border-radius: 0;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

#reset-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* --- Error State --- */
#error-message {
    margin-top: 12px;
}

#error-message p {
    font-family: "Cairo", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--red);
    text-align: center;
    padding: 10px;
    border: 1px solid rgba(181, 2, 1, 0.3);
    background: rgba(181, 2, 1, 0.08);
}

/* --- iPad Portrait (768px wide) --- */
@media (max-width: 850px) {
    main {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        overflow-y: auto;
    }

    .hero {
        border-right: none;
        border-bottom: 1px solid var(--warm-border);
        padding: 36px 32px;
    }

    .hero-inner {
        text-align: center;
        max-width: 100%;
    }

    .hero-eyebrow {
        margin-bottom: 16px;
    }

    .bars {
        margin: 0 auto 20px;
        max-width: 280px;
    }

    .bars .bar-1 { margin-left: auto; margin-right: auto; width: 35%; }
    .bars .bar-2 { margin-left: auto; margin-right: auto; width: 55%; }
    .bars .bar-3 { margin-left: auto; margin-right: auto; width: 75%; }

    .bars-bottom {
        margin-top: 20px;
        margin-bottom: 0;
    }

    .hero-title-line,
    .hero-title-accent {
        font-size: 56px;
    }

    .hero-title-amp {
        font-size: 36px;
    }

    .hero-subtitle {
        margin: 12px auto 0;
        max-width: 100%;
    }

    .form-panel {
        padding: 32px;
    }
}

/* --- Phone (unlikely but handled) --- */
@media (max-width: 500px) {
    .brand-bar {
        padding: 8px 20px;
        gap: 8px;
    }

    .hero {
        padding: 28px 20px;
    }

    .hero-title-line,
    .hero-title-accent {
        font-size: 40px;
    }

    .hero-title-amp {
        font-size: 28px;
    }

    .form-panel {
        padding: 24px 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    input:not([type="checkbox"]), select {
        padding: 12px 14px;
    }
}
