/* ==========================================================================
   IMPRINT — Minimal Apple-Inspired Design System
   ========================================================================== */

/* ===== CSS Variables ===== */
:root {
    /* Light Theme (Cool Neutral) */
    --bg-primary: #fbfbfd;
    --bg-card: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #e8e8ed;
    --bg-screenshot: transparent;

    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --text-tertiary: #86868b;

    --accent: #4f46e5;
    --accent-light: #6366f1;
    --accent-subtle: rgba(79, 70, 229, 0.08);
    --accent-border: rgba(79, 70, 229, 0.2);

    --border-color: rgba(0, 0, 0, 0.08);
    --separator: rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);

    --border-radius: 16px;
    --border-radius-lg: 24px;
    --border-radius-sm: 10px;

    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, sans-serif;
    --font-serif: "Instrument Serif", Georgia, serif;

    --line-height-tight: 1.08;
    --line-height-snug: 1.25;
    --line-height-relaxed: 1.55;

    --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Overrides (Neutral Dark Charcoal) */
html.dark-mode {
    --bg-primary: #0e0e11;
    --bg-card: #16161a;
    --bg-secondary: #1f1f24;
    --bg-tertiary: #28282e;
    --bg-screenshot: transparent;

    --text-primary: #f4f4f6;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;

    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-subtle: rgba(255, 255, 255, 0.06);
    --accent-border: rgba(255, 255, 255, 0.14);

    --border-color: rgba(255, 255, 255, 0.08);
    --separator: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.6);
}

/* Neutral Ambient Dark Mode Aura */
html.dark-mode body::before {
    content: "";
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.035) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
}

html.dark-mode body::after {
    content: "";
    position: fixed;
    bottom: -150px;
    right: 5%;
    width: 700px;
    height: 450px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    filter: blur(90px);
}

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

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

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: var(--line-height-relaxed);
    color: var(--text-secondary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.85rem;
    line-height: var(--line-height-tight);
    font-weight: 700;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 1.75rem;
    line-height: var(--line-height-snug);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

h3 {
    font-size: 1.2rem;
    line-height: var(--line-height-snug);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.25rem;
}

p:last-child {
    margin-bottom: 0;
}

em,
.accent-text {
    font-style: italic;
    font-family: var(--font-serif);
    font-weight: 400;
    color: var(--text-primary);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-light);
}

/* ===== Top Nav Bar (Inside Left Column) ===== */
.brand-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3.5rem;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    color: #111111;
    /* dark text for light mode */
    text-decoration: none;
    transition: color var(--transition-fast);
}

.brand-logo:hover {
    color: var(--accent);
}

html.dark-mode .brand-logo {
    color: white;
    /* match original logo.svg fill="white" exactly */
}

.brand-logo-img {
    height: 32px;
    /* reduced height as requested */
    width: auto;
    display: block;
    transition: transform var(--transition-fast);
}


.nav-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.theme-toggle-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-color: var(--accent-border);
    transform: scale(1.06);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
}

.moon-icon {
    display: block;
}

.sun-icon {
    display: none;
}

html.dark-mode .moon-icon {
    display: none;
}

html.dark-mode .sun-icon {
    display: block;
}

/* ===== Ambient Grid of Small Squares (Image Container) ===== */
:root {
    --grid-box-bg: rgba(0, 0, 0, 0.025);
    --grid-box-border: rgba(0, 0, 0, 0.035);
    --torch-accent: 79, 70, 229;
}

html.dark-mode {
    --grid-box-bg: rgba(255, 255, 255, 0.02);
    --grid-box-border: rgba(255, 255, 255, 0.03);
    --torch-accent: 99, 102, 241;
}

.ambient-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(26, 1fr);
    grid-template-rows: repeat(38, 1fr);
    gap: 3px;
    padding: 10px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.95;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, black 18%, black 82%, rgba(0, 0, 0, 0.25) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, black 18%, black 82%, rgba(0, 0, 0, 0.25) 100%);
}

.ambient-grid-cell {
    aspect-ratio: 1;
    border-radius: 2px;
    background: var(--grid-box-bg);
    border: 1px solid var(--grid-box-border);
    transition: background-color 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.ambient-grid-cell.torch {
    background-color: rgba(var(--torch-accent), calc(0.04 + var(--torch-factor, 0) * 0.22));
    border-color: rgba(var(--torch-accent), calc(0.06 + var(--torch-factor, 0) * 0.40));
}

.ambient-grid-cell.active {
    background: var(--accent-subtle);
    border-color: var(--accent-border);
}

/* ===== 2-Column Layout (50-50 Split) ===== */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.content-column {
    flex: 0 0 50%;
    width: 50%;
    padding: 80px 100px;
}

.screenshot-column {
    flex: 0 0 50%;
    width: 50%;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 60px;
    background: transparent;
    border-left: 1px solid var(--border-color);
    overflow: hidden;
    perspective: 1000px;
}

html.dark-mode .screenshot-column {
    background: transparent;
}

.screenshot-slider-viewport {
    width: 100%;
    max-width: 360px;
    position: relative;
    margin: 0 auto;
    text-align: center;
    perspective: 1000px;
}

.app-screenshot-sizer {
    width: 100%;
    height: auto;
    max-height: 82vh;
    object-fit: contain;
    position: relative;
    margin: 0 auto;
    display: block;
    visibility: hidden;
    opacity: 0 !important;
    pointer-events: none;
    user-select: none;
}

.screenshot-slider-viewport .app-screenshot {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    clip-path: inset(0 0 0 0);
    will-change: clip-path, opacity;
    user-select: none;
    -webkit-user-drag: none;
}

.screenshot-slider-viewport .app-screenshot.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

.mobile-screenshot-container {
    display: none;
    position: relative;
    overflow: hidden;
    background: transparent;
}

html.dark-mode .mobile-screenshot-container {
    background: transparent;
}

/* ===== Hero Section ===== */
.hero {
    padding: 20px 0 48px 0;
}

.hero-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-headline {
    font-size: 2.75rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.25rem;
    line-height: 1.6;
}

.cta-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.app-store-badge {
    display: inline-flex;
    align-items: center;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.app-store-badge:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

.app-store-badge img {
    width: 160px;
    height: auto;
}

.availability {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* ===== Section Divider ===== */
.section {
    padding: 44px 0;
    border-top: 1px dotted var(--separator);
}

.section:first-of-type {
    border-top: none;
}

/* ===== Clean Lists ===== */
.clean-list {
    list-style: none;
    margin: 1rem 0 1.5rem;
}

.clean-list li {
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 1rem;
    position: relative;
    padding-left: 24px;
}

.clean-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--text-tertiary);
    font-weight: 500;
}

.negative-list li::before {
    content: "✕";
    font-size: 0.75rem;
    color: var(--text-tertiary);
    top: 7px;
}

.examples-label {
    color: var(--text-tertiary);
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* ===== Steps Timeline ===== */
.steps {
    margin: 2rem 0;
}

.step {
    margin-bottom: 1.75rem;
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
}

.step:last-child {
    margin-bottom: 0;
}

.step .step-number {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.step p {
    margin-bottom: 0;
    font-size: 1rem;
}

/* ===== Borderless Feature Cards ===== */
.feature-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.feature-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--accent-border);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-subtle);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 18px;
    height: 18px;
}

.feature-card h3 {
    margin-bottom: 0;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== Pattern Recognition Tags ===== */
.pattern-tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem;
    margin-top: 1.25rem;
}

.pattern-tag-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.pattern-tag-card:hover {
    border-color: var(--accent-border);
    transform: translateY(-2px);
}

.pattern-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
    letter-spacing: -0.01em;
}

.pattern-badge.consistent {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.pattern-badge.clusters {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.pattern-badge.spread-out {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.25);
}

.pattern-badge.irregular {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.pattern-badge.low-activity {
    background: rgba(156, 163, 175, 0.14);
    color: #6b7280;
    border: 1px solid rgba(156, 163, 175, 0.25);
}

html.dark-mode .pattern-badge.consistent {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
}

html.dark-mode .pattern-badge.clusters {
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
}

html.dark-mode .pattern-badge.spread-out {
    background: rgba(249, 115, 22, 0.18);
    color: #fb923c;
}

html.dark-mode .pattern-badge.irregular {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
}

html.dark-mode .pattern-badge.low-activity {
    background: rgba(156, 163, 175, 0.18);
    color: #9ca3af;
}

.pattern-tag-card p {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.35;
    margin: 0;
}

/* ===== Interactive Habit Grid Widget ===== */
.interactive-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.1rem 1.75rem 1.5rem 1.75rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.widget-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.widget-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.widget-badge {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--accent-subtle);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 12px;
}

/* ===== Exact Imprint App Grid ===== */
.app-grid-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.app-grid-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

.app-grid-header {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* ===== Floating Cell Toast Chip (Appears above clicked future cell) ===== */
.cell-future-toast {
    position: absolute;
    transform: translateX(-50%) translateY(-4px) scale(0.92);
    background: #18181b;
    color: #f4f4f5;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
    white-space: nowrap;
}

html.dark-mode .cell-future-toast {
    background: #ffffff;
    color: #09090b;
    border-color: rgba(0, 0, 0, 0.15);
}

.cell-future-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.today-corner-badge {
    width: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-right: 0;
    margin-right: 4px;
    padding-bottom: 2px;
    line-height: 1;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    box-sizing: border-box;
}

.corner-day-num {
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 0.9;
    color: var(--accent);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.grid-habit-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 26px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.grid-habit-vertical-name {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 2px;
    white-space: nowrap;
    text-transform: uppercase;
    overflow: visible;
}

.grid-habit-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.app-grid-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.app-grid-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-grid-row.is-today {
    background: transparent;
    padding: 0;
}

.grid-row-date {
    width: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-right: 0;
    margin-right: 4px;
    border-right: 1px solid var(--border-color);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    box-sizing: border-box;
}

.grid-day-name {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    text-align: center;
}

.grid-day-num {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    width: 18px;
    text-align: center;
}

.app-grid-row.is-today .grid-day-name,
.app-grid-row.is-today .grid-day-num {
    color: var(--accent);
    font-weight: 800;
}

.grid-cell-btn {
    width: 26px;
    height: 26px;
    aspect-ratio: 1;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background var(--transition-fast), border-color var(--transition-fast);
}

/* Missed / Uncompleted state: subtle xmark for past/today days only */
.grid-cell-btn::after {
    content: "✕";
    font-size: 8px;
    font-weight: 800;
    color: var(--text-tertiary);
    opacity: 0.35;
}

.grid-cell-btn.active::after {
    display: none;
}

/* Future Day Cell: Faint background, NO xmark */
.app-grid-row.is-future .grid-cell-btn::after {
    display: none !important;
}

.app-grid-row.is-future .grid-cell-btn {
    cursor: not-allowed;
    opacity: 0.55;
}

/* Today Unfinished Cell: Subtle outline prompt */
.app-grid-row.is-today .grid-cell-btn:not(.active) {
    border-color: rgba(99, 102, 241, 0.45);
    background: var(--bg-card);
}

.grid-cell-btn:hover {
    transform: scale(1.15);
    z-index: 2;
}

/* App Habit Gradient Fills when Active (10 Subtle Muted Pastel Colors) */
.grid-cell-btn.habit-1.active {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    border-color: #6366f1;
    box-shadow: none;
}

.grid-cell-btn.habit-2.active {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-color: #3b82f6;
    box-shadow: none;
}

.grid-cell-btn.habit-3.active {
    background: linear-gradient(135deg, #10b981, #34d399);
    border-color: #10b981;
    box-shadow: none;
}

.grid-cell-btn.habit-4.active {
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
    border-color: #06b6d4;
    box-shadow: none;
}

.grid-cell-btn.habit-5.active {
    background: linear-gradient(135deg, #84cc16, #a3e635);
    border-color: #84cc16;
    box-shadow: none;
}

.grid-cell-btn.habit-6.active {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-color: #f59e0b;
    box-shadow: none;
}

.grid-cell-btn.habit-7.active {
    background: linear-gradient(135deg, #f97316, #fb923c);
    border-color: #f97316;
    box-shadow: none;
}

.grid-cell-btn.habit-8.active {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    border-color: #ec4899;
    box-shadow: none;
}

.grid-cell-btn.habit-9.active {
    background: linear-gradient(135deg, #f43f5e, #fb7185);
    border-color: #f43f5e;
    box-shadow: none;
}

.grid-cell-btn.habit-10.active {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    border-color: #8b5cf6;
    box-shadow: none;
}

/* ===== Stats Section ===== */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-box {
    text-align: center;
    padding: 1rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ===== Testimonials ===== */
.quotes-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.quote-card {
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.quote-card p {
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.quote-author {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ===== Footer ===== */
.footer {
    padding: 40px 0;
    border-top: 1px dotted var(--separator);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-credit {
    font-size: 0.88rem;
    color: var(--text-tertiary);
    margin: 0;
}

.footer-credit a {
    color: var(--text-secondary);
    text-decoration: underline;
}

.footer-credit a:hover {
    color: var(--accent);
}

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

.footer-separator {
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color var(--transition-fast);
}

/* ===== Lightweight 60fps Micro-Animations (Desktop Only) ===== */
@media (hover: hover) and (pointer: fine) {
    .grid-habit-icon {
        transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .grid-habit-column:hover .grid-habit-icon {
        transform: scale(1.1);
    }

    .stat-card,
    .widget-card {
        transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .stat-card:hover,
    .widget-card:hover {
        transform: translateY(-2px);
    }

    .app-store-badge,
    .btn-primary {
        transition: transform 0.15s ease;
    }

    .app-store-badge:hover,
    .btn-primary:hover {
        transform: translateY(-1px);
    }

    .grid-cell-btn:hover {
        transform: scale(1.15);
        z-index: 2;
    }
}

@media (max-width: 928px),
(hover: none) {

    .grid-habit-column:hover .grid-habit-icon,
    .stat-card:hover,
    .widget-card:hover,
    .app-store-badge:hover,
    .btn-primary:hover,
    .grid-cell-btn:hover {
        transform: none !important;
    }
}

/* ===== Content Static Visibility (No Scroll Animation) ===== */
.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

.reveal.active {
    opacity: 1;
    transform: none;
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 1100px) {
    .content-column {
        padding: 50px 60px;
    }

    .screenshot-column {
        padding: 40px 24px;
    }
}

@media (max-width: 928px) {
    body {
        padding: 0;
    }

    .layout-wrapper {
        flex-direction: column;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .content-column {
        flex: none;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        padding: 40px 44px;
    }

    .screenshot-column {
        display: none;
    }

    .hero {
        padding: 10px 0 16px 0;
    }

    .mobile-screenshot-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 8px 0 20px 0;
        padding: 8px 0 20px 0;
        background: transparent;
        border-top: none;
        border-bottom: none;
        text-align: center;
        box-sizing: border-box;
    }

    html.dark-mode .mobile-screenshot-container {
        background: transparent;
    }

    .mobile-screenshot-container .ambient-grid-overlay {
        display: none !important;
    }

    .mobile-screenshot-container+.section {
        border-top: none !important;
    }

    .mobile-screenshot-container .screenshot-slider-viewport {
        width: 100%;
        margin: 0 auto;
        text-align: center;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .content-column {
        padding: 32px 28px;
    }

    .interactive-widget {
        padding: 0.75rem 10px 1rem 18px;
        margin: 1rem 0;
        width: 100%;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        box-sizing: border-box;
    }

    /* Hide habits 9 & 10 on 640px screens so card fits available width */
    .grid-habit-column:nth-child(n+10),
    .grid-cell-btn.habit-9,
    .grid-cell-btn.habit-10 {
        display: none !important;
    }

    .today-corner-badge,
    .grid-row-date {
        width: 58px;
        padding-right: 0;
        margin-right: 4px;
    }

    .corner-day-num {
        font-size: 1.7rem;
    }

    .corner-month-name {
        font-size: 0.62rem;
    }

    .grid-habit-column {
        width: 28px;
    }

    .grid-habit-icon {
        width: 28px;
        height: 28px;
        font-size: 13px;
        border-radius: 7px;
    }

    .grid-cell-btn {
        width: 28px;
        height: 28px;
        border-radius: 7px;
    }

    .grid-habit-vertical-name {
        height: 85px;
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .content-column {
        padding: 28px 16px;
    }

    .interactive-widget {
        padding: 0.65rem 8px 0.85rem 16px;
        margin: 0.75rem 0;
        width: 100%;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        box-sizing: border-box;
    }

    /* Hide habits 8, 9 & 10 on 480px phone screens so card fits 100% without horizontal scroll */
    .grid-habit-column:nth-child(n+9),
    .grid-cell-btn.habit-8,
    .grid-cell-btn.habit-9,
    .grid-cell-btn.habit-10 {
        display: none !important;
    }

    .mobile-screenshot-container {
        margin: 8px 0 20px 0;
        padding: 8px 0 20px 0;
    }

    h1,
    .hero-headline {
        font-size: 1.95rem;
        line-height: 1.25;
    }

    h2 {
        font-size: 1.35rem;
    }

    .today-corner-badge,
    .grid-row-date {
        width: 58px;
    }

    .corner-day-num {
        font-size: 1.6rem;
    }

    .grid-day-name {
        font-size: 0.62rem;
    }

    .grid-day-num {
        font-size: 0.8rem;
    }

    .grid-habit-column {
        width: 28px;
    }

    .grid-habit-icon {
        width: 28px;
        height: 28px;
        font-size: 13px;
        border-radius: 7px;
    }

    .grid-cell-btn {
        width: 28px;
        height: 28px;
        border-radius: 7px;
    }

    .app-grid-header {
        gap: 6px;
    }

    .app-grid-row {
        gap: 6px;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}