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

:root {
    /* Colors - note the off-white background */
    --text-primary: #0a0a0a;
    --text-secondary: #4a4a4a;
    --text-tertiary: #7a7a7a;
    --bg-primary: #fafaf8;  /* Off-white with slight warmth */
    --bg-card: #ffffff;     /* Pure white for cards */
    --bg-subtle: #f5f5f2;   /* Slightly darker off-white */
    --border-light: #e8e8e4;
    --accent: #AD71F2;
    --accent-dark: #8B4DBF;
    
    /* Typography - More differentiated */
    --font-serif: 'Georgia', 'Garamond', 'Times New Roman', serif;
    --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    
    /* Spacing - More generous */
    --space-xs: 0.75rem;
    --space-sm: 1.25rem;
    --space-md: 2.5rem;
    --space-lg: 5rem;
    --space-xl: 10rem;
    
    /* Layout */
    --max-width: 1200px;
    --header-height: 80px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 19px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Heroicons */
.hero-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-mark {
    height: 1.5rem;
    width: auto;
}

.logo-type {
    font-family: Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.logo-dot {
    color: #AD71F2;
    font-size: 0.5em;
    vertical-align: middle;
}

nav.desktop-nav {
    display: flex;
    gap: var(--space-lg);
}

/* Mobile navigation - hidden by default */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 0;
    gap: 0;
    width: 100%;
    margin-bottom: var(--space-sm);
}

.mobile-nav a {
    padding: var(--space-sm) var(--space-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: color 0.2s ease;
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--accent);
}

/* Mobile controls container */
.mobile-controls {
    display: none;
    align-items: center;
    gap: var(--space-xs);
}

/* Mobile dark mode toggle */
.mobile-dark-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.mobile-dark-mode-toggle:hover {
    background: var(--bg-subtle);
}

.mobile-dark-mode-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
    transition: all 0.3s ease;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

nav.desktop-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
    position: relative;
}

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

nav.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

nav.desktop-nav a:hover::after,
nav.desktop-nav a.active::after {
    transform: scaleX(1);
}

/* Main content spacing for fixed header */
main {
    padding-top: var(--header-height);
}

/* Hero Section */
.hero {
    padding: var(--space-xl) 0 var(--space-xl);
    text-align: center;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
    font-family: var(--font-serif);
}

.hero h1::before {
    content: "●";
    color: transparent;
    margin-right: 0.2em;
    font-size: 0.5em;
    vertical-align: -0.075em;
}

.hero h1::after {
    content: "●";
    color: #AD71F2;
    margin-left: 0.2em;
    font-size: 0.5em;
    vertical-align: -0.075em;
}

.hero-secondary {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-family: var(--font-serif);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.hero .subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 750px;
    margin: 0 auto var(--space-lg);
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: 0;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: var(--space-sm) var(--space-lg);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn:hover {
    transform: scale(1.01);
}

.btn-primary {
    background: #2a2a2a;
    color: #f8f8f6;
    border: 2px solid #2a2a2a;
}

.btn-primary:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.btn-secondary {
    background: #f8f8f6;
    color: #2a2a2a;
    border: 2px solid #2a2a2a;
}

.btn-secondary:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

/* Products Section */
.products {
    padding: var(--space-lg) 0;
    background: var(--bg-subtle);
    position: relative;
}


.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: var(--space-sm);
    font-family: var(--font-serif);
    letter-spacing: -0.02em;
}

.section-title::after {
    content: "●";
    color: #AD71F2;
    margin-left: 0.2em;
    font-size: 0.6em;
    vertical-align: -0.075em;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.3rem;
    font-weight: 300;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding: 10px;
}

.product-card {
    background: var(--bg-card);
    padding: var(--space-md) var(--space-md) var(--space-md);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border-light);
    border-top: 4px solid transparent;
    border-radius: 8px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Press card coral accents */
.product-card:first-of-type:hover {
    border-top: 4px solid #FF6B6B;
}

.product-card:first-of-type .product-url:hover {
    color: #FF6B6B;
}

.product-card:first-of-type .product-features li::before {
    color: #FF6B6B;
}

.product-card:first-of-type .btn-primary:hover {
    background: #FF6B6B;
    border-color: #FF6B6B;
}

/* Hero Press button coral hover */
.hero-cta .btn-primary:hover {
    background: #FF6B6B;
    border-color: #FF6B6B;
}

/* Hero buttons with outlined treatment */
.hero-cta .btn-primary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid #FF6B6B;
}

.hero-cta .btn-primary:hover {
    background: #FF6B6B;
    color: #ffffff;
    border-color: #FF6B6B;
}

.hero-cta .btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid #4A90E2;
}

.hero-cta .btn-secondary:hover {
    background: #4A90E2;
    color: #ffffff;
    border-color: #4A90E2;
}

/* Studio card blue accents */
.product-card:last-of-type:hover {
    border-top: 4px solid #4A90E2;
}

.product-card:last-of-type .product-url:hover {
    color: #4A90E2;
}

.product-card:last-of-type .product-features li::before {
    color: #4A90E2;
}

.product-card:first-of-type .btn-primary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid #FF6B6B;
}

.product-card:first-of-type .btn-primary:hover {
    background: #FF6B6B;
    color: #ffffff;
    border-color: #FF6B6B;
}

.product-card:last-of-type .btn-primary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid #4A90E2;
}

.product-card:last-of-type .btn-primary:hover {
    background: #4A90E2;
    color: #ffffff;
    border-color: #4A90E2;
}


.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.product-logo-container {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.product-logo {
    height: 1.5rem;
    width: auto;
}

.product-logo-type {
    font-family: Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.status-badge {
    font-size: 0.7rem;
    font-weight: 400;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-family: var(--font-sans);
    letter-spacing: 0.02em;
    display: inline-block;
}

.status-badge-beta {
    color: #059669;
    border: 1px solid #059669;
    background: rgba(5, 150, 105, 0.05);
}

.status-badge-dev {
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
    background: rgba(74, 74, 74, 0.05);
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-sm);
}

.product-url {
    font-size: 0.8rem;
    color: #a3a3a3;
    font-family: var(--font-sans);
    font-weight: 300;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 4px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.product-url:hover {
    color: var(--text-secondary);
}

.product-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    font-style: italic;
    font-weight: 300;
}

.product-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.product-features {
    list-style: none;
    font-size: 1rem;
    color: var(--text-secondary);
}

.product-features li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
}

.product-features li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 300;
}

.product-cta {
    margin-top: var(--space-md);
    display: inline-block;
    align-self: flex-start;
}

/* Philosophy Section */
.philosophy {
    padding: var(--space-lg) 0;
    background: var(--bg-subtle);
    position: relative;
}


.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding: 5px;
}

.pillar {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.pillar:nth-child(2) {
    flex-direction: row-reverse;
}

.pillar:nth-child(2) .pillar-content {
    text-align: right;
}

.pillar:nth-child(4) {
    flex-direction: row-reverse;
}

.pillar:nth-child(4) .pillar-content {
    text-align: right;
}

.pillar-visual {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: var(--bg-subtle);
    border-radius: 50%;
    border: 2px solid var(--border-light);
}

.pillar-content {
    flex: 1;
    text-align: left;
    min-width: 0; /* Allows flex item to shrink below content size */
}


.pillar::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pillar:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

.pillar:hover::before {
    opacity: 1;
}

.pillar:hover .pillar-visual {
    background: rgba(173, 113, 242, 0.1);
}

.pillar-icon {
    width: 3.5rem;
    height: 3.5rem;
    opacity: 0.8;
}

.pillar-name {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.pillar-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* About Section */
.about {
    padding: var(--space-lg) 0;
    background: var(--bg-primary);
    position: relative;
}


.about-content {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.8;
    font-size: 1.15rem;
}

.about-content p:first-of-type {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 300;
    font-family: var(--font-serif);
    font-style: italic;
    margin-bottom: var(--space-lg);
}

/* Why Aris Exists Section */
.why-exists {
    padding: var(--space-lg) 0;
    background: var(--bg-primary);
}

.why-exists .section-header {
    margin-bottom: var(--space-sm);
}

.problem-solutions {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
}

.problem-solution {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    column-gap: var(--space-lg);
    row-gap: 0;
    align-items: center;
    padding: var(--space-md);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.problem-solution:hover {
    background: rgba(173, 113, 242, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.problem {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: right;
    font-style: italic;
}

.arrow {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.solution {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 400;
}

/* Join the Movement Section */
.join-movement {
    padding: var(--space-lg) 0;
    background: var(--bg-subtle);
}

.movement-pathways {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.pathway {
    background: var(--bg-card);
    padding: var(--space-lg);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all 0.3s ease;
}

.pathway:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.pathway-title {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
    font-family: var(--font-serif);
}

.pathway-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.community-links {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.community-links .pathway-cta {
    flex: 1;
    min-width: max-content;
    white-space: nowrap;
}

.pathway-cta {
    margin: 0;
}

/* Blog Styles */
.blog-hero {
    padding: var(--space-lg) 0;
    text-align: center;
    background: var(--bg-subtle);
}

.blog-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.blog-posts {
    padding: var(--space-xl) 0;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.post-preview {
    background: var(--bg-card);
    padding: var(--space-lg);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.post-preview:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

.post-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: var(--space-xs);
    font-family: var(--font-serif);
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: var(--accent-dark);
}

.post-meta {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.read-more {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: var(--accent-dark);
}

/* Single Post */
.post {
    padding: var(--space-lg) 0;
}

.post-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.post-content {
    max-width: 750px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h1 {
    font-size: 2.5rem;
    font-weight: 400;
    margin: var(--space-lg) 0 var(--space-md);
    font-family: var(--font-serif);
}

.post-content h2 {
    font-size: 2rem;
    font-weight: 400;
    margin: var(--space-lg) 0 var(--space-md);
    font-family: var(--font-serif);
}

.post-content h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: var(--space-md) 0 var(--space-sm);
}

.post-content p {
    margin-bottom: var(--space-md);
}

.post-content ul,
.post-content ol {
    margin: 0 0 var(--space-md) var(--space-md);
}

.post-content li {
    margin-bottom: var(--space-xs);
}

.post-content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: var(--space-md);
    margin: var(--space-md) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.post-content code {
    background: var(--bg-subtle);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--bg-subtle);
    padding: var(--space-md);
    overflow-x: auto;
    border-radius: 4px;
    margin-bottom: var(--space-md);
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.post-content a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.back-to-top:hover .hero-icon {
    color: white;
}

.back-to-top .hero-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* Footer */
footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-light);
    background: var(--bg-primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-links {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    :root {
        font-size: 17px;
        --space-xl: 4rem;
        --space-lg: 2.5rem;
        --space-md: 2rem;
        --space-sm: 1rem;
        --header-height: 70px;
    }

    /* Mobile header with hamburger menu */
    header {
        min-height: var(--header-height);
    }

    .header-content {
        height: var(--header-height) !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .header-right {
        display: flex !important;
        align-items: center !important;
    }

    .logo {
        font-size: 1.4rem;
        gap: 6px;
    }

    .logo-mark {
        height: 1.29rem; /* Scales with logo-type: 1.5/1.75 = 0.857, so 1.5 * 0.857 = 1.29 */
    }
    
    .logo-type {
        font-size: 1.5rem;
    }

    .logo-dot {
        font-size: 0.4em;
    }

    /* Hide desktop nav on mobile */
    nav.desktop-nav {
        display: none !important;
    }

    /* Show mobile controls */
    .mobile-controls {
        display: flex !important;
    }

    /* Mobile nav when active */
    .mobile-nav.active {
        display: flex;
    }

    /* Darken all content when mobile menu is open */
    body.mobile-menu-open::after {
        content: '';
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 500;
        transition: opacity 0.15s ease;
        pointer-events: none;
    }

    /* Reset main padding to normal header height */
    main {
        padding-top: var(--header-height);
    }

    /* Hero optimizations */
    .hero {
        padding: var(--space-lg) 0;
        min-height: auto;
        text-align: center;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 8vw, 2.8rem);
        line-height: 1.1;
        margin-bottom: var(--space-md);
    }

    .hero-secondary {
        font-size: 1.6rem;
        margin-bottom: var(--space-sm);
    }
    .hero .subtitle {
        font-size: 1.2rem;
        margin-bottom: var(--space-lg);
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: var(--space-sm) var(--space-md);
        font-size: 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Section spacing optimizations */
    .section-header {
        margin-bottom: var(--space-lg);
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: var(--space-sm);
    }

    .section-subtitle {
        font-size: 1.1rem;
    }

    /* Product cards mobile optimization */
    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .product-card {
        padding: var(--space-md);
    }

    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    .product-logo {
        height: 1.5rem;
        width: auto;
    }
    
    .product-logo-type {
        font-size: 1.3rem;
    }
    .status-badge {
        font-size: 0.65rem;
        padding: 0.1rem 0.4rem;
    }
    
    .product-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-xs);
    }

    .product-url {
        font-size: 0.85rem;
    }

    .product-tagline {
        font-size: 1rem;
    }

    .product-description {
        font-size: 0.95rem;
    }

    .product-features {
        font-size: 0.9rem;
    }



    .pillars {
        display: flex;
        flex-direction: column;
        gap: var(--space-lg);
        margin-top: 0;
        margin-bottom: var(--space-xl);
    }

    .pillar {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: var(--space-lg);
        max-width: 400px;
        margin: 0 auto;
    }

    .pillar:nth-child(2),
    .pillar:nth-child(4) {
        flex-direction: column;
    }

    .pillar-content,
    .pillar:nth-child(2) .pillar-content,
    .pillar:nth-child(4) .pillar-content {
        text-align: center;
    }

    .pillar-visual {
        width: 100px;
        height: 100px;
        margin-bottom: var(--space-md);
    }

    .pillar-icon {
        width: 3rem;
        height: 3rem;
    }

    .pillar-name {
        font-size: 1.2rem;
        margin-bottom: var(--space-sm);
    }

    .pillar-description {
        font-size: 1rem;
    }

    /* About section */
    .about-content p {
        font-size: 1.1rem;
    }

    .about-content p:first-of-type {
        font-size: 1.3rem;
    }
    
    /* Why Aris Exists mobile */
    .problem-solution {
        grid-template-columns: 1fr;
        column-gap: var(--space-lg);
        row-gap: 0;
        text-align: center;
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .problem {
        text-align: center;
        margin-bottom: var(--space-xs);
    }
    
    .arrow {
        transform: rotate(90deg);
        margin: var(--space-xs) 0;
    }
    
    .solution {
        margin-top: var(--space-xs);
    }
    
    /* Join the Movement mobile */
    .movement-pathways {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .pathway {
        padding: var(--space-md);
    }
    
    .community-links {
        flex-direction: column;
        align-items: center;
    }

    /* Blog optimizations */
    .blog-container {
        padding: 0 var(--space-sm);
    }

    .post-preview {
        padding: var(--space-md);
    }

    .post-title {
        font-size: 1.6rem;
        margin-bottom: var(--space-xs);
    }

    .post-content {
        font-size: 1.05rem;
        line-height: 1.7;
    }

    .post-content h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: var(--space-md);
    }

    .post-content h2 {
        font-size: 1.6rem;
        margin: var(--space-md) 0 var(--space-sm);
    }

    .post-content h3 {
        font-size: 1.3rem;
        margin: var(--space-sm) 0 var(--space-xs);
    }

    /* Back to top button mobile positioning */
    .back-to-top {
        bottom: var(--space-sm);
        right: var(--space-sm);
        width: 44px;
        height: 44px;
    }

    .back-to-top .hero-icon {
        width: 18px;
        height: 18px;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }

    .footer-links {
        gap: var(--space-sm);
        justify-content: center;
    }

    .footer-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0.5rem;
    }

    /* 404 page mobile */
    .hero.container {
        padding: var(--space-md) var(--space-sm);
    }

    /* Container mobile optimization */
    .container {
        padding: 0 var(--space-sm);
    }

    /* Improved section padding for mobile */
    .products,
    .why-exists,
    .philosophy,
    .about,
    .join-movement {
        padding: var(--space-lg) 0;
    }

    .blog-hero {
        padding: var(--space-md) 0;
    }

    .blog-posts {
        padding: var(--space-lg) 0;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    :root {
        font-size: 16px;
        --space-xl: 3rem;
        --space-lg: 2rem;
        --space-md: 1.5rem;
    }

    /* Ultra-compact header for very small screens */
    .header-content {
        flex-direction: column;
        height: auto;
        padding: var(--space-xs) 0;
        gap: var(--space-xs);
    }

    .logo {
        font-size: 1.4rem;
    }

    .logo-mark {
        height: 1.11rem; /* Scales with logo-type: 1.3/1.75 = 0.743, so 1.5 * 0.743 = 1.11 */
    }
    
    .logo-type {
        font-size: 1.3rem;
    }

    nav {
        width: 100%;
        justify-content: center;
        gap: var(--space-sm);
    }

    nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    /* Adjust main padding for smaller header */
    main {
        padding-top: calc(var(--header-height) + 20px);
    }

    .hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.2rem);
    }

    .hero-secondary {
        font-size: 1.4rem;
    }

    .hero .subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .product-name {
        font-size: 1.4rem;
    }

    .pillar-name {
        font-size: 1.1rem;
    }

    /* Container extra small screens */
    .container {
        padding: 0 1rem;
    }

    /* Ensure readable line lengths on very small screens */
    .about-content,
    .post-content {
        max-width: 100%;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .product-card:hover,
    .pillar:hover,
    .post-preview:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    }

    /* Better focus states for touch */
    nav a:focus,
    .btn:focus,
    .back-to-top:focus {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

    /* Larger touch targets for very small elements */
    .logo-dot {
        padding: 2px;
    }
}

/* Dark Mode Toggle - Desktop Only */
.dark-mode-toggle {
    position: fixed;
    bottom: calc(var(--space-md) + 60px);
    right: var(--space-md);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--bg-card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

/* Hide desktop dark mode toggle on mobile */
@media (max-width: 768px) {
    .dark-mode-toggle {
        display: none;
    }
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.dark-mode-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
    transition: all 0.3s ease;
}

/* Dark Mode Styles */
[data-theme="dark"] {
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;
    --bg-primary: #0f0f0d;
    --bg-card: #1a1a18;
    --bg-subtle: #141412;
    --border-light: #2a2a26;
}

[data-theme="dark"] header {
    background: rgba(15, 15, 13, 0.92);
}

[data-theme="dark"] .product-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .pillar:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .back-to-top:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .back-to-top .hero-icon {
    filter: invert(1);
}

[data-theme="dark"] .dark-mode-toggle {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .dark-mode-toggle:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* Dark mode button treatments for Join the Movement */
[data-theme="dark"] .pathway-cta.btn-primary {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(173, 113, 242, 0.2);
}

[data-theme="dark"] .pathway-cta.btn-primary:hover {
    background: #9854e0;
    border-color: #9854e0;
    box-shadow: 0 4px 16px rgba(173, 113, 242, 0.3);
    transform: translateY(-1px);
}

[data-theme="dark"] .pathway-cta.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .pathway-cta.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}


/* Auto Dark Mode */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --text-primary: #f0f0f0;
        --text-secondary: #b0b0b0;
        --text-tertiary: #808080;
        --bg-primary: #0f0f0d;
        --bg-card: #1a1a18;
        --bg-subtle: #141412;
        --border-light: #2a2a26;
    }

    :root:not([data-theme]) header {
        background: rgba(15, 15, 13, 0.92);
    }

    :root:not([data-theme]) .product-card:hover {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    }

    :root:not([data-theme]) .pillar:hover {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }

    :root:not([data-theme]) .back-to-top:hover {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }

    :root:not([data-theme]) .dark-mode-toggle {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    :root:not([data-theme]) .dark-mode-toggle:hover {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    }

    /* Auto dark mode button treatments for Join the Movement */
    :root:not([data-theme]) .pathway-cta.btn-primary {
        background: var(--accent);
        color: #ffffff;
        border-color: var(--accent);
        box-shadow: 0 2px 8px rgba(173, 113, 242, 0.2);
    }

    :root:not([data-theme]) .pathway-cta.btn-primary:hover {
        background: #9854e0;
        border-color: #9854e0;
        box-shadow: 0 4px 16px rgba(173, 113, 242, 0.3);
        transform: translateY(-1px);
    }

    :root:not([data-theme]) .pathway-cta.btn-secondary {
        background: transparent;
        color: var(--text-primary);
        border-color: var(--border-light);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    :root:not([data-theme]) .pathway-cta.btn-secondary:hover {
        background: var(--bg-subtle);
        border-color: var(--accent);
        color: var(--accent);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        transform: translateY(-1px);
    }
}