/* --- Global Variables & Base Styles --- */
:root {
    /* Main Dark Theme Colors */
    --main-bg-dark: #0A0A0A; /* Deep black background for body, hero, footer */
    --text-on-dark: #F3F3F3; /* Light text for elements on dark backgrounds */
    --border-dark: #222222; /* Slightly softer dark border for separation */

    /* Light Card Theme Colors (for all content cards & main button) */
    --card-bg-light: #FFFFFF; /* Pure white background for cards */
    --text-on-light: #1A1A1A; /* Very dark gray for text on white, better readability than pure black */
    --border-light: #E0E0E0; /* Subtle light gray border for white cards */
    --shadow-light: rgba(0, 0, 0, 0.08); /* Soft, subtle shadow for cards */
    --shadow-hover-light: rgba(0, 0, 0, 0.12); /* Slightly more pronounced shadow on hover for cards */

    /* Accent Colors (similar to Notion's muted accents for subtle highlights) */
    --accent-color: #787774; /* Muted primary accent */
    --accent-hover: #908F8C; /* Lighter accent on hover */
    --accent-border-focus: #B0B0B0; /* Slightly more prominent for focus states/button hover */

    /* Specific Brand Red (if still needed, e.g., for certain text highlights) */
    --brand-red: #E03C31;
    --brand-red-hover: #CC362B;

    /* Refined Button Colors (Now white by default) */
    --btn-text-color: var(--text-on-light);
    --btn-bg-color: var(--card-bg-light);
    --btn-border-color: var(--border-light);
    --btn-bg-hover: #F8F8F8; /* Very subtle light hover for white button */
    --btn-border-hover: var(--accent-color); /* Accent border on button hover */
}

/* Base styles for the entire document */
body {
    font-family: 'Inter', sans-serif; /* Prioritize Inter for Apple-like clarity */
    background-color: var(--main-bg-dark);
    color: var(--text-on-dark); /* Default text color for dark sections */
    line-height: 1.6; /* Tighter line-height for a crisp look */
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased; /* Improves text rendering on WebKit (Safari, Chrome) */
    -moz-osx-font-smoothing: grayscale; /* Improves text rendering on Firefox */
    overflow-x: hidden; /* Prevent horizontal scroll issues */
    position: relative; /* Needed for canvas positioning */
    text-rendering: optimizeLegibility; /* Improves kerning and ligatures for high quality text */
}

/* Canvas background for animated particles */
#backgroundCanvas {
    position: fixed; /* Stays fixed in the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Dynamically adjusted by JS, but good CSS fallback */
    z-index: -1; /* Ensures it stays behind all content */
    pointer-events: none; /* Allows mouse events to pass through to elements below */
    background-color: transparent; /* Main body handles the dark background */
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2.5rem; /* Increased padding for more breathing room */
}

/* --- Header Styles --- */
.header {
    background-color: var(--main-bg-dark);
    border-bottom: 1px solid var(--border-dark);
    padding: 1.2rem 0; /* Slightly reduced header height */
    box-shadow: none;
    position: relative;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2.1rem; /* Slightly refined logo size */
    font-weight: 700;
    color: var(--text-on-dark);
    letter-spacing: -0.02em; /* Subtle tight letter spacing for headings */
}

.logo .dot {
    color: var(--accent-color);
}

/* Navigation Links */
.nav a {
    color: var(--text-on-dark);
    text-decoration: none;
    padding: 0.7rem 1.3rem; /* Adjusted padding */
    font-weight: 500;
    font-size: 0.95rem; /* Slightly smaller for crispness */
    transition: background-color 0.2s ease-out, color 0.2s ease-out, transform 0.15s ease-out; /* Smoother transitions */
    border-radius: 8px; /* Slightly more rounded corners */
}

.nav a:hover {
    background-color: #2A2A2A;
    color: var(--text-on-dark);
    transform: translateY(-2px); /* Subtle lift on hover */
}

.nav a:focus-visible { /* Accessibility: ensure focus state is visible */
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 8px;
}

.nav a img {
    vertical-align: middle;
    transition: transform 0.2s ease-out; /* Smooth transition for Instagram icon scale */
    /* No filter here by default, allowing natural image colors */
}

.instagram-link:hover img {
    transform: scale(1.15); /* Slightly larger scale on hover */
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 22px;
    padding: 5px;
    box-sizing: content-box;
}

.hamburger div {
    width: 100%;
    height: 2.5px;
    background-color: var(--text-on-dark);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* --- Hero Section Styles --- */
.hero {
    padding: 7rem 0;
    background-color: var(--main-bg-dark);
    position: relative;
    z-index: 1;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1 1 48%;
    min-width: 300px;
}

.hero-image {
    flex: 1 1 48%;
    min-width: 300px;
    text-align: center;
}

.hero-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hero h1 {
    font-size: 4.8rem;
    line-height: 1.1;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-on-dark);
    font-weight: 700;
    letter-spacing: -0.03em;
    /* Font quality: ensure smooth rendering */
    text-rendering: geometricPrecision;
}

.hero h2 {
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 2rem;
    color: var(--text-on-dark);
    font-weight: 500;
    letter-spacing: -0.015em;
    opacity: 0.9;
    text-rendering: optimizeLegibility;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: var(--text-on-dark);
    opacity: 0.8;
    text-rendering: optimizeLegibility;
}

/* Button & Instagram Icon Row */
.btn-instagram-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* White Button Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--btn-bg-color);
    color: var(--btn-text-color);
    border: 1px solid var(--btn-border-color);
    padding: 1rem 2.2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.2s ease-out, transform 0.2s ease-out, border-color 0.2s ease-out, box-shadow 0.2s ease-out; /* Smoother transitions */
    box-shadow: 0 2px 8px var(--shadow-light); /* Subtle shadow for buttons */
}

.btn:hover {
    background-color: var(--btn-bg-hover);
    border-color: var(--btn-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover-light); /* Slightly more pronounced shadow on hover */
}

.btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 10px;
}

/* --- Animations --- */
@keyframes slideInFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Updated blurFadeIn easing for a smoother, more "Linear.app-like" effect */
@keyframes blurFadeIn {
    0% {
        opacity: 0;
        filter: blur(8px);
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

.rawphilosophy-card,
.story-card,
.blog-card,
.results-card {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(20px);
    /* Changed cubic-bezier for a snappier, smoother ease-out */
    animation: blurFadeIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.rawphilosophy-card { animation-delay: 0.6s; }
.story-card { animation-delay: 0.9s; }
.blog-card:nth-child(1) { animation-delay: 1.2s; }
.blog-card:nth-child(2) { animation-delay: 1.3s; }
.blog-card:nth-child(3) { animation-delay: 1.4s; }
.results-card { animation-delay: 1.1s; }


/* --- Content Card Sections (Philosophy, Story, Results) --- */
.rawphilosophy-wrapper,
.offer-story,
.blogs {
    background-color: var(--main-bg-dark);
}

.rawphilosophy-wrapper {
    padding: 3.5rem 0;
}

.rawphilosophy-card,
.story-card,
.results-card {
    background-color: var(--card-bg-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-light);
    max-width: 760px;
    padding: 3rem;
    color: var(--text-on-light);
    line-height: 1.7;
    margin: 0 auto;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.rawphilosophy-card:hover,
.story-card:hover,
.results-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px var(--shadow-hover-light);
}

.rawphilosophy-card h2,
.story-card h2,
.results-card h2 {
    margin-top: 0;
    font-size: 2.2rem;
    color: var(--text-on-light);
    border-left: 5px solid var(--accent-color);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-rendering: optimizeLegibility;
}

.rawphilosophy-card p,
.story-card p,
.results-card p {
    font-size: 1rem;
    margin: 0;
    color: var(--text-on-light);
    opacity: 0.85;
    text-rendering: optimizeLegibility;
}

.offer-story {
    padding: 3rem 0;
}

.story-card {
    text-align: center;
}
.results-card p:last-child {
    margin-bottom: 0;
}


/* --- Blogs Section Styles --- */
.blogs {
    padding-top: 3rem;
    padding-bottom: 6rem;
}

.section-title {
    text-align: center;
    font-size: 3.8rem;
    color: var(--text-on-dark);
    margin-bottom: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-rendering: geometricPrecision;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.blog-card {
    background-color: var(--card-bg-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px var(--shadow-light);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px var(--shadow-hover-light);
}

/* Default image styling for blog cards (NOT 1:1 ratio) */
.blog-card:not(.last-card-1-1) img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;
}

.blog-card h3 {
    font-size: 1.15rem;
    color: var(--text-on-light);
    margin: 1.5rem 1.8rem 0.8rem;
    font-weight: 600;
    text-rendering: optimizeLegibility;
}

.blog-card p {
    font-size: 0.9rem;
    color: var(--text-on-light);
    margin: 0 1.8rem 1rem;
    flex-grow: 1;
    opacity: 0.85;
    text-rendering: optimizeLegibility;
}

.blog-card a {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0 1.8rem 1.5rem;
    transition: color 0.2s ease-out, transform 0.2s ease-out, opacity 0.2s ease-out;
}

.blog-card a:hover {
    color: var(--accent-hover);
    transform: translateX(6px);
    opacity: 0.85;
}

/* NEW: 1:1 aspect ratio specifically for the LAST blog card's image */
.blog-card.last-card-1-1 .image-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.blog-card.last-card-1-1 .image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

/* --- Footer Styles --- */
.footer {
    background-color: var(--main-bg-dark);
    border-top: 1px solid var(--border-dark);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-on-dark);
    font-size: 0.95rem;
    opacity: 0.7;
    text-rendering: optimizeLegibility;
}

/* --- Media Queries for Responsiveness --- */

/* Larger Tablets & Small Laptops (1024px to 769px) */
@media (max-width: 1024px) {
    .container {
        padding: 2.5rem 2rem;
    }
    .hero h1 {
        font-size: 4.2rem;
    }
    .hero h2 {
        font-size: 2rem;
    }
    .section-title {
        font-size: 3.5rem;
    }
    .rawphilosophy-card h2,
    .story-card h2,
    .results-card h2 {
        font-size: 2rem;
    }
    .blog-grid {
        gap: 1.5rem;
    }
    .blog-card:not(.last-card-1-1) img {
        height: 180px;
    }
}

/* Tablets & Smaller Desktops (768px to 481px) */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1.5rem;
    }

    .nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--main-bg-dark);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
        border-top: 1px solid var(--border-dark);
        z-index: 999;
    }
    .nav.show {
        display: flex;
    }
    .nav a {
        padding: 1.2rem 1.5rem;
        border-bottom: 1px solid var(--border-dark);
        color: var(--text-on-dark);
        font-size: 1rem;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: 5rem 0;
    }
    .hero .container {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
    }
    .hero-text, .hero-image {
        flex: 1 1 auto;
        min-width: unset;
    }
    .hero h1 {
        font-size: 3.5rem;
    }
    .hero h2 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .btn-instagram-row {
        justify-content: center;
        gap: 15px;
    }

    .rawphilosophy-card,
    .story-card,
    .results-card {
        max-width: 100%;
        padding: 2.5rem;
    }
    .rawphilosophy-card h2,
    .story-card h2,
    .results-card h2 {
        font-size: 1.8rem;
        padding-left: 0.8rem;
    }
    .rawphilosophy-card p,
    .story-card p,
    .results-card p {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 3rem;
        margin-bottom: 2rem;
    }

    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
    .blog-card:not(.last-card-1-1) img {
        height: 160px;
    }
    .blog-card.last-card-1-1 .image-container {
        padding-bottom: 100%;
    }
    .blog-card.last-card-1-1 .image-container img {
        height: 100%;
    }

    .blog-card h3 {
        font-size: 1.05rem;
        margin: 1rem 1.2rem 0.5rem;
    }
    .blog-card p {
        font-size: 0.85rem;
        margin: 0 1.2rem 0.8rem;
    }
    .blog-card a {
        padding: 0 1.2rem 1rem;
        font-size: 0.85rem;
    }

    .footer {
        padding: 1.8rem 0;
        font-size: 0.9rem;
    }
}

/* Smaller Mobile Devices (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem;
    }
    .header {
        padding: 1rem 0;
    }
    .logo {
        font-size: 1.8rem;
    }
    .hamburger {
        width: 25px;
        height: 20px;
    }
    .hamburger div {
        height: 2px;
    }
    .nav {
        top: 60px;
    }

    .hero {
        padding: 3rem 0;
    }
    .hero h1 {
        font-size: 2.8rem;
        line-height: 1.2;
    }
    .hero h2 {
        font-size: 1.6rem;
    }
    .hero p {
        font-size: 0.9rem;
    }
    .btn {
        padding: 0.9rem 1.8rem;
        font-size: 0.85rem;
    }
    .btn-instagram-row {
        justify-content: center;
        gap: 10px;
    }

    .rawphilosophy-card,
    .story-card,
    .results-card {
        padding: 2rem;
    }
    .rawphilosophy-card h2,
    .story-card h2,
    .results-card h2 {
        font-size: 1.6rem;
    }
    .rawphilosophy-card p,
    .story-card p,
    .results-card p {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .blog-card:not(.last-card-1-1) img {
        height: 140px;
    }
    .blog-card.last-card-1-1 .image-container {
        padding-bottom: 100%;
    }
    .blog-card.last-card-1-1 .image-container img {
        height: 100%;
    }

    .blog-card h3 {
        font-size: 1rem;
        margin: 1rem 1rem 0.5rem;
    }
    .blog-card p {
        font-size: 0.8rem;
        margin: 0 1rem 0.8rem;
    }
    .blog-card a {
        font-size: 0.8rem;
        padding: 0 1rem 1rem;
    }

    .footer {
        padding: 1.5rem 0;
        font-size: 0.85rem;
    }
}
