/* ========================================================================
   Submitbox — ASCII / terminal design system
   Warm "terminal paper", near-black ink, one signal-orange accent.
   Monospace everywhere. Square edges. Box-drawing frames. Hard shadows.
   NOTE: CSS variable names (--indigo-*, --ink, etc.) are kept stable because
   the dashboard SPA references them inline — only their values changed.
   ======================================================================== */
:root {
  /* paper + ink */
  --bg: #ece6d8;
  --bg-soft: #e3dccb;
  --paper-3: #d8d0bb;
  --ink: #1b1712;
  --ink-2: #443c30;
  --muted: #8a8068;
  --line: #1b1712;          /* borders are full ink — that's the look */
  --line-soft: #bcb19a;

  /* signal accent (used sparingly: cursor, primary, active, alerts) */
  --accent: #d8451c;
  --accent-2: #b5360f;
  --accent-tint: #f0dccf;

  /* legacy names kept for the dashboard JS inline styles ------------- */
  --indigo-50: #f0e7d8;
  --indigo-100: #ead9c4;
  --indigo-500: #d8451c;
  --indigo-600: #d8451c;
  --indigo-700: #b5360f;

  --green: #4d6b2f;
  --red: #c0341b;
  --amber: #9a6512;

  --radius: 0px;
  --radius-sm: 0px;
  --shadow-sm: 2px 2px 0 var(--ink);
  --shadow: 5px 5px 0 var(--ink);

  --font: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background-color: var(--bg);
  /* faint engineering-grid texture */
  background-image:
    linear-gradient(rgba(27, 23, 18, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 23, 18, .035) 1px, transparent 1px);
  background-size: 24px 24px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1, "calt" 1;
}

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-soft); }
a:hover { color: var(--accent); border-bottom-color: var(--accent); }

h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }

/* selection + scrollbar flavor */
::selection { background: var(--accent); color: var(--bg); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--ink); border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* blinking terminal cursor ------------------------------------------- */
.cursor, .caret {
  display: inline-block; width: .58em; height: 1.05em;
  background: var(--accent); vertical-align: -.16em; margin-left: .12em;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ===================================================================== */
/* buttons                                                               */
/* ===================================================================== */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; gap: .5ch;
  font-family: var(--mono); font-weight: 600; font-size: .9rem; letter-spacing: .02em;
  padding: .62rem 1.1rem; cursor: pointer;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--b); border-radius: 0;
  box-shadow: var(--shadow-sm);
  transition: transform .08s ease, box-shadow .08s ease, background .12s ease, color .12s ease;
  white-space: nowrap; text-decoration: none;
}
.btn::before { content: "["; opacity: .4; }
.btn::after  { content: "]"; opacity: .4; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--b); color: var(--ink); }
.btn:active { transform: translate(0, 0); box-shadow: 0 0 0 var(--b); }

.btn-primary { background: var(--accent); color: var(--bg); --b: var(--ink); }
.btn-primary::before, .btn-primary::after { opacity: .55; }
.btn-primary:hover { background: var(--accent-2); color: var(--bg); }

.btn-ghost { background: var(--bg); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.btn-danger { background: var(--bg); color: var(--accent); border-color: var(--accent); }
.btn-danger:hover { background: var(--accent); color: var(--bg); }

.btn-sm { padding: .4rem .7rem; font-size: .8rem; box-shadow: none; }
.btn-sm:hover { box-shadow: 3px 3px 0 var(--b); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

/* ===================================================================== */
/* nav                                                                   */
/* ===================================================================== */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg); border-bottom: 1px solid var(--ink);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: .65ch; font-weight: 700; font-size: 1.02rem; color: var(--ink); border: 0; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand .logo {
  width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: .9rem;
  border: 1px solid var(--ink);
}
.nav-links { display: flex; align-items: center; gap: 1.4ch; }
.nav-links a { color: var(--ink-2); font-size: .88rem; border: 0; }
.nav-links a:hover { color: var(--accent); }
.nav-links a.btn { color: var(--bg); }
@media (max-width: 760px) { .nav-links .hide-sm { display: none; } }

/* ===================================================================== */
/* hero                                                                  */
/* ===================================================================== */
.hero { position: relative; padding: 64px 0 56px; }
.eyebrow {
  display: inline-block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); border: 1px solid var(--line-soft); padding: .25rem .7rem; margin-bottom: 1.4rem;
  background: var(--bg-soft);
}
.eyebrow b { color: var(--accent); font-weight: 600; }
.hero p.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 600px; margin-inline: auto; }
.hero .cta-row { display: flex; gap: .8rem; justify-content: center; margin-top: 1.7rem; flex-wrap: wrap; }
.trust { margin-top: 1.5rem; font-size: .8rem; color: var(--muted); letter-spacing: .01em; }

/* ASCII art wordmark */
.ascii-art {
  font-family: var(--mono); white-space: pre; line-height: 1.05;
  font-size: clamp(5px, 1.7vw, 11px); font-weight: 500; color: var(--ink);
  display: inline-block; margin: 0 auto 1.4rem; letter-spacing: 0;
}
.ascii-art .hl { color: var(--accent); }

/* reveal-on-load stagger */
.reveal { opacity: 0; transform: translateY(10px); animation: rise .6s ease forwards; }
.reveal.d1 { animation-delay: .05s; } .reveal.d2 { animation-delay: .14s; }
.reveal.d3 { animation-delay: .23s; } .reveal.d4 { animation-delay: .32s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ===================================================================== */
/* terminal / code window                                                */
/* ===================================================================== */
.code-window {
  margin: 40px auto 0; max-width: 720px; text-align: left;
  background: #14110d; border: 1px solid var(--ink); box-shadow: var(--shadow);
}
.code-bar {
  display: flex; align-items: center; gap: .6ch; padding: .5rem .9rem;
  background: #14110d; border-bottom: 1px solid #3a342a;
}
.dot { width: 10px; height: 10px; border-radius: 0; border: 1px solid #5b5346; }
.dot.r { background: var(--accent); border-color: var(--accent); }
.dot.y { background: #c9962f; border-color: #c9962f; }
.dot.g { background: #7f9b54; border-color: #7f9b54; }
.code-bar .fname { margin-left: .6ch; color: #8c8470; font-size: .78rem; }
pre { margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto; }
code, pre { font-family: var(--mono); font-size: .82rem; }
pre code { color: #d8d0bb; line-height: 1.75; }
.tok-tag { color: #e0a36a; } .tok-attr { color: #c9b78f; }
.tok-str { color: #9fb06e; } .tok-cmt { color: #6f6757; }
.tok-prompt { color: var(--accent); user-select: none; }

/* ===================================================================== */
/* sections + ASCII dividers                                             */
/* ===================================================================== */
section { padding: 60px 0; }
section.soft { background: var(--bg-soft); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.section-head { max-width: 620px; margin: 0 auto 40px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head p { color: var(--muted); font-size: .98rem; }

/* a "// label" used above headings */
.kicker { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; }
.kicker::before { content: "// "; color: var(--muted); }

/* full-width ascii rule */
.rule { overflow: hidden; white-space: nowrap; color: var(--line-soft); user-select: none; line-height: 1; font-size: .9rem; }
.rule::after { content: "+------------------------------------------------------------------------------------------------------------------------"; }

/* ===================================================================== */
/* boxes / cards (ASCII frame look)                                      */
/* ===================================================================== */
.grid { display: grid; gap: 0; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
/* collapse borders between adjacent boxes for a true grid-of-cells */
.grid-3, .grid-2 { border: 1px solid var(--ink); }
.grid-3 > .card, .grid-2 > .card { border: 0; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); box-shadow: none; }
.grid-3 > .card:nth-child(3n) { border-right: 0; }
.grid-2 > .card:nth-child(2n) { border-right: 0; }
@media (max-width: 880px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-3 > .card, .grid-2 > .card { border-right: 0; }
}

.card { background: var(--bg); padding: 22px; transition: background .12s ease; }
.card:hover { background: var(--bg-soft); }
.card .ic {
  width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 14px;
  border: 1px solid var(--ink); background: var(--bg-soft); font-size: 1rem;
}
.card h3 { font-size: 1rem; }
.card h3::before { content: "\25B8  "; color: var(--accent); }
.card p { color: var(--muted); font-size: .9rem; margin: 0; }

/* steps */
.steps { counter-reset: step; display: grid; gap: 0; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); }
.step { position: relative; padding: 24px 22px 22px; border-right: 1px solid var(--ink); }
.step:last-child { border-right: 0; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-size: .8rem; color: var(--accent); border: 1px solid var(--ink); padding: .1rem .5rem;
  display: inline-block; margin-bottom: 12px; background: var(--bg-soft);
}
.step h3 { font-size: 1rem; }
.step p { font-size: .88rem; color: var(--muted); margin: 0; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } .step { border-right: 0; border-bottom: 1px solid var(--ink); } .step:last-child { border-bottom: 0; } }

/* ===================================================================== */
/* pricing                                                               */
/* ===================================================================== */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--ink); }
.price-grid > .plan { border-right: 1px solid var(--ink); }
.price-grid > .plan:last-child { border-right: 0; }
@media (max-width: 880px) { .price-grid { grid-template-columns: 1fr; } .price-grid > .plan { border-right: 0; border-bottom: 1px solid var(--ink); } .price-grid > .plan:last-child { border-bottom: 0; } }
.plan { background: var(--bg); padding: 26px 24px; display: flex; flex-direction: column; position: relative; }
.plan.featured { background: var(--bg-soft); }
.plan.featured .tag { position: absolute; top: 0; right: 0; background: var(--accent); color: var(--bg); font-size: .68rem; letter-spacing: .08em; padding: .2rem .55rem; }
.plan h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; }
.plan .amt { font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em; }
.plan .amt span { font-size: .85rem; font-weight: 400; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: .5rem; }
.plan li { font-size: .86rem; color: var(--ink-2); padding-left: 1.6ch; position: relative; }
.plan li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.plan .btn { margin-top: auto; }

/* ===================================================================== */
/* faq                                                                   */
/* ===================================================================== */
.faq { border: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--ink); padding: 16px 18px; background: var(--bg); }
.faq details:last-child { border-bottom: 0; }
.faq details[open] { background: var(--bg-soft); }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1ch; font-size: .92rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "[+] "; color: var(--accent); }
.faq details[open] summary::before { content: "[-] "; }
.faq p { color: var(--muted); margin: .8rem 0 0; font-size: .9rem; }

/* ===================================================================== */
/* footer                                                                */
/* ===================================================================== */
.footer { background: var(--ink); color: #c9c1ac; padding: 46px 0 26px; border-top: 1px solid var(--ink); }
.footer a { color: #c9c1ac; border-bottom-color: #4a4334; }
.footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { color: var(--bg); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .9rem; }
.footer h4::before { content: "\203A  "; color: var(--accent); }
.footer .brand { color: var(--bg); margin-bottom: .8rem; }
.footer .brand .logo { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .86rem; }
.footer .copy { margin-top: 36px; padding-top: 20px; border-top: 1px solid #3a3327; font-size: .8rem; color: #8c8470; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ===================================================================== */
/* small bits                                                            */
/* ===================================================================== */
.badge { display: inline-block; font-size: .68rem; font-weight: 600; padding: .08rem .45rem; border: 1px solid var(--ink); letter-spacing: .03em; text-transform: uppercase; }
.badge-green { color: var(--green); border-color: var(--green); }
.badge-red { color: var(--accent); border-color: var(--accent); }
.badge-gray { color: var(--muted); border-color: var(--line-soft); }

/* inline code on light pages */
:not(pre) > code {
  font-family: var(--mono); font-size: .85em; background: var(--bg-soft);
  border: 1px solid var(--line-soft); padding: .05rem .4rem;
}
