:root {
    /* Colors */
    --primary: #40CFB5;
    --primary-hover: #36B09A;
    --foreground: #455A64;
    --secondary-foreground: #546E7A;
    --muted-foreground: #78909C;
    --background: #F2F4F7;
    --card: #FFFFFF;
    --border: #D9E0E7;
    --white: #FFFFFF;

    /* Typography */
    --font-heading: 'Bricolage Grotesque', sans-serif;
    --font-body: 'Bricolage Grotesque', sans-serif;

    /* Spacing */
    --container-width: 1128px;
    --header-height: 80px;
    --section-padding: 96px; /* py-24 */
    
    /* Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    z-index: 50;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
}

.desktop-logo {
    display: none;
}

.mobile-logo {
    display: block;
}

@media (min-width: 768px) {
    .desktop-logo {
        display: block;
    }
    
    .mobile-logo {
        display: none;
    }
}

.nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    display: none;
    flex-direction: column;
    padding: 24px;
    gap: 24px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.nav-menu.open {
    display: flex;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
        position: static;
        width: auto;
        border: none;
        background-color: transparent;
        flex-direction: row;
        padding: 0;
        gap: 32px;
        box-shadow: none;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--foreground);
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Privacy Policy & Text Pages */
.policy-section {
    padding-top: calc(var(--header-height) + 64px);
    padding-bottom: 96px;
}

.policy-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

.policy-container h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 32px;
    line-height: 1.2;
}

.policy-container h2 {
    font-size: 28px;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.policy-container h3 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.policy-container p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 24px;
    color: var(--foreground);
}

.policy-container ul {
    list-style-type: disc;
    padding-left: 24px;
    margin-bottom: 24px;
}

.policy-container li {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 8px;
    color: var(--foreground);
}

.policy-container hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 48px 0;
}

.policy-container a {
    color: var(--primary);
    text-decoration: underline;
}

.policy-container a:hover {
    color: var(--primary-hover);
}

.text-muted {
    color: var(--muted-foreground) !important;
}

.nav-link {
    font-size: 14px;
    font-weight: 400;
    color: var(--foreground);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-family: var(--font-body);
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}

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

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

.btn-lg {
    height: 40px;
    padding: 0 16px;
    font-size: 13px;
}

@media (min-width: 768px) {
    .btn-lg {
        padding: 0 24px;
        font-size: 14px;
    }
}

.btn-xl {
    height: 60px;
    padding: 0 32px;
    font-size: 16px;
    border-radius: 8px;
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 64px); /* pt-32 + header */
    padding-bottom: 64px;
    overflow: hidden;
    text-align: center;
}

@media (min-width: 768px) {
    .hero {
        padding-top: calc(var(--header-height) + 128px); /* md:pt-48 */
        padding-bottom: 128px;
    }
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
    line-height: 1.2;
}

.hero-title {
    font-size: 40px;
    font-weight: 400;
    color: var(--foreground);
    margin-bottom: 24px;
    line-height: 1.2;
    max-width: 936px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 64px;
    }
}

.text-rotator {
    display: inline-block;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 1;
    transform: translateY(0);
    position: relative;
    padding: 0 4px;
    z-index: 1;
    
    /* Brush Stroke Underline */
    /* Color: #89D9C8 (Soft Teal) */
    background-image: url("data:image/svg+xml,%3Csvg preserveAspectRatio='none' viewBox='0 0 100 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 14 C 20 14 50 12 100 14' stroke='%2389D9C8' stroke-width='18' stroke-linecap='butt' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 0.7em;
    background-position: center 88%;
}

.text-rotator.rotating-out {
    opacity: 0;
    transform: translateY(-20px);
}

.text-rotator.rotating-in {
    opacity: 0;
    transform: translateY(20px);
    transition: none;
}

.hero-description {
    font-size: 16px;
    line-height: 2;
    color: var(--secondary-foreground);
    margin-bottom: 48px;
    max-width: 744px;
    margin-left: auto;
    margin-right: auto;
    font-family: var(--font-body);
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
}

@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
    }
}

.link-with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 400;
    transition: opacity 0.2s;
}

.link-with-icon:hover {
    opacity: 0.8;
}

.hero-note {
    font-size: 14px;
    line-height: 2.3;
    color: var(--muted-foreground);
    margin-top: 32px;
    font-family: var(--font-heading);
}

/* Dashboard Preview */
.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 1204px;
    margin: 64px auto 0;
}

.hero-image-container {
    position: relative;
    width: 100%;
    padding-top: 54.53%; /* Aspect Ratio 1313/2408 */
    box-shadow: 0px 16px 32px -8px rgba(69, 90, 100, 0.2);
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Features Section */
.features {
    padding: var(--section-padding) 0;
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 100px; /* Vertical gap */
    max-width: 1048px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
        column-gap: 104px;
    }
}

.feature-item {
    display: flex;
    flex-direction: column;
}

.feature-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.2;
    font-family: var(--font-heading);
}

.feature-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 24px;
    line-height: 1.2;
    white-space: pre-line;
    max-width: 437px;
}

.feature-body {
    font-size: 16px;
    line-height: 2; /* Loose */
    color: var(--foreground);
    max-width: 472px;
    font-family: var(--font-heading);
    font-weight: 400;
}

/* Early Access Section */
.early-access {
    padding: var(--section-padding) 0;
    background-color: var(--background);
}

.section-header {
    text-align: center;
    max-width: 744px;
    margin: 0 auto 80px;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 16px;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 52px;
    }
}

.section-description {
    font-size: 16px;
    line-height: 2;
    color: var(--muted-foreground);
    font-family: var(--font-heading);
}

.form-card {
    max-width: 632px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.access-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-label {
    font-size: 16px;
    line-height: 2;
    font-weight: 400;
    color: var(--secondary-foreground);
    font-family: var(--font-heading);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--foreground);
    background-color: transparent;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.form-input, .form-select {
    height: 60px;
    padding: 0 16px;
}

.form-textarea {
    min-height: 120px;
    padding: 16px;
    resize: none;
}

.form-input::placeholder, .form-textarea::placeholder {
    color: var(--muted-foreground);
    font-size: 14px;
}

.select-wrapper {
    position: relative;
}

/* Custom Select styling arrow */
.select-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--muted-foreground);
    pointer-events: none;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.form-select:invalid {
    color: var(--muted-foreground);
}

.form-footer {
    text-align: center;
    font-size: 14px;
    line-height: 2.3;
    color: var(--muted-foreground);
    font-family: var(--font-heading);
}

.success-message {
    text-align: center;
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 16px;
}

.success-text {
    color: var(--muted-foreground);
    margin-bottom: 32px;
}

.hidden {
    display: none !important;
}

/* FAQ Section */
.faq {
    padding: var(--section-padding) 0;
    background-color: var(--background);
}

.accordion {
    max-width: 632px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.accordion-item {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 24px;
    overflow: hidden;
}

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 20px;
    font-weight: 700;
    color: var(--foreground);
    font-family: var(--font-heading);
    cursor: pointer;
}

.accordion-icon {
    width: 20px;
    height: 20px;
    color: var(--foreground);
    transition: transform 0.2s;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-body {
    padding-bottom: 24px;
    font-size: 16px;
    line-height: 2; /* Loose */
    color: var(--muted-foreground);
    font-family: var(--font-heading);
}

/* Footer */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
    background-color: var(--background);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-nav {
    display: flex;
    gap: 24px;
}

.footer-nav a {
    font-size: 14px;
    color: var(--muted-foreground);
    font-family: var(--font-body);
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--foreground);
}

.footer-copyright {
    font-size: 14px;
    color: var(--muted-foreground);
    font-family: var(--font-body);
}

.footer-social {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    transition: color 0.2s;
}

.footer-social a:hover {
    color: var(--foreground);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(69, 90, 100, 0.5); /* #455A64 with opacity */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    padding: 16px;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: var(--white);
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    position: relative;
    padding: 32px 24px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
    .modal-container {
        padding: 48px 64px;
    }
}

.modal-overlay.open .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color 0.2s;
    padding: 8px;
}

.modal-close:hover {
    color: var(--foreground);
}

.modal-header {
    text-align: center;
    margin-bottom: 40px;
}

.modal-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 16px;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .modal-title {
        font-size: 52px;
    }
}

.modal-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: var(--secondary-foreground);
    font-weight: 400;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 1024px) {
    .calculator-grid {
        grid-template-columns: 264px 361px;
        justify-content: center;
        gap: 64px;
    }
}

/* Calculator Inputs */
.calculator-inputs {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.radio-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-custom {
    height: 20px;
    width: 20px;
    background-color: var(--background);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: all 0.2s;
}

.radio-option input:checked ~ .radio-custom {
    border-color: var(--border);
    background-color: var(--background);
}

.radio-option input:checked ~ .radio-custom::after {
    content: "";
    position: absolute;
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--foreground);
}

.radio-label {
    font-size: 14px;
    color: var(--foreground);
}

/* Calculator Results */
.calculator-results {
    display: flex;
    flex-direction: column;
}

.result-header {
    margin-bottom: 32px;
}

.result-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 8px;
}

.result-value {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .result-value {
        font-size: 50px;
    }
}

.result-caption {
    font-size: 12px;
    color: var(--muted-foreground);
    line-height: 1.5;
}

.result-breakdown {
    margin-bottom: 32px;
}

.breakdown-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 16px;
}

.breakdown-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breakdown-list li {
    font-size: 16px;
    color: var(--foreground);
    line-height: 2;
}

.result-disclaimer {
    font-size: 12px;
    color: var(--muted-foreground);
    line-height: 1.5;
}

.modal-footer {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

@media (min-width: 1024px) {
    .modal-footer {
        border-top: none;
        padding-top: 0;
        max-width: 695px;
        margin-left: auto;
        margin-right: auto;
    }
}
