/* SSSSoft Technologies - Stock Strategy Builder product site
   Zero external dependencies (no CDN fonts/icons) so it runs on any plain PHP host with nothing to configure. */

:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-light: #eff6ff;
  --accent: #0d9488;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, .14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1f5f9; --ink-soft: #cbd5e1; --muted: #94a3b8;
    --border: #1e293b; --surface: #0f172a; --surface-alt: #111827;
    --brand-light: #13233f;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 8px 24px rgba(0,0,0,.45); --shadow-lg: 0 24px 48px rgba(0,0,0,.55);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink-soft); background: var(--surface);
  line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 750; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.muted { color: var(--muted); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 8px; top: 8px; z-index: 999; background: var(--brand); color: #fff; padding: 8px 12px; border-radius: 6px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; transition: .15s ease; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; justify-content: center; }

/* ---------------------------------------------------------------- header / nav */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-logo { height: 34px; width: auto; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-company { font-weight: 700; font-size: .95rem; }
.brand-product { font-size: .75rem; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 24px; }
.site-nav a { color: var(--ink-soft); font-weight: 600; font-size: .95rem; }
.site-nav a.active, .site-nav a:hover { color: var(--brand); text-decoration: none; }
.nav-cta { white-space: nowrap; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav { position: fixed; inset: 72px 0 0 0; background: var(--surface); flex-direction: column; align-items: flex-start; padding: 28px 24px; gap: 20px; transform: translateY(-110%); transition: transform .2s ease; overflow-y: auto; }
  .site-nav.open { transform: translateY(0); }
  .site-nav ul { flex-direction: column; gap: 18px; width: 100%; }
  .nav-cta { width: 100%; justify-content: center; }
}

/* ---------------------------------------------------------------- hero */
.hero { padding: 76px 0 60px; background: linear-gradient(180deg, var(--brand-light), var(--surface) 70%); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-light); color: var(--brand-dark); font-weight: 700; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { margin-bottom: 20px; }
.hero-lead { font-size: 1.15rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 22px; margin-top: 26px; flex-wrap: wrap; }
.hero-meta div { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.hero-visual { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.hero-visual img { width: 100%; height: auto; display: block; transition: filter .15s ease; }
.hero-visual:hover img { filter: brightness(.85); }
.play-overlay {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%; background: rgba(15, 23, 42, .75); color: #fff;
  display: flex; align-items: center; justify-content: center; transition: transform .15s ease, background .15s ease;
}
.hero-visual:hover .play-overlay { background: var(--brand); transform: translate(-50%, -50%) scale(1.08); }

/* ---------------------------------------------------------------- sections */
.section { padding: 72px 0; }
.section-alt { background: var(--surface-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .eyebrow { display: inline-flex; }

/* ---------------------------------------------------------------- stat strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; padding: 20px; }
.stat strong { display: block; font-size: 2.1rem; color: var(--brand); font-weight: 800; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------------------------------------------------------------- feature cards */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 920px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); transition: .15s ease; }
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: var(--brand-light); color: var(--brand); margin-bottom: 16px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.feature-category { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin-bottom: 16px; }

/* ---------------------------------------------------------------- screenshot gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } }
.gallery-item { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); cursor: zoom-in; }
.gallery-item img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.gallery-caption { padding: 16px 20px; }
.gallery-caption h3 { margin-bottom: 4px; font-size: 1.05rem; }
.gallery-caption p { margin: 0; font-size: .88rem; color: var(--muted); }

.lightbox { position: fixed; inset: 0; background: rgba(2,6,23,.86); display: none; align-items: center; justify-content: center; z-index: 200; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(90vw, 1000px); max-height: 85vh; border-radius: 10px; }
.lightbox-close { position: absolute; top: 24px; right: 28px; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; }

/* ---------------------------------------------------------------- CTA band */
.cta-band { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; border-radius: var(--radius-lg); padding: 56px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 50ch; margin: 0 auto 28px; }
.cta-band .btn-outline { color: #fff; border-color: rgba(255,255,255,.5); }
.cta-band .btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* ---------------------------------------------------------------- download page */
.download-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-md); display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.download-meta { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 18px; }
.download-meta div { font-size: .88rem; color: var(--muted); }
.download-meta strong { color: var(--ink); display: block; font-size: 1rem; }
.steps { counter-reset: step; }
.step { position: relative; padding-left: 52px; margin-bottom: 28px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.step h3 { margin-bottom: 6px; }
pre.code { background: var(--ink); color: #e2e8f0; padding: 18px 20px; border-radius: 10px; overflow-x: auto; font-family: var(--mono); font-size: .88rem; line-height: 1.7; }
pre.code .cmt { color: #64748b; }
code.inline { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; font-family: var(--mono); font-size: .88em; }

/* ---------------------------------------------------------------- tables / badges */
table.data { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.data th, table.data td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; font-size: .92rem; }
table.data th { background: var(--surface-alt); font-weight: 700; color: var(--ink); }
table.data tr:last-child td { border-bottom: none; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-muted { background: var(--surface-alt); color: var(--muted); }

/* ---------------------------------------------------------------- forms */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); max-width: 560px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; font: inherit; color: var(--ink); background: var(--surface);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field-hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: .92rem; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: var(--brand-light); color: var(--brand-dark); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--surface-alt); border-top: 1px solid var(--border); padding: 56px 0 28px; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: var(--ink-soft); }
.footer-brand { margin-bottom: 10px; }
.social-links { display: flex; gap: 14px; margin-top: 14px; }
.contact-list li { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; color: var(--ink-soft); font-size: .9rem; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: .85rem; }

/* ---------------------------------------------------------------- admin */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
/* Fixed dark navy, not var(--ink): the sidebar is always a dark panel by design, regardless of the
   visitor's light/dark color scheme - var(--ink) flips to near-white in dark mode, which left this
   light-gray/white text on a near-white background. */
.admin-sidebar { background: #0f172a; color: #cbd5e1; padding: 24px 0; }
.admin-sidebar .brand { color: #fff; padding: 0 20px 24px; }
.admin-sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: #cbd5e1; font-weight: 600; font-size: .92rem; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.admin-main { padding: 32px 36px; background: var(--surface-alt); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--surface-alt); padding: 24px; }
@media (max-width: 760px) { .admin-shell { grid-template-columns: 1fr; } .admin-sidebar { display: flex; overflow-x: auto; padding: 10px; } .admin-sidebar .brand { display: none; } .admin-sidebar nav { display: flex; } }

.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: repeat(2, 1fr); } }
.dash-tile strong { font-size: 1.8rem; color: var(--brand); display: block; }
