/* ============================================
   LANDING.CSS - Standalone CSS for Landing Pages
   ============================================ */

/* Declare layer order */
@layer tokens, base, components, utilities;

/* ============================================
   LAYER: TOKENS
   ============================================ */

@layer tokens {
        :root {

            --display-if-user: none;
            --display-if-guest: none;

            --bs-body-bg: hsl(277, 50%, 12%);
            --bs-body-color: lavender;
            --bs-heading-color: hsl(277, 50%, 95%);
            --bs-primary: hsl(282, 44%, 47%);
            --bs-success: hsl(134, 61%, 32%);

            --divider-color: lavender;
            --border-color: hsl(277, 50%, 30%);

            --color-health: hsl(173, 58%, 39%);
            --color-wealth: hsl(282, 44%, 47%);
            --color-relationships: hsl(355, 59%, 43%);
            --color-lifestyle: hsl(207, 99%, 35%);

            --color-body-darker: hsl(277, 50%, 90%);
    }
}

/* ============================================
   LAYER: BASE
   ============================================ */

@layer base {
    *, *::before, *::after {
        box-sizing: border-box;
    }

    /* Hide scrollbars */
    * {
        scrollbar-width: none;
    }
    html:has(body.use-scrollbars) {
        scrollbar-width: auto;
    }


    /* Layout */
    .page-container {
        min-height: 100vh;
    }

    .main-content {
        max-width: 1200px;
        margin-inline: auto;
        padding-inline: 1rem;
        margin-block: 3rem;
    }

    body {
        margin: 0;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        font-size: 1rem;
        line-height: 1.5;
        color-scheme: dark;
        background-color: var(--bs-body-bg);
        color: var(--color-body-darker);
    }

    header{
        position: sticky;
        top: 0;
        z-index: 1000;
        height: 4.2rem;
        background-color: var(--bs-body-bg);
        border-bottom: 1px solid var(--border-color);

        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 1rem;
        padding: 0.2rem 1rem;

        .header-right{
            justify-self: end;
        }

    }

    footer{
        text-align: center;
        padding: 1rem;
        font-size: 0.9rem;
        color: var(--bs-body-color);
        border-top: 1px solid var(--border-color);
        opacity: 0.8;
    }

    hr{
        margin-block: 3rem;
    }


    h1, h2, h3, h4 {
        color: var(--bs-heading-color);
        margin-top: 0;
        margin-bottom: 0.5rem;
        font-weight: 500;
        line-height: 1.2;
    }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.2rem; }

    p {
        color: var(--bs-body-color);
        margin-top: 0;
        margin-bottom: 1rem;
    }

    a {
        color: var(--bs-primary);
        text-decoration: none;
    }
    a:hover {
        text-decoration: underline;
    }


}

/* ============================================
   LAYER: COMPONENTS
   ============================================ */

@layer components {

    .logo {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-decoration: none;
        .logo-name {
            font-size: 1.5rem;
            font-weight: bold;
            color: hsl(from var(--bs-primary) h s 70%);
        }
        img {
            display: block;
            /* max-height: 3.5rem; */
            /* height: 56px; */
            /* width: 56px; */
            /* max-width: 100%; */
            /* object-fit: contain; */
        }
    }

    .nav-area {
        position: relative;
    }

    .nav-menu-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1.2rem;
        cursor: pointer;
        color: var(--bs-body-color);
        background: none;
        border: none;
        padding: 0.375rem 0.75rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background-color: var(--bs-body-bg);
        border: 1px solid var(--border-color);
        border-radius: 0.375rem;
        padding: 0.5rem 0;
        margin-top: 0.5rem;
        min-width: 200px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .nav-area:focus-within .nav-menu {
        display: block;
    }

    .nav-menu ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-menu li {
        text-align: right;
        margin: 0;
    }
    .nav-menu li[role="separator"] {
        height: 1px;
        background-color: var(--border-color);
        margin: 0.2rem 0;
    }

    .nav-menu a {
        display: block;
        padding: 0.5rem 1rem;
        color: var(--bs-body-color);
        text-decoration: none;
        transition: background-color 0.15s ease;
    }

    /* Glass Card */
    .glass {
        --background-color: black;
        background-color: hsl(from var(--background-color) h s 20% / 30%);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 10px;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .glass.section-card {
        padding: 2rem;
        margin: 2rem 0;
    }

    .h, .w, .r, .l {
        background-color: color-mix(in srgb, var(--background-color) 20%, transparent);   
    }
    .h { --background-color: var(--color-health); }
    .w { --background-color: var(--color-wealth); }
    .r { --background-color: var(--color-relationships); }
    .l { --background-color: var(--color-lifestyle); }

    /* Documentation specific styles */
    .section-heading {
        margin-top: 0;
        font-size: 1.8rem;
    }

    .subsection-heading {
        font-size: 1.3rem;
    }

    .subsection-heading-sm {
        font-size: 1.2rem;
        color: var(--bs-primary);
    }

    .content-box {
        margin-top: 2rem;
    }

    .content-box-sm {
        margin-top: 1.5rem;
    }

    .step-box {
        margin-top: 2rem;
        padding: 1.5rem;
        background: rgba(255,255,255,0.05);
        border-radius: 8px;
    }

    .step-box-sm {
        margin-top: 1.5rem;
        padding: 1.5rem;
        background: rgba(255,255,255,0.05);
        border-radius: 8px;
    }

    .step-box .subsection-heading,
    .step-box-sm .subsection-heading {
        margin-top: 0;
    }

    .info-box {
        margin-top: 1.5rem;
        padding: 1rem;
        border-radius: 4px;
        border-left: 3px solid;
    }

    .info-box.success {
        background: rgba(134, 239, 172, 0.1);
        border-left-color: var(--bs-success);
    }

    .info-box.tip {
        background: rgba(196, 113, 237, 0.1);
        border-left-color: var(--bs-primary);
    }

    .list-spaced {
        line-height: 2;
        padding-left: 1.5rem;
    }

    .list-normal {
        line-height: 1.8;
    }

    .list-compact {
        line-height: 1.8;
        margin: 0;
    }

    .text-intro {
        margin: 0 0 0.5rem 0;
        font-weight: 500;
    }

    .indent-content {
        margin-left: 1rem;
    }

    /* Buttons */
    .btn {
        display: inline-block;
        font-weight: 500;
        text-align: center;
        vertical-align: middle;
        cursor: pointer;
        user-select: none;
        padding: 0.375rem 0.75rem;
        font-size: 1rem;
        line-height: 1.5;
        border-radius: 0.375rem;
        border: 1px solid transparent;
        transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
        text-decoration: none;
    }

    .btn:hover {
        text-decoration: none;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1.2rem;
        border-radius: 0.5rem;
    }

    .btn-success {
        color: #fff;
        background-color: var(--bs-success);
        border-color: var(--bs-success);
    }

    .btn-success:hover {
        background-color: hsl(134, 61%, 28%);
        border-color: hsl(134, 61%, 25%);
    }

    .btn-outline-primary {
        color: hsl(from var(--bs-primary) h s 70%);
        border-color: var(--bs-primary);
        background-color: transparent;
    }

    .btn-outline-primary:hover {
        color: #fff;
        background-color: var(--bs-primary);
    }

    .btn-google {
        background-color: hsl(216, 85%, 35%);
        color: white;
        font-weight: bold;
        padding: 0.8rem 1.2rem;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        gap: 0.8rem;
        border: none;
        border-radius: 0.375rem;
        cursor: pointer;
        /* font-size: 1.2rem; */
        letter-spacing: 0.4px;
        transition: background-color 0.15s ease-in-out;
    }

    .btn-google:hover {
        background-color: hsl(216, 85%, 25%);
        color: white;
    }

    .google-icon {
        display: inline-block;
        width: 24px;
        height: 24px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath fill='%2334A853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath fill='%23FBBC05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath fill='%23EA4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Hero Section */
    .hero-section {
        margin: 5rem 0;
        padding: 3rem 1rem;
        text-align: center;
    }

    .hero-section.doc-page {
        margin-top: 2rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 8vw, 4rem);
        font-weight: bold;
        background: linear-gradient(135deg, #c471ed 0%, #f64f59 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 0.5rem;
    }

    .hero-title.doc-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .hero-subtitle {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
        color: var(--bs-heading-color);
        margin-bottom: 1.5rem;
        font-weight: 300;
        letter-spacing: 0.1em;
    }

    .hero-description {
        font-size: clamp(1rem, 3vw, 1.2rem);
        max-width: 600px;
        margin: 0 auto;
        opacity: 0.9;
        line-height: 1.6;
    }

    .hero-description.subdued {
        opacity: 0.8;
        font-size: 1rem;
    }

    /* Categories Grid */
    .grid-of-4 {
        display: grid;
        gap: 1.5rem;
        @media (min-width: 576px) {
            grid-template-columns: 1fr 1fr;
        }
        @media (min-width: 1200px) {
            grid-template-columns: 1fr 1fr 1fr 1fr;
        }
    }

    .categories-grid {
        margin: 2rem 0;
        padding: 0 1rem;
    }

    .category-card {
        text-align: center;
        padding: 2rem 1rem;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        cursor: default;
    }

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    }

    .category-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    }

    .category-card p {
        font-size: 0.95rem;
        opacity: 0.85;
        margin: 0;
    }

    /* Categories */
    .section-title {
        text-align: center;
        margin-bottom: 2rem;
        font-size: 2rem;
        font-weight: 500;
    }

    /* How It Works */
    .how-it-works {
        text-align: center;
        padding: 3rem 1rem;
        max-width: 1000px;
        margin: 0 auto;
    }

    .how-it-works h2 {
        margin-bottom: 3rem;
    }

    .steps {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }

    .step {
        padding: 1.5rem;
    }

    .step-number {
        width: 60px;
        height: 60px;
        background-color: var(--bs-primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.8rem;
        font-weight: bold;
        margin: 0 auto 1rem;
        color: var(--bs-heading-color);
    }

    .step h4 {
        margin-bottom: 0.75rem;
    }

    .step p {
        font-size: 0.95rem;
        opacity: 0.85;
        margin: 0;
    }

    /* CTA Section */
    .cta-section {
        text-align: center;
        padding: 3rem 1rem 4rem;
        max-width: 600px;
        margin: 0 auto;
    }

    .cta-section h2 {
        margin-bottom: 1rem;
    }

    .cta-section .btn-success {
        /* font-weight: bold; */
        display: inline-flex;
        align-items: center;
        gap: 0.7rem;
    }

    .divider-text {
        position: relative;
        text-align: center;
    }

    .divider-text::before,
    .divider-text::after {
        content: '';
        position: absolute;
        top: 50%;
        width: 40%;
        height: 1px;
        background: var(--divider-color);
        opacity: 0.3;
    }

    .divider-text::before { left: 0; }
    .divider-text::after { right: 0; }

    .divider-text span {
        background: var(--bs-body-bg);
        padding: 0 1rem;
        opacity: 0.6;
        font-size: 0.9rem;
    }

    li.unstyled{
        list-style: none;
        padding-left: 0.8rem;
        margin: 0;
    }

    .lead {
        font-size: 1.2rem;
        font-weight: 300;
        opacity: 0.9;
        margin-bottom: 1.5rem;
    }

    /* Alert Component */
    .alert {
        --color: hsl(0, 0%, 81%);
        position: relative;
        padding: 1rem 1.25rem;
        margin-bottom: 1rem;
        border: 1px solid;
        border-radius: 0.7rem;
        color: hsl(from var(--color) h s 95%);
        background-color: hsl(from var(--color) h s 50% / 20%);
        border-color: hsl(from var(--color) h s 50% / 35%);
        p {color: hsl(from var(--color) h s 90%);}
        h2 {margin-bottom: 1rem;}
    }
    .alert.alert-secondary {
        --color: hsl(0, 0%, 51%);
    }

    .alert.alert-success {
        --color: hsl(152, 50%, 44%);
    }
    .alert.alert-primary {
        --color: hsl(240, 45%, 57%);
    }
    .alert-plan.alert-primary{
        /* background-color: hsl(207, 100%, 12%); */
        border-color: hsl(207, 100%, 35%);
    }

    /* Mobile Optimizations */
    @media (max-width: 576px) {
        .hero-section {
            padding: 2rem 1rem;
        }
        
        .categories-grid {
            gap: 1rem;
        }
        
        .grid-of-4 {
            grid-template-columns: 1fr;
        }
        
        .steps {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }
        
        .cta-section {
            padding: 2rem 1rem 3rem;
        }
    }
}

/* ============================================
   LAYER: UTILITIES
   ============================================ */

@layer utilities {
    .visually-hidden {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    .text-center { text-align: center; }
    .mt-3 { margin-top: 1rem; }
    .mt-4 { margin-top: 1.5rem; }
    .mb-3 { margin-bottom: 1rem; }
    .mb-4 { margin-bottom: 1.5rem; }
    .my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
    .me-2 { margin-right: 0.5rem; }
    .small-note { font-size: 0.9rem; opacity: 0.8; }
    .unseparated { white-space: nowrap; }
    .balanced { text-wrap: balance; }
    .d-none { display: none; }
    .if-user, .is-user { display: var(--display-if-user); }
    .if-guest, .is-guest { display: var(--display-if-guest); }
    .d-md-block {
        display: none;
        @media (width>576px) {
            display: block ;
        }
    }
    .d-xxm-block {
        display: none;
        @media (width>400px) {
            display: block ;
        }
    }
    [class^=equal-columns]{
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        gap: 1rem;
    }
    .equal-columns-lg {
        @media (max-width: 992px) {
            grid-auto-flow: row;
            grid-auto-columns: auto;
        }
    }
}
