/* ============================================================
   AltForge — single self-hosted stylesheet
   Brand: purple/indigo "A" mark · indigo→cyan accent gradient
   Fonts: self-hosted Inter (no external requests)
   ============================================================ */

/* ---- Self-hosted Inter ---- */
@font-face { font-family:"Inter"; font-style:normal; font-weight:400; font-display:swap; src:url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family:"Inter"; font-style:normal; font-weight:500; font-display:swap; src:url("../fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family:"Inter"; font-style:normal; font-weight:600; font-display:swap; src:url("../fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family:"Inter"; font-style:normal; font-weight:700; font-display:swap; src:url("../fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family:"Inter"; font-style:normal; font-weight:800; font-display:swap; src:url("../fonts/inter-800.woff2") format("woff2"); }

:root {
  --bg: #0f1420;
  --bg-soft: #161d2e;
  --panel: #1c2740;
  --panel-2: #223050;
  --border: #2c3a5c;
  --text: #e8edf7;
  --muted: #9fb0cf;
  /* indigo -> cyan accent system */
  --brand: #6366f1;      /* indigo */
  --brand-2: #22d3ee;    /* cyan */
  --brand-ink: #a5b4ff;  /* readable indigo text on dark */
  /* purple/indigo logo mark */
  --logo-a: #8b5cf6;     /* violet */
  --logo-b: #6366f1;     /* indigo */
  --grad: linear-gradient(135deg, var(--brand), var(--brand-2));
  --accent: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
  --shadow: 0 10px 34px rgba(3,8,23,.35);
  --maxw: 1140px;
  /* spacing scale */
  --s1: 8px; --s2: 12px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 72px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,h2,h3,h4 { line-height: 1.15; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; height: auto; }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible, .dropzone:focus-visible {
  outline: 3px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 8px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,20,32,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -.3px; }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, var(--logo-a), var(--logo-b));
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 19px;
  box-shadow: 0 4px 14px rgba(99,102,241,.45);
  flex: none;
}
.brand .tag { color: var(--brand-ink); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-weight: 500; font-size: 15px; padding: 6px 2px; }
.nav a:hover, .nav a.active { color: var(--text); text-decoration: none; }
.nav a.active { box-shadow: inset 0 -2px 0 var(--brand-2); }
.nav .btn.active { box-shadow: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 18px; line-height: 1; cursor: pointer; min-height: 44px; min-width: 44px; }

/* ---- Buttons (one consistent primary style) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 11px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  background: var(--panel-2); color: var(--text); min-height: 44px; font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #06121a; border: none; font-weight: 700; }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(34,211,238,.30); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 38px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- Hero ---- */
.hero { padding: var(--s7) 0 var(--s6); text-align: center; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); margin-bottom: 22px;
}
.hero .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(32px, 5.2vw, 54px); line-height: 1.08; margin: 0 0 18px; letter-spacing: -1.4px; font-weight: 800; }
.grad, .hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 700px; margin: 0 auto 30px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* trust badges */
.trust { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.trust .badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border); color: var(--muted);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
}
.trust .badge b { color: var(--text); font-weight: 600; }
.trust .badge .tick { color: var(--accent); font-weight: 800; }

/* ---- Sections ---- */
.section { padding: var(--s6) 0; }
.section h2 { font-size: clamp(26px, 4vw, 38px); text-align: center; margin: 0 0 12px; letter-spacing: -.6px; font-weight: 800; }
.section .sub { text-align: center; color: var(--muted); max-width: 660px; margin: 0 auto var(--s5); font-size: 17px; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { color: var(--muted); margin: 0; }
.card .num {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); color: #06121a; font-weight: 800; margin-bottom: 14px; font-size: 18px;
}
.card .ico { font-size: 28px; margin-bottom: 12px; display: block; }

/* ---- Privacy banner ---- */
.privacy-banner {
  background: linear-gradient(135deg, rgba(52,211,153,.12), rgba(99,102,241,.10));
  border: 1px solid rgba(52,211,153,.3); border-radius: var(--radius);
  padding: 28px; display: flex; gap: 20px; align-items: flex-start;
}
.privacy-banner .ico { font-size: 40px; line-height: 1; }
.privacy-banner h3 { margin: 0 0 6px; }
.privacy-banner p { color: var(--muted); margin: 0; }

/* ---- Pricing (3 tiers) ---- */
.pricing { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; max-width: 1000px; margin: 0 auto; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 14px 40px rgba(99,102,241,.22); }
.price-card .plan { font-size: 14px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--brand-ink); font-weight: 700; }
.price-card .amount { font-size: 42px; font-weight: 800; margin: 8px 0 2px; letter-spacing: -1px; }
.price-card .amount small { font-size: 15px; color: var(--muted); font-weight: 500; }
.price-card .amount-sub { color: var(--muted); font-size: 14px; margin: 0 0 6px; min-height: 20px; }
.price-card .plan-note { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 22px; text-align: left; flex: 1; }
.price-card ul li { padding: 7px 0; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.price-card ul li::before { content: "✓"; color: var(--accent); font-weight: 800; flex: none; }
.price-card ul li.muted-item { opacity: .55; }
.price-card ul li.muted-item::before { content: "—"; color: var(--muted); }
.price-card .btn { width: 100%; }
.badge-soon { position: absolute; top: -12px; right: 20px; background: var(--warn); color: #1a1200; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-rec { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #06121a; padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pricing-note { text-align: center; color: var(--muted); font-size: 14px; margin: 26px auto 0; max-width: 640px; }

/* ---- Footer ---- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: var(--s6) 0 28px; margin-top: var(--s6); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 0 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid a { color: var(--muted); font-size: 15px; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; color: var(--muted); font-size: 13px; text-align: center; }
.footer-bottom a { color: var(--muted); }

/* ---- Tool page ---- */
.tool-shell { padding: 28px 0 60px; }
.tool-head { margin-bottom: 24px; }
.tool-head h1 { margin: 0 0 6px; font-size: clamp(24px,4vw,30px); }
.tool-head p { color: var(--muted); margin: 0; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .spacer { flex: 1; min-width: 12px; }

.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 40px 24px;
  text-align: center; background: var(--panel); transition: .15s; cursor: pointer; margin-bottom: 18px;
}
.dropzone.drag { border-color: var(--brand); background: var(--panel-2); }
.dropzone .ico { font-size: 44px; display: block; margin-bottom: 10px; }
.dropzone h3 { margin: 0 0 6px; }
.dropzone p { color: var(--muted); margin: 0; }

.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 18px;
}
.panel h3 { margin: 0 0 14px; font-size: 17px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input[type=text], .field select, .field textarea, input.cell, textarea.cell {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: 8px; font-size: 14px; font-family: inherit; min-height: 42px;
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row-inline { display: flex; gap: 14px; flex-wrap: wrap; }
.row-inline .field { flex: 1; min-width: 160px; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); }
table.review { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; }
table.review th, table.review td { padding: 10px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.review thead th { background: var(--panel-2); position: sticky; top: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
table.review tbody tr:hover { background: var(--panel-2); }
table.review .thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; background: var(--bg-soft); border: 1px solid var(--border); }
table.review .thumb-ph { width: 54px; height: 54px; border-radius: 8px; background: var(--bg-soft); border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); font-size: 20px; }
.cell { min-width: 160px; }
textarea.cell { resize: vertical; min-height: 46px; }
.charcount { font-size: 11px; color: var(--muted); margin-top: 3px; }
.charcount.warn { color: var(--warn); font-weight: 700; }
.dup { background: rgba(248,113,113,.15) !important; border-color: var(--danger) !important; }
.status-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-ok { background: rgba(52,211,153,.18); color: var(--accent); }
.status-warn { background: rgba(251,191,36,.18); color: var(--warn); }
.status-dup { background: rgba(248,113,113,.18); color: var(--danger); }

.notice { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.notice-info { background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.3); color: var(--text); }
.notice-warn { background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.3); color: var(--text); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state .ico { font-size: 48px; display: block; margin-bottom: 12px; opacity: .5; }

.stats-bar { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 18px; flex: 1; min-width: 90px; }
.stat .n { font-size: 22px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* ---- Article / guides ---- */
.article { max-width: 780px; margin: 0 auto; padding: 40px 0; }
.article h1 { font-size: clamp(28px,5vw,36px); letter-spacing: -.5px; margin: 0 0 8px; }
.article .meta { color: var(--muted); margin-bottom: 30px; font-size: 14px; }
.article h2 { font-size: clamp(22px,4vw,26px); margin: 36px 0 14px; letter-spacing: -.3px; }
.article h3 { font-size: 20px; margin: 26px 0 10px; }
.article p, .article li { color: #c7d2e8; font-size: 16px; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 8px; }
.article code { background: var(--panel-2); padding: 2px 7px; border-radius: 6px; font-size: 14px; color: #ffd7a8; }
.article pre { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; overflow-x: auto; }
.article pre code { background: none; padding: 0; color: var(--text); }
.callout { background: var(--panel); border-left: 4px solid var(--brand); border-radius: 8px; padding: 16px 20px; margin: 22px 0; }
.callout.tip { border-left-color: var(--accent); }
.callout.warn { border-left-color: var(--warn); }
.breadcrumb { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.legal { max-width: 820px; margin: 0 auto; padding: 40px 0; }
.legal h1 { font-size: clamp(28px,5vw,34px); margin: 0 0 6px; }
.legal h2 { font-size: clamp(20px,4vw,22px); margin: 30px 0 10px; }
.legal p, .legal li { color: #c7d2e8; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

.cta-strip { text-align: center; background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(34,211,238,.10)); border: 1px solid var(--border); border-radius: 16px; padding: 44px 24px; margin: 40px 0; }
.cta-strip h2 { margin: 0 0 10px; }
.cta-strip p { color: var(--muted); margin: 0 0 22px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---- Demo video ---- */
.demo-video { max-width: 900px; margin: 46px auto 0; text-align: center; }
.demo-video__title { font-size: 22px; margin: 0 0 6px; }
.demo-video .sub { margin-bottom: 22px; }
.demo-video__frame {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: #0b0f1a; box-shadow: 0 18px 50px rgba(0,0,0,.45); aspect-ratio: 16 / 9;
}
.demo-video__frame video { display: block; width: 100%; height: 100%; object-fit: contain; background: #0b0f1a; }
.demo-video__note { color: var(--muted); font-size: 14px; margin-top: 16px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .pricing { grid-template-columns: 1fr; max-width: 460px; }
  .price-card.featured { order: -1; }
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    align-items: stretch; background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 14px 20px; gap: 6px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; border-radius: 8px; }
  .nav a.active { box-shadow: none; background: var(--panel); }
  .nav .btn { margin-top: 6px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 40px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .privacy-banner { flex-direction: column; gap: 12px; padding: 20px; }
  .stats-bar { gap: 10px; }
  .stat { min-width: calc(50% - 5px); }
  .toolbar .btn { flex: 1 1 auto; }
}
