/* =============================================
   FocusFrame Landing Page — style.css
   Dark theme, accent #0078D4 (Windows blue)
   ============================================= */

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

:root {
  --bg:          #0a0a12;
  --bg-card:     #12121e;
  --bg-card-alt: #16162a;
  --border:      #1e1e3a;
  --border-l:    #2a2a4a;
  --text:        #e8e8f0;
  --text-sec:    #9090b0;
  --text-dim:    #606080;
  --accent:      #0078D4;
  --accent-glow: rgba(0,120,212,.35);
  --accent-dim:  rgba(0,120,212,.12);
  --green:       #30D158;
  --green-dim:   rgba(48,209,88,.12);
  --purple:      #a78bfa;
  --purple-dim:  rgba(167,139,250,.12);
  --red:         #FF3B30;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:        'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --transition:  .2s ease;
  --max-w:       1120px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }
img, svg { display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #3da0f0; }
code { font-family: var(--mono); font-size: .875em; background: var(--bg-card-alt); padding: 2px 6px; border-radius: 4px; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* --- NAV --- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; backdrop-filter: blur(16px); background: rgba(10,10,18,.8); border-bottom: 1px solid var(--border); transition: background .3s, box-shadow .3s; }
.nav.scrolled { background: rgba(10,10,18,.95); box-shadow: 0 4px 20px rgba(0,0,0,.3); }
.nav-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--text); }
.logo:hover { color: var(--accent); }
.logo-img { width: 28px; height: 28px; display: block; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-sec); font-size: .9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* --- BUTTONS --- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font); font-weight: 600; border-radius: var(--radius-sm); border: none; cursor: pointer; transition: all var(--transition); text-decoration: none; }
.btn-sm { padding: 6px 16px; font-size: .85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 0 20px var(--accent-glow); }
.btn-primary:hover { background: #1a8fe8; color: #fff; box-shadow: 0 0 30px rgba(0,120,212,.5); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--text-sec); border: 1px solid var(--border-l); }
.btn-secondary:hover { color: var(--text); border-color: var(--text-dim); }
.btn-arrow { transition: transform var(--transition); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* --- TAGS --- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; font-size: .8rem; font-weight: 500; }
.tag--blue { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,120,212,.2); }
.tag--green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(48,209,88,.2); }
.tag--purple { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(167,139,250,.2); }

/* --- HERO --- */
.hero { padding: 140px 0 80px; text-align: center; position: relative; }
.hero-glow { position: absolute; top: -100px; left: 50%; transform: translateX(-50%); width: 700px; height: 500px; background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%); pointer-events: none; z-index: 0; animation: glow-float 6s ease-in-out infinite; }
@keyframes glow-float {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  50%      { transform: translateX(-50%) translateY(-20px) scale(1.05); }
}
.hero-particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,120,212,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,120,212,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black, transparent);
  animation: grid-drift 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 60px 60px, 60px 60px; }
}
.hero-content { position: relative; z-index: 1; }
.hero-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.15; margin-bottom: 20px; letter-spacing: -.02em; }
.gradient-text { background: linear-gradient(135deg, var(--accent) 0%, #60b8ff 50%, var(--purple) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; background-size: 200% 200%; animation: gradient-shift 4s ease-in-out infinite; }
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.hero-sub { max-width: 560px; margin: 0 auto 36px; font-size: 1.15rem; color: var(--text-sec); line-height: 1.7; }
.hero-cta-wrap { margin-bottom: 56px; }
.cta-reassure { margin-top: 14px; font-size: .82rem; color: var(--text-dim); }

/* Hero entrance */
.hero-tags, .hero h1, .hero-sub, .hero-cta-wrap, .hero-demo {
  opacity: 0;
  animation: hero-in .8s cubic-bezier(.16,1,.3,1) forwards;
}
.hero-tags       { animation-delay: .1s; }
.hero h1         { animation-delay: .25s; }
.hero-sub        { animation-delay: .4s; }
.hero-cta-wrap   { animation-delay: .55s; }
.hero-demo       { animation-delay: .7s; }
@keyframes hero-in {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- HERO DEMO --- */
.hero-demo { max-width: 520px; margin: 0 auto; }
.demo-border { padding: 3px; border-radius: var(--radius); animation: border-cycle 8s linear infinite; }
@keyframes border-cycle {
  0%   { background: #0078D4; box-shadow: 0 0 24px rgba(0,120,212,.4), 0 0 60px rgba(0,120,212,.15); }
  33%  { background: #a78bfa; box-shadow: 0 0 24px rgba(167,139,250,.4), 0 0 60px rgba(167,139,250,.15); }
  66%  { background: #30D158; box-shadow: 0 0 24px rgba(48,209,88,.4), 0 0 60px rgba(48,209,88,.15); }
  100% { background: #0078D4; box-shadow: 0 0 24px rgba(0,120,212,.4), 0 0 60px rgba(0,120,212,.15); }
}
.demo-window { background: var(--bg-card); border-radius: calc(var(--radius) - 2px); overflow: hidden; }
.demo-titlebar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--bg-card-alt); border-bottom: 1px solid var(--border); }
.demo-dots { display: flex; gap: 6px; }
.demo-dots span { width: 10px; height: 10px; border-radius: 50%; }
.demo-dots span:nth-child(1) { background: var(--red); }
.demo-dots span:nth-child(2) { background: #FFCC00; }
.demo-dots span:nth-child(3) { background: var(--green); }
.demo-title { font-size: .78rem; color: var(--text-sec); }
.demo-body { padding: 20px 16px; }
.demo-line { height: 10px; background: var(--border-l); border-radius: 4px; margin-bottom: 10px; position: relative; overflow: hidden; }
.demo-line:last-child { margin-bottom: 0; }
.demo-line::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.06) 50%, transparent 100%);
  animation: line-shimmer 2.5s ease-in-out infinite;
  transform: translateX(-100%);
}
.demo-line:nth-child(2)::after { animation-delay: .3s; }
.demo-line:nth-child(3)::after { animation-delay: .6s; }
.demo-line:nth-child(4)::after { animation-delay: .9s; }
@keyframes line-shimmer {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}
.demo-caption { margin-top: 16px; font-size: .82rem; color: var(--text-dim); }

/* --- SECTION STYLES --- */
.section-label { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 12px; }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; line-height: 1.2; margin-bottom: 16px; letter-spacing: -.02em; }
.section-sub { font-size: 1.05rem; color: var(--text-sec); max-width: 600px; line-height: 1.7; margin-bottom: 48px; }

/* === FOCUSFRAME-STYLE CARD HIGHLIGHT === */
/* Cards get a colored border on hover, like the app highlights windows */
.pain-card, .feature-card, .usecase {
  --card-color: var(--accent);
  --card-glow: var(--accent-glow);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .3s, box-shadow .3s, transform .3s;
  position: relative;
}
.pain-card:hover, .feature-card:hover, .usecase:hover {
  border-color: var(--card-color);
  box-shadow: 0 0 20px var(--card-glow), inset 0 0 20px color-mix(in srgb, var(--card-color) 6%, transparent);
  transform: translateY(-3px);
}

/* --- PROBLEM --- */
.problem { padding: 100px 0; }
.pain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.pain-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 10px; margin-bottom: 16px; }
.pain-card h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.pain-card p { font-size: .9rem; color: var(--text-sec); line-height: 1.6; }
.pain-card code { font-size: .8rem; }

/* --- FEATURES --- */
.features { padding: 100px 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.feature-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; margin-bottom: 16px; }
.feature-card h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: .9rem; color: var(--text-sec); line-height: 1.6; }

/* --- HOW IT WORKS --- */
.how { padding: 100px 0; }
.steps { max-width: 660px; display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 24px; align-items: flex-start; position: relative; padding-bottom: 40px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ''; position: absolute; left: 23px; top: 48px; bottom: 0; width: 2px; background: var(--border); transform-origin: top; transform: scaleY(0); transition: transform .6s cubic-bezier(.16,1,.3,1) .3s; }
.step:last-child::before { display: none; }
.steps.revealed .step::before { transform: scaleY(1); }
.step-num { flex-shrink: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--accent-dim); border: 1px solid rgba(0,120,212,.3); border-radius: 50%; color: var(--accent); }
.steps.revealed .step-num {
  animation: step-pop .5s cubic-bezier(.16,1,.3,1) backwards;
}
.steps.revealed .step:nth-child(1) .step-num { animation-delay: .1s; }
.steps.revealed .step:nth-child(2) .step-num { animation-delay: .4s; }
.steps.revealed .step:nth-child(3) .step-num { animation-delay: .7s; }
@keyframes step-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.step-content h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.step-content p { font-size: .9rem; color: var(--text-sec); line-height: 1.6; }
.step-content code { font-size: .8rem; }

/* --- CONFIGURE --- */
.configure { padding: 100px 0; }
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; margin-bottom: 56px; }
.config-visual { display: flex; }
.config-window { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; width: 100%; }
.config-titlebar { padding: 10px 16px; background: var(--bg-card-alt); border-bottom: 1px solid var(--border); font-size: .8rem; color: var(--text-dim); font-weight: 500; display: flex; align-items: center; gap: 12px; }
.config-dots { display: flex; gap: 6px; }
.config-dots span { width: 8px; height: 8px; border-radius: 50%; }
.config-dots span:nth-child(1) { background: var(--red); }
.config-dots span:nth-child(2) { background: #FFCC00; }
.config-dots span:nth-child(3) { background: var(--green); }
.config-code { padding: 20px; font-family: var(--mono); font-size: .85rem; line-height: 1.8; overflow-x: auto; flex: 1; display: flex; align-items: center; }
.config-code code { background: none; padding: 0; }
.config-code::after { content: '|'; color: var(--accent); animation: blink-cursor .8s step-end infinite; font-weight: 300; }
@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.ck { color: #7dd3fc; }
.cv { color: #86efac; }
.cn { color: #fbbf24; }
.cb { color: var(--purple); }

.config-params { display: flex; flex-direction: column; gap: 12px; }
.param { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; transition: border-color .2s; }
.param:hover { border-color: var(--border-l); }
.param-row { display: flex; align-items: center; gap: 14px; }
.param-icon { flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.param-info { flex: 1; min-width: 0; }
.param-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.param-name { font-family: var(--mono); font-size: .82rem; font-weight: 600; color: var(--accent); }
.param-type { font-size: .72rem; color: var(--text-dim); }
.param p { font-size: .82rem; color: var(--text-sec); line-height: 1.4; }
.color-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-left: 4px; border: 1px solid rgba(255,255,255,.15); }

/* --- PRESET SLIDERS --- */
.presets-title { font-size: 1rem; font-weight: 700; margin-bottom: 20px; text-align: center; }
.slider-track { overflow: hidden; margin-bottom: 14px; mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); }
.slider-inner { display: flex; gap: 14px; width: max-content; }
.slider-track--left .slider-inner { animation: slide-left 40s linear infinite; }
.slider-track--right .slider-inner { animation: slide-right 40s linear infinite; }
@keyframes slide-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes slide-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.slider-track:hover .slider-inner { animation-play-state: paused; }
.preset-chip { flex-shrink: 0; width: 140px; height: 80px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; position: relative; transition: border-color .2s, transform .2s; }
.preset-chip:hover { transform: scale(1.06); border-color: var(--pc, var(--border-l)); }
.chip-border { width: 50px; height: 30px; border: 2px solid var(--pc, #fff); border-radius: 3px; }
.chip-border--glow { box-shadow: inset 0 0 8px var(--pc, #fff); }
.preset-chip span { font-size: .72rem; color: var(--text-sec); font-weight: 500; }

/* --- USE CASES --- */
.usecases { padding: 100px 0; }
.usecase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.usecase { text-align: center; }
.usecase-icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 12px; margin: 0 auto 16px; }
.usecase h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.usecase p { font-size: .88rem; color: var(--text-sec); line-height: 1.5; }

/* --- INSTALL CTA --- */
.install { padding: 80px 0 100px; }
.install-card { background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0,120,212,.08) 100%); border: 1px solid rgba(0,120,212,.2); border-radius: var(--radius-lg); padding: 56px 48px; text-align: center; }
.install-card h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 36px; }
.install-steps { max-width: 560px; margin: 0 auto 28px; display: flex; flex-direction: column; gap: 12px; }
.install-step { display: flex; align-items: center; gap: 14px; }
.install-step-num { flex-shrink: 0; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--accent-dim); border-radius: 50%; font-size: .8rem; font-weight: 700; color: var(--accent); }
.install-code { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 16px; text-align: left; }
.install-code code { font-family: var(--mono); font-size: .82rem; color: var(--text-sec); background: none; padding: 0; }
.install-note { font-size: .85rem; color: var(--text-dim); margin-bottom: 28px; line-height: 1.6; }
.install-note code { font-size: .8rem; }

/* --- FOOTER --- */
.footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-brand { font-size: .88rem; color: var(--text-sec); }
.footer-brand a { color: var(--text); font-weight: 600; }
.footer-license { font-size: .82rem; color: var(--text-dim); }

/* --- SCROLL REVEAL --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

[data-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s cubic-bezier(.16,1,.3,1), transform .5s cubic-bezier(.16,1,.3,1);
}
[data-stagger].revealed > *:nth-child(1) { transition-delay: 0s; }
[data-stagger].revealed > *:nth-child(2) { transition-delay: .08s; }
[data-stagger].revealed > *:nth-child(3) { transition-delay: .16s; }
[data-stagger].revealed > *:nth-child(4) { transition-delay: .24s; }
[data-stagger].revealed > *:nth-child(5) { transition-delay: .32s; }
[data-stagger].revealed > *:nth-child(6) { transition-delay: .4s; }
[data-stagger].revealed > * { opacity: 1; transform: translateY(0); }

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  [data-stagger] > * { opacity: 1; transform: none; }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .nav-links a:not(.btn) { display: none; }
  .config-grid { grid-template-columns: 1fr; }
  .hero { padding: 120px 0 60px; }
  .problem, .features, .how, .configure, .usecases { padding: 60px 0; }
  .install-card { padding: 36px 24px; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
  .pain-grid, .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-tags { gap: 6px; }
  .tag { font-size: .72rem; padding: 4px 10px; }
  .btn-lg { padding: 12px 24px; font-size: .95rem; }
}
