/*
 * FDS Marketing Hub — Dashboard palette (black + orange + cyan accent).
 * Aligned with FDS_WEBSITE/static/landing.css. No external CSS framework.
 */

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

:root {
  /* Palette aligned with the FDS AI Studio dashboard (FDS_WEBSITE/static/landing.css).
     Variable NAMES are unchanged so every existing rule in this file plus the
     inline admin styles in templates/admin_editor.html and admin_login.html
     keep resolving without edits. Only the HEX VALUES move. */

  /* Near-black base */
  --bg:        #06060b;
  --surface:   #0c0c14;
  --surface-2: #13131e;
  --surface-3: #1a1a28;
  --border:    #1a1a2e;
  --border-2:  #252540;

  /* Cyan (highlights / focus rings — same role as dashboard) */
  --cyan:      #00e5ff;
  --cyan-2:    #00b8cc;
  --cyan-soft: rgba(0, 229, 255, 0.10);

  /* Orange accent — primary buttons + CTA. New on marketing; matches
     dashboard --accent / --accent2. */
  --accent:    #ff6b2b;
  --accent-2:  #ff8f5e;
  --accent-soft: rgba(255, 107, 43, 0.10);

  /* Text */
  --text:      #f0f0f4;
  --text-2:    #9898b0;
  --text-3:    #555568;

  /* Status */
  --green:     #10b981;
  --red:       #ef4444;
  --yellow:    #eab308;

  /* Shape */
  --radius:    10px;
  --radius-l:  16px;
  --maxw:      1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================== */
/*  Admin-only light theme — scoped via `body.admin-page` class    */
/*  that the admin_editor and admin_login JS stamps on page load.  */
/*  Variable NAMES are unchanged so every existing rule that reads */
/*  --bg / --surface / --text / etc. resolves to the light values  */
/*  inside the admin shell. The public marketing site (no class)   */
/*  keeps the original dark palette declared in :root above.       */
/* ============================================================== */
body.admin-page {
  --bg:        #f7f7fa;
  --surface:   #ffffff;
  --surface-2: #f0f0f4;
  --surface-3: #e6e6ec;
  --border:    #e0e0e8;
  --border-2:  #c4c4d0;
  --text:      #0c0c14;
  --text-2:    #555568;
  --text-3:    #9898b0;
}
/* Public site reserves 80px at the top of <main> to clear the fixed nav;
   admin pages hide the nav (hide_chrome=True in seo.py) so that gap shows
   up as an empty dark strip above the admin shell. Kill the gap for admin. */
body.admin-page main { padding-top: 0 !important; min-height: 100vh; }
/* The page's html/body root explicitly resolved to the LIGHT background
   (otherwise the strip behind the admin shell shows the dark base). */
body.admin-page { background: var(--bg) !important; color: var(--text) !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #5af0ff; }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================== */
/*  Layout primitives                                              */
/* ============================================================== */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
main { min-height: 70vh; padding-top: 80px; }       /* clears fixed nav */

.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }

.gr {
  background: linear-gradient(90deg, var(--cyan), #5af0ff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================== */
/*  Nav                                                            */
/* ============================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(6, 6, 11, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav-in {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700;
        font-size: 16px; color: var(--text); }
.logo-i { width: 32px; height: 32px;
          background: linear-gradient(135deg, var(--accent), var(--accent-2));
          border-radius: 8px; display: grid; place-items: center;
          font-size: 11px; font-weight: 800; color: #fff; letter-spacing: 0.5px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: var(--text-2);
  font-size: 14px; font-weight: 500;
  padding: 6px 12px; border-radius: 6px;
  transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text); background: var(--surface-2);
}
.nav-cta {
  background: var(--accent); color: #fff; border: 0;
  padding: 8px 18px; border-radius: 8px;
  font-weight: 600; font-size: 14px; cursor: pointer;
  font-family: inherit; transition: .2s;
  text-decoration: none;
}
.nav-cta:hover { background: var(--accent-2); transform: translateY(-1px);
                 box-shadow: 0 6px 20px rgba(255,107,43,0.30); color: #fff; }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ============================================================== */
/*  Buttons                                                        */
/* ============================================================== */
.btn-p, .btn-g {
  display: inline-block;
  padding: 12px 24px; border-radius: 10px;
  font-family: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: .2s;
  text-align: center; text-decoration: none;
  border: 1px solid transparent;
}
.btn-p { background: var(--accent); color: #fff; }
.btn-p:hover { background: var(--accent-2); color: #fff;
               transform: translateY(-1px);
               box-shadow: 0 8px 28px rgba(255,107,43,0.35); }
.btn-g { background: transparent; color: var(--text);
         border-color: var(--border-2); }
.btn-g:hover { border-color: var(--cyan); color: var(--cyan); }

/* ============================================================== */
/*  Hero (homepage)                                                */
/* ============================================================== */
.hero { padding: 100px 0 80px; }
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800; letter-spacing: -2px; line-height: 1.05;
  margin-bottom: 20px;
}
.hero .lead {
  font-size: clamp(16px, 1.4vw, 18px); color: var(--text-2);
  max-width: 680px; margin-bottom: 32px;
}
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 999px;
  background: var(--cyan-soft); border: 1px solid rgba(0,229,255,0.25);
  color: var(--cyan); font-size: 11px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 28px;
}
.hero .dot {
  width: 6px; height: 6px; background: var(--cyan); border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats { display: flex; gap: 48px; flex-wrap: wrap; }
.hero-stats .stat .num { font-size: 28px; font-weight: 800;
                         letter-spacing: -1px; color: var(--cyan); }
.hero-stats .stat .lbl { font-size: 11px; color: var(--text-3);
                         text-transform: uppercase; letter-spacing: 1.5px;
                         margin-top: 2px; }

/* Section header */
.section-head { text-align: center; margin-bottom: 40px; }
.section-head .tag {
  font-size: 11px; color: var(--cyan); font-weight: 600;
  text-transform: uppercase; letter-spacing: 2.5px; margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(28px, 3.8vw, 44px); font-weight: 800;
                   letter-spacing: -1.5px; margin-bottom: 12px; }
.section-head p { color: var(--text-2); max-width: 540px; margin: 0 auto;
                  font-size: 15px; }

/* Grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 1000px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px)  {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 24px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: rgba(0,229,255,0.35); transform: translateY(-3px);
              box-shadow: 0 16px 40px rgba(0,0,0,0.35); }
.card .pill {
  display: inline-block;
  font-size: 10px; font-weight: 700; color: var(--cyan-2);
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px;
}
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.card p { font-size: 13.5px; color: var(--text-2); }

/* Post / tool cards */
.post-card { display: block; overflow: hidden; padding: 0;
             color: inherit; text-decoration: none; }
.post-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.post-card .body { padding: 22px; }
.post-card .cat { font-size: 10px; color: var(--cyan-2); font-weight: 700;
                  text-transform: uppercase; letter-spacing: 1.5px;
                  margin-bottom: 8px; display: inline-block; }
.post-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px;
                color: var(--text); line-height: 1.3; }
.post-card p  { font-size: 13px; color: var(--text-2);
                margin-bottom: 14px; min-height: 38px; }
.post-card .meta { display: flex; justify-content: space-between;
                   font-size: 11px; color: var(--text-3); }
.post-card .meta .read { color: var(--cyan); font-weight: 600; }

/* Article body */
.article {
  max-width: 820px; margin: 0 auto;
  padding: 60px 24px 80px;
}
.article header { margin-bottom: 28px; }
.article .crumb { font-size: 11px; color: var(--text-3);
                  text-transform: uppercase; letter-spacing: 2px;
                  margin-bottom: 14px; }
.article .crumb a { color: var(--text-3); }
.article .crumb a:hover { color: var(--cyan); }
.article h1 { font-size: clamp(30px, 4.5vw, 52px); font-weight: 800;
              letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 14px; }
.article .meta { font-size: 13px; color: var(--text-3); }
.article .feature { width: 100%; max-height: 460px; object-fit: cover;
                    border-radius: 14px; border: 1px solid var(--border);
                    margin-bottom: 36px; }

/* Long-form prose */
.prose { font-size: 16.5px; line-height: 1.8; color: var(--text); }
.prose h1, .prose h2, .prose h3, .prose h4 {
  color: var(--text); font-weight: 700; letter-spacing: -0.5px;
  margin: 1.8em 0 0.6em; line-height: 1.25;
}
.prose h2 { font-size: 26px; }
.prose h3 { font-size: 21px; }
.prose h4 { font-size: 17px; }
.prose p { margin: 0 0 1.1em; }
.prose a { color: var(--cyan); text-decoration: underline;
           text-underline-offset: 3px; }
.prose a:hover { color: #5af0ff; }
.prose ul, .prose ol { margin: 0 0 1.1em 1.5em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  border-left: 3px solid var(--cyan); margin: 1.4em 0;
  padding: 0.5em 1.2em; color: var(--text-2);
  background: var(--surface); border-radius: 8px;
}
.prose code { background: var(--surface); border: 1px solid var(--border);
              padding: 1px 6px; border-radius: 4px;
              font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
              font-size: 0.92em; }
.prose pre { background: var(--surface); border: 1px solid var(--border);
             border-radius: 12px; padding: 18px; overflow-x: auto; margin: 1.4em 0; }
.prose pre code { background: transparent; border: 0; padding: 0; }
.prose img { border-radius: 10px; border: 1px solid var(--border); margin: 1em 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 14px;
                       text-align: left; }
.prose th { background: var(--surface); font-weight: 700; }

/* ============================================================== */
/*  Public-prose color override                                    */
/*                                                                 */
/*  Quill preserves inline `color:` / `background:` from pasted    */
/*  content (e.g. Google Docs / Word default to color:#000). On    */
/*  the LIGHT admin panel this is correct. On the DARK public      */
/*  blog those black-on-black inline styles make the text          */
/*  invisible. Override inline color/background ONLY on the public */
/*  prose so it falls back to the theme's text color.              */
/*                                                                 */
/*  The admin editor itself (Quill inside .admin-page) is NOT      */
/*  scoped to .prose, so this rule does not affect what the author */
/*  sees while editing — only the rendered public page.            */
/* ============================================================== */
body:not(.admin-page) .prose [style*="color"]            { color: var(--text)  !important; }
body:not(.admin-page) .prose [style*="background-color"] { background-color: transparent !important; }
body:not(.admin-page) .prose [style*="background:"]      { background: transparent       !important; }
/* Inline `font` family/size from pasted content also reverts to the
   site's typography so the dark theme stays consistent. */
body:not(.admin-page) .prose [style*="font-family"]      { font-family: inherit !important; }
body:not(.admin-page) .prose [style*="font-size"]        { font-size:   inherit !important; }

/* FAQ */
.faq-block { margin-top: 56px; }
.faq-block h2 { font-size: 26px; font-weight: 800; letter-spacing: -1px;
                margin-bottom: 16px; }
.faq-list details { background: var(--surface); border: 1px solid var(--border);
                    border-radius: 10px; padding: 14px 18px; margin-bottom: 8px; }
.faq-list summary { cursor: pointer; font-weight: 600; font-size: 15px;
                    color: var(--text); list-style-position: outside; }
.faq-list summary::marker { color: var(--cyan); }
.faq-list .answer { margin-top: 10px; font-size: 14px;
                    color: var(--text-2); line-height: 1.7; }

/* Tool launch CTA */
.tool-cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 22px 26px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px;
  margin-bottom: 36px;
}
.tool-cta strong { font-size: 16px; font-weight: 700; color: var(--text);
                   display: block; margin-bottom: 4px; }
.tool-cta p { font-size: 13px; color: var(--text-2); }
@media (max-width: 600px) { .tool-cta { flex-direction: column; align-items: flex-start; } }

/* ============================================================== */
/*  Footer — compact 4-column grid, mirrors AI backend's homepage  */
/*  layout exactly. Cyan logo tile + cyan link hover are kept.     */
/* ============================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px 32px;
  max-width: 1800px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 28px;
}

/* Brand block */
.footer .brand .ftl {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 15px; margin-bottom: 10px;
  color: var(--text);
}
.footer .brand .ftl .logo-i {
  width: 24px; height: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 5px;
  display: grid; place-items: center;
  font-size: 8px; font-weight: 900; color: #fff;
}
.footer .brand p {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.7;
}

/* Column heads + links */
.footer-col h4 {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-3);
  margin-bottom: 12px;
  font-weight: 600;
}
.footer-col a {
  display: block;
  font-size: 11px;
  color: var(--text-2);
  padding: 2px 0;
  transition: color .15s;
}
.footer-col a:hover { color: var(--cyan); }

/* Bottom row */
.footer-bot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-3);
}

@media (max-width: 760px) {
  .footer { padding: 28px 16px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bot { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* 404 */
.notfound { max-width: 720px; margin: 0 auto; padding: 100px 24px 80px;
            text-align: center; }
.notfound h1 { font-size: clamp(56px, 9vw, 100px); font-weight: 800;
               letter-spacing: -3px; margin-bottom: 14px; }
.notfound p { color: var(--text-2); margin-bottom: 28px; }
.notfound .actions { display: flex; gap: 12px; justify-content: center;
                     flex-wrap: wrap; }

/* Empty state */
.empty { text-align: center; padding: 80px 0; color: var(--text-3);
         font-size: 14px; }

/* ============================================================== */
/*  Legal / policy pages                                          */
/*  Applied via <article class="article legal">                   */
/*  All seven legal templates share this — privacy, terms, refund */
/*  about, contact, disclaimer, structure.                        */
/* ============================================================== */
.article.legal {
  max-width: 760px;                       /* roughly Tailwind max-w-3xl */
  padding: 90px 28px 110px;               /* generous py-, px-          */
  margin: 0 auto;
}
.article.legal .crumb {
  font-size: 11px; letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 18px;
}
.article.legal .crumb a { color: var(--text-3); }
.article.legal .crumb a:hover { color: var(--cyan); }

.article.legal header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
  margin-bottom: 40px;
}
.article.legal h1 {
  font-size: clamp(32px, 4.6vw, 50px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin: 0;
  color: var(--text);
  display: inline-block;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--cyan);
}
.article.legal .meta {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* Body — relaxed leading, off-white not pure white, max readability. */
.article.legal .prose {
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--text-2);
}
.article.legal .prose > * + * { margin-top: 1.1em; }

/* Hierarchy: H2 lighter + larger; H3 mid; H4 cyan all-caps eyebrow. */
.article.legal .prose h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  margin-top: 2.4em;
  margin-bottom: 0.6em;
  line-height: 1.25;
}
.article.legal .prose h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.9em;
  margin-bottom: 0.45em;
  line-height: 1.3;
}
.article.legal .prose h4 {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--cyan);
  margin-top: 1.6em;
  margin-bottom: 0.3em;
}

/* Inline emphasis */
.article.legal .prose strong { color: var(--text); font-weight: 700; }
.article.legal .prose em     { color: var(--text); font-style: italic; }

/* Lists with cyan markers */
.article.legal .prose ul,
.article.legal .prose ol { padding-left: 26px; margin: 0.9em 0 1.5em; }
.article.legal .prose li { padding-left: 4px; margin-bottom: 0.55em; }
.article.legal .prose ul li::marker { color: var(--cyan); font-size: 1em; }
.article.legal .prose ol li::marker { color: var(--cyan); font-weight: 700; }

/* Links — cyan with subtle underline that brightens on hover */
.article.legal .prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 229, 255, 0.4);
  text-decoration-thickness: 1px;
  transition: color .15s, text-decoration-color .15s;
}
.article.legal .prose a:hover {
  color: #5af0ff;
  text-decoration-color: var(--cyan);
}

/* Inline code as cyan token */
.article.legal .prose code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 7px;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.9em;
  color: var(--cyan);
}

/* Blockquote with cyan rail */
.article.legal .prose blockquote {
  border-left: 3px solid var(--cyan);
  background: var(--surface);
  padding: 14px 20px;
  margin: 1.4em 0;
  color: var(--text-2);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

/* Tables (used by structure.html for the entity matrix) */
.article.legal .prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 14px;
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
}
.article.legal .prose table th {
  background: rgba(0, 229, 255, 0.06);
  color: var(--cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 11px;
}
.article.legal .prose table th,
.article.legal .prose table td {
  border: 1px solid var(--border);
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
}

.article.legal .prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

@media (max-width: 600px) {
  .article.legal              { padding: 64px 18px 72px; }
  .article.legal h1           { font-size: 30px; padding-bottom: 10px; border-bottom-width: 2px; }
  .article.legal .prose       { font-size: 15.5px; line-height: 1.8; }
  .article.legal .prose h2    { font-size: 21px; margin-top: 2em; }
  .article.legal .prose table { font-size: 13px; }
}
