/* frameflow.css -- Vibrant flat creative aesthetic for Frame & Flow */

/* Fonts loaded via <link> in HTML for better performance */

:root{
  --ff-pink:#ff006e;
  --ff-cyan:#00f5ff;
  --ff-yellow:#ffbe0b;
  --ff-purple:#8338ec;
  --ff-blue:#3a86ff;
  --ff-bg:#0a0a0f;
  --ff-surface:#141420;
  --ff-surface2:#1c1c2e;
  --ff-text:#f0f0f5;
  --ff-muted:#8888aa;
  --ff-radius:14px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
html,body{height:100%}

body.ff-page{
  font-family:'Syne','Space Mono',system-ui,sans-serif;
  background:var(--ff-bg);
  color:var(--ff-text);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  position:relative;
  line-height:1.6;
  cursor:none;
}

/* ===== Background canvas ===== */
#ff-bg-canvas{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
}

/* ===== Transition overlay canvas ===== */
#ff-transition-canvas{
  position:fixed;
  inset:0;
  z-index:9999;
  pointer-events:none;
}

/* ===== Layout ===== */
.ff-container{
  max-width:1000px;
  margin:0 auto;
  padding:48px 24px;
  position:relative;
  z-index:1;
}

/* ===== Header / Nav ===== */
.ff-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 24px;
  border-radius:var(--ff-radius);
  background:rgba(20,20,32,0.5);
  backdrop-filter:blur(20px) saturate(1.3);
  -webkit-backdrop-filter:blur(20px) saturate(1.3);
  border:1px solid rgba(131,56,236,0.2);
  margin-bottom:40px;
}

.ff-back{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:14px;
  font-weight:700;
  color:var(--ff-cyan);
  text-decoration:none;
  padding:8px 18px;
  border-radius:10px;
  border:2px solid var(--ff-cyan);
  background:transparent;
  transition:all 0.25s ease;
  font-family:inherit;
}
.ff-back:hover{
  background:var(--ff-cyan);
  color:var(--ff-bg);
  transform:translateY(-2px);
  box-shadow:0 4px 20px rgba(0,245,255,0.3);
}

.ff-logo{
  font-family:'Syne',sans-serif;
  font-weight:800;
  font-size:22px;
  background:linear-gradient(135deg,var(--ff-pink),var(--ff-cyan),var(--ff-yellow));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

/* ===== Transition Selector ===== */
.ff-controls{
  display:flex;
  align-items:center;
  gap:12px;
}

.ff-transition-select{
  padding:8px 14px;
  border-radius:10px;
  border:1px solid rgba(131,56,236,0.3);
  background:rgba(20,20,32,0.6);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  color:var(--ff-text);
  font-family:'Space Mono',monospace;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  transition:all 0.25s ease;
  outline:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
}
.ff-transition-select:hover,
.ff-transition-select:focus{
  border-color:var(--ff-pink);
  box-shadow:0 0 12px rgba(255,0,110,0.2);
  animation:selectPulse 1.5s ease-in-out infinite;
}
@keyframes selectPulse{
  0%,100%{box-shadow:0 0 12px rgba(255,0,110,0.2)}
  50%{box-shadow:0 0 20px rgba(255,0,110,0.4),0 0 40px rgba(255,0,110,0.15)}
}

/* ===== Hero Section ===== */
.ff-hero{
  text-align:center;
  padding:60px 24px 40px;
  position:relative;
}

.ff-hero-title{
  font-family:'Syne',sans-serif;
  font-weight:800;
  font-size:clamp(40px,8vw,80px);
  line-height:1.05;
  margin-bottom:16px;
  background:linear-gradient(135deg,var(--ff-pink),var(--ff-purple),var(--ff-blue));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  filter:drop-shadow(0 0 20px rgba(255,0,110,0.3)) drop-shadow(0 0 40px rgba(131,56,236,0.2));
}

.ff-hero-sub{
  font-family:'Space Mono',monospace;
  font-size:clamp(14px,2vw,18px);
  color:var(--ff-muted);
  max-width:600px;
  margin:0 auto 32px;
  line-height:1.6;
}

/* ===== Section panels (flat, vibrant) ===== */
.ff-panel{
  padding:36px;
  border-radius:var(--ff-radius);
  background:rgba(20,20,32,0.55);
  backdrop-filter:blur(20px) saturate(1.3);
  -webkit-backdrop-filter:blur(20px) saturate(1.3);
  border:1px solid rgba(255,255,255,0.06);
  margin-bottom:32px;
  position:relative;
  overflow:hidden;
  transition:border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.ff-panel:hover{
  border-color:rgba(131,56,236,0.3);
  transform:translateY(-4px) scale(1.01);
  box-shadow:0 12px 40px rgba(131,56,236,0.15), inset 0 1px 0 0 rgba(131,56,236,0.2);
}

.ff-panel--pink{box-shadow:inset 0 1px 0 0 rgba(255,0,110,0.2)}
.ff-panel--cyan{box-shadow:inset 0 1px 0 0 rgba(0,245,255,0.2)}
.ff-panel--yellow{box-shadow:inset 0 1px 0 0 rgba(255,190,11,0.2)}
.ff-panel--purple{box-shadow:inset 0 1px 0 0 rgba(131,56,236,0.2)}
.ff-panel--blue{box-shadow:inset 0 1px 0 0 rgba(58,134,255,0.2)}

.ff-panel-title{
  font-family:'Syne',sans-serif;
  font-weight:800;
  font-size:clamp(20px,4vw,28px);
  margin-bottom:16px;
  color:var(--ff-text);
}

.ff-panel-text{
  font-size:15px;
  color:var(--ff-muted);
  line-height:1.8;
}

/* ===== Full-Width Instagram Section ===== */
.ff-instagram-fullwidth{
  width:100%;
  position:relative;
  left:0;
  text-align:center;
  padding:64px 24px 72px;
  background:linear-gradient(180deg,transparent 0%,rgba(255,0,110,0.04) 30%,rgba(131,56,236,0.05) 70%,transparent 100%);
  border-top:1px solid rgba(255,0,110,0.08);
  border-bottom:1px solid rgba(131,56,236,0.08);
  z-index:1;
}

.ff-instagram-inner{
  max-width:1400px;
  margin:0 auto;
  padding:0 24px;
}

.ff-instagram-title{
  font-family:'Syne',sans-serif;
  font-weight:800;
  font-size:clamp(24px,5vw,36px);
  margin-bottom:8px;
  color:var(--ff-pink);
}

.ff-instagram-sub{
  font-size:14px;
  color:var(--ff-muted);
  margin-bottom:32px;
  font-family:'Space Mono',monospace;
}

.ff-instagram-embed{
  display:flex;
  justify-content:center;
  margin:0 auto;
  max-width:540px;
}

.ff-instagram-embed blockquote{
  margin:0 !important;
  width:100% !important;
  max-width:540px !important;
}

.ff-instagram-cta{
  display:inline-block;
  margin-top:32px;
  padding:14px 40px;
  font-family:'Syne',sans-serif;
  font-weight:700;
  font-size:16px;
  color:var(--ff-bg);
  background:linear-gradient(135deg,var(--ff-pink),var(--ff-purple));
  border:none;
  border-radius:30px;
  text-decoration:none;
  transition:all 0.3s ease;
  box-shadow:0 4px 20px rgba(255,0,110,0.3);
}
.ff-instagram-cta:hover{
  transform:translateY(-3px) scale(1.05);
  box-shadow:0 8px 32px rgba(255,0,110,0.5),0 0 60px rgba(131,56,236,0.2);
}

/* ===== Filmmaking Tags / Chips ===== */
.ff-tags{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.ff-tag{
  padding:6px 16px;
  border-radius:20px;
  font-size:12px;
  font-weight:700;
  font-family:'Space Mono',monospace;
  text-transform:uppercase;
  letter-spacing:1px;
  border:2px solid;
  transition:all 0.25s ease;
}
.ff-tag--pink{color:var(--ff-pink);border-color:var(--ff-pink);background:rgba(255,0,110,0.1)}
.ff-tag--cyan{color:var(--ff-cyan);border-color:var(--ff-cyan);background:rgba(0,245,255,0.1)}
.ff-tag--yellow{color:var(--ff-yellow);border-color:var(--ff-yellow);background:rgba(255,190,11,0.1)}
.ff-tag--purple{color:var(--ff-purple);border-color:var(--ff-purple);background:rgba(131,56,236,0.1)}
.ff-tag--blue{color:var(--ff-blue);border-color:var(--ff-blue);background:rgba(58,134,255,0.1)}

.ff-tag:hover{
  transform:scale(1.08) rotate(-2deg);
  box-shadow:0 4px 16px rgba(0,0,0,0.3);
}

/* ===== Grid layout for hobby sections ===== */
.ff-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:24px;
  margin-top:24px;
}

.ff-grid-item{
  padding:28px;
  border-radius:var(--ff-radius);
  background:rgba(28,28,46,0.5);
  backdrop-filter:blur(16px) saturate(1.2);
  -webkit-backdrop-filter:blur(16px) saturate(1.2);
  border:1px solid rgba(255,255,255,0.06);
  transition:all 0.3s ease;
  position:relative;
  overflow:hidden;
}
.ff-grid-item:hover{
  border-color:var(--ff-yellow);
  transform:translateY(-4px);
  box-shadow:0 8px 32px rgba(255,190,11,0.15);
}

.ff-grid-item h3{
  font-family:'Syne',sans-serif;
  font-weight:700;
  font-size:18px;
  margin-bottom:8px;
  color:var(--ff-text);
}
.ff-grid-item p{
  font-size:14px;
  color:var(--ff-muted);
  line-height:1.7;
}

/* ===== Carousel Wrapper ===== */
.ff-carousel-wrapper{
  overflow:hidden;
  margin-top:24px;
  position:relative;
}
.ff-carousel-wrapper::before,
.ff-carousel-wrapper::after{
  content:'';
  position:absolute;
  top:0;bottom:0;
  width:60px;
  z-index:2;
  pointer-events:none;
}
.ff-carousel-wrapper::before{
  left:0;
  background:linear-gradient(90deg,rgba(10,10,15,0.8),transparent);
}
.ff-carousel-wrapper::after{
  right:0;
  background:linear-gradient(270deg,rgba(10,10,15,0.8),transparent);
}
.ff-carousel{
  display:flex;
  gap:20px;
  animation:carouselScroll 30s linear infinite;
  width:max-content;
  will-change:transform;
}
.ff-carousel:hover{
  animation-play-state:paused;
}
@keyframes carouselScroll{
  0%{transform:translateX(0)}
  100%{transform:translateX(-50%)}
}

/* ===== Video Showcase Cards (carousel) ===== */
.ff-video-card{
  min-width:300px;
  max-width:max-content;
  background:rgba(28,28,46,0.5);
  backdrop-filter:blur(12px) saturate(1.2);
  -webkit-backdrop-filter:blur(12px) saturate(1.2);
  border-radius:var(--ff-radius);
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.06);
  transition:all 0.3s ease;
  flex-shrink:0;
  will-change:transform;
}
.ff-video-card:hover{
  border-color:var(--ff-cyan);
  transform:translateY(0px) scale(1);
  box-shadow:0 12px 40px rgba(0,245,255,0.25);
}
.ff-video-card h3{
  font-family:'Syne',sans-serif;
  font-weight:700;
  font-size:15px;
  padding:12px 14px 2px;
  color:var(--ff-text);
}
.ff-video-card p{
  font-size:12px;
  color:var(--ff-muted);
  padding:0 14px 14px;
  font-family:'Space Mono',monospace;
}
.ff-video-placeholder{
  width:100%;
  aspect-ratio:16/9;
  background:linear-gradient(135deg,rgba(20,20,32,0.6) 0%,rgba(28,28,46,0.4) 50%,rgba(20,20,32,0.6) 100%);
  background-size:200% 200%;
  animation:videoScanlines 3s linear infinite;
  position:relative;
}
.ff-video-placeholder::after{
  content:'\25B6';
  position:absolute;
  top:50%;left:50%;
  transform:translate(-50%,-50%);
  font-size:32px;
  color:var(--ff-cyan);
  opacity:0.3;
  z-index:1;
  pointer-events:none;
}

/* Hide play button when GIF/image media is present inside placeholder */
.ff-video-placeholder:has(.ff-media)::after{
  display:none;
}

/* ===== Inline media (GIFs + images) ===== */
.ff-media{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:0;
}
@keyframes videoScanlines{
  0%{background-position:0% 0%}
  50%{background-position:100% 100%}
  100%{background-position:0% 0%}
}

/* ===== Image Gallery Cards (carousel) ===== */
.ff-image-card{
  min-width:300px;
  max-width:300px;
  flex-shrink:0;
  border-radius:var(--ff-radius);
  overflow:hidden;
  transition:all 0.3s ease;
  will-change:transform;
}
.ff-image-card:hover{
  transform:translateY(0px) scale(1);
  box-shadow:0 12px 36px rgba(0,0,0,0.5);
}
.ff-image-placeholder{
  width:100%;
  aspect-ratio:4/3;
  position:relative;
  overflow:hidden;
}
.ff-image-meta{
  padding:12px 14px 14px;
  background:rgba(28,28,46,0.5);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-top:1px solid rgba(255,255,255,0.06);
}
.ff-image-title{
  font-family:'Syne',sans-serif;
  font-weight:700;
  font-size:14px;
  color:var(--ff-text);
  margin-bottom:4px;
}
.ff-image-caption{
  font-size:12px;
  color:var(--ff-muted);
  font-family:'Space Mono',monospace;
  line-height:1.6;
}
.ff-image-card--pink .ff-image-placeholder{background:linear-gradient(135deg,rgba(255,0,110,0.2),rgba(255,0,110,0.05))}
.ff-image-card--yellow .ff-image-placeholder{background:linear-gradient(135deg,rgba(255,190,11,0.2),rgba(255,190,11,0.05))}
.ff-image-card--purple .ff-image-placeholder{background:linear-gradient(135deg,rgba(131,56,236,0.2),rgba(131,56,236,0.05))}
.ff-image-card--blue .ff-image-placeholder{background:linear-gradient(135deg,rgba(58,134,255,0.2),rgba(58,134,255,0.05))}
.ff-image-card--cyan .ff-image-placeholder{background:linear-gradient(135deg,rgba(0,245,255,0.2),rgba(0,245,255,0.05))}

/* ===== Footer ===== */
.ff-footer{
  text-align:center;
  padding:32px 24px;
  margin-top:40px;
  border-radius:var(--ff-radius);
  background:rgba(20,20,32,0.55);
  backdrop-filter:blur(20px) saturate(1.3);
  -webkit-backdrop-filter:blur(20px) saturate(1.3);
  border:1px solid rgba(255,255,255,0.06);
  font-size:14px;
  color:var(--ff-muted);
}
.ff-footer a{
  color:var(--ff-cyan);
  text-decoration:none;
  font-weight:700;
  transition:color 0.2s ease;
}
.ff-footer a:hover{
  color:var(--ff-pink);
}

/* ===== Section reveal (used by scroll JS) ===== */
.ff-reveal{
  opacity:0;
  transform:translateY(40px) scale(0.97);
  transition:opacity 0.8s cubic-bezier(0.34,1.56,0.64,1), transform 0.8s cubic-bezier(0.34,1.56,0.64,1);
}
.ff-reveal.ff-visible{
  opacity:1;
  transform:translateY(0) scale(1);
}

/* ===== Parallax shape layers (controlled by JS) ===== */
.ff-shape{
  position:fixed;
  pointer-events:none;
  z-index:0;
  will-change:transform;
}

/* ===== Custom cursor (elements created by JS) ===== */
.ff-cursor{
  position:fixed;
  left:0;
  top:0;
  opacity:1;
  pointer-events:none;
  z-index:10000;
  filter:drop-shadow(0 0 6px var(--ff-cyan)) drop-shadow(0 0 12px rgba(0,245,255,0.4));
}
.ff-cursor-crosshair{
  width:40px;
  height:40px;
  position:relative;
  transition:transform 0.15s ease;
}
.ff-cursor-crosshair.expanded{
  transform:scale(1.5);
}
.ff-cursor-dot{
  position:absolute;
  top:50%;left:50%;
  width:6px;height:6px;
  border-radius:50%;
  background:var(--ff-cyan);
  transform:translate(-50%,-50%);
  box-shadow:0 0 6px var(--ff-cyan),0 0 12px var(--ff-cyan);
  animation:cursorPulse 1.2s ease-in-out infinite;
}
.ff-cursor-h{
  position:absolute;
  top:50%;left:0;
  width:100%;height:1.5px;
  background:var(--ff-cyan);
  transform:translateY(-50%);
  opacity:0.9;
  box-shadow:0 0 4px var(--ff-cyan);
}
.ff-cursor-v{
  position:absolute;
  left:50%;top:0;
  height:100%;width:1.5px;
  background:var(--ff-cyan);
  transform:translateX(-50%);
  opacity:0.9;
  box-shadow:0 0 4px var(--ff-cyan);
}
/* Corner brackets for viewfinder */
.ff-cursor-corner{
  position:absolute;
  width:10px;height:10px;
  border-color:var(--ff-pink);
  border-style:solid;
  border-width:0;
  filter:drop-shadow(0 0 4px var(--ff-pink));
}
.ff-cursor-corner--tl{top:0;left:0;border-top-width:2px;border-left-width:2px}
.ff-cursor-corner--tr{top:0;right:0;border-top-width:2px;border-right-width:2px}
.ff-cursor-corner--bl{bottom:0;left:0;border-bottom-width:2px;border-left-width:2px}
.ff-cursor-corner--br{bottom:0;right:0;border-bottom-width:2px;border-right-width:2px}

@keyframes cursorPulse{
  0%,100%{transform:translate(-50%,-50%) scale(1);opacity:1}
  50%{transform:translate(-50%,-50%) scale(1.4);opacity:0.7}
}

/* ===== Responsive ===== */
@media(max-width:768px){
  /* TASK 5: Hide cursor on mobile */
  .ff-cursor{
    display:none !important;
  }
  body.ff-page{
    cursor:auto;
  }
  .ff-header{
    flex-direction:column;
    gap:12px;
    text-align:center;
  }
  .ff-controls{
    justify-content:center;
  }
  .ff-hero{
    padding:40px 16px 24px;
  }
  .ff-panel{
    padding:24px;
    margin-left:-16px;
    margin-right:-16px;
    border-radius:0;
  }
  .ff-grid{
    grid-template-columns:1fr;
  }
  .ff-container{
    padding:24px 16px;
  }
  /* TASK 5: Stack carousel vertically, disable animation */
  .ff-carousel-wrapper::before,
  .ff-carousel-wrapper::after{
    display:none;
  }
  .ff-carousel{
    flex-direction:column;
    animation:none;
    width:100%;
    gap:16px;
  }
  .ff-video-card,
  .ff-image-card{
    min-width:100%;
    max-width:100%;
  }
  /* Touch-friendly spacing */
  .ff-video-card{
    margin-bottom:4px;
  }
  .ff-image-card{
    margin-bottom:4px;
  }
  /* Hide duplicate carousel items on mobile */
  .ff-duplicate{
    display:none !important;
  }
  /* Full-width Instagram on mobile */
  .ff-instagram-fullwidth{
    padding:40px 16px 48px;
  }
  .ff-instagram-inner{
    padding:0;
  }
  .ff-instagram-cta{
    padding:12px 32px;
    font-size:14px;
  }
}

@media(max-width:480px){
  .ff-header{
    padding:14px 16px;
  }
  .ff-back{
    font-size:13px;
    padding:6px 14px;
  }
  .ff-logo{
    font-size:18px;
  }
  .ff-panel{
    padding:18px;
  }
  .ff-grid-item{
    padding:20px;
  }
  .ff-hero-title{
    font-size:clamp(32px,10vw,52px);
  }
}

/* ===== Page load fade ===== */
body.ff-page{
  animation:ffFadeIn 0.4s ease-out both;
}
@keyframes ffFadeIn{
  from{opacity:0}
  to{opacity:1}
}

/* ===== Accessibility: prefers-reduced-motion ===== */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:0.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.01ms !important;
    scroll-behavior:auto !important;
  }
}

