/* =========================================
   Birchtree Productions - Apple-inspired
   Clean, light, elegant
   ========================================= */

:root {
    /* Colors - clean and light */
    --color-bg: #ffffff;
    --color-bg-secondary: #f5f5f7;
    --color-text: #1d1d1f;
    --color-text-secondary: #86868b;
    --color-link: rgb(136, 57, 239);
    --color-link-hover: rgb(156, 87, 255);
    --color-border: #d2d2d7;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;
    --space-3xl: 8rem;

    /* Typography */
    --font-family: 'Atkinson Hyperlegible Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3.5rem;
    --font-size-hero: clamp(3rem, 8vw, 5rem);

    /* Effects */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-sm) 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.nav-logo {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.nav-links a {
    font-size: var(--font-size-sm);
    color: var(--color-text);
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--color-link);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-base);
    font-weight: 400;
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-link);
    color: white;
}

.btn-primary:hover {
    background: var(--color-link-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--color-link);
}

.btn-secondary:hover {
    text-decoration: underline;
}

/* Background Shapes */
.background-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 25s ease-in-out infinite;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: #a8d5ff;
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: #ffd6a8;
    top: 40%;
    right: -15%;
    animation-delay: -8s;
}

.shape-3 {
    width: 450px;
    height: 450px;
    background: #a8ffd4;
    bottom: -10%;
    left: 25%;
    animation-delay: -16s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(40px, -40px) scale(1.05);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.95);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) var(--space-lg);
    background: transparent;
    position: relative;
    overflow: hidden;
}

/* Floating App Icons */
.floating-icons {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.floating-icon {
    position: absolute;
    border-radius: 22%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0.6;
    animation: floatIcon 8s ease-in-out infinite;
}

/* Image icons */
img.floating-icon {
    object-fit: cover;
}

/* Text placeholder icons */
div.floating-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.icon-1 {
    width: 100px;
    height: 100px;
    top: 15%;
    left: 10%;
    animation-delay: 0s;
    transform: rotate(-12deg);
}

.icon-2 {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 12%;
    animation-delay: -1.5s;
    transform: rotate(8deg);
}

.icon-3 {
    width: 70px;
    height: 70px;
    bottom: 25%;
    left: 8%;
    animation-delay: -3s;
    transform: rotate(15deg);
}

.icon-4 {
    width: 90px;
    height: 90px;
    bottom: 20%;
    right: 10%;
    animation-delay: -4.5s;
    transform: rotate(-8deg);
}

.icon-5 {
    width: 60px;
    height: 60px;
    top: 50%;
    right: 20%;
    animation-delay: -6s;
    transform: rotate(20deg);
}

.icon-6 {
    width: 85px;
    height: 85px;
    font-size: 1.25rem;
    top: 45%;
    left: 12%;
    background: linear-gradient(135deg, #8839ef 0%, #b86eff 100%);
    animation-delay: -2s;
    transform: rotate(-5deg);
}

.icon-7 {
    width: 75px;
    height: 75px;
    font-size: 0.75rem;
    top: 30%;
    right: 22%;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    animation-delay: -5s;
    transform: rotate(10deg);
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0) rotate(var(--rotation, 0deg));
    }
    50% {
        transform: translateY(-20px) rotate(var(--rotation, 0deg));
    }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: var(--font-size-hero);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.hero-subtitle {
    font-size: var(--font-size-2xl);
    font-weight: 400;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    line-height: 1.4;
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    color: var(--color-text-secondary);
    transition: color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base), opacity 0.3s ease;
    animation: bounce 3s ease-in-out infinite;
}

.scroll-indicator.hidden {
    opacity: 0 !important;
    pointer-events: none;
}

.scroll-indicator:hover {
    color: var(--color-link);
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* Hero fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-delay-1 {
    animation-delay: 0.2s;
}

.fade-in-delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
.section {
    padding: var(--space-3xl) 0;
    position: relative;
    z-index: 1;
}

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

.section-label {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-link);
    margin-bottom: var(--space-xs);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Apps Section */
.apps-section {
    background: transparent;
    position: relative;
    z-index: 1;
}

.apps-showcase {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xl);
}

.app-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.app-feature-reverse {
    direction: rtl;
}

.app-feature-reverse > * {
    direction: ltr;
}

.app-feature-content {
    padding: var(--space-lg) 0;
}

.app-icon-container {
    margin-bottom: var(--space-md);
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.app-name {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.app-award {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: #bf8700;
    margin-bottom: var(--space-sm);
}

.app-award a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.app-award a:hover {
    text-decoration: underline;
}

.app-award svg {
    opacity: 0.7;
}

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

.app-link {
    font-size: var(--font-size-lg);
    color: var(--color-link);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: gap var(--transition-base);
}

.app-link:hover {
    gap: 0.5rem;
}

.app-link .arrow {
    transition: transform var(--transition-base);
}

.app-feature-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-screenshot {
    width: 100%;
    max-width: 280px;
    border-radius: var(--radius-2xl);
}

.app-screenshot-wide {
    max-width: 500px;
}

.app-screenshot {
    cursor: pointer;
    transition: transform var(--transition-base);
}

.app-screenshot:hover {
    transform: scale(1.02);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius-xl);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active img {
    transform: scale(1);
}

.screenshot-placeholder {
    width: 100%;
    aspect-ratio: 9 / 16;
    max-width: 280px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.screenshot-placeholder span {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

/* Content Section */
.content-section {
    background: rgba(245, 245, 247, 0.7);
    position: relative;
    z-index: 1;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.content-card {
    background: var(--color-bg);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.content-card-visual {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
}

.content-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
}

.content-image-placeholder span {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

.content-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-card-gradient {
    background: rgb(136, 57, 239);
}

.content-card-body {
    padding: var(--space-lg);
}

.content-label {
    display: inline-block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.content-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

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

/* About Section */
.about-section {
    background: transparent;
    position: relative;
    z-index: 1;
}

.about-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.about-photo {
    display: flex;
    justify-content: center;
}

.headshot {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.about-content .section-label {
    text-align: left;
}

.about-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.about-text {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.about-text:last-child {
    margin-bottom: 0;
}

/* Footer */
.footer {
    background: rgba(245, 245, 247, 0.7);
    padding: var(--space-xl) 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.footer-logo {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
}

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

.footer-links a {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .floating-icon {
        opacity: 0.4;
    }

    .icon-1 {
        width: 60px;
        height: 60px;
        top: 12%;
        left: 5%;
    }

    .icon-2 {
        width: 50px;
        height: 50px;
        top: 15%;
        right: 5%;
    }

    .icon-3 {
        width: 45px;
        height: 45px;
        bottom: 22%;
        left: 3%;
    }

    .icon-4 {
        width: 55px;
        height: 55px;
        bottom: 18%;
        right: 5%;
    }

    .icon-5 {
        display: none;
    }

    .icon-6 {
        width: 50px;
        height: 50px;
        font-size: 0.875rem;
        top: 40%;
        left: 3%;
    }

    .icon-7 {
        display: none;
    }

    .app-feature {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        text-align: center;
    }

    .app-feature-reverse {
        direction: ltr;
    }

    .app-feature-content {
        order: 1;
    }

    .app-feature-visual {
        order: 2;
    }

    .app-icon-container {
        display: flex;
        justify-content: center;
    }

    .screenshot-placeholder {
        max-width: 220px;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .about-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-xl);
    }

    .about-content .section-label {
        text-align: center;
    }

    .headshot {
        width: 200px;
        height: 200px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-lg);
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Utility: Smooth scroll offset for fixed nav */
:target {
    scroll-margin-top: 80px;
}

/* View Transitions */
@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: fade-out 0.25s ease-out;
}

::view-transition-new(root) {
    animation: fade-in 0.25s ease-in;
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
