* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    transition: background-color 0.8s ease;
    background-color: #CB6767; /* Default to state 1 (red) */
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: background 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: 400;
    color: #333;
    text-decoration: none;
    text-transform: lowercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 400;
    transition: color 0.3s ease;
    text-transform: lowercase;
    letter-spacing: 0.05em;
}

.nav-links a:hover,
.nav-links a.active {
    color: #2563eb;
}

/* Scroll sections - these trigger state changes */
.scroll-section {
    height: 100vh;
    width: 100%;
}

/* Color-blocked sections for alternate homepage */
.color-block {
    height: 100vh;
    width: 100%;
    position: relative;
}

/* Signup Section */
.signup-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 20px;
    z-index: 200;
    background: rgba(203, 103, 103, 0.95);
    backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.signup-section.visible {
    transform: translateY(0);
}

.signup-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.signup-form .form-group {
    display: flex;
    flex-direction: column;
}

.signup-form label {
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: white;
    font-size: 1rem;
    text-transform: lowercase;
    letter-spacing: 0.05em;
}

.signup-form input,
.signup-form select,
.signup-form textarea {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.signup-form input::placeholder,
.signup-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.signup-form input:focus,
.signup-form select:focus,
.signup-form textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.15);
}

.signup-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.signup-form option {
    background-color: #CF5E5E;
    color: white;
}

.signup-form .expandable-field {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-bottom 0.4s ease;
    margin-bottom: 0;
}

.signup-form .expandable-field.expanded {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 0;
}

.signup-form .submit-button {
    padding: 1rem 2rem;
    background: white;
    color: #CF5E5E;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: opacity 0.3s ease;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    align-self: flex-start;
    margin-top: 0.5rem;
}

.signup-form .submit-button:hover {
    opacity: 0.9;
}

/* Fixed device container */
.device-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    width: 100%;
    max-width: 480px;
    padding: 0 20px;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.device-svg {
    width: 100%;
    height: auto;
    display: block;
}

.device-body,
.device-screen,
.device-accessory,
.device-button {
    transition: stroke 0.8s ease, fill 0.8s ease;
}

/* Message bubble styling */
.message-bubble {
    transition: opacity 0.5s ease;
}

.message-label,
.message-text {
    transition: fill 0.5s ease;
}

/* State colors - these will be applied via JavaScript */
body.state-0 {
    background-color: #CB6767; /* Red */
}

body.state-1 {
    background-color: #E3F791; /* Yellow */
}

body.state-2 {
    background-color: #5E7ACF; /* Blue */
}

body.state-3 {
    background-color: #FAB376; /* Orange */
}

body.state-4 {
    background-color: #CF5E5E; /* Putty */
}

.device-svg {
    color: #000000; /* Default device color */
}

.device-svg.state-0 {
    color: #000000;
}

.device-svg.state-1 {
    color: #000000;
}

.device-svg.state-2 {
    color: #000000;
}

.device-svg.state-3 {
    color: #000000;
}

.device-svg.state-4 {
    color: #000000;
}

/* About Page Styles */
body.about-page {
    background-color: #CB6767; /* Red background matching homepage */
    color: white;
}

body.about-page .main-nav {
    background: transparent;
    box-shadow: none;
}

body.about-page .logo,
body.about-page .nav-links a {
    color: white;
}

body.about-page .nav-links a:hover,
body.about-page .nav-links a.active {
    color: white;
    opacity: 0.8;
}

.about-page-content {
    position: fixed;
    bottom: auto;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    padding: 0 20px;
    z-index: 50;
}

.about-heading {
    font-size: 3rem;
    font-weight: 400;
    color: white;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    line-height: 1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.about-divider {
    width: 82%;
    height: 1px;
    background-color: white;
    margin-bottom: 1.5rem;
    margin-left: auto;
    margin-right: auto;
}

.about-text {
    max-width: 600px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    color: white;
    line-height: 1.8;
}

/* Contact Page Styles */
body.contact-page {
    background-color: #CB6767; /* Red background matching homepage */
    color: white;
}

body.contact-page .main-nav {
    background: transparent;
    box-shadow: none;
}

body.contact-page .logo,
body.contact-page .nav-links a {
    color: white;
}

body.contact-page .nav-links a:hover,
body.contact-page .nav-links a.active {
    color: white;
    opacity: 0.8;
}

.contact-page-content {
    position: fixed;
    bottom: auto;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    padding: 0 20px;
    z-index: 50;
}

.contact-heading {
    font-size: 3rem;
    font-weight: 400;
    color: white;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    line-height: 1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-divider {
    width: 82%;
    height: 1px;
    background-color: white;
    margin-bottom: 1.5rem;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: white;
    font-size: 1.1rem;
    text-transform: lowercase;
    letter-spacing: 0.05em;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.15);
}

.contact-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.contact-form option {
    background-color: #D74B2A;
    color: white;
}

.submit-button {
    padding: 1rem 2rem;
    background: white;
    color: #D74B2A;
    border: none;
    border-radius: 0;
    font-size: 1.1rem;
    font-weight: 400;
    cursor: pointer;
    transition: opacity 0.3s ease;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    align-self: flex-start;
}

.submit-button:hover {
    opacity: 0.9;
}

.form-status {
    margin-top: 0.5rem;
    color: white;
    font-size: 0.95rem;
    display: none;
}

.form-status.visible {
    display: block;
}

.form-status.error {
    color: #ffe0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .device-container {
        max-width: calc(100% - 40px);
        padding: 0 20px;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .about-heading {
        font-size: 2.5rem;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .contact-heading {
        font-size: 2.5rem;
    }
    
    .contact-form {
        max-width: 100%;
    }
    
    .about-text,
    .contact-form {
        max-width: 100%;
    }
}
