/* ========================================
   TOME Website Styles
   Design: Minimalistic, Nothing/Apple-inspired
   ======================================== */

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

:root {
    /* Colors */
    --black: #000000;
    --white: #ffffff;
    --white-90: rgba(255, 255, 255, 0.9);
    --white-80: rgba(255, 255, 255, 0.8);
    --white-70: rgba(255, 255, 255, 0.7);
    --white-60: rgba(255, 255, 255, 0.6);
    --white-50: rgba(255, 255, 255, 0.5);
    --white-40: rgba(255, 255, 255, 0.4);
    --white-30: rgba(255, 255, 255, 0.3);
    --white-20: rgba(255, 255, 255, 0.2);
    --white-10: rgba(255, 255, 255, 0.1);
    --white-05: rgba(255, 255, 255, 0.05);

    /* Environment Colors */
    --writer-green: #00ff88;
    --workshop-purple: #9d00ff;
    --coffeeshop-orange: #ff8800;
    --garden-green: #00ff44;
    --planning-blue: #0088ff;

    /* Typography */
    --font-family: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-title: 72px;
    --font-heading: 48px;
    --font-subheading: 32px;
    --font-body: 18px;
    --font-small: 14px;
    --font-tiny: 12px;

    /* Spacing */
    --section-padding: 160px;
    --container-width: 1400px;

    /* Transitions */
    --transition-smooth: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    background-color: var(--black);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Navigation
   ======================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 24px 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.7);
    border-bottom: 1px solid var(--white-10);
    transition: var(--transition-smooth);
}

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

.nav-logo {
    height: 32px;
    opacity: 0.9;
    transition: var(--transition-smooth);
}

.nav-logo:hover {
    opacity: 1;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    color: var(--white-70);
    text-decoration: none;
    font-size: var(--font-small);
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: var(--transition-smooth);
}

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

.nav-link:hover::after {
    width: 100%;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 40px 80px;
    position: relative;
}

.hero-content {
    max-width: 1200px;
    text-align: center;
}

.hero-title {
    font-size: var(--font-title);
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 0;
    background: linear-gradient(180deg, var(--white) 0%, var(--white-80) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: var(--font-subheading);
    font-weight: 400;
    color: var(--white-70);
    margin-bottom: 32px;
    letter-spacing: -0.5px;
    margin-top: 40px;
    position: relative;
    z-index: 0;
}

.hero-description {
    font-size: var(--font-body);
    color: var(--white-60);
    line-height: 1.8;
    margin-bottom: 80px;
}

.highlight {
    color: var(--white);
    font-weight: 500;
}

.hero-image-container {
    position: relative;
    display: inline-block;
    margin-top: -120px;
    margin-bottom: -100px;
    z-index: 2;
}

.hero-hardware {
    max-width: 800px;
    width: 100%;
    height: auto;
    filter: brightness(1.2) contrast(1.1);
    transition: all 0.1s ease-out;
    position: relative;
    z-index: 2;
}

.hero-hardware:hover {
    filter: brightness(1.3) contrast(1.15);
    transform: translateY(-30px) scale(1.05);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0.5;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, transparent, var(--white), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.scroll-text {
    font-size: var(--font-tiny);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ========================================
   Fade In Animations
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 1s ease-out forwards;
}

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

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

.fade-in.delay-3 {
    animation-delay: 0.6s;
}

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

/* ========================================
   Section Base
   ======================================== */

.section-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--section-padding) 40px;
}

.section-title {
    font-size: var(--font-heading);
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 24px;
    text-align: center;
}

.section-headline {
    font-size: var(--font-subheading);
    font-weight: 400;
    color: var(--white-70);
    text-align: center;
    margin-bottom: 64px;
    letter-spacing: -0.5px;
}

.section-text {
    font-size: var(--font-body);
    color: var(--white-60);
    text-align: center;
    line-height: 1.8;
    margin-bottom: 80px;
}

/* ========================================
   Glassmorphic Effects
   ======================================== */

.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--white-10);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ========================================
   Physical Section
   ======================================== */

.physical-section {
    background: radial-gradient(ellipse at top, rgba(0, 136, 255, 0.08), transparent 60%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 120px;
}

.feature-card {
    padding: 40px;
    text-align: center;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--white-20);
}

.feature-icon {
    margin-bottom: 20px;
    opacity: 0.9;
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon {
    opacity: 1;
    transform: scale(1.1);
}

.feature-icon svg {
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.2));
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--white-90);
}

.feature-description {
    font-size: var(--font-small);
    color: var(--white-60);
    line-height: 1.6;
}

.ritual-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.ritual-image {
    width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ritual-text {
    font-size: var(--font-body);
    color: var(--white-70);
    line-height: 1.9;
}

/* ========================================
   Video Section
   ======================================== */

.video-section {
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.03), transparent 60%);
}

.video-container {
    max-width: 1200px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    transition: var(--transition-smooth);
}

.video-wrapper:hover {
    transform: translateY(-4px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

/* ========================================
   Environments Section
   ======================================== */

.environments-section {
    background: radial-gradient(ellipse at center, rgba(157, 0, 255, 0.05), transparent 70%);
}

.environments-grid {
    display: grid;
    gap: 80px;
}

.environment-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.environment-card:nth-child(even) {
    direction: rtl;
}

.environment-card:nth-child(even) > * {
    direction: ltr;
}

.environment-visual {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.env-screenshot {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-smooth);
}

.environment-visual:hover .env-screenshot {
    transform: scale(1.02);
}

.env-glow {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 60px;
    filter: blur(40px);
    opacity: 0;
    transition: var(--transition-smooth);
}

.environment-visual:hover .env-glow {
    opacity: 1;
}

.writer-glow {
    background: radial-gradient(ellipse, var(--writer-green), transparent 70%);
}

.workshop-glow {
    background: radial-gradient(ellipse, var(--workshop-purple), transparent 70%);
}

.coffeeshop-glow {
    background: radial-gradient(ellipse, var(--coffeeshop-orange), transparent 70%);
}

.garden-glow {
    background: radial-gradient(ellipse, var(--garden-green), transparent 70%);
}

.environment-content {
    padding: 20px;
}

.env-title {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.env-subtitle {
    font-size: var(--font-body);
    color: var(--white-60);
    margin-bottom: 24px;
}

.env-features {
    list-style: none;
    font-size: var(--font-small);
    color: var(--white-70);
    line-height: 2;
}

.env-features li {
    padding-left: 24px;
    position: relative;
}

.env-features li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--white-40);
}

/* Environment-specific title colors */
.environment-card[data-env="writer"] .env-title {
    color: var(--writer-green);
}

.environment-card[data-env="workshop"] .env-title {
    color: var(--workshop-purple);
}

.environment-card[data-env="coffeeshop"] .env-title {
    color: var(--coffeeshop-orange);
}

.environment-card[data-env="garden"] .env-title {
    color: var(--garden-green);
}

/* ========================================
   Intelligence Section
   ======================================== */

.intelligence-section {
    background: radial-gradient(ellipse at bottom, rgba(0, 255, 68, 0.06), transparent 60%);
}

.intelligence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 100px;
}

.intel-card {
    padding: 48px 32px;
    text-align: center;
    transition: var(--transition-smooth);
}

.intel-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--white-20);
}

.intel-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.intel-description {
    font-size: var(--font-small);
    color: var(--white-60);
}

.planning-showcase {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
    margin-top: 80px;
}

.planning-image {
    width: 100%;
    height: auto;
    padding: 0;
}

.planning-text h3 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.planning-text p {
    font-size: var(--font-body);
    color: var(--white-70);
    line-height: 1.8;
}

/* ========================================
   Experience Section
   ======================================== */

.experience-section {
    background: radial-gradient(ellipse at top, rgba(255, 136, 0, 0.05), transparent 50%);
}

.experience-showcase {
    margin-bottom: 60px;
}

.experience-image {
    width: 100%;
    height: auto;
    padding: 0;
    border-radius: 24px;
}

.experience-text {
    text-align: center;
}

.experience-large {
    font-size: 28px;
    color: var(--white-80);
    line-height: 1.6;
    font-weight: 300;
    letter-spacing: -0.3px;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    border-top: 1px solid var(--white-10);
    padding: 80px 0;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.footer-logo {
    height: 40px;
    opacity: 0.8;
    margin-bottom: 24px;
}

.footer-text {
    font-size: var(--font-small);
    color: var(--white-50);
    margin-bottom: 32px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.footer-link {
    color: var(--white-50);
    text-decoration: none;
    font-size: var(--font-tiny);
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
}

.footer-link:hover {
    color: var(--white);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    :root {
        --font-title: 56px;
        --font-heading: 40px;
        --font-subheading: 28px;
        --section-padding: 100px;
    }

    .ritual-section,
    .environment-card,
    .planning-showcase {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .environment-card:nth-child(even) {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    :root {
        --font-title: 42px;
        --font-heading: 32px;
        --font-subheading: 24px;
        --font-body: 16px;
        --section-padding: 80px;
    }

    .nav-container {
        padding: 0 24px;
    }

    .nav-links {
        gap: 24px;
    }

    .hero {
        padding: 100px 24px 60px;
    }

    .section-container {
        padding: var(--section-padding) 24px;
    }

    .features-grid,
    .intelligence-grid {
        grid-template-columns: 1fr;
    }

    .hero-hardware {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --font-title: 36px;
        --font-heading: 28px;
        --section-padding: 60px;
    }

    .nav-links {
        display: none;
    }

    .hero-title br,
    .hero-subtitle br,
    .hero-description br,
    .section-text br {
        display: none;
    }
}

/* ========================================
   Scroll-Triggered Animations
   ======================================== */

.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: var(--transition-smooth);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Performance Optimizations
   ======================================== */

.hero-hardware,
.ritual-image,
.env-screenshot,
.planning-image,
.experience-image {
    will-change: transform;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
