/* ============================================================
   PageFuse — Landing Page Styles
   Color palette: Rosé Pine Main
   ============================================================ */

:root {
  --bg:        #191724;
  --bg-alt:    #1f1d2e;
  --surface:   #26233a;
  --border:    #393552;
  --accent:    #f6c177;   /* gold — primary CTA */
  --accent-dim:#c99a5e;   /* darker gold */
  --iris:      #c4a7e7;   /* links */
  --foam:      #9ccfd8;   /* success / checks */
  --rose:      #ebbcba;   /* secondary highlight */
  --pine:      #31748f;   /* tertiary */
  --text:      #e0def4;
  --text-muted:#908caa;
  --text-dim:  #6e6a86;
  --green:     #9ccfd8;
  --red:       #eb6f92;
  --yellow:    #f6c177;
  --radius:    10px;
  --radius-lg: 16px;
  --font:      'Inter', system-ui, sans-serif;
  --mono:      'Roboto Mono', 'JetBrains Mono', monospace;
}

/* ---- LIGHT THEME (Rosé Pine Dawn) ---- */
[data-theme="light"] {
  --bg:        #faf4ed;
  --bg-alt:    #f2e9e1;
  --surface:   #fffaf3;
  --border:    #dfdad9;
  --accent:    #ea9d34;
  --accent-dim:#b87d27;
  --iris:      #907aa9;
  --foam:      #56949f;
  --rose:      #d7827a;
  --pine:      #286983;
  --text:      #464261;
  --text-muted:#797593;
  --text-dim:  #9893a5;
  --green:     #56949f;
  --red:       #b4637a;
  --yellow:    #ea9d34;
}

[data-theme="light"] .nav {
  background: rgba(250, 244, 237, 0.88);
}

[data-theme="light"] .hero h1 {
  background: linear-gradient(135deg, #464261 40%, #ea9d34);
  -webkit-background-clip: text;
  background-clip: text;
}

/* SVG logo element colors — CSS overrides SVG presentation attributes */
.logo-svg-bracket { stroke: var(--accent); }
.logo-svg-rect    { fill: var(--text); stroke: var(--text); }
.logo-svg-line    { stroke: var(--bg); }

/* ---- THEME TOGGLE ---- */
.theme-toggle {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.theme-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-muted);
  transition: background .15s, color .15s;
  line-height: 1;
}

.theme-btn.active {
  background: var(--accent);
  color: #191724;
}

[data-theme="light"] .theme-btn.active {
  color: #faf4ed;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--iris); text-decoration: none; }
a:hover { color: var(--text); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- NAV ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(25, 23, 36, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}

.logo-page { color: var(--text); }
.logo-fuse { color: var(--accent); }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color .15s;
}

.nav-links a:hover { color: var(--text); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background .15s, transform .1s;
  text-decoration: none;
  border: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 7px 16px; font-size: 13px; }

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent-dim); color: var(--bg); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--text); }

.nav .btn { background: var(--accent); color: var(--bg); font-size: 13px; padding: 7px 16px; }
.nav .btn:hover { background: var(--accent-dim); color: var(--bg); }

/* ---- HERO ---- */
.hero {
  padding: 96px 0 80px;
  text-align: center;
}

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-brand svg {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.hero-brand-text {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: -.02em;
  line-height: 1;
}

.badge {
  display: inline-block;
  background: rgba(246, 193, 119, 0.12);
  border: 1px solid rgba(246, 193, 119, 0.3);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
  letter-spacing: .02em;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #e0def4 40%, #f6c177);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 36px;
}

/* Install box */
.install-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 48px;
  font-family: var(--mono);
}

.install-label {
  font-size: 12px;
  font-family: var(--font);
  color: var(--text-dim);
  font-weight: 500;
  border-right: 1px solid var(--border);
  padding-right: 12px;
}

.install-box code {
  color: var(--text);
  font-size: 14px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

.copy-btn:hover { color: var(--text); border-color: var(--accent); }

/* Terminal */
.demo-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: demo-pulse 2.5s ease-in-out infinite;
  transition: opacity .15s;
}
.demo-link:hover { opacity: 0.75; animation: none; }

.demo-link::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: demo-dot 2.5s ease-in-out infinite;
}

@keyframes demo-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes demo-dot {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.5); }
}

.hero-terminal {
  max-width: 820px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red    { background: var(--red); }
.dot.yellow { background: var(--yellow); }
.dot.green  { background: var(--foam); }

.terminal-title {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-dim);
}

.terminal-body {
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre;
  overflow-x: auto;
}

.t-dim  { color: var(--text-dim); }
.t-out  { color: var(--accent); font-weight: 600; }
.t-ok   { color: var(--foam); }

/* ---- SECTIONS ---- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 48px;
}

/* ---- FORMATS ---- */
.fmt-panels {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fmt-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
}

.fmt-panel-header {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.fmt-columns {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
}

.fmt-col { flex: 1; min-width: 200px; }

.fmt-col-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.fmt-divider {
  font-size: 20px;
  color: var(--text-dim);
  padding-top: 28px;
  flex-shrink: 0;
  user-select: none;
}

.fmt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fmt-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 12px;
  cursor: default;
  transition: opacity .15s, border-color .15s, background .15s;
  user-select: none;
}

.fmt-icon { font-size: 14px; line-height: 1; flex-shrink: 0; }
.fmt-name { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; }
.fmt-ext  { font-size: 11px; font-family: var(--mono); color: var(--text-dim); white-space: nowrap; }

.fmt-chip.highlighted {
  border-color: var(--accent);
  background: rgba(246, 193, 119, 0.08);
}

.fmt-chip.dimmed {
  opacity: 0.25;
}

@media (max-width: 480px) {
  .fmt-panel { padding: 20px 18px; }
  .fmt-columns { flex-direction: column; gap: 20px; }
  .fmt-divider { display: none; }
}

.tag {
  background: rgba(246, 193, 119, 0.1);
  border: 1px solid rgba(246, 193, 119, 0.25);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---- HOW IT WORKS ---- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.how-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.how-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.how-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.how-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

/* ---- CODE BLOCKS ---- */
.code-block-wrap {
  position: relative;
  display: block;
  max-width: 480px;
  margin: 0 auto;
}

.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
}

.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 100px 14px 16px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
  text-align: left;
}

code {
  font-family: var(--mono);
  background: var(--surface);
  color: var(--foam);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .9em;
}

/* ---- FEATURES ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.feature { padding: 8px 0; }
.feature-icon { font-size: 1.5rem; margin-bottom: 10px; }

.feature h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ---- PRICING ---- */
.pricing-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  align-items: stretch;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  min-width: 280px;
  max-width: 340px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  text-align: center;
  align-items: center;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.pricing-btn {
  width: 100%;
  justify-content: center;
}

.pricing-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 40px rgba(246, 193, 119, 0.15);
}

.promo-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(246, 193, 119, 0.08);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  padding: 8px 12px;
  width: 100%;
  justify-content: center;
}

.promo-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.promo-code {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .06em;
}

.promo-copy-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font);
  padding: 2px 4px;
  border-radius: 4px;
  transition: color .15s;
}

.promo-copy-btn:hover { color: var(--accent); }

.pricing-soon {
  opacity: 0.6;
  pointer-events: none;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.coming-soon-pill {
  display: inline-block;
  background: rgba(144, 140, 170, 0.12);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 999px;
  text-align: center;
  width: 100%;
}

.pricing-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 16px 48px rgba(246, 193, 119, 0.15);
  transform: translateY(-4px);
}

.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #191724;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-tier {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-num {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
}

.price-unit {
  color: var(--text-muted);
  font-size: 14px;
}

.pricing-desc {
  color: var(--text-muted);
  font-size: 13px;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.pricing-features li {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--foam);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---- INSTALL SECTION ---- */
.install-section { text-align: center; }

.install-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  padding: 6px 16px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.tab-btn.active, .tab-btn:hover {
  background: var(--accent);
  color: #191724;
}

.tab-content { display: none; max-width: 500px; margin: 0 auto; }
.tab-content.active { display: block; }

/* Demo section */
.demo-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.demo-tab-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--mono);
  padding: 6px 18px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.demo-tab-btn.active, .demo-tab-btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.demo-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 860px;
  margin: 0 auto;
  background: #1a1a2e;
}

.demo-pane { display: none; }
.demo-pane.active { display: block; }

.demo-gif {
  width: 100%;
  display: block;
}

.install-note {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 12px;
}

.docs-link {
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
}

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

.footer-copy {
  color: var(--text-dim);
  font-size: 13px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 64px 0 56px; }
  .install-box { flex-wrap: wrap; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { margin-left: 0; }
  .pricing-card { min-width: 100%; }
}
