*,
::after,
::before {
    box-sizing: border-box;
}

html {
    font-family: sans-serif;
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    font-size: clamp(15px, 1.2vw, 16px);
}

body {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #343a40;
    text-align: left;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main, section, header, footer {
    display: block;
}

ul { margin-top: 0; margin-bottom: 1rem; }
a { color: #007bff; text-decoration: none; }
a:hover { color: #0056b3; text-decoration: none; }
[hidden] { display: none !important; }

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 35px;
}

@media (max-width: 500px) {
    .page-wrapper {
    display: flex;
    flex-direction: column;
    }
}

.page-wrapper .main-content {
    flex-grow: 1;
}

/* --- HEADER --- */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.header__content {
    display: flex;
    justify-content: center; /* Center on mobile */
    align-items: center;
    padding-top: 7px;
}

.logo__img {
    width: clamp(150px, 30vw, 200px);
    max-width: 100%;
    height: auto;
}

/* --- FOOTER --- */
.footer__content-wrapper { 
    background-color: #e9ecef;
    border-top: 1px solid #dee2e6;
}

.footer__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.footer__top-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.footer .nav__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding-left: 0;
    list-style: none;
}
.nav__link { 
    color: #495057; 
    font-size: .875rem;
    font-weight: 500;
}
.nav__link:hover {
    color: #007bff;
}

.footer__logo-container {
    width: 100%;
    display: flex;
    justify-content: flex-start; /* Always align logo to the left */
}

.footer .logo__img {
    width: clamp(120px, 25vw, 180px); 
    height: auto;
}
.footer__copyright {
    width: 100%;
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #dee2e6;
}
.copyright { 
    font-size: .8rem; 
    color: #6c757d; 
}

@media (min-width:768px) {
    .header__content {
        justify-content: flex-start; /* Left-align on medium and larger screens */
    }
}

@media (min-width:992px) {
    .footer__top-content {
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: center; /* Vertically align items on desktop */
    }

    .footer .nav__list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        column-gap: 25px;
        row-gap: 10px;
    }
}

/* --- MAIN CONTENT, INTRO & FORM --- */
.main-content {
    padding-top: 40px;
    padding-bottom: 60px;
    padding-left: 10px;
    padding-right: 10px;
}

:root {
 --primary-color: #007bff;
 --secondary-color: #e9ecef;
 --text-color: #212529;
 --border-color: #ced4da;
 --success-color: #28a745;
 --danger-color: #dc3545;
}

/* --- NEW: INTRO STEPS (Splash and Name) --- */
.intro-step-holder {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 30px 25px;
    max-width: 700px;
    margin: 2rem auto;
    text-align: center;
    display: flex; /* ADDED */
    flex-direction: column; /* ADDED */
    flex-grow: 1; /* ADDED */
}
.intro-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}
.intro-step-holder p {
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    color: #495057;
    margin-bottom: 2rem; /* MODIFIED from 4rem */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.intro-subtext {
    font-size: 0.9rem !important;
    color: #6c757d !important;
    font-weight: 500;
    margin-bottom: 0 !important;
    margin-top: auto; /* MODIFIED: Pushes element to bottom */
    padding-top: 2rem; /* ADDED: Ensures space from content above */
}
#name-input {
    max-width: 400px;
    text-align: center;
    font-size: 1.1rem;
    margin: 0 auto;
}
#get-started-btn {
    /* MODIFIED for better responsiveness */
    padding: 15px 30px;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
/* Initially hide the name step and main form */
#name-step,
.main-form-holder {
    display: none;
}
.loading-content {
    text-align: center;
}

/* --- UPDATED: GRADIENT NAME STYLE --- */
span.highlight-name {
    font-weight: 700;
    background: linear-gradient(45deg, #007BFF, #6f42c1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}
/* --- END NEW STYLES --- */


.main-form {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 30px 25px;
    max-width: 700px;
    margin: 2rem auto;
    overflow: hidden;
}

@media (min-width: 768px) {
    .main-form, .intro-step-holder {
        padding: 40px 50px;
    }
}

/* PROGRESS BAR */
.progressbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4rem;
    position: relative;
    counter-reset: step;
}
.progressbar::before {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    width: 100%;
    background-color: var(--secondary-color);
    z-index: 1;
}
.progress-line {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background-color: var(--primary-color);
    width: 0%;
    z-index: 1;
    transition: width 0.4s ease-in-out;
}
.progress-step {
    width: 40px;
    height: 40px;
    background-color: #fff;
    color: #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 2;
    position: relative;
    border: 3px solid var(--secondary-color);
    transition: all 0.4s ease;
}
.progress-step::before {
    counter-increment: step;
    content: counter(step);
    transition: all 0.4s ease;
}
.progress-step-active {
    border-color: var(--primary-color);
}
.progress-step-complete {
    background-color: var(--primary-color);
    color: #fff;
}
.progress-step-complete::before {
    content: '✔';
    font-size: 1.2em;
}
.progress-step-active::after {
    color: var(--primary-color);
}
.progress-step::after {
    content: attr(data-title);
    position: absolute;
    top: calc(100% + 10px);
    font-size: clamp(11px, 1.5vw, 13px);
    color: #6c757d;
    font-weight: 600;
    text-align: center;
    width: 100px;
    left: 50%;
    transform: translateX(-50%);
}

/* FORM STEPS */
.form-step {
  display: none;
  animation: fadeIn 0.5s;
}
.form-step-active {
  display: block;
}
/* NEW: Make the active final step a flex container for layout */
.form-step-active:has(.final-security-text) {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.step-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text-color);
  margin-top: 0;
  margin-bottom: 1rem;
  text-align: center;
}
.step-subtitle {
    text-align: center;
    margin-top: -0.5rem;
    margin-bottom: 3.5rem;
    color: #6c757d;
    font-size: clamp(0.9rem, 2vw, 1rem);
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* FORM ELEMENTS */
.input-group, .radio-group, .checkbox-group {
    margin-bottom: 2rem;
}
.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: clamp(0.9rem, 2.2vw, 1rem);
}
.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: "Montserrat", sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fdfdfd;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}
.form-input.input-error {
    border-color: var(--danger-color);
}
.radio-group.input-error, .checkbox-group.input-error {
    border: 2px dashed var(--danger-color);
    border-radius: 8px;
    padding: 10px;
}

/* --- UPDATED: Standard Checkbox for Opt-in --- */
.opt-in-group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    margin: 25px 0;
    padding: 10px;
    border: 2px solid transparent; /* for error state */
    background: none;
    border-radius: 8px;
    transition: border-color 0.3s;
}
/* NEW: Style for Opt-in error */
.opt-in-group.input-error {
    border-color: var(--danger-color);
    border-style: dashed;
}
.opt-in-group label {
    margin-bottom: 0;
    font-weight: 400;
    color: #6c757d;
    font-size: 0.9rem;
    cursor: pointer;
}
.opt-in-group input[type="checkbox"] {
    /* This makes the native checkbox visible and usable */
    all: revert; 
    width: 1.25em;
    height: 1.25em;
    cursor: pointer;
    accent-color: var(--primary-color);
}


/* --- Custom Styled Radio/Checkbox Buttons --- */
.radio-group, .checkbox-group {
    display: grid;
    gap: 1.2rem;
}

@media (min-width: 576px) {
    .radio-group, .checkbox-group {
        grid-template-columns: 1fr 1fr;
    }
}

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-weight: 600;
    position: relative;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.radio-label:hover, .checkbox-label:hover {
    border-color: #b8daff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.radio-label input, .checkbox-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-label:has(input:checked),
.checkbox-label:has(input:checked) {
    background-color: #e7f3ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,123,255,0.1);
}

/* Add a checkmark icon to selected custom inputs */
.radio-label::before, .checkbox-label::before {
    content: '✔';
    color: white;
    background-color: var(--primary-color);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    line-height: 1;
    margin-right: 12px;
    transform: scale(0);
    transition: transform 0.2s ease;
}
.checkbox-label::before {
    border-radius: 4px;
}

.radio-label:has(input:checked)::before,
.checkbox-label:has(input:checked)::before {
    transform: scale(1);
}


/* BUTTONS */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 3rem;
}
.btn {
  padding: 10px 25px;
  border: 2px solid var(--primary-color);
  background-color: var(--primary-color);
  color: #ffffff;
  border-radius: 30px;
  cursor: pointer;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.btn:hover {
  background-color: #0069d9;
  border-color: #0062cc;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,123,255,0.3);
  text-decoration: none;
  color: #fff;
}
.btn-prev {
  background-color: transparent;
  color: var(--primary-color);
  box-shadow: none;
}
.btn-prev:hover {
    background-color: rgba(0, 123, 255, 0.05);
    color: var(--primary-color);
    box-shadow: none;
}
button.btn {
    width: auto;
}
.btn-group > :first-child {
    margin-right: auto;
}
.btn-group > :last-child {
    margin-left: auto;
}
.btn-group > .btn-next {
    margin-left: auto;
}

/* RESPONSIVE DESIGN */
@media (max-width: 600px) {
    .main-form {
        padding: 25px 20px;
        margin: 1rem auto;
    }
    .step-title {
        font-size: 1.4rem;
    }
    .progress-step::after {
        display: none; /* Hide text on very small screens */
    }
    .radio-group, .checkbox-group {
        grid-template-columns: 1fr;
    }
    .btn-group {
        flex-direction: column-reverse;
        width: 100%;
        gap: 10px;
    }
    .btn {
        width: 100%;
        padding: 14px 20px;
    }
     .btn-group > :first-child, .btn-group > :last-child, .btn-group > .btn-next {
        margin: 0;
    }
    .btn-group .btn-prev {
        margin-top: 5px;
    }
    .main-content {
        padding-top: 10px;
        padding-bottom: 25px; 
    }
}

/* --- TOP BAR --- */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #212529;
    color: #f8f9fa;
    padding: 8px 0;
    font-weight: 400;
    text-align: center;
    z-index: 1050;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    font-size: medium;
}
.top-bar .stars {
    color: #FFC107;
    font-weight: bold;
    font-size: small;
}
.top-bar span {
    font-size: clamp(0.6rem, 2.5vw, 0.8rem); /* Responsive font size */
    white-space: nowrap; 
}

/* --- NEW: FORM STEP INFO BOX --- */
.form-step-info {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    padding: 1rem 1.5rem;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-style: italic;
    font-weight: 500;
    border-radius: 12px;
    margin-top: 2.5rem;
    text-align: center;
    line-height: 1.5;
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* --- NEW ANIMATION FOR SPLASH SCREEN INFO BOX --- */
@keyframes scrollBackground {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Specific style for the info box on the splash screen */
#splash-screen .form-step-info {
    background-image: linear-gradient(90deg, #e9ecef, #ffffff, #e9ecef);
    background-size: 250% auto;
    color: #343a40;
    font-style: normal;
    animation: pulse 2.5s infinite, scrollBackground 6s linear infinite;
}


/* --- NEW: Final Step Security Text --- */
.final-security-text {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
    margin-top: auto; 
    padding-top: 1.5rem;
}

/* Trust */
.trust-signals {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-top: 1.5rem;
}

.trust-signal-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.trust-icon {
    font-size: 1.2rem;
    color: #28a745;
}

/* --- Static Content Page Styles --- */
.content-section {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 30px 25px;
    max-width: 900px; /* Wider for text content */
    margin: 2rem auto;
}

@media (min-width: 768px) {
    .content-section {
        padding: 40px 50px;
    }
}

.content-section h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
    text-align: center;
}

.content-section h2 {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    font-weight: 700;
    color: var(--text-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-section p, .content-section li {
    font-size: 1rem;
    line-height: 1.7;
    color: #495057;
}

.content-section ul {
    padding-left: 20px;
    margin-bottom: 1.5rem;
}

.content-section p:not(:last-child) {
    margin-bottom: 1rem;
}

.footer__disclaimer-wrapper {
    background-color: #f8f9fa; /* Light background */
    padding: 20px 0;
    border-top: 1px solid #dee2e6;
}
.footer__disclaimer-wrapper p {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}
.footer__disclaimer-wrapper a {
    color: #495057;
    font-weight: 600;
    text-decoration: underline;
}
.footer__disclaimer-wrapper a:hover {
    color: #007bff;
}
