/* ============================================
   flowo Design Impressions
   Theme: Pristine Light — Elevated
   ============================================ */

/* Variables */
:root {
    --bg: #F5F4F0;
    --bg-warm: #FAF9F6;
    --surface: #FFFFFF;
    --text: #1A1A1A;
    --text-secondary: #7C7C7C;
    --text-tertiary: #B0B0A8;
    --border: #E5E4DF;
    --accent: #C8A97E;
    --accent-light: rgba(200, 169, 126, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.03);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.06);
    --shadow-lg: 0 24px 64px rgba(0,0,0,0.08);
    --ease: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   DECORATIVE BACKGROUND ELEMENTS
   ============================================ */

/* Floating gradient orbs */
.bg-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(200,169,126,0.3) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: orbFloat1 20s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(180,200,220,0.25) 0%, transparent 70%);
    bottom: 20%;
    left: -80px;
    animation: orbFloat2 25s ease-in-out infinite;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(200,180,160,0.2) 0%, transparent 70%);
    top: 50%;
    right: 20%;
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, 80px) scale(1.1); }
    66% { transform: translate(40px, -40px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(80px, -60px) scale(1.15); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0); }
    40% { transform: translate(-50px, 50px); }
    80% { transform: translate(30px, -30px); }
}

/* Subtle grain texture */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* ============================================
   TOP NAVIGATION
   ============================================ */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    background: rgba(245, 244, 240, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229, 228, 223, 0.6);
    animation: fadeIn 0.6s var(--ease-out) both;
}

.nav-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid var(--border);
    transition: all 0.25s var(--ease);
}

.nav-link:hover {
    color: var(--text);
    border-color: var(--text-secondary);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.nav-link svg {
    transition: transform 0.25s var(--ease);
}

.nav-link:hover svg {
    transform: translate(1px, -1px);
}

/* ============================================
   HEADER
   ============================================ */
.gallery-header {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 24px 40px; /* extra top padding for fixed nav */
    max-width: 700px;
    margin: 0 auto;
}

.header-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-light);
    padding: 5px 16px;
    border-radius: 100px;
    margin-bottom: 28px;
    animation: fadeDown 0.8s var(--ease-out) both;
}

.gallery-header h1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 16px;
}

.title-line {
    display: block;
    overflow: hidden;
}

.title-line-1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 3.2rem;
    letter-spacing: -0.03em;
    color: var(--text);
    animation: slideUp 0.9s var(--ease-out) 0.1s both;
}

.title-line-2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 1.6rem;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    animation: slideUp 0.9s var(--ease-out) 0.25s both;
}

.header-subtitle {
    color: var(--text-tertiary);
    font-size: 0.92rem;
    font-weight: 300;
    letter-spacing: 0.01em;
    animation: fadeIn 1s var(--ease-out) 0.5s both;
}

/* Decorative divider */
.header-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 36px;
    animation: fadeIn 1s var(--ease-out) 0.7s both;
}

.divider-line {
    width: 40px;
    height: 1px;
    background: var(--border);
}

.divider-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
}

/* ============================================
   FEATURED VIDEO SECTION
   ============================================ */
.section-video {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 48px 0;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 16px;
    animation: fadeIn 0.8s var(--ease-out) 0.6s both;
}

.label-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 0.55rem;
    background: var(--text);
    color: white;
    border-radius: 5px;
}

.video-showcase {
    cursor: pointer;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
    animation: fadeUp 0.8s var(--ease-out) 0.7s both;
}

.video-showcase:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0A0A0A;
}

.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease), opacity 0.4s;
    opacity: 0.85;
}

.video-showcase:hover .video-frame video {
    transform: scale(1.03);
    opacity: 1;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.05);
    transition: background 0.3s;
}

.video-showcase:hover .video-play-overlay {
    background: rgba(0,0,0,0.15);
}

.play-ring {
    transition: transform 0.35s var(--ease);
}

.play-ring svg circle {
    transition: stroke 0.3s;
}

.video-showcase:hover .play-ring {
    transform: scale(1.12);
}

.video-showcase:hover .play-ring svg circle {
    stroke: rgba(255,255,255,0.6);
}

.video-meta {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.video-meta h3 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

.meta-tag {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

/* ============================================
   CONTENT DIVIDER between sections
   ============================================ */
.content-divider {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 48px auto 8px;
    padding: 0 48px;
}

.content-divider::before,
.content-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider-text {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding: 0 20px;
}

/* ============================================
   GALLERY GRID (Images Only — 6 items, 3 cols)
   ============================================ */
.gallery-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 32px 48px 48px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 960px) {
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 24px 32px 40px;
    }
}

@media (max-width: 600px) {
    .gallery-container {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px 16px 40px;
    }
}

/* ============================================
   GALLERY CARD
   ============================================ */
.gallery-item {
    position: relative;
    z-index: 2;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
    display: flex;
    flex-direction: column;
    /* Scroll-triggered animation: starts hidden */
    opacity: 0;
    transform: translateY(30px);
}

.gallery-item.visible {
    animation: cardReveal 0.7s var(--ease-out) both;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.gallery-item:active {
    transform: translateY(-2px);
}

/* Thumbnail area */
.item-visual {
    width: 100%;
    aspect-ratio: 3 / 4;
    position: relative;
    background-color: #EFEEEA;
    overflow: hidden;
}

.image-cover {
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: transform 0.6s var(--ease);
}

.gallery-item:hover .image-cover {
    transform: scale(1.04);
}

/* Card label */
.item-info {
    padding: 16px 18px;
    background: var(--surface);
}

.item-info h3 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.01em;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 32px auto 0;
    padding: 0 48px;
}

.cta-inner {
    text-align: center;
    padding: 56px 32px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

/* Subtle warm gradient glow behind CTA */
.cta-inner::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(200,169,126,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-eyebrow {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
    margin-bottom: 10px;
}

.cta-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 28px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--surface);
    background: var(--text);
    border: none;
    padding: 12px 28px;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s var(--ease);
    cursor: pointer;
}

.cta-button:hover {
    background: #333;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.cta-button svg {
    transition: transform 0.25s var(--ease);
}

.cta-button:hover svg {
    transform: translate(2px, -2px);
}

/* ============================================
   FOOTER
   ============================================ */
.gallery-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 32px 24px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-footer p {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

/* ============================================
   LIGHTBOX — Full-Width Scrollable Viewer
   ============================================ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    display: flex;
    flex-direction: column;
}

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

/* Lightbox Top Bar */
.lightbox-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 56px;
    min-height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    background: rgba(245, 244, 240, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.lightbox-title {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 16px;
}

.lightbox-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.btn-action {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 400;
    padding: 6px 14px;
    white-space: nowrap;
}

.btn-action:hover {
    color: var(--text);
    border-color: var(--text-secondary);
    background: var(--surface);
}

.btn-action.close {
    font-size: 1.2rem;
    font-weight: 300;
    padding: 4px 10px;
    line-height: 1;
    border: none;
}

.btn-action.close:hover {
    background: rgba(0,0,0,0.05);
}

/* Lightbox Content */
.lightbox-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: var(--bg);
}

.lightbox-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 0 80px;
}

.lightbox-inner img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
    box-shadow: var(--shadow-lg);
}

.lightbox-inner video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
    box-shadow: var(--shadow-lg);
    background: #000;
}

/* 1:1 Original Size mode */
.lightbox-content.mode-original .lightbox-inner {
    max-width: none;
    padding: 32px 40px 80px;
}

.lightbox-content.mode-original .lightbox-inner img,
.lightbox-content.mode-original .lightbox-inner video {
    width: auto;
    max-width: none;
    margin: 0 auto;
}

/* Mobile lightbox */
@media (max-width: 600px) {
    .lightbox-header {
        padding: 0 16px;
        height: 50px;
        min-height: 50px;
    }
    .lightbox-title {
        font-size: 0.85rem;
    }
    .lightbox-inner {
        max-width: 100%;
        padding: 0 0 48px;
    }
    .lightbox-inner img,
    .lightbox-inner video {
        border-radius: 0;
        box-shadow: none;
    }
    .btn-action.zoom-toggle {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-top-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 10001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s var(--ease), opacity 0.2s;
}

.scroll-top-btn:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-md);
}

.scroll-top-btn.visible {
    display: flex;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .top-nav {
        padding: 0 16px;
        height: 48px;
    }
    .nav-logo {
        font-size: 0.95rem;
    }
    .nav-link {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
    .gallery-header {
        padding: 100px 20px 32px;
    }
    .title-line-1 {
        font-size: 2.4rem;
    }
    .title-line-2 {
        font-size: 1.2rem;
    }
    .section-video {
        padding: 16px 16px 0;
    }
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 14px 16px;
    }
    .content-divider {
        padding: 0 16px;
        margin: 36px auto 4px;
    }
    .cta-section {
        padding: 0 16px;
    }
    .cta-inner {
        padding: 40px 24px;
    }
    .cta-heading {
        font-size: 1.25rem;
    }
}

@media (max-width: 960px) and (min-width: 601px) {
    .section-video {
        padding: 20px 32px 0;
    }
    .content-divider {
        padding: 0 32px;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
.lightbox-content::-webkit-scrollbar {
    width: 6px;
}
.lightbox-content::-webkit-scrollbar-track {
    background: transparent;
}
.lightbox-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}
.lightbox-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.2);
}
