/* frht.app page layout. Sits on top of brand/freight.css (the FREIGHT brand kit):
   colours, fonts and the signature treatments come from there. Only page-specific
   tokens live here, so a brand-kit update is a drop-in replacement of freight.css. */

:root {
  --gold-ghost: rgba(227, 210, 156, 0.07);
  --hairline: rgba(227, 210, 156, 0.1);
  --kaine-wash: rgba(63, 224, 143, 0.07);
  --track-label: 0.3em;
  --track-btn: 0.2em;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  display: flow-root; /* keep .doc's top margin inside body */
  min-height: 100vh;
  background-color: var(--navy-deep);
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1px 1px at 78% 9%, rgba(255,255,255,0.35), transparent 60%),
    radial-gradient(1px 1px at 63% 41%, rgba(255,255,255,0.28), transparent 60%),
    radial-gradient(1px 1px at 31% 67%, rgba(255,255,255,0.32), transparent 60%),
    radial-gradient(1px 1px at 89% 73%, rgba(255,255,255,0.4), transparent 60%),
    radial-gradient(1px 1px at 47% 88%, rgba(255,255,255,0.28), transparent 60%),
    radial-gradient(1.5px 1.5px at 5% 52%, rgba(227,210,156,0.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 94% 35%, rgba(227,210,156,0.35), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 70%);
  background-attachment: fixed;
}

p { margin: 0; }
a { color: var(--gold); }
a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- The document: a .panel with the brand's double frame ---------- */

.doc {
  max-width: 1180px;
  margin: clamp(10px, 2.2vw, 28px) auto;
  overflow: hidden;
}
.sheet {
  position: relative;
  padding: clamp(56px, 6vw, 76px) clamp(48px, 6vw, 80px) clamp(48px, 5vw, 64px);
}

/* Faded station silhouette behind the hero, echoing the banner */
.sheet::before {
  content: "";
  position: absolute;
  top: -6%;
  right: -14%;
  width: min(760px, 95vw);
  aspect-ratio: 1;
  background: url("../assets/emblem.svg") center / contain no-repeat;
  opacity: 0.045;
  transform: rotate(-8deg);
  pointer-events: none;
}

/* ---------- Ledger line (the report's REF / CYCLE / ISSUED row) ---------- */

.ledger {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding-bottom: 14px;
}
.ledger b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  margin-left: 0.5em;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.6em;
  border-radius: 50%;
  background: var(--kaine);
  animation: pulse 2.6s ease-out infinite;
  vertical-align: 1px;
}

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

.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 6vw, 72px);
}
.hero .badge {
  display: block;
  width: clamp(150px, 21vw, 240px);
  height: auto;
  aspect-ratio: 1;
}

.org {
  font-weight: 600;
  font-size: clamp(14px, 1.5vw, 17px);
  letter-spacing: 0.42em;
  color: var(--gold-dim);
  margin-bottom: 0.7em;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.6vw, 5.2rem);
  line-height: 1;
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}

.expansion {
  font-size: clamp(13px, 1.3vw, 16px);
  letter-spacing: var(--track-btn);
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.2em;
}
.expansion strong {
  color: var(--gold);
  font-weight: 700;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2.2em;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  padding: 0.9em 1.6em;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: var(--track-btn);
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid var(--gold);
  transition: background-color 0.2s, transform 0.2s;
}
.btn-solid {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-solid:hover { background: #f0e3b6; transform: translateY(-1px); }
.btn-line {
  color: var(--gold);
  background: transparent;
}
.btn-line:hover { background: var(--gold-ghost); transform: translateY(-1px); }

/* Drawn arrow: the brand fonts are Latin-subset and carry no → glyph */
.btn-solid::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: -0.1em;
}

/* ---------- Stats (the report's total box + fact stack) ---------- */

.stats {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  margin-bottom: clamp(56px, 8vw, 96px);
}

.total {
  border: 1.5px solid var(--gold-dim);
  padding: clamp(24px, 3vw, 36px) clamp(24px, 3vw, 40px);
  background: linear-gradient(135deg, rgba(227, 210, 156, 0.08), transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.total .stat {
  font-size: clamp(3.6rem, 9vw, 6.4rem);
  margin: 14px 0 12px;
}
.total .stat small {
  font-size: 0.36em;
  letter-spacing: 0;
  margin-left: 0.2em;
  color: var(--gold-dim);
}
.note {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--muted);
}
.note b {
  font-weight: 500;
  color: var(--kaine);
}

.facts {
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 12px;
}
.fact {
  border-left: 3px solid var(--kaine);
  padding: 10px 0 10px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(90deg, var(--kaine-wash), transparent);
}
.fact .v {
  font: 500 clamp(26px, 3vw, 34px)/1.1 var(--font-mono);
  color: var(--text);
  margin-top: 4px;
}
.fact .v small {
  font-size: 0.48em;
  color: var(--muted);
  margin-left: 0.35em;
}

/* ---------- Section headings: ◆ TITLE ———— ---------- */

section { margin-bottom: clamp(56px, 8vw, 96px); }

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(17px, 1.9vw, 20px);
  margin: 0 0 clamp(20px, 2.6vw, 30px);
}
.section-head::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  background: var(--kaine);
  transform: rotate(45deg);
}
.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gold-dim);
  opacity: 0.6;
}

.lede {
  max-width: 62ch;
  color: var(--muted);
  margin: -0.3em 0 2em;
}

/* ---------- Operations ---------- */

.ops {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.op {
  border: 1px solid var(--gold-faint);
  padding: 26px 24px 28px;
  background: linear-gradient(180deg, var(--gold-ghost), transparent);
  transition: border-color 0.25s, transform 0.25s;
}
.op:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}
.op .code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--gold-dim);
}
.op h3 {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0.45em 0 0.45em;
}
.op p { color: var(--muted); }

/* ---------- Manifest table (the report's Principal Systems table) ---------- */

.manifest {
  width: 100%;
  border-collapse: collapse;
}
.manifest th {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dim);
  text-align: left;
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--gold-dim);
}
.manifest td {
  padding: 18px 10px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.manifest .n {
  font: 500 17px var(--font-mono);
  color: var(--gold);
  width: 54px;
}
.manifest .step {
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
  width: 24%;
}
.manifest .detail { color: var(--muted); }
.manifest .state { width: 1%; white-space: nowrap; text-align: right; }

.tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--gold-dim);
  color: var(--gold-dim);
}
.tag.ours {
  border-color: var(--kaine);
  color: var(--kaine);
}

/* ---------- Private orders ---------- */

.orders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.orders-copy p { color: var(--muted); margin-bottom: 1.1em; }
.orders-copy .pitch {
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
  color: var(--gold);
}

.brief {
  border: 1.5px solid var(--gold-dim);
  padding: 26px clamp(20px, 3vw, 32px) 30px;
  background: linear-gradient(135deg, rgba(227, 210, 156, 0.08), transparent 60%);
}
.brief ol {
  list-style: none;
  counter-reset: brief;
  margin: 14px 0 26px;
  padding: 0;
}
.brief li {
  counter-increment: brief;
  display: grid;
  grid-template-columns: 2.6em 1fr;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--muted);
}
.brief li::before {
  content: counter(brief, decimal-leading-zero);
  font-family: var(--font-mono);
  color: var(--gold);
}
.brief li strong {
  color: var(--text);
  font-weight: 700;
}

/* ---------- Footer (the report's .foot) ---------- */

.foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px;
  padding-top: 22px;
  border-top: 2px solid var(--gold);
}
.foot p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.foot p b {
  color: var(--gold-dim);
  font-weight: 600;
  letter-spacing: 0.12em;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 1.2em 0 0;
  padding: 0;
  list-style: none;
}
.links a {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: var(--track-btn);
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 2px;
}
.links a:hover { border-bottom-color: var(--gold); }

.stamp {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px double var(--kaine);
  color: var(--kaine);
  display: grid;
  place-items: center;
  text-align: center;
  transform: rotate(-11deg);
  opacity: 0.85;
  font: 700 12px/1.2 var(--font-display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  animation: stamp-in 0.7s cubic-bezier(0.2, 1.6, 0.4, 1) 1.1s both;
}
.stamp .ring {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1px solid var(--kaine-dim);
}
.stamp span {
  display: block;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0.08em;
  margin: 5px 0;
}

/* ---------- Load sequence ---------- */

.rise { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.d1 { animation-delay: 0.08s; }
.d2 { animation-delay: 0.2s; }
.d3 { animation-delay: 0.32s; }
.d4 { animation-delay: 0.44s; }
.d5 { animation-delay: 0.56s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes stamp-in {
  from { opacity: 0; transform: rotate(-30deg) scale(1.6); }
  to { opacity: 0.85; transform: rotate(-11deg) scale(1); }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(63, 224, 143, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(63, 224, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 224, 143, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .ops,
  .stats,
  .orders { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .doc { margin: 8px; }
  .doc .frame { inset: 8px; }
  .doc .frame.inner { inset: 13px; }
  .sheet { padding: 40px 30px 36px; }
  .hero { grid-template-columns: 1fr; }
  .hero .badge { width: 120px; }
  .org { letter-spacing: 0.32em; }
  .ledger { font-size: 12px; }

  .manifest thead { display: none; }
  .manifest tr {
    display: grid;
    grid-template-columns: 2.6em 1fr auto;
    gap: 4px 10px;
    padding: 16px 0;
    border-bottom: 1px solid var(--hairline);
  }
  .manifest td,
  .manifest td.n,
  .manifest td.step,
  .manifest td.state { padding: 0; border: 0; width: auto; }
  .manifest .detail { grid-column: 2 / -1; }
  .manifest .state { grid-row: 1; grid-column: 3; }


  .foot { grid-template-columns: 1fr; }
  .stamp { width: 144px; height: 144px; justify-self: end; }
  .stamp span { font-size: 18px; }
}
