:root {
  /* Flex Foundry brand kit (2026) */
  --bg: #100e0d;
  --bg-alt: #161311;
  --surface: #1d1917;
  --surface-2: #262220;
  --border: #332e2a;
  --text: #f1eee9;          /* "Flex" off-white */
  --muted: #a39b93;
  --red: #dc2a1e;           /* logo red */
  --red-deep: #b51a15;
  --red-hover: #ef3b2b;
  --orange: #ef6a1f;
  --heat: #f2741e;
  --gold: #ffc45a;
  --copper: #d39a55;        /* tagline */
  --charcoal: #221e1b;      /* hexagon fill */
  --forge: linear-gradient(180deg, #c8241b 0%, #dc2a1e 40%, #ef6a1f 80%, #f4904a 100%); /* "Foundry" */
  --red-glow: rgba(242, 116, 30, 0.18);
  --red-glow-soft: rgba(242, 116, 30, 0.10);
  --steel: #8e959c;
  --radius: 14px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --headline: "Big Shoulders Display", "Barlow Condensed", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 7vw, 4.75rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 0.95rem; letter-spacing: 0.08em; color: var(--muted); }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }
.container.wide { max-width: 1440px; }
.accent { color: var(--red); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.eyebrow {
  font-family: var(--display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--red);
  margin-bottom: 0.9rem;
}
.lede { font-size: 1.125rem; color: #cfc9c2; max-width: 38em; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.95em 1.6em;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--red);
  border-radius: 10px;
  font: 600 0.95rem/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--red-hover); border-color: var(--red-hover); transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--steel); }
.btn-sm { padding: 0.65em 1.2em; font-size: 0.85rem; }
.btn-block { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.75rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 14, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 700 1.2rem/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.brand img { width: 36px; height: 36px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) {
  text-decoration: none;
  font: 500 0.9rem/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #d6d0c9;
}
.nav-links a:not(.btn):hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-links .btn { margin-top: 16px; }
}

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 88px;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 20%, var(--red-glow), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero-photo {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(16, 14, 13, 0.55));
}
.img-missing img { visibility: hidden; }

@media (max-width: 820px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { max-width: 420px; }
}

/* Sections */
.section { padding: 96px 0; }
.section-tight { padding: 40px 0 96px; }
.section-alt { background-color: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
@media (max-width: 820px) { .section { padding: 64px 0; } }

/* Ambient red glow, echoing the hero. Placement alternates down the page. */
.glow-tl { background-image: radial-gradient(800px 420px at 0% 0%, var(--red-glow-soft), transparent 65%); }
.glow-tr { background-image: radial-gradient(800px 420px at 100% 0%, var(--red-glow-soft), transparent 65%); }
.glow-bl { background-image: radial-gradient(800px 460px at 0% 100%, var(--red-glow-soft), transparent 65%); }
.glow-br { background-image: radial-gradient(800px 460px at 100% 100%, var(--red-glow-soft), transparent 65%); }
.glow-r  { background-image: radial-gradient(700px 520px at 80% 50%, var(--red-glow-soft), transparent 65%); }


.page-head {
  padding: 64px 0 8px;
  background: radial-gradient(700px 300px at 50% 0%, var(--red-glow), transparent 70%);
}

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 2rem; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: #463e38; transform: translateY(-3px); }
.card p { color: #c2bbb3; flex: 1; }
.card-num { font: 700 0.85rem/1 var(--display); color: var(--red); letter-spacing: 0.15em; margin-bottom: 1.4rem; }
.link-arrow {
  font: 600 0.9rem/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--text);
}
.link-arrow::after { content: " →"; color: var(--red); transition: margin 0.15s; }
.link-arrow:hover::after { margin-left: 4px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* Transformations: before/after pairs */
.transformations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 2rem; }
.transform-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 10px 0;
  transition: border-color 0.2s, transform 0.2s;
}
.transform-card:hover { border-color: #463e38; transform: translateY(-3px); }
.transform-card h3 { font-size: 1.25rem; margin: 0; padding: 14px 6px 16px; letter-spacing: 0.06em; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ba figure {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}
.ba img { width: 100%; height: 100%; object-fit: cover; }
.ba figcaption {
  position: absolute;
  left: 8px; bottom: 8px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(16, 14, 13, 0.8);
  font: 600 0.7rem/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #d6d0c9;
}
.ba .after figcaption { background: var(--red); color: #fff; }
.ba figure.img-missing img { visibility: hidden; }
@media (max-width: 960px) { .transformations { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .transformations { grid-template-columns: 1fr; } }

/* Testimonials */
.subhead { font-size: 1.5rem; margin: 3.5rem 0 1.25rem; letter-spacing: 0.04em; }
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote-card {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 30px 26px 24px;
  background: radial-gradient(360px 180px at 0% 0%, var(--red-glow-soft), transparent 70%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.quote-card::before {
  content: "\201C";
  position: absolute;
  top: 6px; left: 20px;
  font: 700 4.5rem/1 var(--display);
  color: var(--red);
  opacity: 0.55;
}
.quote-card blockquote { flex: 1; margin: 1.1rem 0 1.4rem; color: #dcd6cf; font-size: 0.98rem; line-height: 1.7; }
.quote-card figcaption { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.quote-card figcaption > span:last-child { display: grid; gap: 2px; line-height: 1.3; }
.avatar {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font: 600 0.9rem/1 var(--display);
  letter-spacing: 0.06em;
}
@media (max-width: 960px) { .testimonials { grid-template-columns: 1fr; max-width: 680px; } }

/* Split / about */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.checks { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 0.7rem; }
.checks li::before {
  content: "";
  position: absolute; left: 0; top: 0.45em;
  width: 16px; height: 9px;
  border-left: 3px solid var(--red);
  border-bottom: 3px solid var(--red);
  transform: rotate(-45deg);
}
.about > div { max-width: 760px; }
.about p { color: #cfc9c2; font-size: 1.075rem; }
.about p.eyebrow { color: var(--red); font-size: 0.8rem; }
.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: 12px;
  background: radial-gradient(400px 160px at 100% 0%, var(--red-glow-soft), transparent 70%), var(--bg);
}
.callout p { margin: 0; color: #cfc9c2; font-size: 0.95rem; flex: 1 1 280px; }
.callout strong { color: #fff; }
.code { font-family: var(--display); color: #fff; background: var(--red); padding: 0.1em 0.5em; white-space: nowrap; border-radius: 6px; letter-spacing: 0.08em; }

/* Forms */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
}
@media (max-width: 600px) { .panel { padding: 22px; } }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .field-row.four { grid-template-columns: 1fr 1fr; }
}
label, legend {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #bdb6ae;
  padding: 0;
}
.optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=search], input[type=password], input:not([type]), select, textarea {
  width: 100%;
  padding: 13px 14px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font: 400 1rem/1.4 var(--body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
textarea { resize: vertical; }
.input-validation-error { border-color: #e5484d !important; }
.field-error, .form-error { color: #ff6b70; font-size: 0.85rem; }
.form-error:empty, .form-error ul:empty { display: none; }

/* Equal-width, equal-height options regardless of label length. */
.segmented { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 8px; }
.segmented label { display: flex; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 0.95rem; font-weight: 500; color: var(--text); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  line-height: 1.3;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  transition: border-color 0.15s, background 0.15s;
}
.segmented span.two-line { flex-direction: column; gap: 2px; padding: 12px 10px; }
.segmented span.two-line strong { font-weight: 600; }
.segmented span.two-line small { font-size: 0.8rem; color: var(--muted); }
.segmented label:hover span { border-color: var(--steel); }
.segmented input:checked + span { border-color: var(--red); background: rgba(220, 42, 30, 0.12); }
.segmented input:focus-visible + span { box-shadow: 0 0 0 3px var(--red-glow); }
@media (max-width: 600px) { .segmented.stack-mobile { grid-auto-flow: row; } }

.check { display: flex; gap: 12px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex-shrink: 0; }
/* Note under a checkbox that only appears once it's ticked. */
.check-note { display: none; margin: 8px 0 0 30px; padding: 10px 12px; border-left: 2px solid var(--red); background: var(--bg); border-radius: 0 8px 8px 0; font-size: 0.875rem; color: #cfc9c2; }
.check-group:has(input:checked) .check-note { display: block; }

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

.success h3 { color: #fff; }
.success p { color: #cfc9c2; }

/* Macro results */
.results .calories { margin: 0.5rem 0 1.5rem; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.results .calories .big { font: 700 clamp(3.5rem, 12vw, 5.5rem)/1 var(--display); color: #fff; }
.results .calories span:last-child { font: 500 1rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.macro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 1.5rem; }
.macro {
  display: grid;
  gap: 4px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  border-top: 3px solid var(--red);
}
.macro .big { font: 700 2.25rem/1 var(--display); }
.macro small { font-size: 0.55em; color: var(--muted); margin-left: 2px; }
.macro span:last-child { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
@media (max-width: 480px) { .macro { padding: 14px; } .macro .big { font-size: 1.75rem; } }

/* Legal prose */
.prose { color: #cfc9c2; }
.prose h2 { font-size: 1.35rem; color: #fff; margin: 2.2em 0 0.6em; }
.prose p { overflow-wrap: anywhere; }

/* Admin */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.flash { margin-bottom: 20px; padding: 12px 16px; border: 1px solid var(--border); border-left: 3px solid var(--red); border-radius: 10px; background: var(--surface); }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.admin-toolbar input[type=search] { flex: 1 1 240px; width: auto; }
.admin-toolbar select { width: auto; flex: 0 0 auto; }
.admin-toolbar input, .admin-toolbar select { padding-top: 10px; padding-bottom: 10px; }
.admin-toolbar #csv-link { margin-left: auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: var(--surface); }
.admin-table th { background: var(--surface); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); user-select: none; }
.admin-table th[data-sort] { cursor: pointer; }
.admin-table th[data-sort]:hover { color: var(--text); }
.admin-table th[aria-sort="ascending"]::after { content: " ▲"; color: var(--red); }
.admin-table th[aria-sort="descending"]::after { content: " ▼"; color: var(--red); }
.admin-table a { color: inherit; }
.row-actions > * + * { margin-left: 14px; }
/* Keep actions reachable when the table scrolls sideways on smaller screens. */
.admin-table th:last-child, .admin-table td:last-child { position: sticky; right: 0; background: var(--bg); box-shadow: -1px 0 0 var(--border); }
.admin-table th:last-child { background: var(--surface); }
.admin-table tbody tr:hover td:last-child { background: var(--surface); }
.btn-link { background: none; border: 0; padding: 0; color: var(--muted); font: 500 0.85rem/1 var(--body); cursor: pointer; }
.btn-link:hover { color: var(--text); text-decoration: underline; }
.btn-link.danger:hover { color: #ff6b70; }
.status { padding: 3px 9px; border-radius: 999px; font-size: 0.75rem; background: var(--surface-2); }
.status-sent { background: rgba(48, 164, 108, 0.2); color: #5bd69a; }
.status-failed { background: rgba(229, 72, 77, 0.2); color: #ff6b70; }
.status-pending { background: rgba(245, 180, 60, 0.18); color: #f5c451; }

.modal {
  width: min(560px, calc(100vw - 32px));
  padding: 26px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.modal::backdrop { background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(3px); }
.modal h3 { font-size: 1.3rem; }
.modal p { color: #cfc9c2; }
.modal pre { max-height: 60vh; overflow: auto; padding: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; font-size: 0.8rem; color: #cfc9c2; white-space: pre-wrap; }
.modal-warning { padding: 10px 12px; border-radius: 8px; background: rgba(245, 180, 60, 0.12); color: #f5c451 !important; font-size: 0.9rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.btn-danger { background: #b3261e; border-color: #b3261e; }
.btn-danger:hover { background: #d13a31; border-color: #d13a31; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
  background: radial-gradient(900px 260px at 50% 0%, var(--red-glow-soft), transparent 70%), var(--bg-alt);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid p { margin-top: 0.75rem; }
.footer-grid a { text-decoration: none; color: #d6d0c9; }
.footer-grid a:hover { color: #fff; }
.socials { display: flex; flex-direction: column; gap: 4px; }
.legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--muted); }
.legal a { color: var(--muted); }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Forge design: full-bleed hero, embers, crossed ribbons, ghost headings,
   checkerboard cards, scroll reveals. Motion is disabled for reduced-motion.
   ========================================================================== */

/* Top info bar */
.topbar { background: #0a0908; border-bottom: 1px solid var(--border); font-size: 0.78rem; color: var(--muted); }
.topbar-inner { display: flex; align-items: center; height: 38px; }
.topbar a, .topbar span { color: inherit; text-decoration: none; }
.topbar a:hover { color: var(--text); }
.topbar-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 20px; }
.topbar-item:first-child { padding-left: 0; }
/* Thin divider between items, like a vertical rule */
.topbar-item + .topbar-item { border-left: 1px solid var(--border); }
.topbar-icon { width: 15px; height: 15px; color: var(--copper); flex-shrink: 0; }
.topbar-ig { margin-left: auto; display: inline-flex; align-items: center; padding-left: 20px; border-left: 1px solid var(--border); height: 100%; }
.topbar-ig .topbar-icon { width: 17px; height: 17px; transition: color 0.15s; }
.topbar-ig:hover .topbar-icon { color: var(--heat); }
@media (max-width: 700px) { .topbar { display: none; } }

/* Brand headline type (matches the "FLEX FOUNDRY" wordmark) */
.display, .section h2, .page-head h1 { font-family: var(--headline); font-weight: 800; letter-spacing: 0.04em; line-height: 0.95; }
.section h2 { font-size: clamp(2.4rem, 6vw, 4rem); }
.page-head h1 { font-size: clamp(2.8rem, 8vw, 5rem); }

/* Hero */
.hero-xl {
  display: flex;
  align-items: center;
  min-height: min(calc(100vh - 116px), 820px);
  padding: 90px 0 120px;
  background: radial-gradient(900px 600px at 75% 30%, rgba(220, 42, 30, 0.28), transparent 65%), var(--bg);
  isolation: isolate;
}
.hero-inner { position: relative; z-index: 3; }
.hero-inner .lede { max-width: 36em; }
.hero-xl .display { font-size: clamp(3.4rem, 12vw, 8rem); margin-bottom: 0.3em; }
.hero-bg { position: absolute; inset: 0 0 0 36%; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: grayscale(1) contrast(1.15) brightness(0.9); }
/* Red duotone, then fade into the page on the left and bottom. */
.hero-bg::before { content: ""; position: absolute; inset: 0; background: #dc2a1e; mix-blend-mode: multiply; opacity: 0.85; }
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(16, 14, 13, 0.75) 22%, rgba(16, 14, 13, 0) 60%),
    linear-gradient(0deg, var(--bg) 0%, rgba(16, 14, 13, 0) 30%);
}
.hero-slashes { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.hero-slashes span {
  position: absolute;
  top: -20%;
  height: 140%;
  width: 180px;
  transform: skewX(-22deg);
  background: linear-gradient(180deg, rgba(239, 106, 31, 0.55), rgba(220, 42, 30, 0.05));
  mix-blend-mode: screen;
}
.hero-slashes span:nth-child(1) { right: 34%; opacity: 0.35; }
.hero-slashes span:nth-child(2) { right: 18%; width: 90px; opacity: 0.5; }
.hero-slashes span:nth-child(3) { right: 6%; width: 260px; opacity: 0.18; background: transparent; border: 2px solid rgba(239, 106, 31, 0.5); }

.embers { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.embers span {
  position: absolute;
  bottom: -12px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #f2741e;
  box-shadow: 0 0 8px 2px rgba(255, 196, 90, 0.6);
  opacity: 0;
  animation: ember-rise var(--t) linear infinite;
  animation-delay: calc(var(--d) * -1);
}
@keyframes ember-rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 0.9; }
  75% { opacity: 0.6; }
  100% { transform: translate(var(--drift), -105vh); opacity: 0; }
}
.dot-col {
  position: absolute; z-index: 2;
  width: 8px; height: 96px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 1.6px, transparent 2.2px) 0 0 / 8px 12px;
}
.dot-col-l { left: 2.5%; top: 42%; }
.dot-col-r { right: 3%; top: 62%; }
/* Only where there's gutter room beside the text. */
@media (max-width: 1320px) { .dot-col { display: none; } }

@media (max-width: 820px) {
  .hero-xl { min-height: 0; padding: 56px 0 90px; }
  .hero-bg { inset: 0; opacity: 0.55; }
  .hero-bg::after { background: linear-gradient(0deg, var(--bg) 5%, rgba(16, 14, 13, 0.55) 60%, rgba(16, 14, 13, 0.35) 100%); }
  .hero-slashes span:nth-child(3), .dot-col { display: none; }
}

/* Crossed marquee ribbons */
/* The ribbons straddle the seam between the hero and the next section (equal negative margins),
   so both sections' backgrounds run continuously behind them instead of a flat strip. */
.ribbons { position: relative; height: 160px; margin: -80px 0; overflow: hidden; z-index: 4; pointer-events: none; }
.ribbons + .section { padding-top: 150px; }
.ribbon {
  position: absolute;
  top: 50%; left: -5%;
  width: 110%;
  padding: 13px 0;
  font: 800 1.45rem/1 var(--headline);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
}
.ribbon-back { transform: translateY(-50%) rotate(3.5deg); background: #1d1917; color: #8a8178; border-block: 1px solid var(--border); }
.ribbon-front { transform: translateY(-50%) rotate(-2deg); background: var(--forge); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.ribbon-track { display: inline-flex; animation: marquee 38s linear infinite; }
.ribbon-back .ribbon-track { animation-duration: 52s; animation-direction: reverse; }
.ribbon span { display: inline-flex; align-items: center; gap: 30px; padding-right: 30px; }
.ribbon span::after {
  content: "";
  width: 1.25em; height: 1.25em;
  background: currentColor;
  opacity: 0.6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' fill-rule='evenodd' d='M0.8 12a11.2 11.2 0 1 0 22.4 0a11.2 11.2 0 1 0 -22.4 0ZM9.7 12a2.3 2.3 0 1 0 4.6 0a2.3 2.3 0 1 0 -4.6 0ZM9.6 4.45L14.4 4.45A1.25 1.25 0 0 1 14.4 6.95L9.6 6.95A1.25 1.25 0 0 1 9.6 4.45ZM19.74 13.7L17.34 17.85A1.25 1.25 0 0 1 15.17 16.6L17.57 12.45A1.25 1.25 0 0 1 19.74 13.7ZM6.66 17.85L4.26 13.7A1.25 1.25 0 0 1 6.43 12.45L8.83 16.6A1.25 1.25 0 0 1 6.66 17.85ZM2.4 12a9.6 9.6 0 1 0 19.2 0a9.6 9.6 0 1 0 -19.2 0ZM3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' fill-rule='evenodd' d='M0.8 12a11.2 11.2 0 1 0 22.4 0a11.2 11.2 0 1 0 -22.4 0ZM9.7 12a2.3 2.3 0 1 0 4.6 0a2.3 2.3 0 1 0 -4.6 0ZM9.6 4.45L14.4 4.45A1.25 1.25 0 0 1 14.4 6.95L9.6 6.95A1.25 1.25 0 0 1 9.6 4.45ZM19.74 13.7L17.34 17.85A1.25 1.25 0 0 1 15.17 16.6L17.57 12.45A1.25 1.25 0 0 1 19.74 13.7ZM6.66 17.85L4.26 13.7A1.25 1.25 0 0 1 6.43 12.45L8.83 16.6A1.25 1.25 0 0 1 6.66 17.85ZM2.4 12a9.6 9.6 0 1 0 19.2 0a9.6 9.6 0 1 0 -19.2 0ZM3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: plate-spin 6s linear infinite;
}
.ribbon-back span::after { animation-direction: reverse; }
.ribbon-front span::after { background: #3a0c08; opacity: 0.55; }
@keyframes plate-spin { to { transform: rotate(360deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (max-width: 600px) {
  /* Narrow screens need steeper angles or the red ribbon hides the dark one. */
  .ribbons { height: 170px; margin: -85px 0; }
  .ribbons + .section { padding-top: 125px; }
  .ribbon { font-size: 1.1rem; padding: 10px 0; }
  .ribbon-back { transform: translateY(-50%) rotate(12deg); }
  .ribbon-front { transform: translateY(-50%) rotate(-7deg); }
}

/* Ghost word behind section headings, plus slash marks on eyebrows */
.section { overflow: clip; }
.heading { position: relative; }
.heading::before {
  content: attr(data-ghost);
  position: absolute;
  left: -0.04em; bottom: 0.1em;
  font: 900 clamp(5rem, 17vw, 12rem)/1 var(--headline);
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.09);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
}
.heading > * { position: relative; z-index: 1; }
.heading .eyebrow::before, .hero-inner .eyebrow::before { content: "///"; margin-right: 0.7em; font-style: italic; letter-spacing: -0.08em; }

/* Checkerboard service cards */
.cards-checker { gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cards-checker .card { border: 0; border-radius: 0; border-right: 1px solid var(--border); transition: background 0.25s; }
.cards-checker .card:last-child { border-right: 0; }
.cards-checker .card:hover { transform: none; background: var(--surface-2); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.6rem; }
.card-top .card-num { margin: 0; }
.card-icon { width: 46px; height: 46px; color: var(--red); }
.card-accent { background: linear-gradient(155deg, #de2a20 0%, #b51a15 100%); }
.cards-checker .card-accent:hover { background: linear-gradient(155deg, #ef3b2b 0%, #b52126 100%); }
.card-accent p { color: rgba(255, 255, 255, 0.9); }
.card-accent .card-icon, .card-accent .card-num, .card-accent .link-arrow::after { color: #fff; }
@media (max-width: 900px) {
  .cards-checker .card { border-right: 0; border-bottom: 1px solid var(--border); }
  .cards-checker .card:last-child { border-bottom: 0; }
}

/* Scroll reveal (only when JS is running, so content never stays hidden) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--reveal-delay, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* Back to top */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--red); color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, background 0.15s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--red-hover); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ribbon-track, .ribbon span::after { animation: none; }
  .embers { display: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Brand kit: logo lockups, copper tagline labels, forge gradients, hexagons
   ========================================================================== */
.brand img { width: auto; height: 58px; }
.nav { height: 80px; }
@media (max-width: 820px) { .nav-links { top: 80px; } .brand img { height: 50px; } }
.nav-links a:not(.btn) { font: 600 1rem/1 var(--display); letter-spacing: 0.14em; }
.btn { font: 700 1rem/1 var(--display); letter-spacing: 0.12em; background: linear-gradient(180deg, #de2a20, var(--red-deep)); border-color: transparent; }
.btn:hover { background: linear-gradient(180deg, var(--orange), var(--red)); border-color: transparent; }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--copper); }
.btn-sm { font-size: 0.9rem; }
.card h3, .transform-card h3, .subhead { font-family: var(--headline); font-weight: 800; font-size: 1.75rem; letter-spacing: 0.04em; line-height: 1; }
.subhead { font-size: 2rem; }

/* "PHYSIQUE" gets the same fire gradient as "FOUNDRY" in the wordmark. */
.accent { background: var(--forge); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Section labels mirror the copper "FORGE YOUR PHYSIQUE" tagline. */
.eyebrow, .about p.eyebrow { font: 600 0.95rem/1.2 var(--display); letter-spacing: 0.3em; color: var(--copper); }
.heading .eyebrow::before, .hero-inner .eyebrow::before { color: var(--copper); }
.card-num { font-family: var(--display); color: var(--copper); }
.card-accent .card-num { color: #fff; }
.card-icon { color: var(--heat); }

/* Checkerboard accent card: logo red with a forge glow in the corner. */
.card-accent { background: radial-gradient(380px 260px at 100% 100%, rgba(242, 116, 30, 0.55), transparent 70%), linear-gradient(160deg, #de2a20 0%, #b51a15 100%); }
.cards-checker .card-accent:hover { background: radial-gradient(420px 300px at 100% 100%, rgba(255, 196, 90, 0.5), transparent 70%), linear-gradient(160deg, #ef3b2b 0%, #c8241b 100%); }

/* Hexagon badges, like the logo's frame. */
.avatar {
  width: 46px; height: 46px;
  border-radius: 0;
  background: linear-gradient(135deg, #8c6232, #c98a3c 55%, #ee9a3a);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
  position: relative;
  font: 700 1rem/1 var(--display);
  letter-spacing: 0.06em;
  color: var(--copper);
}
.avatar::before {
  content: "";
  position: absolute; inset: 2px;
  background: var(--charcoal);
  clip-path: inherit;
  z-index: -1;
}
.avatar { isolation: isolate; }

/* Hero photo: logo-red duotone with forge heat rising from the bottom. */
.hero-bg::before { background: var(--red); }
.hero-xl { background: radial-gradient(900px 600px at 75% 30%, rgba(220, 42, 30, 0.22), transparent 65%), radial-gradient(700px 400px at 60% 110%, rgba(242, 116, 30, 0.28), transparent 70%), var(--bg); }

/* About: text beside the worked logo. */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr); gap: 56px; align-items: center; }
.about-mark { justify-self: center; width: min(100%, 340px); filter: drop-shadow(0 0 40px rgba(242, 116, 30, 0.25)); }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-mark { width: 200px; justify-self: start; order: -1; }
}

/* Footer lockup */
.footer-logo img { width: 190px; height: auto; margin-bottom: 18px; }
.site-footer h4 { font: 600 0.9rem/1 var(--display); letter-spacing: 0.3em; color: var(--copper); }

/* Hero trust line */
.hero-creds { margin: 1.4rem 0 0; font: 600 0.9rem/1.2 var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--copper); }
.hero-creds span { color: var(--border); margin: 0 0.5em; }

/* How it works: hexagon step numbers joined by a copper line */
.steps { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.steps::before {
  content: "";
  position: absolute;
  top: 36px; left: calc(16.66% + 20px); right: calc(16.66% + 20px);
  border-top: 2px dashed rgba(211, 154, 85, 0.45);
}
.step { position: relative; text-align: center; padding: 0 8px; }
.step-num {
  position: relative;
  width: 72px; height: 72px;
  margin: 0 auto 22px;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
  background: linear-gradient(135deg, #8c6232, #c98a3c 55%, #ee9a3a);
  display: grid; place-items: center;
  isolation: isolate;
}
.step-num::before {
  content: "";
  position: absolute; inset: 3px;
  clip-path: inherit;
  background: radial-gradient(circle at 50% 110%, rgba(242, 116, 30, 0.55), transparent 60%), var(--charcoal);
  z-index: -1;
}
.step-num span { font: 800 2rem/1 var(--headline); background: var(--forge); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { font: 800 1.7rem/1 var(--headline); letter-spacing: 0.04em; margin-bottom: 0.5em; }
.step p { color: #cfc9c2; margin: 0 auto; max-width: 30ch; }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { top: 36px; bottom: 36px; left: 35px; right: auto; border-top: 0; border-left: 2px dashed rgba(211, 154, 85, 0.45); }
  .step { display: grid; grid-template-columns: 72px 1fr; column-gap: 20px; text-align: left; padding: 0; }
  .step-num { grid-row: span 2; margin: 0; }
  .step p { margin: 0; max-width: none; }
}

/* Certifications */
.creds { list-style: none; padding: 0; margin: 1.6rem 0 2rem; display: flex; flex-wrap: wrap; gap: 12px; }
.cred { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.cred-badge { width: 38px; height: 38px; display: grid; place-items: center; color: var(--copper); }
.cred-badge svg { width: 30px; height: 30px; }
.cred-text { display: grid; gap: 2px; line-height: 1.2; }
.cred-text strong { font: 700 1.05rem/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.cred-text span { font-size: 0.8rem; color: var(--muted); }
.cred-art { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }
.cred-verify { margin-top: 3px; font-size: 0.78rem; color: var(--copper); }
.cred-verify:hover { color: var(--heat); }

/* FAQ accordion */
.faq { margin-top: 2rem; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 4px;
  font: 700 1.2rem/1.25 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 12px; height: 12px;
  border-right: 2px solid var(--copper);
  border-bottom: 2px solid var(--copper);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq-item summary:hover { color: #fff; }
.faq-item summary:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.faq-item p { margin: 0 4px 22px; color: #cfc9c2; max-width: 62ch; }
.faq-more { margin-top: 1.8rem; color: var(--muted); }
.faq-more a { color: var(--copper); }

/* Application thank-you: embedded Calendly consultation */
.consult { margin-top: 1.8rem; padding-top: 1.6rem; border-top: 1px solid var(--border); }
.consult h3 { font: 800 2rem/1 var(--headline); letter-spacing: 0.04em; }
.consult-widget { min-width: 280px; height: 720px; margin: 1.2rem -12px 0; border-radius: 12px; overflow: hidden; }
.consult-alt { margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }
.consult-alt a { color: var(--copper); }
@media (max-width: 600px) { .consult-widget { height: 900px; margin-inline: -8px; } }

/* Admin sign-in */
.login-wrap { display: grid; justify-items: center; }
.page-head.login-head { text-align: center; }
.login-panel { width: min(100%, 420px); }
.login-mark { width: 72px; height: 72px; margin: 0 auto 1.4rem; filter: drop-shadow(0 0 18px rgba(242, 116, 30, 0.3)); }
.login-panel code { font-size: 0.85em; color: var(--copper); }
.form-error ul { margin: 0; padding: 12px 14px; list-style: none; border: 1px solid rgba(255, 107, 112, 0.35); border-radius: 10px; background: rgba(229, 72, 77, 0.08); }
.admin-bar { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-bottom: 1rem; }
