/* ============================================
   FOOP STORYTELLER HUB - STYLE.CSS
   Awwwards-Winning Dark Mode Editorial Design
   ============================================ */

/* -------------------------
   CSS CUSTOM PROPERTIES
   ------------------------- */
:root {
    /* Core Colors */
    --bg-deepest: #0a0a0a;
    --bg-dark: #111111;
    --bg-card: rgba(20, 20, 20, 0.6);

    /* Accent Colors */
    --accent-pink: #FF2D65;
    --accent-pink-glow: rgba(255, 45, 101, 0.4);
    --accent-pink-soft: rgba(255, 45, 101, 0.15);
    --accent-yellow: #FFF59D;
    --accent-yellow-soft: rgba(255, 245, 157, 0.1);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-body: #E0E0E0;
    --text-muted: #888888;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(255, 45, 101, 0.5);

    /* Typography */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

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

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

img {
    max-width: 100%;
    display: block;
}

/* -------------------------
   GRAIN OVERLAY
   ------------------------- */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* -------------------------
   AURORA BACKGROUND
   ------------------------- */
.aurora-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.aurora {
    position: absolute;
    width: 60vw;
    height: 60vh;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    will-change: transform, opacity;
    animation: aurora-pulse 8s ease-in-out infinite alternate;
}

.aurora-1 {
    top: -20%;
    right: -10%;
    background: radial-gradient(circle, var(--accent-pink) 0%, transparent 70%);
}

.aurora-2 {
    bottom: 20%;
    left: -20%;
    background: radial-gradient(circle, var(--accent-pink-soft) 0%, transparent 70%);
    animation-delay: -4s;
}

@keyframes aurora-pulse {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.2) translate(20px, -20px);
        opacity: 0.5;
    }
}

/* -------------------------
   NAVIGATION
   ------------------------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    z-index: 1000;
    background: linear-gradient(to bottom, var(--bg-deepest), transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-pink);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-pink-glow);
}

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

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

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

.nav-cta {
    padding: 0.6rem 1.2rem;
    background: var(--accent-pink);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 100px;
    transition: all var(--transition-smooth);
    box-shadow: 0 0 0 0 var(--accent-pink-glow);
}

.nav-cta:hover {
    box-shadow: 0 0 30px var(--accent-pink-glow);
    transform: translateY(-2px);
}

/* -------------------------
   HERO SECTION
   ------------------------- */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-lg);
    padding: clamp(6rem, 15vh, 10rem) var(--space-md) var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.title-line {
    display: block;
    color: var(--accent-yellow);
}

.title-accent {
    color: var(--text-primary);
    opacity: 0.9;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 400px;
    line-height: 1.7;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    background: transparent;
    color: var(--accent-pink);
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--accent-pink);
    border-radius: 100px;
    transition: all var(--transition-smooth);
    width: fit-content;
}

.hero-cta:hover {
    background: var(--accent-pink);
    color: var(--text-primary);
    box-shadow: 0 0 40px var(--accent-pink-glow);
}

.cta-arrow {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.hero-cta:hover .cta-arrow {
    transform: translateX(5px);
}

/* -------------------------
   PHONE MOCKUP
   ------------------------- */
.hero-phone {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    will-change: transform;
}

.phone-glow {
    position: absolute;
    width: 300px;
    height: 400px;
    background: radial-gradient(ellipse, var(--accent-pink-glow) 0%, transparent 60%);
    filter: blur(60px);
    z-index: -1;
    animation: glow-pulse 4s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.phone-frame {
    width: 280px;
    height: 560px;
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        0 0 0 1px var(--border-subtle),
        0 25px 50px -12px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-smooth);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0d0d0d 100%);
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.phone-header {
    display: flex;
    justify-content: center;
    padding: 12px;
}

.phone-notch {
    width: 80px;
    height: 24px;
    background: #000;
    border-radius: 12px;
}

.phone-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.phone-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-pink), #ff6b9d);
    border-radius: 50%;
    margin: 0 auto;
    box-shadow: 0 0 20px var(--accent-pink-glow);
}

.phone-chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.8rem;
    line-height: 1.4;
    max-width: 85%;
    animation: bubble-in 0.5s ease-out both;
}

.chat-ai {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    align-self: flex-start;
    animation-delay: 0.3s;
}

.chat-user {
    background: var(--accent-pink);
    color: var(--text-primary);
    align-self: flex-end;
    animation-delay: 1s;
}

.chat-bubble.typing {
    display: flex;
    gap: 4px;
    padding: 16px 20px;
    animation-delay: 1.5s;
}

.typing .dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing-dot 1.4s ease-in-out infinite;
}

.typing .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bubble-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes typing-dot {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

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

.section-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--accent-pink-soft);
    color: var(--accent-pink);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 100px;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
}

.section-title em {
    color: var(--accent-yellow);
    font-style: normal;
}

/* -------------------------
   STORY CARDS
   ------------------------- */
.stories {
    padding: var(--space-xl) var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.story-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
    transition: all var(--transition-smooth);
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.story-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-5px);
    box-shadow: 0 0 40px var(--accent-pink-soft);
}

.story-card--large {
    grid-column: span 2;
}

.story-card--wide {
    grid-column: span 2;
}

.card-image {
    height: 180px;
    background: linear-gradient(135deg,
            hsl(var(--card-hue, 340), 80%, 30%) 0%,
            hsl(var(--card-hue, 340), 60%, 15%) 100%);
    position: relative;
    overflow: hidden;
}

.card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, var(--bg-card));
}

.story-card--large .card-image {
    height: 240px;
}

.card-image {
    height: 250px;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border-subtle);
}

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

.card-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-pink-soft);
    color: var(--accent-pink);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 100px;
    margin-bottom: var(--space-xs);
}

.card-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.card-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* -------------------------
   FEATURES SECTION
   ------------------------- */
.features {
    padding: var(--space-xl) var(--space-md);
    max-width: 1000px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.feature-item {
    text-align: center;
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-pink-soft);
    border-radius: 16px;
    color: var(--accent-pink);
    transition: all var(--transition-smooth);
}

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

.feature-item:hover .feature-icon {
    background: var(--accent-pink);
    color: var(--text-primary);
    box-shadow: 0 0 30px var(--accent-pink-glow);
    transform: scale(1.05);
}

.feature-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.feature-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* -------------------------
   CTA SECTION
   ------------------------- */
.cta-section {
    position: relative;
    padding: var(--space-xl) var(--space-md);
    text-align: center;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 400px;
    background: radial-gradient(ellipse at center bottom, var(--accent-pink-glow) 0%, transparent 60%);
    filter: blur(80px);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--accent-yellow);
    margin-bottom: var(--space-xs);
}

.cta-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

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

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-smooth);
}

.cta-button--primary {
    background: var(--accent-pink);
    color: var(--text-primary);
    box-shadow: 0 4px 20px var(--accent-pink-glow);
}

.cta-button--primary:hover {
    box-shadow: 0 8px 40px var(--accent-pink-glow);
    transform: translateY(-3px);
}

.cta-button--secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.cta-button--secondary:hover {
    border-color: var(--accent-pink);
    box-shadow: 0 0 30px var(--accent-pink-soft);
}

.app-icon {
    width: 28px;
    height: 28px;
}

.button-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.button-small {
    font-size: 0.65rem;
    opacity: 0.7;
}

.button-large {
    font-size: 1rem;
    font-weight: 600;
}

/* -------------------------
   FOOTER
   ------------------------- */
.footer {
    padding: var(--space-lg) var(--space-md);
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-align: center;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

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

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* -------------------------
   RESPONSIVE DESIGN
   ------------------------- */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-lg);
    }

    .hero-content {
        align-items: center;
    }

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

    .story-card--large,
    .story-card--wide {
        grid-column: span 1;
    }

    .nav-links {
        gap: var(--space-sm);
    }

    .nav-link {
        display: none;
    }
}

@media (max-width: 600px) {
    :root {
        --space-md: 1.5rem;
        --space-lg: 3rem;
        --space-xl: 5rem;
    }

    .nav {
        padding: var(--space-sm);
    }

    .phone-frame {
        width: 240px;
        height: 480px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* -------------------------
   ACCESSIBILITY
   ------------------------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .aurora,
    .phone-glow {
        animation: none;
    }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-pink);
    outline-offset: 4px;
}