/* ==========================================================================
   burnsim.com - site stylesheet
   Replaces the interim mobile safety net of 2026-09-28.

   Palette is taken from BurnSim 4's own UI chrome (the orange panel headers on
   Grains / Motor & Nozzle / Propellant / Results) rather than the old flat red,
   so the site and the product read as the same thing.

   Type: Archivo for headings, IBM Plex Sans for body, IBM Plex Mono for every
   number and unit - psi, lbf, N-sec, Kn, dates, versions. A page full of
   engineering values should set them like engineering values.
   ========================================================================== */

:root {
  --paper:      #FAF7F3;
  --panel:      #FFFFFF;
  --ink:        #17120E;
  --steel:      #5D6A72;
  --rule:       #E6DCD2;
  --ember:      #C8500F;
  --ember-lit:  #ED8B2C;
  --ember-wash: #FBEEE2;
  --shadow: 0 1px 2px rgba(23,18,14,.06), 0 8px 24px -12px rgba(23,18,14,.18);

  --measure: 68ch;
  --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #14110E;
    --panel:      #1C1814;
    --ink:        #F3EDE6;
    --steel:      #9AA5AC;
    --rule:       #2E2721;
    --ember:      #F0902F;
    --ember-lit:  #F5A54A;
    --ember-wash: #2A1E14;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}

:root[data-theme="dark"] {
  --paper:      #14110E;
  --panel:      #1C1814;
  --ink:        #F3EDE6;
  --steel:      #9AA5AC;
  --rule:       #2E2721;
  --ember:      #F0902F;
  --ember-lit:  #F5A54A;
  --ember-wash: #2A1E14;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* ---- layout -------------------------------------------------------------- */

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

main.wrap { padding-block: 40px 56px; }

/* Running text stays readable; wide things opt out with .full */
main p, main ul, main ol, main dl, main blockquote {
  max-width: var(--measure);
}
main .full, main .full p, main .full ul { max-width: none; }

/* ---- header -------------------------------------------------------------- */

.site-head {
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 30;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 10px 18px;
  min-height: 62px;
  flex-wrap: wrap;
  padding-block: 9px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand .spark {
  width: 11px; height: 11px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 35%, var(--ember-lit), var(--ember) 70%);
}

.site-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--steel);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 6px;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--ember-wash); }
.site-nav a.on { color: var(--ember); background: var(--ember-wash); }

.site-head .buy {
  background: var(--ember);
  color: #fff;
  padding: 8px 15px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  white-space: nowrap;
}
.site-head .buy:hover { background: var(--ember-lit); }

/* On a phone the brand takes its own line and the nav sits under it. */
@media (max-width: 640px) {
  .site-head { position: static; }
  .site-head .wrap { gap: 8px 12px; }
  .brand { margin-right: 0; flex: 1 0 auto; font-size: 19px; }
  .site-nav { order: 3; flex-basis: 100%; gap: 1px; }
  .site-nav a { padding: 6px 9px; font-size: 14px; }
}

/* ---- typography ---------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  text-wrap: balance;
  color: var(--ink);
  margin: 0;
}

h1 {
  font-size: clamp(30px, 5.2vw, 44px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.028em;
  margin-bottom: 8px;
}
h2 {
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 700;
  letter-spacing: -.022em;
  margin-top: 44px;
  margin-bottom: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
h3 {
  font-size: 18.5px;
  font-weight: 600;
  letter-spacing: -.012em;
  margin-top: 30px;
  margin-bottom: 7px;
}
h4 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 22px;
  margin-bottom: 5px;
}

/* First heading after the page title shouldn't carry a rule straight away. */
h1 + h2 { border-top: 0; padding-top: 0; margin-top: 26px; }

p { margin: 0 0 15px; }

.lede {
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.5;
  color: var(--steel);
  margin-bottom: 26px;
}

a { color: var(--ember); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--ember-lit); }

small, .small { font-size: 14px; color: var(--steel); }

code, kbd, samp, pre {
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .92em;
}
code { background: var(--ember-wash); padding: 1px 5px; border-radius: 4px; }
pre { overflow-x: auto; background: var(--panel); border: 1px solid var(--rule);
      border-radius: 8px; padding: 14px 16px; }
pre code { background: none; padding: 0; }

ul, ol { margin: 0 0 15px; padding-left: 22px; }
li { margin-bottom: 6px; }
li > ul, li > ol { margin-top: 6px; margin-bottom: 4px; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 34px 0; }

blockquote {
  margin: 0 0 15px;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--ember);
  font-style: normal;
}

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

figure { margin: 22px 0; }
figure img { border: 1px solid var(--rule); border-radius: 8px; display: block; }
figcaption {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  color: var(--steel);
  margin-top: 8px;
}

/* Content tables (change history etc.) must never widen the page. */
.tablewrap { overflow-x: auto; margin-bottom: 18px; }
table { border-collapse: collapse; }
.tablewrap table { width: 100%; min-width: 420px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--rule); }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--steel); }

/* ---- reusable pieces ----------------------------------------------------- */

.eyebrow, .kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 12px;
}
.eyebrow { color: var(--ember); }
.kicker  { color: var(--steel); }
h2 .count, .num {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.btn, .btn-2 {
  display: inline-block;
  font-weight: 600;
  font-size: 15.5px;
  text-decoration: none;
  padding: 11px 21px;
  border-radius: 7px;
  border: 1px solid transparent;
}
.btn { background: var(--ember); color: #fff; }
.btn:hover { background: var(--ember-lit); color: #fff; }
.btn-2 { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-2:hover { border-color: var(--ember); color: var(--ember); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 26px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.note {
  background: var(--ember-wash);
  border-left: 3px solid var(--ember);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 0 0 20px;
  max-width: var(--measure);
}
.note > :last-child { margin-bottom: 0; }

/* card grids: downloads, features, grain types */
.grid { display: grid; gap: 14px; margin: 0 0 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-tiles { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }

.card { background: var(--panel); border: 1px solid var(--rule); border-radius: 10px;
        padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.tile { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px;
        padding: 12px 8px 9px; text-align: center; }
.tile svg { display: block; margin: 0 auto 7px; }
.tile span { font-size: 11.5px; color: var(--steel); font-weight: 500;
             line-height: 1.3; display: block; }

/* stat strip under the hero shot */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
         gap: 1px; background: var(--rule); border: 1px solid var(--rule);
         border-radius: 8px; overflow: hidden; margin: 0 0 22px; }
.stats > div { background: var(--panel); padding: 11px 13px; }
.stats dt { font-family: "IBM Plex Mono", monospace; font-size: 10.5px;
            letter-spacing: .09em; text-transform: uppercase; color: var(--steel); margin: 0; }
.stats dd { margin: 3px 0 0; font-family: "IBM Plex Mono", monospace; font-weight: 500;
            font-size: 16px; font-variant-numeric: tabular-nums; }
.stats dd .u { font-size: 11px; color: var(--steel); }

/* feature highlights - a 2x2 of screen captures that dissolve into the page, each one a
   link into the wiki section for that feature. Added 2026-10-20. The edge fade is a mask,
   so it blends into whatever the page background is (paper or dark) with no visible frame;
   the title sits in the faded bottom band, where it reads against the page colour. */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin: 0 0 26px; }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.feature { display: block; text-decoration: none; color: inherit; }
.feature-media { position: relative; display: block; aspect-ratio: 16 / 10;
                 overflow: hidden; border-radius: 16px; }
.feature-media img,
.feature-media .ph {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent),
                      linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent),
                      linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
/* honest placeholder panel until the real capture is dropped in */
.feature-media .ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 0 20px; color: var(--steel);
  font-family: "IBM Plex Mono", monospace; font-size: 12px; line-height: 1.5;
  background: radial-gradient(130% 130% at 50% 0%, var(--ember-wash), var(--panel) 72%);
}
.feature-title {
  display: block; text-align: center; margin: 0 0 9px;
  font-family: "Archivo", sans-serif; font-weight: 700; font-size: 16px; line-height: 1.2;
  color: var(--ink);
}
.feature:hover .feature-title, .feature:focus-visible .feature-title { color: var(--ember); }
.feature-blurb { display: block; margin: 9px 2px 0; font-size: 13px; line-height: 1.45;
                 color: var(--steel); }
.feature:hover .feature-blurb { color: var(--ink); }

/* the invitation under the feature grid */
.feature-ask { margin: 6px auto 30px; text-align: center; font-size: 14.5px; color: var(--steel); }
.feature-ask a { font-weight: 600; color: var(--ember); }
.feature-ask a:hover { color: var(--ember-lit); }

/* contact form */
.form { max-width: 560px; margin: 10px 0 12px; }
.field { margin: 0 0 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 5px; color: var(--ink); }
.field input, .field textarea {
  width: 100%; box-sizing: border-box; font: inherit; color: var(--ink);
  background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-wash);
}
.field-err { margin: 6px 0 0; font-size: 13px; color: var(--ember); font-weight: 500; }
/* honeypot: positioned off-screen rather than display:none, which more bots skip */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* news list */
.news { margin: 0 0 8px; }
.news-item { display: grid; grid-template-columns: 104px 1fr; gap: 18px;
             padding-block: 16px; border-top: 1px solid var(--rule); }
.news-item time { font-family: "IBM Plex Mono", monospace; font-size: 12.5px;
                  color: var(--steel); padding-top: 4px; }
.news-item h3 { margin: 0 0 5px; font-size: 17px; }
.news-item p { margin: 0; }
@media (max-width: 560px) { .news-item { grid-template-columns: 1fr; gap: 5px; } }

/* testimonial */
.quote { max-width: 64ch; margin: 0 0 12px; padding: 0; border: 0;
         font-family: Archivo, sans-serif; font-weight: 500;
         font-size: clamp(17px, 2.1vw, 20px); line-height: 1.5; letter-spacing: -.012em; }
.quote-by { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--steel); }

/* ---- footer -------------------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--rule);
  background: var(--panel);
  padding-block: 28px 40px;
  font-size: 14px;
  color: var(--steel);
}
.site-foot .row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.site-foot a { color: var(--steel); text-decoration: none; }
.site-foot a:hover { color: var(--ember); }
.site-foot .mail { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; }
@media (min-width: 641px) { .site-foot .mail { margin-left: auto; } }

/* ---- accessibility ------------------------------------------------------- */

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ember); color: #fff; padding: 10px 16px; z-index: 50;
  border-radius: 0 0 6px 0; text-decoration: none; font-weight: 600;
}
.skip:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Legacy <font> tags still present in un-migrated copy must not fight the
   stylesheet. Neutralise their colour only; size is left to the element. */
font[color="red"] { color: var(--ember); }

/* ---- privacy policy ------------------------------------------------------
   .box is the policy's "short version" callout; div.pp was its old width
   wrapper and now defers to the page measure. */

.box {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 0 0 22px;
  max-width: var(--measure);
  box-shadow: var(--shadow);
}
.box > :last-child { margin-bottom: 0; }

div.pp { max-width: none; }
table.pp th { background: var(--ember-wash); color: var(--ink); }
