/* Main Styles */
@import 'variables.css';

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-light);
    color: var(--color-text-on-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Prevent horizontal scroll from marquee */
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--border-radius);
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

button,
input,
textarea {
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
}

/* -----------------------------------------------------------------------------
   Utility Classes
----------------------------------------------------------------------------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

.section-dark {
    background-color: var(--color-bg-dark);
    color: var(--color-text-on-dark);
    padding: var(--spacing-xxl) 0;
}

.section-light {
    background-color: var(--color-bg-light);
    color: var(--color-text-on-light);
    padding: var(--spacing-xxl) 0;
}

.text-muted-dark {
    color: var(--color-text-muted-dark);
}

.text-muted-light {
    color: var(--color-text-muted-light);
}

.pill-btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 999px;
    background-color: var(--color-accent);
    color: var(--color-bg-dark);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s, filter 0.2s;
    cursor: pointer;
}

.pill-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.outline-btn {
    background-color: transparent;
    border: 1px solid var(--color-text-on-dark);
    color: var(--color-text-on-dark);
}

.outline-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    filter: none;
}

.eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    margin-bottom: var(--spacing-sm);
    display: block;
}

/* -----------------------------------------------------------------------------
   Typography
----------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
}

/* -----------------------------------------------------------------------------
   Header
----------------------------------------------------------------------------- */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: var(--spacing-lg) 0;
    color: var(--color-text-on-dark);
    /* Always dark bg initially */
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    letter-spacing: 2px;
    font-weight: 700;
}

.main-nav {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-links a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* -----------------------------------------------------------------------------
   Hero Section (Asymmetric)
----------------------------------------------------------------------------- */
/* Special padding for hero to account for header */
.hero-section {
    padding-top: calc(var(--spacing-xxl) + 80px);
    min-height: 100vh;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr;
    /* Asymmetric ratio */
    gap: var(--spacing-xl);
    align-items: start;
}

.hero-left {
    padding-top: var(--spacing-xl);
}

.hero-statement {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-text-muted-dark);
    margin-top: var(--spacing-md);
}

.hero-center {
    position: relative;
    z-index: 1;
}

.hero-img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    filter: grayscale(20%) contrast(110%);
}

.hero-motion-visual {
    opacity: 0;
    animation: drift 6s ease-in-out infinite, fadeIn 1.5s ease-out forwards;
}

@keyframes drift {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hero-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-left: 1px solid var(--color-border-dark);
    padding-left: var(--spacing-lg);
}

.availability-block h4 {
    font-size: 0.9rem;
    color: var(--color-text-muted-dark);
    margin-bottom: var(--spacing-xs);
}

.availability-status {
    color: var(--color-accent);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
}

.hero-signature {
    font-family: 'Cinzel', serif;
    opacity: 0.5;
    margin-top: -10px;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.hero-author {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--color-text-on-dark);
    letter-spacing: 1px;
}

.hero-support {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-muted-dark);
    margin-bottom: var(--spacing-md);
    opacity: 0.8;
}

.studio-name {
    color: var(--color-text-on-dark);
    font-weight: 500;
}

.hero-cta-soft {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.hero-cta-soft:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.scroll-indicator {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    opacity: 0.6;
}

.scroll-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-muted-dark);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-text-muted-dark), transparent);
}

/* -----------------------------------------------------------------------------
   Featured Work Strip
----------------------------------------------------------------------------- */
.featured-strip {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding-bottom: var(--spacing-lg);
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.featured-strip::-webkit-scrollbar {
    display: none;
}

.strip-item {
    min-width: 300px;
    height: 400px;
    position: relative;
    flex-shrink: 0;
}

.strip-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.strip-label {
    position: absolute;
    bottom: var(--spacing-md);
    left: var(--spacing-md);
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    color: #000;
}

/* -----------------------------------------------------------------------------
   Philosophy Section
----------------------------------------------------------------------------- */
.phil-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.phil-content p {
    font-size: 1.25rem;
    max-width: 500px;
}

.phil-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--color-border-light);
}

.icon-col {
    text-align: center;
}

.circle-icon {
    width: 60px;
    height: 60px;
    border: 1px solid var(--color-text-on-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    font-size: 1.2rem;
}

/* -----------------------------------------------------------------------------
   Portfolio Collection
----------------------------------------------------------------------------- */
.portfolio-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-xl);
}

.portfolio-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.portfolio-mini-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.featured-project img {
    width: 100%;
    height: 700px;
    object-fit: cover;
}

.project-meta {
    margin-top: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* -----------------------------------------------------------------------------
   Flash Grid - Static Gallery
----------------------------------------------------------------------------- */
.flash-grid-wrapper {
    position: relative;
    width: 100%;
}

.flash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
    padding: var(--spacing-lg) 0;
    width: 100%;

    /* Collapsed State (Default) */
    max-height: 800px;
    /* Approx 2 rows */
    overflow: hidden;
    transition: max-height 0.6s ease-in-out;
}

.flash-grid.expanded {
    max-height: 4000px;
    /* Large enough to fit all content */
}

/* Fade Overlay */
.flash-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-bg-light));
    pointer-events: none;
    transition: opacity 0.4s;
}

.flash-fade-overlay.hidden {
    opacity: 0;
}

.view-more-container {
    text-align: center;
    margin-top: var(--spacing-md);
}

.outline-btn {
    background: transparent;
    border: 1px solid var(--color-text-on-light);
    color: var(--color-text-on-light);
}

.outline-btn:hover {
    background: var(--color-text-on-light);
    color: var(--color-bg-light);
}

.flash-item {
    height: 380px;
    background: #fff;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.flash-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.flash-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.flash-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 900px) {
    .flash-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .flash-item {
        height: 300px;
    }
}

@media (max-width: 600px) {
    .flash-grid {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------------------------------------------------------
   Booking (Dark)
----------------------------------------------------------------------------- */
.booking-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: left;
    margin-top: var(--spacing-lg);
}

.input-dark {
    background: transparent;
    border-bottom: 1px solid var(--color-text-muted-dark);
    padding: 12px 0;
    color: var(--color-text-on-dark);
    font-size: 1.1rem;
}

.input-dark:focus {
    border-bottom-color: var(--color-accent);
}

/* -----------------------------------------------------------------------------
   Footer
----------------------------------------------------------------------------- */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

.footer-credits {
    color: var(--color-text-muted-dark);
    font-size: 0.85rem;
    margin-top: var(--spacing-xl);
}

/* -----------------------------------------------------------------------------
   Animations
----------------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* -----------------------------------------------------------------------------
   Responsive
----------------------------------------------------------------------------- */
@media (max-width: 900px) {
    :root {
        --spacing-xxl: 80px;
        --spacing-xl: 50px;
        --spacing-lg: 30px;
        --spacing-md: 20px;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .site-header {
        position: relative;
        /* Let it flow naturally on mobile if needed, or keep absolute but manage spacing */
        padding: var(--spacing-md) 0;
        background: var(--color-bg-dark);
        /* Ensure readable on mobile if hero image is light/complex */
    }

    .header-inner {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .nav-links {
        gap: var(--spacing-md);
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-section {
        padding-top: var(--spacing-lg);
        min-height: auto;
        /* Allow content to dictate height on mobile */
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .hero-left {
        padding-top: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-right {
        border-left: none;
        padding-top: var(--spacing-lg);
        border-top: 1px solid var(--color-border-dark);
        border-bottom: 1px solid var(--color-border-dark);
        /* Add bottom border for separation */
        padding-left: 0;
        text-align: center;
    }

    .scroll-indicator {
        display: none;
        /* Start with hidden, maybe show if space permits, but usually distracting on small mobile */
    }

    .phil-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-grid div[style*="text-align:right;"] {
        text-align: center !important;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .marquee-item {
        width: 250px;
        height: 350px;
    }
}


/* -----------------------------------------------------------------------------
   Designer Modals & Booking
----------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Design Modal */
.design-modal {
    background: #fff;
    width: 95%;
    max-width: 1000px;
    height: auto;
    max-height: 90vh;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    color: #000;
    line-height: 1;
}

.design-modal-layout {
    display: flex;
    height: 100%;
    overflow-y: auto;
    /* Enable scrolling for the whole layout if needed */
}

@media (max-width: 768px) {
    .design-modal-layout {
        flex-direction: column;
    }

    .design-modal-image {
        min-height: 300px;
        flex: none;
    }

    .design-modal-info {
        padding: 30px 20px;
    }
}

.design-modal-image {
    flex: 1.5;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.design-modal-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.design-modal-info {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.modal-flash-id {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-muted-light);
    margin-bottom: 20px;
}

.modal-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--color-text-on-light);
}

.modal-constraints {
    margin-bottom: 40px;
    font-size: 0.9rem;
    color: var(--color-text-muted-light);
}

.modal-constraints ul {
    list-style: none;
}

.modal-constraints li::before {
    content: "•";
    margin-right: 8px;
    color: #ccc;
}

.primary-cta {
    width: 100%;
    text-align: center;
    background: #000;
    color: #fff;
    border: none;
}

.primary-cta:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Booking Modal */
.booking-modal {
    background: #fff;
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.booking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.booking-summary {
    display: flex;
    align-items: center;
    gap: 15px;
}

.booking-summary img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.designer-form .form-group {
    margin-bottom: 20px;
}

.designer-form label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--color-text-muted-light);
}

.input-minimal {
    width: 100%;
    border: none;
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    font-size: 1rem;
    background: transparent;
    transition: border-color 0.2s;
}

.input-minimal:focus {
    border-bottom-color: #000;
}

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

.size-selector {
    display: flex;
    gap: 10px;
}

.size-selector label {
    cursor: pointer;
    margin: 0;
}

.size-selector span {
    display: flex;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.size-selector input {
    display: none;
}

.size-selector input:checked+span {
    background: #000;
    color: #fff;
    border-color: #000;
}

.form-checks {
    margin: 30px 0;
}

.check-label {
    display: flex;
    gap: 10px;
    align-items: start;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--color-text-on-light);
    cursor: pointer;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .design-modal-layout {
        flex-direction: column;
    }

    .design-modal-image {
        height: 40%;
        flex: none;
    }

    .design-modal-info {
        padding: 30px;
        flex: 1;
    }

    .design-modal {
        height: 90vh;
    }
}

/* -----------------------------------------------------------------------------
   How It Works Page
----------------------------------------------------------------------------- */
.how-it-works-section {
    padding: var(--spacing-xxl) 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.how-it-works-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.hiw-header {
    margin-bottom: var(--spacing-xl);
}

.hiw-header h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-on-light);
}

.hiw-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted-light);
    font-weight: 300;
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-number {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--color-text-muted-light);
    margin-bottom: var(--spacing-xs);
    opacity: 0.6;
}

.step-title {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-on-light);
    font-weight: 500;
}

.step-desc {
    color: var(--color-text-muted-light);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
    font-size: 1rem;
}

.hiw-cta {
    margin-top: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.secondary-link {
    color: var(--color-text-muted-light);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.secondary-link:hover {
    border-color: var(--color-text-muted-light);
}

/* -----------------------------------------------------------------------------
   Booking Form (Dark Mode Extensions)
----------------------------------------------------------------------------- */
.booking-form label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--color-text-muted-dark);
}

.booking-form .form-group {
    margin-bottom: 25px;
}

.booking-form .help-text {
    font-size: 0.8rem;
    color: var(--color-text-muted-dark);
    opacity: 0.7;
    margin-top: 5px;
}

.input-dark {
    width: 100%;
    /* Ensure full width for selects/textareas */
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-text-muted-dark);
    padding: 12px 0;
    color: var(--color-text-on-dark);
    font-size: 1.1rem;
    font-family: inherit;
}

.input-dark:focus {
    outline: none;
    border-bottom-color: #fff;
}

/* Select overrides for dark mode */
select.input-dark {
    appearance: none;
    cursor: pointer;
    border-radius: 0;
}

select.input-dark option {
    background: #000;
    color: #fff;
}

/* File Input */
.input-dark.file-input {
    font-size: 0.9rem;
    padding: 10px 0;
}

/* Radio / Check overrides */
.radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label-dark {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-on-dark);
    cursor: pointer;
    font-size: 0.95rem;
    text-transform: none;
    /* Override label uppercase */
    letter-spacing: 0;
}

.check-label-dark {
    color: var(--color-text-on-dark) !important;
}

.size-selector-dark span {
    border-color: var(--color-text-muted-dark);
    color: var(--color-text-muted-dark);
}

.size-selector-dark input:checked+span {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* -----------------------------------------------------------------------------
   Custom Request Modal
----------------------------------------------------------------------------- */
/* Reuse .modal-overlay, .modal-close from existing styles */

.custom-modal {
    background: var(--color-bg-dark);
    /* Dark background for custom form */
    width: 100%;
    max-width: 650px;
    height: 90vh;
    /* Fixed height for scroll */
    border-radius: var(--border-radius-lg);
    position: relative;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-modal-content {
    padding: 40px;
    overflow-y: auto;
    /* Enable scrolling for long form */
    flex: 1;
}

.custom-modal h2 {
    color: var(--color-text-on-dark);
    margin-bottom: 10px;
}

/* Scrollbar refinement for modal */
.custom-modal-content::-webkit-scrollbar {
    width: 6px;
}

.custom-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.custom-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* -----------------------------------------------------------------------------
   Compact How It Works (Homepage Integration)
----------------------------------------------------------------------------- */
.compact-hiw-section {
    padding: var(--spacing-xl) 0;
    margin-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--color-border-light);
}

.compact-step-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    text-align: center;
    margin-top: var(--spacing-lg);
    position: relative;
}

/* The Continuous Line */
.compact-step-list::before {
    content: "";
    position: absolute;
    top: 45px;
    /* Position line below the number (approx between number and title) */
    left: 12%;
    right: 12%;
    height: 1px;
    background: var(--color-border-dark);
    opacity: 0.3;
    z-index: 0;
}

.compact-step-list .step-item {
    padding: 0 var(--spacing-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* The Number */
.compact-step-list .step-number {
    font-size: 1rem;
    margin-bottom: 25px;
    /* Space for the dot/line */
    opacity: 0.5;
    background: transparent;
    padding: 0;
    display: block;
}

/* The Dot (Point) */
.compact-step-list .step-item::after {
    content: "";
    position: absolute;
    top: 41px;
    /* Aligned with the line (45px center) */
    width: 9px;
    height: 9px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-text-on-light);
    border-radius: 50%;
    z-index: 2;
}

.compact-step-list .step-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    margin-top: 10px;
}

.compact-step-list .step-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 100%;
}

@media (max-width: 900px) {
    .compact-step-list {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    /* Hide horizontal line on mobile */
    .compact-step-list::before {
        display: none;
    }

    /* Hide dots on mobile or adjust? Let's hide them for cleaner stack */
    .compact-step-list .step-item::after {
        display: none;
    }

    .compact-step-list .step-number {
        margin-bottom: 5px;
    }
}

}
}

/* -----------------------------------------------------------------------------
   Section Header Utilities (Replaces Inline Styles)
----------------------------------------------------------------------------- */
.hiw-intro {
    text-align: center;
}

.hiw-intro h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-title-center {
    text-align: center;
    margin-bottom: 40px;
}

.section-desc-center {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px auto;
    color: var(--color-text-muted-light);
}

@media (max-width: 900px) {
    .section-title-center {
        margin-bottom: 20px;
    }

    .section-desc-center {
        margin-bottom: 30px;
        padding: 0 var(--spacing-sm);
    }
}

@media (max-width: 768px) {
    .custom-modal-content {
        padding: 20px;
        padding-top: 60px;
        /* Ensure content doesn't overlap with close button */
    }
}