:root {
    /* --- Shared Tokens --- */
    --transition-duration: 0ms;
    --transition-easing: cubic-bezier(0.2, 0.8, 0.2, 1);
    
    /* --- Retro Theme (XP) --- */
    --bg-page: #ECE9D8;
    --bg-surface: #FFFFFF;
    --text-main: #000000;
    --text-muted: #333333;
    --border-color: #D4D0C8;
    
    --font-stack: Tahoma, "Microsoft Sans Serif", Verdana, sans-serif;
    --font-size-base: 11px;
    --heading-font: "Trebuchet MS", Arial, sans-serif;
    --heading-spacing: normal;
    
    /* XP Window Specifics */
    --window-bg: #ECE9D8;
    --title-bar-bg: linear-gradient(to bottom, #0058EE 0%, #3593FF 4%, #288EFF 18%, #127dff 20%, #0369FD 100%);
    --title-text: #FFF;
    --btn-face: #ECE9D8;
    
    /* Retro UI */
    --btn-bg: linear-gradient(to bottom, #FFF, #ECE9D8);
    --btn-text: #000000;
    --btn-border: 1px solid #003C74;
    --btn-radius: 3px;
    --btn-padding: 4px 12px;
    
    --input-bg: #FFFFFF;
    --input-border: 1px inset #7F9DB9;
    --input-radius: 0px;
    
    --container-max: 800px;
}

/* --- Premium Theme (Dark High-End) --- */
:root[data-theme="premium"] {
    --transition-duration: 1000ms;
    
    --bg-page: #0E0E0E; /* Dark but not pitch black */
    --bg-surface: #111111;
    --text-main: #FFFFFF;
    --text-muted: #9CA3AF;
    --border-color: #333333;
    
    --font-stack: "Inter", system-ui, sans-serif;
    --font-size-base: 16px;
    --heading-font: "Inter", system-ui, sans-serif; 
    --heading-spacing: -0.02em;
    
    /* Premium UI */
    --btn-bg: #FFFFFF;
    --btn-text: #000000;
    --btn-border: 1px solid #FFFFFF;
    --btn-radius: 12px; /* Match Input Radius */
    --btn-padding: 16px 32px;
    
    --input-bg: #1A1A1A;
    --input-border: 1px solid #333;
    --input-radius: 12px;
    
    --container-max: 1200px; /* Wider width */
}

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

html {
    font-size: var(--font-size-base);
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-stack);
    line-height: 1.5;
    transition: background-color var(--transition-duration) var(--transition-easing), 
                color var(--transition-duration) var(--transition-easing);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    font-size: var(--font-size-base);
}

/* Premium Background Spotlights */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: 
        radial-gradient(circle at 10% 20%, rgba(20, 20, 20, 0.8) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(10, 10, 10, 0.8) 0%, transparent 40%);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-duration) var(--transition-easing);
    pointer-events: none;
}

:root[data-theme="premium"] body::before {
    opacity: 1;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
}

/* --- XP Window Overlay --- */
.xp-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: transparent; /* No dimming usually in XP? Or maybe slightly? */
    display: flex; /* Hidden by JS initially */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.xp-window {
    width: 400px;
    background: var(--window-bg);
    border: 1px solid #0055EA; /* XP Blue Border */
    border-radius: 3px 3px 0 0;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.4);
    font-family: Tahoma, sans-serif;
    font-size: 11px;
    color: #000;
}

.xp-title-bar {
    height: 30px;
    background: var(--title-bar-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    border-radius: 2px 2px 0 0;
}

.xp-title-text {
    color: #FFF;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 1px 1px #000;
    margin-left: 5px;
}

.xp-control-btn.close {
    width: 21px;
    height: 21px;
    background: #E02; /* Red close btn placeholder */
    border: 1px solid #FFF;
    border-radius: 2px;
    color: #FFF;
    font-weight: bold;
    line-height: 18px;
    text-align: center;
    cursor: default;
    background: linear-gradient(to bottom, #E67E73, #D34638);
}

.xp-window-body {
    padding: 15px;
}

.xp-fly-animation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 200px;
    margin: 0 auto 15px;
    position: relative;
    height: 40px;
}
/* Placeholder icons using CSS shapes or unicode */
.xp-icon-computer {
    width: 40px;
    height: 36px;
    position: relative;
    /* Monitor Base/Stand */
    background: transparent;
}
/* Monitor Bezel */
.xp-icon-computer::before {
    content: '';
    position: absolute;
    top: 0; left: 4px;
    width: 32px; height: 26px;
    background: #ECE9D8;
    border: 1px solid #777;
    border-radius: 3px 3px 0 0;
    box-shadow: inset 1px 1px 2px #FFF, 2px 2px 3px rgba(0,0,0,0.2);
    z-index: 2;
}
/* Monitor Screen */
.xp-icon-computer::after {
    content: '';
    position: absolute;
    top: 3px; left: 7px;
    width: 26px; height: 20px;
    background: linear-gradient(135deg, #62AEE6 0%, #2A68B6 100%);
    border: 1px solid #555;
    z-index: 3;
}
/* Stand base hack using a child span if possible, but I'll use box-shadow on the main element or a pseudo on a child?
   Let's keep it simple: Monitor is enough. I can add a stand using a pseudo element on the container if I didn't use both for monitor.
   Actually, I can use a radial gradient on the main element for the stand.
*/
.xp-icon-computer {
    background-image: radial-gradient(ellipse at bottom, rgba(0,0,0,0.3) 0%, transparent 60%);
    background-size: 100% 10px;
    background-repeat: no-repeat;
    background-position: bottom center;
}

.xp-icon-arrow {
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid #3E9E3E; /* Green Arrow */
    position: relative;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.3));
}
/* Add a tail to the arrow */
.xp-icon-arrow::after {
    content: '';
    position: absolute;
    top: -3px; left: -10px;
    width: 10px; height: 6px;
    background: #3E9E3E;
}

.xp-details {
    margin-bottom: 15px;
}
.xp-details p {
    margin: 2px 0;
}

.xp-progress-wrapper {
    height: 15px;
    border: 1px inset #FFF;
    background: #FFF;
    margin-bottom: 15px;
    padding: 1px;
}

.xp-progress-bar {
    height: 100%;
    background-image: linear-gradient(to right, #3E9E3E 0%, #3E9E3E 7px, transparent 7px, transparent 9px);
    background-size: 9px 100%;
    background-repeat: repeat-x;
    width: 0%;
    transition: width 0.1s linear; /* Smooth fill controlled by JS */
}

.xp-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.xp-native-btn {
    min-width: 75px;
    padding: 4px 10px;
    background: #ECE9D8;
    border: 1px solid #003C74;
    border-radius: 3px;
    font-family: Tahoma;
    font-size: 11px;
}
.xp-native-btn:disabled {
    color: #888;
    border-color: #888;
}
.xp-native-btn.primary {
    box-shadow: inset 1px 1px rgba(255,255,255,0.4);
    background: linear-gradient(to bottom, #8FB9EA 0%, #288EFF 50%, #1D62F0 100%);
    color: #FFF;
    border: 1px solid #003C74;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}
.xp-native-btn.primary:hover {
    background: linear-gradient(to bottom, #A6CAFF 0%, #4FA3FF 50%, #3F85F5 100%);
}


/* --- Main Content --- */
#main-content {
    /* Retro specific padding */
    padding-top: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

:root[data-theme="premium"] #main-content {
    padding-top: 6rem; /* Standard spacing */
    justify-content: flex-start;
}

/* --- Hero --- */
.hero {
    width: 100%;
}

.hero__content {
    max-width: 100%;
}

:root[data-theme="premium"] .hero__content {
    max-width: 100%;
}

/* Animation Entry */
:root[data-theme="premium"] .premium-header,
:root[data-theme="premium"] .hero__title,
:root[data-theme="premium"] .hero__subtitle,
:root[data-theme="premium"] .tag-chips,
:root[data-theme="premium"] .form-wrapper {
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}
:root[data-theme="premium"] .premium-header { animation-delay: 0.1s; }
:root[data-theme="premium"] .hero__title { animation-delay: 0.2s; }
:root[data-theme="premium"] .hero__subtitle { animation-delay: 0.3s; }
:root[data-theme="premium"] .tag-chips { animation-delay: 0.4s; }
:root[data-theme="premium"] .form-wrapper { animation-delay: 0.5s; }


.hero__title {
    font-family: var(--heading-font);
    font-size: 1.8rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    transition: all var(--transition-duration);
}

:root[data-theme="premium"] .hero__title {
    font-family: "Inter", system-ui, sans-serif;
    /* Reverted to manageable size to fit fold */
    max-width: 850px;
    font-size: clamp(3rem, 4vw, 4.5rem); 
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    
    /* High Contrast Scroll Gradient Effect */
    background: linear-gradient(135deg, #FFFFFF 35%, #666666 50%, #FFFFFF 65%) fixed;
    background-size: 100% 100vh; 
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Premium Header Group */
.premium-header {
    display: none;
}
:root[data-theme="premium"] .premium-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.premium-label {
    display: none;
}
:root[data-theme="premium"] .premium-label {
    display: block;
    font-family: "Instrument Serif", serif;
    font-style: italic;
    font-weight: 400;
    font-size: 4rem;
    line-height: 1;
    
    /* Blue Gradient */
    background: linear-gradient(to right, #4b33d4, #65abfb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 100, 255, 0.3));
}

.coming-soon-badge {
    display: none;
}
:root[data-theme="premium"] .coming-soon-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFF;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2); }
    70% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@keyframes slideOutLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.slide-out-left {
    animation: slideOutLeft 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

.hero__subtitle {
    font-family: Verdana;
    font-size: 11px;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    transition: all var(--transition-duration);
}

:root[data-theme="premium"] .hero__subtitle {
    font-family: "Inter", sans-serif;
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.5;
}

/* --- Tag Chips (Inline) --- */
.tag-chips {
    display: none;
}
:root[data-theme="premium"] .tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 3rem;
}

.tag-chip {
    /* Styles from user feedback (CSS Glass) */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.3),
      0 2px 8px rgba(0, 0, 0, 0.15),
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    
    padding: 8px 16px;
    font-size: 0.9rem;
    color: #FFF; /* Ensure text is visible on dark background with white border */
    transition: all 0.3s;
}
.tag-chip:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Retro Only Elements --- */
.retro-only {
    display: block;
}
:root[data-theme="premium"] .retro-only {
    display: none;
}

.pill-list {
    margin-bottom: 1rem;
    padding-left: 20px;
    list-style-type: square;
}

.pill {
    font-size: 11px;
    color: var(--text-main);
}

/* --- Form --- */
.waitlist-form {
    width: 100%;
    max-width: 400px;
}

@media (max-width: 900px) {
    .waitlist-form {
        max-width: 100%;
    }
}

.social-proof-text {
    display: none;
}
:root[data-theme="premium"] .social-proof-text {
    display: block;
    font-family: "Inter", sans-serif;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
}
#merchantCount {
    color: #FFF;
    font-weight: 600;
}

.form-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Mobile optimization */
@media (max-width: 900px) {
    :root[data-theme="premium"] .form-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    :root[data-theme="premium"] input[type="email"] {
        width: 100% !important;
    }
    
    :root[data-theme="premium"] .submit-btn {
        width: 100%;
    }
}

input[type="email"] {
    flex: 1;
    padding: 3px;
    background: var(--input-bg);
    border: var(--input-border);
    border-radius: var(--input-radius);
    color: var(--text-main);
    font-family: Tahoma;
    font-size: 11px;
}

:root[data-theme="premium"] input[type="email"] {
    padding: 16px 20px;
    font-size: 16px;
    font-family: "Inter", sans-serif;
    color: #FFF;
    background: #1A1A1A;
    border: 1px solid #333;
    width: 320px;
    flex: unset;
    border-radius: 12px; /* Matched radius */
}
:root[data-theme="premium"] input[type="email"]::placeholder {
    color: #555;
}

.submit-btn {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: var(--btn-border);
    border-radius: var(--btn-radius);
    padding: var(--btn-padding);
    font-size: 11px;
    font-family: Tahoma;
    cursor: pointer;
    white-space: nowrap;
}

:root[data-theme="premium"] .submit-btn {
    font-size: 16px;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    background: #FFFFFF;
    color: #000000;
    border: none;
    border-radius: 12px; /* Matched radius */
}
:root[data-theme="premium"] .submit-btn:hover {
    background: #F0F0F0;
}

.microcopy {
    font-size: 10px;
    color: #555;
    margin-top: 5px;
}

:root[data-theme="premium"] .microcopy {
    /* Hide the old microcopy in Premium, we use social proof text now? */
    /* User said "Make the text under the field to be above it." */
    /* So I should hide the bottom one or move it. I moved the content to social-proof-text. */
    display: none;
}

/* Success Message */
.success-message {
    color: #FFF;
    font-family: "Inter", sans-serif;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.checkmark-wrapper {
    width: 32px;
    height: 32px;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #7ac142;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #7ac142;
    fill: none;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

/* --- Footer --- */
.site-footer {
    padding: 1rem 0;
    text-align: left;
    border-top: 2px groove #fff;
    margin-top: auto;
    background: #ECE9D8;
    font-size: 10px;
}

:root[data-theme="premium"] .site-footer {
    background: transparent;
    border-top: none;
    padding: 2rem 0;
    color: #333;
}


/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Utilities --- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
