/* ============================================================
   Folder Templates landing page
   Self-contained, no build step. Same system as the BRUV site,
   retinted blue → cyan → green to match the blueprint-folder icon.
   ============================================================ */

:root {
  --bg: #04111a;
  --bg-2: #071a26;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-bright: rgba(34, 211, 238, 0.42);
  --text: #e8f2f7;
  --text-muted: #9fb6c3;
  --text-faint: #648090;

  --blue: #3b82f6;
  --sky: #60a5fa;
  --cyan: #22d3ee;
  --teal: #2dd4bf;
  --green: #34d399;

  --grad: linear-gradient(110deg, #60a5fa 0%, #22d3ee 50%, #34d399 100%);
  --grad-soft: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(52, 211, 153, 0.13));
  --glow: 0 0 0 1px rgba(34, 211, 238, 0.35), 0 18px 60px -18px rgba(14, 165, 233, 0.55);

  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --maxw: 1140px;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 700px at 12% -8%, rgba(59, 130, 246, 0.24), transparent 60%),
    radial-gradient(1000px 720px at 92% 4%, rgba(52, 211, 153, 0.15), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, rgba(34, 211, 238, 0.16), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.18);
  color: #bdeefb;
  white-space: nowrap;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.inline-link { color: var(--cyan); border-bottom: 1px solid rgba(34, 211, 238, 0.4); }
.inline-link:hover { border-bottom-color: var(--cyan); }

/* ---------- drifting orbs ---------- */
.orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5;
  animation: drift 22s ease-in-out infinite;
}
.orb-a { width: 460px; height: 460px; top: -120px; left: -80px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.9), transparent 70%); }
.orb-b { width: 520px; height: 520px; top: 8%; right: -160px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.6), transparent 70%); animation-delay: -7s; }
.orb-c { width: 560px; height: 560px; bottom: -220px; left: 30%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.6), transparent 70%); animation-delay: -13s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
}

/* ---------- layout primitives ---------- */
main { position: relative; z-index: 1; }
.section {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto; padding: 96px 24px;
}
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 14px;
}
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
.section-head p { color: var(--text-muted); margin: 16px 0 0; font-size: 1.08rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
  backdrop-filter: blur(10px);
}
.brand {
  display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.01em;
  transform-origin: left top;
  will-change: transform;
}
.brand img { filter: drop-shadow(0 4px 14px rgba(59, 130, 246, 0.55)); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.95rem; color: var(--text-muted); }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px; color: var(--text) !important;
  background: var(--surface-2); border: 1px solid var(--border);
}
.nav-cta:hover { border-color: var(--border-bright); }
.gh-ico { width: 16px; height: 16px; fill: currentColor; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- hero ---------- */
.hero {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto; padding: 112px 24px 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  color: var(--text); background: var(--grad-soft); border: 1px solid var(--border-bright);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero h1 { font-size: clamp(2.5rem, 5.6vw, 3.9rem); font-weight: 900; margin: 20px 0 0; }
.lede { color: var(--text-muted); font-size: 1.14rem; margin: 20px 0 0; max-width: 540px; }
.fineprint { color: var(--text-faint); font-size: 0.9rem; margin-top: 18px; }

.cta-row { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.cta-row.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 24px; border-radius: 12px; font-weight: 700; font-size: 1rem;
  border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.btn-ico { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { color: #03141d; background: var(--grad); box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.5), 0 24px 70px -16px rgba(52, 211, 153, 0.55); }
.btn-ghost { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-bright); transform: translateY(-2px); }

.hero-art { position: relative; }
.hero-glow {
  position: absolute; inset: -10% -6% -10% -6%; z-index: 0; border-radius: 40px;
  background: var(--grad); opacity: 0.2; filter: blur(60px);
}

/* ---------- screenshots in a drawn window frame ---------- */
.shot {
  position: relative; z-index: 1; margin: 0;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-bright);
  background: #1c1c1f;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85);
}
.win-bar {
  display: flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 10px;
  background: #16161a; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.72rem; color: #a1a1aa;
}
.win-bar-light { background: #e4e7ec; border-bottom-color: rgba(0, 0, 0, 0.08); color: #42526e; }
.win-bar img { width: 15px; height: 15px; }
.win-bar span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.win-bar i { width: 26px; height: 2px; position: relative; opacity: 0.55; }
.win-bar i::before { content: ''; position: absolute; left: 8px; right: 8px; top: 0; height: 1px; background: currentColor; }
.win-bar i:nth-of-type(2)::before { top: -4px; height: 9px; background: none; border: 1px solid currentColor; }
.win-bar i:nth-of-type(3)::before { top: 0; height: 1px; transform: rotate(45deg); }
.win-bar i:nth-of-type(3)::after { content: ''; position: absolute; left: 8px; right: 8px; top: 0; height: 1px; background: currentColor; transform: rotate(-45deg); }
.shot > img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.shot figcaption {
  padding: 12px 16px; font-size: 0.88rem; color: var(--text-muted);
  border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.02);
}
.shot-hero { transform: perspective(1600px) rotateY(-4deg); transition: transform 0.4s ease; }
.shot-hero:hover { transform: perspective(1600px) rotateY(0deg); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.gallery .shot { transition: transform 0.2s ease, box-shadow 0.25s ease; }
.gallery .shot:hover { transform: translateY(-4px); box-shadow: 0 30px 70px -28px rgba(14, 165, 233, 0.55); }

/* ---------- pillars ---------- */
.pillars {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 30px auto 0; padding: 0 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.pillar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 22px; backdrop-filter: blur(6px);
}
.pillar h3 { font-size: 1.1rem; font-weight: 700; margin: 14px 0 8px; }
.pillar p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ---------- icons ---------- */
.ico {
  width: 30px; height: 30px; fill: none; stroke: url(#ng);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.ico-sm { width: 20px; height: 20px; }

/* ---------- cards & grids ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px; backdrop-filter: blur(6px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  background: var(--grad-soft); opacity: 0; transition: opacity 0.25s ease; pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-bright); box-shadow: 0 24px 60px -28px rgba(14, 165, 233, 0.55); }
.card:hover::before { opacity: 1; }
.card h3 { position: relative; font-size: 1.18rem; font-weight: 700; margin: 16px 0 9px; }
.card > h3:first-child { margin-top: 0; }
.card p { position: relative; color: var(--text-muted); font-size: 0.96rem; margin: 0; }
.plain { position: relative; margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 0.96rem; display: grid; gap: 8px; }
.plain li::marker { color: var(--cyan); }

/* ---------- how it works ---------- */
.flow {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px; align-items: stretch;
}
.step { padding-top: 34px; }
.step-num {
  position: absolute; top: 16px; right: 20px;
  font-family: var(--mono); font-size: 0.8rem; color: var(--text-faint);
}
.flow-arrow, .anatomy-arrow {
  width: 26px; height: 26px; align-self: center; flex-shrink: 0;
  fill: none; stroke: url(#ng); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.anatomy {
  margin-top: 36px;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center;
}
.anatomy-col {
  background: rgba(3, 12, 18, 0.7); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 20px 18px;
}
.anatomy-label {
  display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 10px;
}
.tree {
  margin: 0; font-family: var(--mono); font-size: 0.86rem; line-height: 1.75; color: var(--text-faint);
  overflow-x: auto;
}
.t-dir { color: var(--sky); }
.t-file { color: var(--text); }
.t-ft { color: var(--cyan); font-weight: 500; }
.t-hidden { color: var(--text-faint); font-style: italic; }
.t-note {
  font-family: 'Inter', sans-serif; font-size: 0.7rem; padding: 1px 7px; border-radius: 999px;
  color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.55);
}
.anatomy-note { text-align: center; color: var(--text-muted); font-size: 0.95rem; margin: 24px auto 0; max-width: 680px; }

/* ---------- spotlights ---------- */
.spotlight {
  background:
    radial-gradient(800px 400px at 80% 20%, rgba(52, 211, 153, 0.09), transparent 60%),
    linear-gradient(180deg, rgba(59, 130, 246, 0.06), transparent);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  max-width: none; padding-left: 24px; padding-right: 24px;
}
.spotlight-alt {
  background:
    radial-gradient(800px 400px at 20% 20%, rgba(59, 130, 246, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(52, 211, 153, 0.05), transparent);
  border-top: 0;
}
.spotlight-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center;
}
.spotlight-copy h2 { margin-top: 10px; }
.spotlight-copy > p { color: var(--text-muted); font-size: 1.08rem; margin: 16px 0 24px; }
.spotlight-copy strong { color: var(--text); }
@media (min-width: 921px) {
  .spotlight-grid.flip { grid-template-columns: 1.1fr 1fr; }
  .spotlight-grid.flip .spotlight-copy { order: 2; }
  .spotlight-grid.flip .spotlight-art { order: 1; }
}
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; color: var(--text); }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--grad-soft); border: 1px solid var(--border-bright);
}
.ticks li::after {
  content: ''; position: absolute; left: 6px; top: 8px; width: 6px; height: 9px;
  border: solid var(--green); border-width: 0 2px 2px 0; transform: rotate(40deg);
}
.spotlight-art { display: flex; justify-content: center; }

/* Explorer context-menu illustration (not a screenshot) */
.menu-mock {
  position: relative; width: min(420px, 100%); aspect-ratio: 4 / 3;
  border-radius: var(--radius); border: 1px solid var(--border-bright);
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 100% 38px,
    linear-gradient(160deg, #0b1d29, #06121a 70%);
  box-shadow: var(--glow);
}
.menu-folder {
  position: absolute; top: 22px; left: 24px;
  display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.9rem;
}
.menu {
  position: absolute; left: 22%; top: 24%; width: 64%;
  padding: 6px; border-radius: 10px;
  background: rgba(32, 34, 40, 0.96); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.8);
  font-size: 0.86rem;
}
.menu-item { display: flex; align-items: center; gap: 9px; padding: 7px 12px; border-radius: 6px; color: var(--text); }
.menu-item span { margin-left: auto; color: var(--text-faint); }
.menu-item img { width: 16px; height: 16px; }
.menu-item.muted { color: var(--text-muted); }
.menu-item.hot { background: rgba(34, 211, 238, 0.14); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.4); font-weight: 600; }
.menu-sep { height: 1px; margin: 5px 8px; background: rgba(255, 255, 255, 0.08); }

/* ---------- terminal ---------- */
.terminal {
  max-width: 900px; margin: 0 auto;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border-bright); background: #030b10;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}
.term-bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-faint);
}
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.term-bar span { margin-left: 8px; }
.terminal pre {
  margin: 0; padding: 18px 20px 20px; overflow-x: auto;
  font-family: var(--mono); font-size: 0.84rem; line-height: 1.7; color: var(--text);
}
.t-prompt { color: var(--green); }
.t-flag { color: var(--sky); }
.t-out { color: var(--text-muted); }
.t-comment { color: var(--text-faint); font-style: italic; }
.terminal .t-note { font-family: var(--mono); font-size: 0.8rem; padding: 0; border: 0; color: var(--cyan); }
.cli-note { text-align: center; color: var(--text-muted); margin: 24px 0 0; font-size: 0.95rem; }

/* ---------- author's note ---------- */
.note-card {
  max-width: 720px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px 44px; backdrop-filter: blur(6px);
}
.note-head { display: flex; align-items: center; gap: 16px; }
.note-head .eyebrow { margin-bottom: 0; }
.note-avatar {
  border-radius: 50%; border: 1px solid var(--border-bright);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14), 0 6px 24px -8px rgba(14, 165, 233, 0.5);
}
.note-card p { color: var(--text-muted); font-size: 1.02rem; margin: 14px 0 0; }
.note-card p:first-of-type { margin-top: 18px; }
.note-sign { text-align: right; font-style: italic; color: var(--text); }

/* ---------- final cta ---------- */
.cta-final {
  position: relative; z-index: 1; text-align: center;
  max-width: 760px; margin: 30px auto 0; padding: 90px 24px;
}
.cta-final img { margin: 0 auto 22px; filter: drop-shadow(0 8px 30px rgba(59, 130, 246, 0.6)); }
.cta-final h2 { font-size: clamp(2rem, 5vw, 3rem); }
.cta-final p { color: var(--text-muted); margin: 16px 0 30px; }
.cta-final p strong { color: var(--text); }
.deal {
  list-style: none; padding: 0; margin: 44px auto 0; max-width: 560px;
  display: grid; gap: 12px; text-align: left;
}
.deal li {
  color: var(--text-faint); font-size: 0.92rem; line-height: 1.5;
  padding-left: 18px; position: relative;
}
.deal li::before {
  content: ''; position: absolute; left: 0; top: 9px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--grad-soft); border: 1px solid var(--border-bright);
}
.deal strong { color: var(--text-muted); font-weight: 600; }

/* ---------- footer ---------- */
.footer {
  position: relative; z-index: 1; border-top: 1px solid var(--border);
  max-width: var(--maxw); margin: 60px auto 0; padding: 36px 24px 56px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px;
}
.footer-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; color: var(--text-muted); font-size: 0.95rem; }
.footer-links a:hover { color: var(--text); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center; padding: 4vmin;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: lb-in 0.18s ease;
}
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 92vw; }
.lb-img {
  max-width: 92vw; max-height: 82vh; width: auto; height: auto; border-radius: 12px;
  border: 1px solid var(--border-bright); box-shadow: 0 50px 140px -20px rgba(0, 0, 0, 0.9); cursor: zoom-out;
}
.lb-cap { color: var(--text-muted); font-size: 0.92rem; text-align: center; }
.lb-btn {
  position: absolute; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 999px; cursor: pointer; line-height: 1;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  font-size: 1.5rem; transition: border-color 0.2s ease, background 0.2s ease;
}
.lb-btn:hover { border-color: var(--border-bright); background: var(--grad-soft); }
.lb-close { top: 20px; right: 22px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 2rem; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 40px; }
  .hero-art { order: -1; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .spotlight-grid { grid-template-columns: 1fr; gap: 36px; }
  .gallery { grid-template-columns: 1fr; }
  .shot-hero { transform: none; }
  .nav-links a:not(.nav-cta) { display: none; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  .anatomy { grid-template-columns: 1fr; }
  .anatomy-arrow { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 64px 20px; }
  .pillars, .grid { grid-template-columns: 1fr; }
  .cta-row { flex-direction: column; }
  .btn { justify-content: center; }
  .footer { flex-direction: column; align-items: flex-start; }
  .note-card { padding: 28px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
