/* =====================================================================
   FreeLabels — Site Theme
   Brand refresh based on the FreeLabels Desktop reference page.
   ---------------------------------------------------------------------
   Structure of this file:
   1. Design tokens (safe to load on every page — variables only)
   2. #site-header / #site-footer — shared chrome, scoped by ID so it
      can be safely included on every page, including the camel.php
      label designer, without touching that tool's Bootstrap styling.
   3. .fl-theme ... — the marketing-page component library (hero,
      features, FAQ, steps, etc). Scoped under .fl-theme so it never
      leaks into camel.php's own UI.
   ===================================================================== */

:root {
  --bg: #FAF9F4;
  --surface: #FFFFFF;
  --ink: #1A2035;
  --ink-soft: #4B5165;
  --primary: #D9232D;
  --primary-dark: #A81820;
  --accent: #E3A72D;
  --accent-dark: #C78E1C;
  --stamp: #2E7D5B;
  --line: #E1DACB;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 10px;
  --max-w: 1160px;
}

/* =====================================================================
   2. SHARED HEADER
   ===================================================================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(250, 249, 244, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
}
#site-header .wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
#site-header .logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
#site-header .logo .mark {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex: none;
}
#site-header .site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14.5px;
}
#site-header .site-nav a:not(.btn-cta) {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  white-space: nowrap;
}
#site-header .site-nav a:not(.btn-cta):hover,
#site-header .site-nav a.active:not(.btn-cta) {
  color: var(--ink);
}
#site-header .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}
#site-header .btn-cta:hover { background: var(--accent-dark); }

#site-header .nav-toggle-input { display: none; }
#site-header .nav-toggle-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}
#site-header .nav-toggle-btn span {
  width: 22px; height: 2px; background: var(--ink); display: block; border-radius: 2px;
}

@media (max-width: 900px) {
  #site-header .nav-toggle-btn { display: flex; }
  #site-header .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  #site-header .site-nav a { padding: 14px 24px; border-top: 1px solid var(--line); }
  #site-header .site-nav a.btn-cta { margin: 14px 24px; justify-content: center; }
  #site-header .nav-toggle-input:checked ~ .site-nav { max-height: 480px; }
}

/* =====================================================================
   2b. SHARED FOOTER
   ===================================================================== */
#site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 46px 0 26px;
  font-size: 13.5px;
  font-family: var(--font-body);
}
#site-footer .wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
#site-footer .flogo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  margin-bottom: 10px;
}
#site-footer .flogo .mark {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: none;
}
#site-footer .fcols {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 30px;
  margin-bottom: 18px;
}
#site-footer .fcol { min-width: 200px; }
#site-footer .fcol h4 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 12px;
  font-weight: 600;
}
#site-footer .fcol p { margin: 0 0 4px; color: rgba(255, 255, 255, 0.65); }
#site-footer .fcol a {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  margin-bottom: 9px;
}
#site-footer .fcol a:hover { color: #fff; }
#site-footer .bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
#scroll-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 998;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 18px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, background 0.15s ease;
}
#scroll-top.active { opacity: 1; visibility: visible; }
#scroll-top:hover { background: var(--primary-dark); }

/* =====================================================================
   3. MARKETING PAGE COMPONENT LIBRARY (scoped under .fl-theme)
   ===================================================================== */
.fl-theme {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.fl-theme h1, .fl-theme h2, .fl-theme h3, .fl-theme h4 {
  font-family: var(--font-display); color: var(--ink); margin: 0;
}
.fl-theme a { color: inherit; }
.fl-theme .wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.fl-theme section { padding: 84px 0; }
.fl-theme .eyebrow {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary);
  display: inline-flex; align-items: center; gap: 8px;
}
.fl-theme .eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--accent); display: inline-block; border-radius: 1px; }

/* buttons */
.fl-theme .btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 8px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
}
.fl-theme .btn-primary { background: var(--accent); color: var(--ink); }
.fl-theme .btn-primary:hover { background: var(--accent-dark); }
.fl-theme .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.fl-theme .btn-ghost:hover { border-color: rgba(255,255,255,0.7); }
.fl-theme .btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.fl-theme .btn-outline:hover { background: var(--primary); color: #fff; }

/* hero (marketing pages) */
.fl-theme .hero {
  background: var(--primary);
  background-image: radial-gradient(circle at 85% 15%, rgba(255,255,255,0.06), transparent 45%);
  color: #fff;
  padding: 72px 0 0;
  overflow: hidden;
}
.fl-theme .hero .wrap { display: grid; grid-template-columns: 1fr; gap: 46px; align-items: center; padding-bottom: 60px; }
@media (min-width: 940px) { .fl-theme .hero .wrap { grid-template-columns: 1.05fr 0.95fr; } }
.fl-theme .hero h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.14; font-weight: 700; margin: 18px 0 20px; letter-spacing: -0.01em; color: #fff; }
.fl-theme .hero .eyebrow { color: var(--accent); }
.fl-theme .hero .eyebrow::before { background: #fff; }
.fl-theme .hero p.lead { font-size: 17px; color: rgba(255,255,255,0.82); max-width: 50ch; margin: 0 0 28px; }
.fl-theme .hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.fl-theme .hero .micro { font-family: var(--font-mono); font-size: 12.5px; color: rgba(255,255,255,0.55); margin: 0; }

/* simple page-header (for legal / how-to / about pages) */
.fl-theme .page-hero { background: var(--primary); color: #fff; padding: 62px 0 54px; }
.fl-theme .page-hero .eyebrow { color: var(--accent); }
.fl-theme .page-hero .eyebrow::before { background: #fff; }
.fl-theme .page-hero h1 { font-size: clamp(28px, 4vw, 40px); margin: 14px 0 12px; color: #fff; }
.fl-theme .page-hero p { color: rgba(255,255,255,0.8); max-width: 60ch; margin: 0; font-size: 16.5px; }

/* label-sheet signature visual */
.fl-theme .label-stack { position: relative; height: 340px; }
.fl-theme .sticker {
  position: absolute; width: 210px; background: #fff; border-radius: 6px; padding: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.28); color: var(--ink);
}
.fl-theme .sticker .qr {
  width: 42px; height: 42px;
  background:
    linear-gradient(var(--ink) 0 100%) 0 0/10px 10px no-repeat,
    linear-gradient(var(--ink) 0 100%) 32px 0/10px 10px no-repeat,
    linear-gradient(var(--ink) 0 100%) 0 32px/10px 10px no-repeat,
    repeating-conic-gradient(var(--ink) 0 90deg, transparent 0 180deg) 13px 13px/16px 16px;
  border: 2px solid var(--ink); float: left; margin-right: 10px;
}
.fl-theme .sticker .lines { padding-top: 2px; }
.fl-theme .sticker .lines span { display: block; height: 6px; border-radius: 2px; background: #DCDFE6; margin-bottom: 6px; }
.fl-theme .sticker .lines span:nth-child(1) { width: 78%; background: var(--primary); opacity: 0.7; }
.fl-theme .sticker .lines span:nth-child(2) { width: 60%; }
.fl-theme .sticker .lines span:nth-child(3) { width: 70%; }
.fl-theme .sticker .barcode {
  clear: both; margin-top: 12px; height: 24px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 6px, transparent 6px 9px);
}
.fl-theme .s1 { top: 6px; left: 4%; transform: rotate(-7deg); z-index: 2; }
.fl-theme .s2 { top: 56px; left: 34%; transform: rotate(4deg); z-index: 3; background: #FEF6E4; }
.fl-theme .s3 { top: 122px; left: 8%; transform: rotate(10deg); z-index: 1; width: 180px; }
.fl-theme .tag-free {
  position: absolute; top: 236px; left: 40%;
  background: var(--stamp); color: #fff; font-family: var(--font-mono); font-weight: 600; font-size: 13px;
  letter-spacing: 0.06em; padding: 9px 16px; border-radius: 4px; transform: rotate(-6deg);
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}
@media (max-width: 939px) { .fl-theme .label-stack { height: 280px; margin-top: 8px; } }

/* trust bar */
.fl-theme .trustbar { background: var(--primary-dark); border-top: 1px solid rgba(255,255,255,0.08); }
.fl-theme .trustbar .wrap { display: flex; flex-wrap: wrap; gap: 10px 34px; padding: 18px 24px; justify-content: center; }
.fl-theme .trustbar span { font-family: var(--font-mono); font-size: 13px; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 8px; }
.fl-theme .trustbar span::before { content: "✓"; color: var(--accent); font-weight: 700; }

/* section headers */
.fl-theme .sec-head { max-width: 640px; margin: 0 0 44px; }
.fl-theme .sec-head h2 { font-size: clamp(25px, 3.2vw, 33px); margin: 14px 0 12px; font-weight: 700; }
.fl-theme .sec-head p { color: var(--ink-soft); font-size: 16px; margin: 0; }
.fl-theme .sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* feature / use-case grid */
.fl-theme .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.fl-theme .feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.fl-theme .feature .ico {
  width: 38px; height: 38px; border-radius: 8px; background: #EFEAD9;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--primary); font-size: 18px;
}
.fl-theme .feature h3 { font-size: 16.5px; margin-bottom: 8px; font-family: var(--font-body); font-weight: 600; }
.fl-theme .feature p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* stat strip */
.fl-theme .stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; text-align: center; }
.fl-theme .stat-strip .stat-num { font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); font-weight: 700; color: var(--primary); }
.fl-theme .stat-strip .stat-label { font-size: 13.5px; color: var(--ink-soft); font-family: var(--font-mono); }

/* steps / tutorial */
.fl-theme .tutorial { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fl-theme .tutorial .grid { display: grid; grid-template-columns: 1fr; gap: 44px; }
@media (min-width: 900px) { .fl-theme .tutorial .grid { grid-template-columns: 0.85fr 1.15fr; } }
.fl-theme .steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.fl-theme .steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.fl-theme .steps li:first-child { border-top: none; }
.fl-theme .steps li::before {
  content: counter(step); font-family: var(--font-mono); font-weight: 600; font-size: 13px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.fl-theme .steps h4 { margin: 0 0 4px; font-family: var(--font-body); font-size: 15.5px; font-weight: 600; }
.fl-theme .steps p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* use-case cards */
.fl-theme .usecase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.fl-theme .usecase { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; text-align: left; }
.fl-theme .usecase .ico { font-size: 26px; margin-bottom: 14px; }
.fl-theme .usecase h5 { font-family: var(--font-body); font-weight: 600; font-size: 15.5px; margin-bottom: 6px; }
.fl-theme .usecase p { color: var(--ink-soft); font-size: 14px; margin: 0; }

/* comparison cards (web app vs desktop app) */
.fl-theme .compare-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .fl-theme .compare-grid { grid-template-columns: 1fr 1fr; } }
.fl-theme .compare-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.fl-theme .compare-card.highlight { border-color: var(--accent); box-shadow: 0 14px 34px rgba(26,32,53,0.08); }
.fl-theme .compare-card h3 { font-size: 20px; margin-bottom: 6px; }
.fl-theme .compare-card .tagline { color: var(--ink-soft); font-size: 14px; margin-bottom: 18px; }
.fl-theme .compare-card ul { list-style: none; margin: 0 0 22px; padding: 0; }
.fl-theme .compare-card li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; display: flex; gap: 10px; }
.fl-theme .compare-card li:first-child { border-top: none; }
.fl-theme .compare-card li::before { content: "✓"; color: var(--stamp); font-weight: 700; }

/* video wrap */
.fl-theme .video-wrap { position: relative; padding-top: 56.25%; background: var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 44px rgba(26,32,53,0.18); }
.fl-theme .video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fl-theme .video-caption { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); margin-top: 10px; }

/* faq */
.fl-theme .faq { background: var(--surface); border-top: 1px solid var(--line); }
.fl-theme .faq-list { max-width: 780px; }
.fl-theme .faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.fl-theme .faq-item summary { cursor: pointer; font-weight: 600; font-size: 15.5px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fl-theme .faq-item summary::-webkit-details-marker { display: none; }
.fl-theme .faq-item summary::after { content: "+"; font-family: var(--font-mono); font-size: 20px; color: var(--primary); flex: none; }
.fl-theme .faq-item[open] summary::after { content: "–"; }
.fl-theme .faq-item p { color: var(--ink-soft); font-size: 14.5px; margin: 12px 0 0; }

/* final cta */
.fl-theme .final-cta { background: var(--primary); color: #fff; text-align: center; padding: 66px 0; }
.fl-theme .final-cta h2 { color: #fff; font-size: clamp(24px, 3.4vw, 32px); margin-bottom: 14px; }
.fl-theme .final-cta p { color: rgba(255,255,255,0.78); margin-bottom: 26px; }

/* prose / legal-page content */
.fl-theme .prose { max-width: 760px; }
.fl-theme .prose h2 { font-size: 22px; margin: 40px 0 12px; }
.fl-theme .prose h2:first-child { margin-top: 0; }
.fl-theme .prose p { color: var(--ink-soft); margin: 0 0 16px; font-size: 15.5px; }
.fl-theme .prose ul { color: var(--ink-soft); font-size: 15.5px; padding-left: 20px; margin: 0 0 16px; }
.fl-theme .prose li { margin-bottom: 6px; }
.fl-theme .prose .updated { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); margin-top: 40px; border-top: 1px solid var(--line); padding-top: 16px; }

/* data table (how-to-use sample) */
.fl-theme .sample-table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.fl-theme table.sample-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); }
.fl-theme table.sample-table th { background: var(--primary); color: #fff; font-family: var(--font-mono); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 12px; text-align: left; white-space: nowrap; }
.fl-theme table.sample-table td { padding: 10px 12px; border-top: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.fl-theme table.sample-table tr:nth-child(even) td { background: #FBFAF6; }
