/* ==========================================================================
   FMI WEB v1  -  Iron / Ember / Edge
   Locked to: iron-body-app/APP-BRAND.md (approved 2026-07-20)
   Rules honored: dark ground only, ONE ember per viewport section, chamfer
   every control, no rounded pills, no gamification, heat bars not rings.
   ========================================================================== */

:root {
  /* Ground + panels.
     Coal lifted and seam brightened vs the app tokens. On a phone in daylight
     the original 9-point separation between ground and panel disappeared, so
     every section read as one flat sheet. Same family, more steps. */
  --iron:        #14110F;
  --iron-alt:    #191512;  /* alternating section ground, keeps a reading rhythm */
  --coal-a:      #241F1A;
  --coal-b:      #2E2822;
  --seam:        #4A3F37;

  /* Text */
  --bone:        #F0EDE8;
  --ash:         #8E837A;  /* brand token, kept for decorative use */
  --ash-lift:    #A79B90;  /* small text and long muted runs, for legibility */

  /* Accent (ONE per section) */
  --ember:       #F36B21;
  --ember-hot:   #FF7E32;
  --ember-deep:  #C74E12;

  /* Semantic only. Never decoration. */
  --blood:       #EB201A;
  --zone:        #7BA05B;

  /* Chamfer: 45-degree corner cuts, the signature shape.
     App spec is 12px panels / 8px controls. Web panels run 2-3x the width of
     an app card, so a 12px cut reads as a rounding error at that scale. Panels
     go to 18px here so the cut is legible as a deliberate shape. Controls stay
     at 8px, they are the same physical size on both. */
  --ch18: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px),
                  calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
  --ch8:  polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px),
                  calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);

  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 56px);
}

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

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

body {
  margin: 0;
  background: var(--iron);
  color: var(--bone);
  font-family: "Merriweather", Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Type ---------- */

h1, h2, h3, .display {
  font-family: "Anton", Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: 0.005em;
  margin: 0 0 0.4em;
}

/* Type scale.
   The vw factors are deliberately low and the caps deliberately hard. Anton is
   condensed, so a headline that reads right on a phone turns into a wall at
   1900px if you let vw run. Caps are set so a ~100 character headline lands in
   2 to 3 lines on a desktop, not 7. */
h1 { font-size: clamp(2.1rem, 3.6vw, 3.3rem); line-height: 0.96; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
h3 { font-size: clamp(1.12rem, 1.5vw, 1.35rem); line-height: 1.15; }

/* Ember emphasis inside headlines. Keep it to the operative words.
   nowrap so a highlighted phrase never breaks across two lines. A split
   "RECOVERY / DAY" reads as a mistake and kills the emphasis. */
.em { color: var(--ember); white-space: nowrap; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.label {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.73rem;
  color: var(--ember);
  margin: 0 0 1.1rem;
  display: block;
}

.lede {
  font-size: clamp(1.06rem, 1.5vw, 1.3rem);
  line-height: 1.65;
  color: #EAE4DD;
  max-width: 62ch;
}

.muted { color: var(--ash-lift); }
.small { font-size: 0.92rem; line-height: 1.62; }
.tiny  { font-size: 0.82rem; line-height: 1.55; color: var(--ash-lift); }

strong, b { font-weight: 700; color: var(--bone); }

a { color: var(--bone); text-decoration-color: var(--seam); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ember); }

/* ---------- Layout ---------- */

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

section { padding: clamp(56px, 9vw, 104px) 0; }

/* Alternating grounds so adjacent sections separate without extra chrome. */
section:nth-of-type(even) { background: var(--iron-alt); }

.section-edge { border-top: 1px solid var(--seam); }

/* ---------- Heat bar (progress = temperature, per brand). Used as a rule. */

.heatbar {
  height: 3px;
  width: 84px;
  background: linear-gradient(90deg, var(--ember-deep), var(--ember), var(--ember-hot));
  box-shadow: 0 0 14px rgba(243, 107, 33, 0.45);
  margin: 0 0 1.6rem;
}

/* ---------- Chamfered panel: seam edge + coal fill + 2% brushed grain ---- */

.panel { background: var(--seam); clip-path: var(--ch18); padding: 1px; }

.panel > .panel-in {
  clip-path: var(--ch18);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E"),
    linear-gradient(160deg, var(--coal-a), var(--coal-b));
  padding: clamp(22px, 3.4vw, 34px);
  height: 100%;
}

/* The conversion panel. Ember edge so the form is never just another card. */
.panel--focus { background: linear-gradient(160deg, var(--ember), var(--ember-deep)); padding: 2px; }
.panel--focus > .panel-in { background: linear-gradient(160deg, #262019, #302921); }

/* ---------- Buttons: chamfered, never pill. Dark text on ember for contrast. */

.btn {
  display: inline-block;
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  line-height: 1;
  padding: 19px 34px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  clip-path: var(--ch8);
  transition: background .16s ease, transform .16s ease;
}

.btn-ember {
  background: linear-gradient(160deg, var(--ember-hot), var(--ember));
  color: #14110F;
}
.btn-ember:hover { background: linear-gradient(160deg, var(--ember), var(--ember-deep)); }
.btn-ember:active { transform: translateY(1px); }

.btn-block { display: block; width: 100%; text-align: center; }

:focus-visible { outline: 3px solid var(--ember-hot); outline-offset: 3px; }

/* ---------- Hero ---------- */

/* Tight on purpose. The form has to clear the fold on a 900px-tall laptop. */
.hero { padding-top: clamp(30px, 4.5vw, 54px); padding-bottom: clamp(44px, 6vw, 72px); }

.hero-logo { width: 86px; height: auto; display: block; margin: 0 0 2.2rem; opacity: 0.95; }

/* Measure for a story-led hero headline. Pages that run the headline full
   width across the top override this to `none`. 15ch was the original value
   and it forced long headlines into a narrow 7-line stack. */
.hero h1 { max-width: 22ch; }

.hero-cta { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 16px 26px; align-items: center; }

.hero-note { font-family: "Oswald", sans-serif; font-weight: 300; font-size: 0.92rem; color: var(--ash); }

/* ---------- Squeeze hero: copy left, form right, form above the fold ---- */

.hero-split { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 920px) {
  .hero-split { grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
  .hero-split > .panel { max-width: 460px; justify-self: end; width: 100%; }
}

/* ---------- Inline capture row ------------------------------------------
   Two fields and a button on one line. A tall form in a side column next to
   two short paragraphs leaves a dead well no alignment value can fix, so the
   structure changes instead: full-width copy, compact form beneath it.
   ----------------------------------------------------------------------- */

.form-inline { display: grid; gap: 15px; grid-template-columns: 1fr; }
@media (min-width: 780px) {
  .form-inline { grid-template-columns: 1fr 1.35fr auto; gap: 16px; align-items: end; }
}
.form-inline .form-row { margin-bottom: 0; }
.form-inline .btn { padding: 16px 32px; }
@media (max-width: 779px) { .form-inline .btn { width: 100%; } }

.form-head {
  font-family: "Anton", Impact, sans-serif;
  text-transform: uppercase;
  font-size: 1.35rem;
  line-height: 1;
  margin: 0 0 1.3rem;
  color: var(--bone);
}

/* ---------- Feature grid ---------- */

.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.feature h3 { color: var(--bone); margin-bottom: 0.55em; }

.feature .tagname {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ash);
  border: 1px solid var(--seam);
  clip-path: var(--ch8);
  padding: 5px 11px;
  display: inline-block;
  margin-bottom: 1.05rem;
}

.feature p { font-size: 0.98rem; line-height: 1.65; color: #DAD3CB; margin: 0; }

/* ---------- Fit list (for / not for) ---------- */

.fitlist { list-style: none; margin: 0; padding: 0; }
.fitlist li { padding: 0 0 0 26px; margin-bottom: 0.85rem; position: relative; font-size: 0.98rem; line-height: 1.6; }
.fitlist li:last-child { margin-bottom: 0; }
.fitlist li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 9px; height: 9px; background: var(--ember);
  clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px);
}
/* "not for you" markers stay muted. Ember means go, not stop. */
.fitlist:not(.is-for) li::before { background: var(--seam); }

/* ---------- Form ---------- */

.form-row { margin-bottom: 20px; }

.form-row label {
  display: block;
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.68rem;
  color: var(--ash);
  margin-bottom: 9px;
}

.field-wrap { background: var(--seam); clip-path: var(--ch8); padding: 1px; }

.form-row input,
.form-row select {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  background: #15110E;
  color: var(--bone);
  border: 0;
  clip-path: var(--ch8);
  font-family: "Oswald", sans-serif;
  font-weight: 300;
  font-size: 1rem;
  padding: 15px 16px;
  line-height: 1.3;
}

.form-row select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238E837A' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-row input::placeholder { color: #7E7368; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-msg {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  clip-path: var(--ch8);
  font-family: "Oswald", sans-serif;
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.5;
}
.form-msg.is-shown { display: block; }
.form-msg.is-error { background: rgba(235, 32, 26, 0.12); border-left: 3px solid var(--blood); color: #F3C9C7; }
.form-msg.is-ok    { background: rgba(123, 160, 91, 0.12); border-left: 3px solid var(--zone); color: #D3E0C6; }

/* ---------- Verdict card + chamfered sliders (brand components) ----------
   APP-BRAND.md: "Verdict card: coal panel, 4px left border (ember = go,
   blood = weak link/stop), Anton verdict line + one-line reason showing the
   rule that fired." Slider thumbs carry the chamfer like every other control.
   ------------------------------------------------------------------------ */

.dial { margin-bottom: 22px; }

.dial-top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: "Oswald", sans-serif; margin-bottom: 9px;
}
.dial-name {
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 0.68rem; color: var(--ash-lift);
}
.dial-val {
  font-weight: 500; font-size: 1.05rem; color: var(--bone);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 8px; margin: 0; padding: 0;
  background: linear-gradient(90deg, var(--ember-deep), var(--ember-hot));
  clip-path: var(--ch8);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 26px; background: var(--bone); border: 0;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 26px; background: var(--bone); border: 0; border-radius: 0;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
input[type="range"]::-moz-range-track { background: transparent; }

.verdict {
  background: linear-gradient(160deg, var(--coal-a), var(--coal-b));
  border-left: 4px solid var(--ember);
  padding: 22px 24px;
  transition: border-color .18s ease;
}
.verdict.is-stop { border-left-color: var(--blood); }

.verdict-line {
  font-family: "Anton", Impact, sans-serif;
  text-transform: uppercase; font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1; margin: 0 0 .5rem; color: var(--bone);
}
.verdict-why {
  font-family: "Oswald", sans-serif; font-weight: 300;
  font-size: .95rem; line-height: 1.55; color: var(--ash-lift); margin: 0;
}
.verdict-rule {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem; color: var(--ash); margin: .9rem 0 0; letter-spacing: .02em;
}

/* ---------- Footer ---------- */

footer { border-top: 1px solid var(--seam); padding: 40px 0 56px; }
footer p { font-size: 0.82rem; line-height: 1.65; color: var(--ash); }
footer a { color: var(--ash); }

/* ---------- Utility ---------- */

.stack > * + * { margin-top: clamp(28px, 4vw, 44px); }
.center-narrow { max-width: 640px; margin: 0 auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
