/* Material 3 Expressive Theme — looplog */
/* Palette sampled directly from the app's real UI + promo screenshots (see images/screenshot-*.png) */

:root {
    /* Neutral surfaces — true black base, matches the real app UI */
    --md-surface-dim: #000000;
    --md-surface: #000000;
    --md-surface-bright: #3A3A3A;
    --md-surface-container: #141414;
    --md-surface-container-low: #0A0A0A;
    --md-surface-container-high: #1E1E1E;
    --md-surface-container-highest: #262626;

    --md-on-surface: #F5F5F5;
    --md-on-surface-variant: #A3A3A3;
    --md-outline: #3D3D3D;
    --md-outline-variant: #2A2A2A;

    /* Primary interactive = neutral white pill, matches the app's real buttons */
    --md-primary: #F5F5F5;
    --md-primary-container: #262626;
    --md-on-primary: #0A0A0A;

    /* Expressive accent hues — sampled from images/screenshot-2/3/4/5/6.png */
    --md-accent-violet: #8048F8;
    --md-accent-violet-container: #2A1A4D;
    --md-accent-teal: #18C0B0;
    --md-accent-teal-container: #0A3B36;
    --md-accent-lime: #A6F13B;
    --md-accent-lime-container: #2E3B12;
    --md-accent-blue: #A0B8E0;
    --md-accent-blue-container: #262E42;
    --md-accent-gold: #F0C030;
    --md-accent-gold-container: #453A10;
    --md-accent-orange: #FF6B35;
    --md-accent-orange-container: #472314;

    --md-error: #F2B8B5;
    --md-error-container: #8C1D18;

    /* Motion */
    --md-ease-standard: cubic-bezier(0.2, 0, 0, 1);
    --md-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Material 3 Base Styles */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Google Sans Text', 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--md-surface);
    color: var(--md-on-surface);
}

html {
    scroll-behavior: smooth;
}

/* Material 3 State Layers (Official M3 Opacity Values) */
.state-layer {
    position: relative;
    overflow: hidden;
}

.state-layer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: currentColor;
    opacity: 0;
    transition: opacity 200ms var(--md-ease-standard);
}

.state-layer:hover::before {
    opacity: 0.08;
}

.state-layer:focus::before {
    opacity: 0.12;
}

.state-layer:active::before {
    opacity: 0.12;
}

/* Motion */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(245, 245, 245, 0.15);
    }
    50% {
        opacity: 0.9;
        box-shadow: 0 0 32px rgba(245, 245, 245, 0.28);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 420ms var(--md-ease-spring);
}

.animate-fadeInLeft {
    animation: fadeInLeft 420ms var(--md-ease-spring);
}

.animate-fadeInRight {
    animation: fadeInRight 420ms var(--md-ease-spring);
}

/* ===================================================================
   Material 3 Button Components
   =================================================================== */

.m3-btn-filled {
    position: relative;
    overflow: hidden;
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    height: 40px;
    padding: 0 24px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 1px 3px 1px rgb(0 0 0 / 15%);
    transition: all 260ms var(--md-ease-spring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 48px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.m3-btn-filled:hover {
    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 30%), 0px 4px 8px 3px rgb(0 0 0 / 15%);
    transform: translateY(-2px) scale(1.02);
}

.m3-btn-filled:active {
    box-shadow: none;
    transform: translateY(0) scale(0.98);
}

.m3-btn-tonal {
    position: relative;
    overflow: hidden;
    background-color: var(--md-surface-container-high);
    color: var(--md-on-surface);
    height: 40px;
    padding: 0 24px;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    box-shadow: none;
    transition: all 260ms var(--md-ease-spring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 48px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.m3-btn-tonal:hover {
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 1px 3px 1px rgb(0 0 0 / 15%);
    transform: translateY(-1px);
}

.m3-btn-elevated {
    position: relative;
    overflow: hidden;
    background-color: var(--md-surface);
    color: var(--md-on-surface);
    height: 40px;
    padding: 0 24px;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 1px 3px 1px rgb(0 0 0 / 15%);
    transition: all 260ms var(--md-ease-spring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 48px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.m3-btn-elevated:hover {
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 2px 6px 2px rgb(0 0 0 / 15%);
    transform: translateY(-1px);
}

.m3-btn-elevated:active {
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 1px 3px 1px rgb(0 0 0 / 15%);
}

.m3-btn-outlined {
    position: relative;
    overflow: hidden;
    background-color: transparent;
    color: var(--md-on-surface);
    height: 40px;
    padding: 0 24px;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    border: 1px solid var(--md-outline);
    box-shadow: none;
    transition: all 200ms var(--md-ease-standard);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 48px;
    cursor: pointer;
    text-decoration: none;
}

.m3-btn-outlined:hover {
    border-color: var(--md-on-surface);
}

.m3-btn-text {
    position: relative;
    overflow: hidden;
    background-color: transparent;
    color: var(--md-on-surface);
    height: 40px;
    padding: 0 12px;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    box-shadow: none;
    transition: all 200ms var(--md-ease-standard);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 48px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    position: relative;
    overflow: hidden;
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    height: 40px;
    padding: 0 24px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 1px 3px 1px rgb(0 0 0 / 15%);
    transition: all 260ms var(--md-ease-spring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 48px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 30%), 0px 4px 8px 3px rgb(0 0 0 / 15%);
    transform: translateY(-2px) scale(1.02);
}

/* ===================================================================
   Material 3 Card Components
   =================================================================== */

.m3-card-elevated {
    position: relative;
    background-color: var(--md-surface);
    border-radius: 16px;
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 1px 3px 1px rgb(0 0 0 / 15%);
    transition: all 300ms var(--md-ease-standard);
    overflow: hidden;
}

.m3-card-elevated:hover {
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 2px 6px 2px rgb(0 0 0 / 15%);
}

.m3-card-filled {
    position: relative;
    background-color: var(--md-surface-container-highest);
    border-radius: 16px;
    transition: all 300ms var(--md-ease-standard);
    overflow: hidden;
}

.m3-card-outlined {
    position: relative;
    background-color: var(--md-surface);
    border-radius: 16px;
    border: 1px solid var(--md-outline-variant);
    transition: all 200ms var(--md-ease-standard);
    overflow: hidden;
}

.m3-card-outlined:hover {
    border-color: var(--md-outline);
}

/* Feature Cards */
.feature-card {
    position: relative;
    background-color: var(--md-surface-container);
    border-radius: 32px;
    padding: 24px;
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 1px 3px 1px rgb(0 0 0 / 15%);
    transition: all 320ms var(--md-ease-spring);
}

.feature-card:hover {
    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 30%), 0px 4px 8px 3px rgb(0 0 0 / 15%);
    transform: translateY(-8px);
    background-color: var(--md-surface-container-high);
}

.feature-icon-container {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 320ms var(--md-ease-spring);
}

.feature-card:hover .feature-icon-container {
    transform: scale(1.12) rotate(-4deg);
}

.feature-icon {
    transition: transform 300ms var(--md-ease-standard);
}

/* Screenshot Frame — the promo images already carry their own color/shape,
   so this is a plain neutral frame rather than a colored gradient wrapper */
.screenshot-card {
    background-color: var(--md-surface-container);
    border-radius: 28px;
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 2px 6px 2px rgb(0 0 0 / 15%);
    overflow: hidden;
    transition: all 400ms var(--md-ease-spring);
    border: 1px solid var(--md-outline-variant);
}

.screenshot-card:hover {
    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 30%), 0px 4px 8px 3px rgb(0 0 0 / 15%);
    transform: translateY(-12px) scale(1.01);
    border-color: var(--md-outline);
}

/* ===================================================================
   Material 3 Chip Components
   =================================================================== */

.m3-chip {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 32px;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    transition: all 200ms var(--md-ease-standard);
    cursor: pointer;
}

.m3-chip-assist {
    background: var(--md-surface-container-high);
    color: var(--md-on-surface);
    border: 1px solid var(--md-outline-variant);
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 1px 3px 1px rgb(0 0 0 / 15%);
}

.m3-chip-assist:hover {
    background: var(--md-surface-bright);
    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 30%), 0px 4px 8px 3px rgb(0 0 0 / 15%);
    transform: translateY(-2px);
}

.m3-chip-filter {
    background-color: transparent;
    color: var(--md-on-surface);
    border: 1px solid var(--md-outline);
}

.m3-chip-filter.selected {
    background-color: var(--md-surface-container-high);
    color: var(--md-on-surface);
    border-color: transparent;
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 1px 3px 1px rgb(0 0 0 / 15%);
}

.m3-chip-input {
    background-color: transparent;
    color: var(--md-on-surface);
    border: 1px solid var(--md-outline);
}

.m3-chip-suggestion {
    background-color: transparent;
    color: var(--md-on-surface);
    border: 1px solid var(--md-outline);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 32px;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    transition: all 200ms var(--md-ease-standard);
}

.m3-chip-suggestion:hover {
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 1px 3px 1px rgb(0 0 0 / 15%);
}

/* ===================================================================
   Material 3 Badge Component
   =================================================================== */

.m3-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background-color: var(--md-error);
    color: #ffffff;
    border-radius: 9999px;
    font-size: 11px;
    line-height: 16px;
    font-weight: 500;
    letter-spacing: 0.1px;
}

.m3-badge-large {
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.1px;
}

.m3-badge-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    min-width: 0;
    background-color: var(--md-error);
    border-radius: 9999px;
}

/* ===================================================================
   Material 3 FAB
   =================================================================== */

.m3-fab {
    position: relative;
    overflow: hidden;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background-color: var(--md-surface-container-highest);
    color: var(--md-on-surface);
    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 30%), 0px 4px 8px 3px rgb(0 0 0 / 15%);
    transition: all 260ms var(--md-ease-spring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.m3-fab:hover {
    transform: scale(1.08);
}

.m3-fab:active {
    transform: scale(0.95);
}

.m3-fab-small {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: var(--md-surface-container-highest);
    color: var(--md-on-surface);
    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 30%), 0px 4px 8px 3px rgb(0 0 0 / 15%);
    transition: all 260ms var(--md-ease-spring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.m3-fab-large {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background-color: var(--md-surface-container-highest);
    color: var(--md-on-surface);
    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 30%), 0px 4px 8px 3px rgb(0 0 0 / 15%);
    transition: all 260ms var(--md-ease-spring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.m3-fab-extended {
    position: relative;
    overflow: hidden;
    width: auto;
    height: 56px;
    padding: 0 16px;
    border-radius: 16px;
    background-color: var(--md-surface-container-highest);
    color: var(--md-on-surface);
    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 30%), 0px 4px 8px 3px rgb(0 0 0 / 15%);
    transition: all 260ms var(--md-ease-spring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.m3-fab-extended:hover {
    transform: scale(1.05);
}

.m3-fab-extended:active {
    transform: scale(0.95);
}

/* ===================================================================
   Material 3 Icon Button
   =================================================================== */

.m3-icon-button {
    position: relative;
    overflow: hidden;
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background-color: transparent;
    color: var(--md-on-surface-variant);
    transition: all 200ms var(--md-ease-standard);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.m3-icon-button:hover {
    color: var(--md-on-surface);
}

.m3-icon-button-filled {
    background-color: var(--md-primary);
    color: var(--md-on-primary);
}

.m3-icon-button-tonal {
    background-color: var(--md-surface-container-high);
    color: var(--md-on-surface);
}

.m3-icon-button-outlined {
    border: 1px solid var(--md-outline);
}

/* ===================================================================
   Material 3 Divider
   =================================================================== */

.m3-divider {
    height: 1px;
    background-color: var(--md-outline-variant);
    border: 0;
}

.m3-divider-vertical {
    width: 1px;
    height: auto;
    background-color: var(--md-outline-variant);
    border: 0;
}

/* Hero Section — solid black, matches the real app + promo images */
.hero-gradient {
    background: var(--md-surface);
}

.hero-accent {
    color: var(--md-accent-lime);
    background: none;
    box-shadow: none;
}

/* Navigation — liquid glass material, floating pill (clear, not frosted) */
.nav-surface {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(10, 10, 10, 0.22);
    backdrop-filter: blur(10px) saturate(160%) contrast(105%);
    -webkit-backdrop-filter: blur(10px) saturate(160%) contrast(105%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 0 rgba(255, 255, 255, 0.06),
        0 8px 32px rgba(0, 0, 0, 0.35);
}

.nav-surface::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, 0.12), transparent 55%);
    pointer-events: none;
}

.nav-surface > * {
    position: relative;
}

.nav-link {
    position: relative;
    color: var(--md-on-surface-variant);
    padding: 8px 16px;
    border-radius: 8px;
    transition: color 200ms var(--md-ease-standard);
}

.nav-link:hover {
    color: var(--md-on-surface);
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background-color: var(--md-on-surface);
    opacity: 0;
    transition: opacity 200ms var(--md-ease-standard);
}

.nav-link:hover::before {
    opacity: 0.08;
}

/* Download Button */
.download-btn {
    position: relative;
    overflow: hidden;
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    border-radius: 9999px;
    padding: 16px 32px;
    box-shadow: 0px 1px 2px 0px rgb(0 0 0 / 30%), 0px 2px 6px 2px rgb(0 0 0 / 15%);
    transition: all 400ms var(--md-ease-spring);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 22px;
    line-height: 30px;
    text-decoration: none;
}

.download-btn:hover {
    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 30%), 0px 4px 8px 3px rgb(0 0 0 / 15%);
    transform: translateY(-2px) scale(1.02);
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.12), transparent);
    transition: left 600ms var(--md-ease-standard);
}

.download-btn:hover::before {
    left: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--md-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--md-surface-container-highest);
    border-radius: 6px;
    border: 2px solid var(--md-surface);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--md-accent-violet);
}

/* Mobile Menu Animation */
.mobile-menu {
    transition: all 300ms var(--md-ease-spring);
}

/* CTA Section */
.cta-section {
    position: relative;
    overflow: hidden;
    background: var(--md-surface-container);
    color: var(--md-on-surface);
    padding: 64px 0;
    border-radius: 32px;
    box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 30%), 0px 4px 8px 3px rgb(0 0 0 / 15%);
}

/* Responsive Typography */
@media (max-width: 640px) {
    .hero-title {
        font-size: 36px;
        line-height: 42px;
        font-weight: 700;
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 16px;
        line-height: 24px;
        font-weight: 400;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .hero-title {
        font-size: 45px;
        line-height: 50px;
        font-weight: 700;
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 16px;
        line-height: 24px;
        font-weight: 400;
    }
}

@media (min-width: 1025px) {
    .hero-title {
        font-size: 57px;
        line-height: 62px;
        font-weight: 700;
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 16px;
        line-height: 24px;
        font-weight: 400;
    }
}

/* ===================================================================
   M3 Expressive Shapes
   Real named shapes from the M3 Expressive shape library, matching what
   already appears in the app's own UI/promo art (day-pills, heatmap
   cells, sunburst icon). Used only on decorative/icon elements, never
   on text-bearing cards.
   =================================================================== */

.shape-clover {
    clip-path: url(#shape-clover4);
}

.shape-cookie-4 {
    clip-path: url(#shape-cookie4);
}

.shape-cookie-7 {
    clip-path: url(#shape-cookie7);
}

.shape-arch {
    clip-path: url(#shape-arch);
}

.shape-pentagon {
    clip-path: url(#shape-pentagon);
}

.shape-ghostish {
    clip-path: url(#shape-ghostish);
}

.shape-blob-decor {
    clip-path: url(#shape-clover4);
    filter: blur(48px);
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus States */
.focus-visible:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(166, 241, 59, 0.5);
}

*:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(166, 241, 59, 0.5);
    border-radius: 4px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}
