/* ============================================================================
   GraftHQ — AI Crew Starter Dashboard
   Aesthetic: site-office industrial × sci-fi HUD.
   Charcoal #2B2B2B base · single amber accent #E5872C · Barlow Condensed + Inter
   ========================================================================== */

:root {
  --charcoal:      #2b2b2b;   /* brand charcoal — matches the logo assets */
  --charcoal-2:    #1f2022;
  --panel:         #1b1c1e;
  --panel-2:       #232426;
  --amber:         #e5872c;   /* matches every GraftHQ logo asset exactly */
  --amber-soft:    #f2a24e;
  --amber-deep:    #b56518;
  --white:         #ffffff;
  --text:          #ededee;
  --muted:         #9a9c9f;
  --muted-2:       #95979b;   /* lifted to clear 4.5:1 on charcoal for body text */
  --muted-dim:     #6c6e72;   /* decorative only (dots, chevrons) — not for text */
  --line:          rgba(255,255,255,.08);
  --line-amber:    rgba(229,135,44,.35);
  --ok:            #4cc06b;

  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body:    'Inter', system-ui, sans-serif;

  --radius: 6px;
  --maxw: 1180px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--body);
  color: var(--text);
  background: var(--charcoal);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100svh;   /* iOS Safari: account for the dynamic toolbar */
  overflow-x: hidden;
}

/* Atmospheric backdrop: blueprint grid faded toward the edges + radial depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(229,135,44,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229,135,44,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 80%);
          mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 80%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(110% 70% at 50% -10%, rgba(229,135,44,.10), transparent 55%);
}

.wrap { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Utility -------------------------------------------------------------- */
.kicker {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--amber);
}
.amber { color: var(--amber); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Visible focus ring for keyboard users (WCAG 2.4.7) */
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 3px; }
.btn--primary:focus-visible { outline-color: var(--white); }
:focus:not(:focus-visible) { outline: none; }

/* Link + text utilities */
.lk-amber { color: var(--amber); text-decoration: none; }
.lk-amber:hover { text-decoration: underline; text-underline-offset: 2px; }
.disclaimer { margin-top: 6px; color: var(--muted-2); }
.btn__label { display: inline; }

/* ============================================================================
   PASSWORD GATE
   ========================================================================== */
.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;   /* short viewports (iPhone SE/mini, toolbar shown) can scroll */
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(90% 60% at 50% 20%, rgba(229,135,44,.12), transparent 60%),
    var(--charcoal);
}
.gate[hidden] { display: none; }
.gate__inner {
  width: 100%;
  max-width: 380px;
  text-align: center;
  animation: rise .7s var(--ease) both;
}
.gate__logo { width: 190px; height: auto; margin: 0 auto 26px; display: block; }
.gate__title {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 30px;
  line-height: .98;
  letter-spacing: .01em;
  margin-bottom: 8px;
}
.gate__sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.gate__form { display: flex; flex-direction: column; gap: 12px; }
.gate__input {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  text-align: center;
  font-size: 18px;
  color: var(--white);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.gate__input::placeholder { color: var(--muted-2); letter-spacing: .2em; }
.gate__input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(229,135,44,.18); }
.gate__error {
  color: #ff6b5e;
  font-size: 13px;
  min-height: 18px;
  font-weight: 500;
  opacity: 0;
  transition: opacity .2s;
}
.gate__error.show { opacity: 1; }
.gate.shake .gate__inner { animation: shake .4s; }
.gate__hint { margin-top: 20px; font-size: 12px; color: var(--muted-2); }

@keyframes shake {
  10%,90%{transform:translateX(-2px);} 20%,80%{transform:translateX(4px);}
  30%,50%,70%{transform:translateX(-7px);} 40%,60%{transform:translateX(7px);}
}

/* ============================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(31,32,34,.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.site-nav { display: flex; align-items: center; gap: 16px; }
.site-nav__link {
  font-family: var(--display); font-weight: 600; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2);
  text-decoration: none; white-space: nowrap;
}
.site-nav__link:hover { color: var(--amber); }
.site-nav__cta {
  font-family: var(--display); font-weight: 700; font-size: 13px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--charcoal);
  background: var(--amber); text-decoration: none; padding: 8px 15px;
  border-radius: 7px; white-space: nowrap;
}
.site-nav__cta:hover { background: var(--amber-soft); }
@media (max-width: 520px) { .site-nav__link { display: none; } }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand__mark { width: 30px; height: 30px; display: block; }
.brand__word {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .06em;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1;
}
.brand__word b { color: var(--amber); font-weight: 800; }
.site-header__tag {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 3px;
}

/* ============================================================================
   HERO
   ========================================================================== */
.hero { padding: 54px 0 30px; text-align: center; }
.hero__title {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(38px, 8vw, 76px);
  line-height: .92;
  letter-spacing: .005em;
  margin: 14px 0 16px;
}
.hero__title span { color: var(--amber); }
.hero__lead {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(15px, 2.4vw, 18px);
}
.hero__lead b { color: var(--text); font-weight: 600; }

/* ============================================================================
   PROGRESS TRACKER
   ========================================================================== */
.progress {
  margin: 30px auto 8px;
  max-width: 560px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.progress__top {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 11px;
}
.progress__label {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; font-size: 14px; color: var(--text);
}
.progress__count {
  font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--amber);
}
.progress__segs { display: flex; gap: 6px; }
.progress__seg {
  flex: 1; height: 8px; border-radius: 2px;
  background: #303133; overflow: hidden; position: relative;
}
.progress__seg::after {
  content: ""; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--amber-deep), var(--amber));
  transition: transform .5s var(--ease);
}
.progress__seg.on::after { transform: scaleX(1); }
.progress__seg.on { box-shadow: 0 0 10px rgba(229,135,44,.5); }
.progress__done {
  margin-top: 12px; font-size: 13px; color: var(--ok); font-weight: 600;
  display: none; align-items: center; gap: 7px;
}
.progress__done.show { display: flex; animation: rise .5s var(--ease); }

/* ============================================================================
   QUICK WIN BANNER
   ========================================================================== */
.quickwin {
  display: flex; gap: 14px; align-items: flex-start;
  max-width: 760px; margin: 22px auto 0;
  background: linear-gradient(100deg, rgba(229,135,44,.14), rgba(229,135,44,.04));
  border: 1px solid var(--line-amber);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 15px 18px;
}
.quickwin__icon { color: var(--amber); display: flex; flex-shrink: 0; margin-top: 1px; }
.quickwin__body { font-size: 14.5px; }
.quickwin__body strong { color: var(--amber); font-weight: 700; }
.quickwin__link {
  display: inline-block; background: none; border: none; cursor: pointer; padding: 6px 2px;
  color: var(--white); font: inherit; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--amber);
}

/* ============================================================================
   SECTION HEADINGS
   ========================================================================== */
.section { padding: 40px 0; }
.section__head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.section__head h2 {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(22px, 4vw, 30px); letter-spacing: .01em; white-space: nowrap;
}
.section__head .rule { flex: 1; height: 1px; background: var(--line); }

/* ============================================================================
   CREW GRID + CARDS
   ========================================================================== */
.crew-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 680px)  { .crew-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .crew-grid { grid-template-columns: repeat(3, 1fr); } }

.crew-card {
  position: relative;
  display: flex; flex-direction: column;
  background: linear-gradient(170deg, var(--panel-2), var(--panel) 60%, var(--charcoal-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  animation: rise .6s var(--ease) both;
}
.crew-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-amber);
  box-shadow: 0 22px 40px rgba(0,0,0,.45);
}
.crew-card.is-active { border-color: var(--line-amber); }

/* amber corner brackets (targeting reticle) */
.crew-card__stage::before, .crew-card__stage::after {
  content: ""; position: absolute; width: 22px; height: 22px; z-index: 4;
  opacity: .0; transition: opacity .35s;
}
.crew-card__stage::before { top: 12px; left: 12px; border-top: 2px solid var(--amber); border-left: 2px solid var(--amber); }
.crew-card__stage::after  { bottom: 12px; right: 12px; border-bottom: 2px solid var(--amber); border-right: 2px solid var(--amber); }
.crew-card:hover .crew-card__stage::before,
.crew-card:hover .crew-card__stage::after,
.crew-card.is-active .crew-card__stage::before,
.crew-card.is-active .crew-card__stage::after { opacity: .85; }

/* Stage = the portrait viewport */
.crew-card__stage {
  position: relative;
  aspect-ratio: 16 / 11;
  background:
    radial-gradient(80% 70% at 50% 30%, #2a2b2e, #161719 75%);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.crew-card__portrait, .crew-card__media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; object-fit: cover;
}
.crew-card__media { z-index: 3; border: 0; background: #161719; }  /* photo/video over the SVG */
.crew-card__portrait svg { width: 100%; height: 100%; display: block; }

.crew-card__badge {
  position: absolute; top: 12px; left: 12px; z-index: 5;
  font-family: var(--display); font-weight: 700; font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--charcoal);
  background: var(--amber); padding: 4px 9px; border-radius: 3px;
}
.crew-card__status {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display); font-weight: 700; font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  background: rgba(20,20,21,.7); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: 3px;
}
.crew-card__status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.crew-card.is-active .crew-card__status { color: var(--amber); border-color: var(--line-amber); }
.crew-card.is-active .crew-card__status .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

.crew-card__nameplate {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 26px 16px 13px;
  background: linear-gradient(to top, #141415 18%, rgba(20,20,21,.7) 60%, transparent);
}
.crew-card__name {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 30px; line-height: .92; color: var(--white);
}
.crew-card__name span { color: var(--amber); }
.crew-card__role {
  font-size: 12px; color: var(--muted); margin-top: 3px;
  letter-spacing: .02em;
}

/* Card body */
.crew-card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.crew-card__intro {
  font-size: 14px; color: var(--text); font-style: italic;
  border-left: 2px solid var(--line-amber); padding-left: 11px;
}

/* "What X can do" capability list */
.crew-card__caps-label {
  display: block; font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; font-size: 11.5px;
  color: var(--muted); margin-bottom: 7px;
}
.crew-card__caps ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.crew-card__caps li { position: relative; padding-left: 16px; font-size: 13px; color: var(--text); }
.crew-card__caps li::before {
  content: ""; position: absolute; left: 2px; top: 7px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--amber);
}

/* Prompt list */
.plist { display: flex; flex-direction: column; gap: 8px; }
.pitem {
  border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.015);
  overflow: hidden;
}
.pitem__head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 13px 12px; min-height: 44px; cursor: pointer; background: none; border: none; text-align: left;
  color: var(--text); font: inherit;
}
.pitem__num {
  font-family: var(--display); font-weight: 800; font-size: 13px; color: var(--amber);
  min-width: 30px;
}
.pitem__title { flex: 1; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.pitem__saves {
  font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .04em;
  color: var(--muted); white-space: nowrap;
}
.pitem__chev { color: var(--muted-2); transition: transform .3s var(--ease); flex-shrink: 0; }
.pitem.open .pitem__chev { transform: rotate(180deg); }
.pitem__detail {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease);
}
.pitem.open .pitem__detail { grid-template-rows: 1fr; }
/* hide collapsed content from tab + a11y order until opened */
.pitem__detail-inner { overflow: hidden; visibility: hidden; transition: visibility .35s var(--ease); }
.pitem.open .pitem__detail-inner { visibility: visible; }
.pitem__detail-pad { padding: 0 12px 13px; display: flex; flex-direction: column; gap: 11px; }
.pitem__what { font-size: 13px; color: var(--muted); }
.pitem__vars { font-size: 12px; color: var(--muted); }
.pitem__vars b { color: var(--text); font-weight: 600; display: block; margin-bottom: 4px;
  font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; font-size: 11px; }
.pitem__vars ul { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.pitem__vars li { padding-left: 12px; position: relative; }
.pitem__vars li::before { content: "▸"; position: absolute; left: 0; color: var(--amber); }
.pitem__tip {
  display: flex; gap: 7px; align-items: flex-start;
  font-size: 12.5px; color: var(--amber-soft);
  background: rgba(229,135,44,.07); border-radius: 4px; padding: 8px 10px;
}
.pitem__tip .i-bolt { flex-shrink: 0; margin-top: 2px; }
.pitem__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; font-size: 14px;
  border-radius: 5px; padding: 11px 16px; min-height: 44px; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s, background .2s, border-color .2s, color .2s;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn--primary { background: var(--amber); color: #1a1300; }
.btn--primary:hover { background: var(--amber-soft); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn--block { width: 100%; }
.btn--sm { padding: 12px 16px; font-size: 14px; flex: 1 1 auto; min-width: 46%; }
.btn.copied { background: var(--ok); color: #052b0f; border-color: var(--ok); }

/* ============================================================================
   SETUP GUIDE
   ========================================================================== */
.steps { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.step {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 15px 16px;
}
.step__n {
  font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1;
  color: var(--amber); margin-bottom: 8px;
}
.step__t { font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; font-size: 15px; margin-bottom: 5px; }
.step__d { font-size: 13px; color: var(--muted); }

/* ============================================================================
   FULL CREW UPSELL
   ========================================================================== */
.upsell {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--panel-2), var(--charcoal-2));
  border: 1px solid var(--line-amber); border-radius: 10px;
  padding: 34px 26px; text-align: center;
}
.upsell__locked {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  max-width: 420px; margin: 0 auto 22px; opacity: .65;
}
@media (min-width: 620px) { .upsell__locked { grid-template-columns: repeat(6, 1fr); } }
.upsell__chip {
  aspect-ratio: 1; border: 1px dashed var(--line-amber); border-radius: 5px;
  display: flex; align-items: center; justify-content: center; color: var(--muted-2);
  background: rgba(229,135,44,.04); font-size: 16px;
}
.upsell__price { font-family: var(--display); font-weight: 800; font-size: 17px; color: var(--amber);
  letter-spacing: .04em; text-transform: uppercase; }
.upsell h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(26px, 5vw, 38px); line-height: 1; margin: 6px 0 12px; }
.upsell p { max-width: 560px; margin: 0 auto 22px; color: var(--muted); font-size: 15px; }

/* ============================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 30px; padding: 30px 0 50px;
  text-align: center; color: var(--muted-2); font-size: 13px;
}
.site-footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-amber); }
.site-footer a:hover { color: var(--amber); }
.site-footer__row { display: flex; gap: 8px 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }

/* ============================================================================
   TOAST
   ========================================================================== */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px);
  z-index: 60; background: #131314; border: 1px solid var(--line-amber);
  color: var(--text); padding: 12px 18px; border-radius: 6px;
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500;
  box-shadow: 0 14px 30px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast__check {
  width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #052b0f;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px;
}

/* ============================================================================
   MOTION
   ========================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.stagger > * { animation: rise .6s var(--ease) both; }
.stagger > *:nth-child(1){animation-delay:.04s}
.stagger > *:nth-child(2){animation-delay:.10s}
.stagger > *:nth-child(3){animation-delay:.16s}
.stagger > *:nth-child(4){animation-delay:.22s}
.stagger > *:nth-child(5){animation-delay:.28s}

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