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

/* Define Variables (Customize these!) */
:root {
    --background-color: #1a1a1d; /* Dark charcoal/near black */
    --text-color: #f5f5f5; /* Off-white/light grey */
    --primary-color: #4ecdc4; /* Bright cyan/turquoise - retro accent */
    --secondary-color: #c7f464; /* Optional secondary accent - bright lime green */
    --card-background: #2c2f33; /* Slightly lighter dark shade for cards/sections */
    --border-color: #444;
    --font-main: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Clean sans-serif */
    --font-monospace: 'IBM Plex Mono', 'Courier New', Courier, monospace; /* Monospace for code/logo */
    --container-width: 960px;
    --spacing-unit: 1rem; /* Base spacing unit (e.g., 16px) */
}

/* Import Inter font (optional, but nice) */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500&family=Inter:wght@400;700&display=swap');

body {
    font-family: var(--font-main);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Basic Layout Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 1.5); /* Add horizontal padding */
}

/* Header Styles */
header {
    padding: calc(var(--spacing-unit) * 1.5) 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-monospace); /* Monospace font for logo */
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--primary-color); /* Use accent color for logo */
    text-decoration: none;
}

/* Section Padding */
main section {
    padding: calc(var(--spacing-unit) * 3) 0;
}

/* Headings */
h1, h2, h3 {
    margin-bottom: var(--spacing-unit);
    color: var(--primary-color); /* Use accent for main headings */
    line-height: 1.3;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

h2 {
    font-size: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: calc(var(--spacing-unit) * 0.5);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

h3 {
    font-size: 1.4rem;
    color: var(--text-color); /* Regular text color for H3 */
}

/* Paragraphs and Lists */
p, ul {
    margin-bottom: var(--spacing-unit);
}

ul {
    list-style: none; /* Remove default bullets */
    padding-left: 0;
}

ul li {
    position: relative;
    padding-left: calc(var(--spacing-unit) * 1.5); /* Indent list items */
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

/* Custom bullet using pseudo-element */
ul li::before {
    content: '>'; /* Use > as a retro/terminal style bullet */
    position: absolute;
    left: 0;
    top: 0px; /* Adjust vertical alignment if needed */
    color: var(--primary-color); /* Accent color for bullet */
    font-family: var(--font-monospace);
    font-weight: bold;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: var(--secondary-color); /* Optional hover color */
    text-decoration: underline;
}

/* Buttons */
.button {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.5);
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.button:hover, .button:focus {
    background-color: var(--primary-color);
    color: var(--background-color);
    text-decoration: none;
}

.button-primary {
    background-color: var(--primary-color);
    color: var(--background-color);
}

.button-primary:hover, .button-primary:focus {
    background-color: transparent;
    color: var(--primary-color);
}

.button-large {
    font-size: 1.2rem;
    padding: var(--spacing-unit) calc(var(--spacing-unit) * 2);
}

/* Hero Section Specific Styles */
.hero-section {
    text-align: center;
    padding-top: calc(var(--spacing-unit) * 4);
    padding-bottom: calc(var(--spacing-unit) * 4);
}

.hero-section .subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto calc(var(--spacing-unit) * 2.5);
    color: #ccc; /* Slightly dimmer color for subtitle */
}

/* How It Works Section - Steps Layout */
.how-it-works-section .steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid */
    gap: calc(var(--spacing-unit) * 2);
}

.how-it-works-section .step {
    background-color: var(--card-background);
    padding: calc(var(--spacing-unit) * 1.5);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.step-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: var(--font-monospace);
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    display: inline-block; /* Keep number contained */
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 38px; /* Center number vertically */
    text-align: center;
}

/* Beta Offer Section */
.beta-offer-section {
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    padding-top: calc(var(--spacing-unit) * 4);
    padding-bottom: calc(var(--spacing-unit) * 4);
}

.beta-offer-section ul {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: left; /* Align list text left within centered section */
    margin-bottom: calc(var(--spacing-unit) * 2.5);
}

/* Basic Form Styling (if using embedded form) */
.beta-offer-section form {
    max-width: 400px;
    margin: calc(var(--spacing-unit) * 2) auto 0;
    display: flex; /* Simple inline form layout */
    gap: var(--spacing-unit);
}

.beta-offer-section label {
    /* Visually hide label but keep accessible */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.beta-offer-section input[type="email"] {
    flex-grow: 1;
    padding: calc(var(--spacing-unit) * 0.75);
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    border-radius: 4px;
    font-family: var(--font-main);
}

.beta-offer-section .form-note {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: var(--spacing-unit);
}


/* Footer Styles */
footer {
    text-align: center;
    padding: calc(var(--spacing-unit) * 2) 0;
    margin-top: calc(var(--spacing-unit) * 3);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #aaa;
}

footer a {
    color: #bbb;
}
footer a:hover, footer a:focus {
    color: var(--primary-color);
}

/* Basic Responsive Adjustments */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .hero-section .subtitle { font-size: 1.1rem; }

    /* Stack form elements if using embedded form */
     .beta-offer-section form {
        flex-direction: column;
    }
    .beta-offer-section form button {
        width: 100%; /* Make button full width on small screens */
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .hero-section .subtitle { font-size: 1rem; }

    .logo { font-size: 1.5rem; }
}

/* --- WAF Copilot Early Access Form Styling --- */

#early-access-form {
    max-width: 700px; /* Increased max-width slightly */
    margin: calc(var(--spacing-unit) * 3) auto 0; /* More top margin, centered */
    padding: calc(var(--spacing-unit) * 2.5); /* More padding */
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: left;
}

/* Styling for each label + input row */
.form-row {
    display: flex;
    align-items: center; /* Vertically align label and input */
    margin-bottom: calc(var(--spacing-unit) * 1.5); /* Space between rows */
    flex-wrap: wrap; /* Allow wrapping on very small screens */
}

/* Label styling within a row */
.form-row label {
    flex: 0 0 160px; /* Label fixed width: Don't grow, Don't shrink, Basis 160px */
    padding-right: calc(var(--spacing-unit) * 1.5); /* Space between label and input */
    text-align: right;
    font-weight: bold;
    color: var(--text-color);
    font-size: 0.9rem;
    box-sizing: border-box;
}

/* Input styling within a row */
.form-row input[type="text"],
.form-row input[type="email"] {
    flex: 1 1 auto; /* Input flexible width: Grow, Shrink, Basis auto */
    /* It will take up remaining space */
    min-width: 150px; /* Prevent input becoming too small before wrapping */

    /* Re-apply visual styles (ensure they target inputs correctly) */
    width: auto; /* Override potential explicit width: 100% */
    padding: calc(var(--spacing-unit) * 0.8);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
    font-family: var(--font-main);
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Input focus style */
.form-row input[type="text"]:focus,
.form-row input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.25);
}

/* Fieldset for checkboxes */
#early-access-form fieldset.checkbox-group {
    border: 1px solid var(--border-color);
    padding: calc(var(--spacing-unit) * 1.5);
    border-radius: 4px;
    margin-top: calc(var(--spacing-unit) * 1); /* Space above fieldset */
    margin-bottom: calc(var(--spacing-unit) * 2); /* Space below fieldset */
}

#early-access-form fieldset.checkbox-group legend {
    font-weight: bold;
    padding: 0 calc(var(--spacing-unit) * 0.5);
    color: var(--primary-color);
    font-size: 1rem;
    font-family: var(--font-main);
}

/* Checkbox divs */
#early-access-form fieldset.checkbox-group div {
     margin-bottom: calc(var(--spacing-unit) * 0.75);
     display: flex;
     align-items: center;
}
#early-access-form fieldset.checkbox-group div:last-child {
     margin-bottom: 0;
}

/* Checkbox input */
#early-access-form fieldset.checkbox-group input[type="checkbox"] {
     margin-right: calc(var(--spacing-unit) * 0.8);
     width: 18px;
     height: 18px;
     accent-color: var(--primary-color);
     cursor: pointer;
     background-color: var(--background-color);
     border: 1px solid var(--border-color);
     flex-shrink: 0;
}
#early-access-form fieldset.checkbox-group input[type="checkbox"]:focus {
     outline: none;
     box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.25);
}

/* Checkbox label */
#early-access-form fieldset.checkbox-group label {
     margin-bottom: 0;
     font-weight: normal;
     font-size: 0.95rem;
     color: var(--text-color);
     cursor: pointer;
}

/* Honeypot - Ensure visually hidden */
.form-honeypot { /* Target using its class */
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
.form-honeypot label {
     position: absolute !important;
     left: -9999px !important;
}

/* --- Submit Button --- */
#early-access-form button[type="submit"] {
     display: block; /* Make it a block element */
     width: 100%; /* Full width relative to container */
     max-width: 300px; /* Max width */
     margin: 0 auto calc(var(--spacing-unit) * 1.5) auto; /* Top 0, Auto L/R (center), Bottom margin */
     /* Relies on existing .button, .button-primary, .button-large styles */
}

/* --- Form Message Area Styling --- */
#form-message {
    padding: var(--spacing-unit);
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    display: none; /* Hidden by default */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    color: var(--background-color);
    margin-bottom: calc(var(--spacing-unit) * 1.5); /* Space below message */
}
#form-message.show { display: block; opacity: 1;}
#form-message.success { background-color: var(--secondary-color, #28a745); color: var(--background-color);}
#form-message.error { background-color: #dc3545; color: white; }
#form-message.submitting { background-color: var(--border-color); color: var(--text-color);}
#form-message:not(.show) { margin-bottom: 0; padding: 0; } /* Prevent space when hidden */

/* Form note below button */
#early-access-form .form-note {
    font-size: 0.85rem;
    color: #aaa;
    text-align: center;
    margin-top: 0; /* Space handled by elements above */
    margin-bottom: 0;
}

/* --- Responsive Adjustments for the Form --- */
@media (max-width: 600px) { /* Adjust breakpoint as needed */
    .form-row {
        /* Stack label and input vertically */
        flex-direction: column;
        align-items: flex-start; /* Align items to the start */
    }

    .form-row label {
        flex-basis: auto; /* Reset fixed width */
        width: 100%; /* Take full width */
        text-align: left; /* Align label text left */
        padding-right: 0; /* Remove right padding */
        margin-right: 0; /* Remove right margin */
        margin-bottom: calc(var(--spacing-unit) * 0.5); /* Add space below label */
    }

    .form-row input[type="text"],
    .form-row input[type="email"] {
         width: 100%; /* Ensure input takes full width */
         min-width: unset; /* Reset min-width */
    }

     #early-access-form {
         padding: calc(var(--spacing-unit) * 1.5); /* Reduce padding on small screens */
     }
}
