/* ==========================================================================
   BrightSpark Apps — site stylesheet
   Plain CSS, no build step. Edit the variables below to change the look.
   ========================================================================== */

:root {
  /* Brand */
  --accent: #f97316;          /* spark orange */
  --accent-strong: #c2410c;   /* accessible orange for text/links on white */
  --accent-warm: #fbbf24;     /* amber, used in gradients */
  --accent-soft: #fff3e6;     /* tinted backgrounds */
  --accent-line: #fed7aa;

  /* Neutrals */
  --ink: #18181f;
  --ink-2: #3f3f4a;
  --muted: #66667a;
  --line: #ece7e1;
  --bg: #ffffff;
  --surface: #fffaf5;

  /* Type & shape */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(24, 24, 31, .04), 0 8px 24px rgba(24, 24, 31, .06);
  --wrap: 1120px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

a { color: var(--accent-strong); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

address { font-style: normal; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand .brand-accent { color: var(--accent-strong); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.nav a:hover { background: var(--accent-soft); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-strong); }
.nav .nav-cta { background: var(--ink); color: #fff; margin-left: 6px; }
.nav .nav-cta:hover { background: var(--accent-strong); color: #fff; }

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; padding-top: 10px; gap: 6px; }
  .nav {
    width: calc(100% + 40px); margin: 0 -20px; padding: 0 12px 8px; gap: 0;
    overflow-x: auto; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: .88rem; padding: 6px 9px; }
  .nav .nav-cta { margin-left: auto; padding: 6px 14px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: .98rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px;
  background: var(--accent); transform: rotate(45deg);
}

@media (max-width: 760px) { .section { padding: 64px 0; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 96px;
  background:
    radial-gradient(900px 420px at 92% -10%, #ffe3c4 0%, rgba(255, 227, 196, 0) 60%),
    radial-gradient(600px 300px at -10% 110%, #fff1d6 0%, rgba(255, 241, 214, 0) 60%),
    var(--bg);
}
.hero-grid {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center;
}
.hero h1 .spark-text {
  background: linear-gradient(90deg, var(--accent-strong), var(--accent) 60%, #f59e0b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: 1.18rem; color: var(--ink-2); max-width: 560px; margin: 18px 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.facts {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); padding: 26px 26px 10px;
  position: relative;
}
.facts::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, var(--accent-warm), var(--accent));
}
.facts h2 {
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.facts dl { margin: 0; }
.facts .row {
  display: grid; grid-template-columns: 128px 1fr; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.facts dt { font-size: .88rem; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; color: var(--ink); font-weight: 600; font-size: .95rem; }

@media (max-width: 900px) {
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 420px) {
  .facts .row { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.about-copy p { font-size: 1.06rem; }
.features { display: grid; gap: 14px; }
.feature {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px;
  padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.feature h3 { margin-bottom: 4px; }
.feature p { margin: 0; color: var(--muted); font-size: .96rem; }
.icon-tile {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong);
}
.icon-tile svg { width: 22px; height: 22px; }

@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Apps ---------- */
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.app-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 24px; box-shadow: var(--shadow);
}
.app-icon {
  width: 60px; height: 60px; border-radius: 16px; margin-bottom: 18px;
  display: grid; place-items: center; color: #fff;
}
.app-icon svg { width: 28px; height: 28px; }
.app-icon.c1 { background: linear-gradient(135deg, #fbbf24, #f97316); }
.app-icon.c2 { background: linear-gradient(135deg, #fb923c, #e11d48); }
.app-icon.c3 { background: linear-gradient(135deg, #f59e0b, #b45309); }
.app-card .category {
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.app-card p { color: var(--muted); font-size: .96rem; flex: 1; }
.badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--accent-strong); font-weight: 700; font-size: .82rem;
}
.badge svg { width: 14px; height: 14px; }

@media (max-width: 900px) { .apps-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .apps-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 28px; box-shadow: var(--shadow);
}
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.contact-list .label {
  display: block; font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
}
.contact-list .value { color: var(--ink); font-weight: 600; word-break: break-word; }
.contact-list a.value { color: var(--ink); text-decoration-color: var(--accent-line); }
.contact-list a.value:hover { color: var(--accent-strong); }

.info-table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.info-table th, .info-table td { text-align: left; padding: 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
.info-table tr:first-child th, .info-table tr:first-child td { border-top: 0; }
.info-table th { color: var(--muted); font-weight: 600; width: 44%; padding-right: 12px; }
.info-table td { color: var(--ink); font-weight: 600; }
.card h3 { margin-bottom: 14px; }

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Legal / document pages ---------- */
.page-hero {
  padding: 64px 0 40px;
  background:
    radial-gradient(700px 300px at 100% 0%, #ffe8cf 0%, rgba(255, 232, 207, 0) 65%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-hero p { color: var(--muted); margin: 0; }
.page-hero .meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: .85rem; font-weight: 600; color: var(--ink-2);
}

.doc-layout {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px;
  padding: 56px 20px 88px;
}
.toc { position: sticky; top: 92px; align-self: start; font-size: .9rem; }
.toc strong {
  display: block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a {
  display: block; padding: 5px 0 5px 14px; margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--ink-2); text-decoration: none;
}
.toc a:hover { color: var(--accent-strong); border-left-color: var(--accent); }

.prose { max-width: 740px; }
.prose h2 { font-size: 1.45rem; margin-top: 2.2em; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .4em; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--surface); color: var(--ink); }
.table-scroll { overflow-x: auto; }

.callout {
  padding: 18px 20px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  margin: 0 0 1.4em;
}
.callout p:last-child { margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding: 0 !important; display: grid; gap: 14px; }
.steps li {
  counter-increment: step; position: relative;
  padding: 18px 20px 18px 66px; margin: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 18px; top: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 800; font-size: .95rem;
}

.email-template {
  background: #fff; border: 1px dashed var(--accent-line); border-radius: var(--radius-sm);
  padding: 16px 18px; font-size: .92rem; white-space: pre-wrap; color: var(--ink-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 0 0 1.4em; overflow-x: auto;
}

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
}

/* ---------- 404 ---------- */
.notfound {
  min-height: calc(100vh - 68px - 260px);
  display: grid; place-items: center; text-align: center;
  padding: 80px 20px;
}
.notfound .code {
  font-size: clamp(4.5rem, 16vw, 8rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--accent-warm), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 8px;
}
.notfound p { color: var(--muted); max-width: 440px; margin: 0 auto 28px; }
.notfound .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9c9d4; padding: 56px 0 28px; font-size: .94rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--accent-warm); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand .brand-accent { color: var(--accent-warm); }
.site-footer h4 {
  color: #fff; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid #2e2e3a;
  font-size: .86rem; color: #9a9aab;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
