/* bl4ze.net — from the Ember Desktop artboard.
 *
 * Values are the design's own, not rounded: #E07B45 on #0B0A09, the 104px/-4px
 * wordmark, 76px header, 52px controls, 11/14/15/20/22px radii, and the
 * cubic-bezier(.32,.72,0,1) curve on everything that moves.
 *
 * The design is a single dark world. There is no light theme to swap to, so
 * the background is painted explicitly rather than inherited from the host.
 */

:root {
  --bg: #0B0A09;
  --surface: #16130F;
  --panel: #100E0C;
  --sunk: #0D0B0A;

  --text: #F7F4F0;
  --text-2: #C9C2BA;
  --text-3: #948C83;
  --text-4: #7E766E;
  --text-5: #5A544D;
  --ink: #180C06;

  --accent: #E07B45;
  --accent-hi: #EE8B53;
  --danger-text: #F0B9A6;

  --line: rgba(255, 255, 255, .09);
  --line-soft: rgba(255, 255, 255, .06);

  --font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.32, .72, 0, 1);

  --gutter: 56px;
}

* { box-sizing: border-box; }
/* The hidden attribute must beat any display rule below it. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

@keyframes edFade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes edRise  { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes edRiseS { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes edPop   { from { opacity: 0; transform: translateY(26px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes edGlow  { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

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

/* ------------------------------------------------------------------ marks */

/* The flame is the logo now. It was a rounded orange square standing in for
   one, so the square's background and centring are gone -- left in place they
   would paint a tile behind artwork that is already transparent. */
.mark {
  width: 30px;
  height: 30px;
  flex: none;
  display: block;
  object-fit: contain;
}

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

header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 38px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11, 10, 9, .82);
  backdrop-filter: blur(14px);
  animation: edFade .5s ease both;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand span { font-size: 17px; font-weight: 600; letter-spacing: -.3px; color: var(--text); }
nav { display: flex; gap: 26px; flex: 1; }
nav a { font-size: 14px; color: var(--text-3); transition: color .16s ease; }
nav a:hover { color: var(--text); }
.signin { font-size: 14px; color: var(--text-2); transition: color .16s ease; }
.signin:hover { color: var(--text); }

/* --------------------------------------------------------------- buttons */

.btn {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 11px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .14s var(--ease), background .16s ease;
}
.btn:hover { background: var(--accent-hi); color: var(--ink); }
.btn:active { transform: scale(.96); }
.btn-lg { height: 52px; padding: 0 26px; border-radius: 15px; font-size: 15.5px; }

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 600px;
  gap: 56px;
  align-items: center;
  padding: 74px var(--gutter) 64px;
}

/* With the session panel gone the hero is one column, so it centres under the
   glow instead of sitting left of an empty half. Left-aligned copy in a
   600px-wide column reads as a layout missing its other half; centred, the
   wordmark and the glow line up and it reads as the composition it is. */
.hero-solo {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  padding: 108px var(--gutter) 92px;
}
.hero-solo .wordmark { justify-content: center; }
.hero-solo .lede { margin-left: auto; margin-right: auto; }
.hero-solo .capture { margin: 0 auto; width: 100%; }
.hero-solo .capture-note { text-align: center; }

.glow {
  position: absolute;
  top: -220px; left: 50%;
  width: 900px; height: 520px;
  margin-left: -450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 123, 69, .20), rgba(224, 123, 69, 0) 68%);
  filter: blur(10px);
  animation: edGlow 9s ease-in-out infinite;
  pointer-events: none;
}

.wordmark {
  margin: 0 0 20px;
  font-size: 104px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -4px;
  display: flex;
  gap: 2px;
}
.wordmark span { animation: edRise .6s var(--ease) both; }
.wordmark span:nth-child(1) { animation-delay: .04s; }
.wordmark span:nth-child(2) { animation-delay: .10s; }
.wordmark span:nth-child(3) { animation-delay: .16s; color: var(--accent); }
.wordmark span:nth-child(4) { animation-delay: .22s; }
.wordmark span:nth-child(5) { animation-delay: .28s; }

.lede {
  margin: 0 0 32px;
  max-width: 490px;
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--text-3);
  animation: edRise .6s var(--ease) .3s both;
  text-wrap: pretty;
}

.capture {
  display: flex;
  gap: 10px;
  max-width: 470px;
  animation: edRise .6s var(--ease) .38s both;
}
.capture input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .1);
  padding: 0 16px;
  font-size: 15px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: border-color .16s ease;
}
.capture input::placeholder { color: var(--text-4); }
.capture input:focus { border-color: var(--accent); }
.capture .btn { height: 52px; padding: 0 24px; border-radius: 14px; font-size: 15.5px; }

.capture-note {
  margin-top: 12px;
  font-size: 13px;
  min-height: 18px;
  color: var(--text-4);
  animation: edFade .3s ease both;
}
.capture-note.bad { color: var(--danger-text); }
.capture-note.good { color: var(--accent); }

/* --------------------------------------------------------------- features */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 24px var(--gutter) 10px;
}
.feature {
  padding: 26px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .07);
}
.feature h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; letter-spacing: -.3px; }
.feature p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-3); text-wrap: pretty; }

/* ------------------------------------------------------------------- cta */

.cta {
  margin: 10px var(--gutter) 40px;
  padding: 44px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  gap: 30px;
}
.cta h2 { margin: 0 0 8px; font-size: 28px; font-weight: 600; letter-spacing: -.8px; }
.cta p { margin: 0; font-size: 15.5px; color: var(--text-3); line-height: 1.55; }
.cta > div:first-child { flex: 1; }

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

footer {
  padding: 30px var(--gutter) 46px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
footer .copy { font-size: 13px; color: var(--text-5); }
footer nav { flex: 1; justify-content: flex-end; }
footer nav a { font-size: 13px; color: var(--text-4); }
footer nav a:hover { color: var(--text-2); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1180px) {
  :root { --gutter: 32px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 44px; padding-top: 56px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  header { gap: 16px; height: 68px; }
  header nav { display: none; }
  .wordmark { font-size: 64px; letter-spacing: -2.5px; }
  .lede { font-size: 16px; }
  .capture { flex-direction: column; max-width: none; }
  .capture .btn { justify-content: center; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .cta { flex-direction: column; align-items: flex-start; padding: 30px; }
  footer { flex-direction: column; align-items: flex-start; gap: 14px; }
  footer nav { justify-content: flex-start; flex-wrap: wrap; gap: 16px; }
}

/* ------------------------------------------------- mobile navigation ----
   The header nav is hidden below 760px (see above). Without a replacement
   the site had no navigation at all on a phone — Product/Agents/Pricing/Docs
   were simply unreachable. This is that replacement, using the same links
   and the same tokens; the desktop header is untouched. */

.navtoggle { display: none; }

@media (max-width: 760px) {
  .navtoggle {
    display: grid;
    align-content: center;
    gap: 5px;
    flex: none;
    width: 44px; height: 44px;      /* a real tap target, not a 24px icon */
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
  }
  .navtoggle span {
    display: block; height: 1.5px; width: 100%;
    background: var(--text-2);
    transition: transform .2s var(--ease), opacity .2s ease;
  }
  .navtoggle.is-open span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .navtoggle.is-open span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

  /* The "Sign in" text link is redundant once it is in the sheet, and
     dropping it stops the header wrapping on a 360px screen. */
  header .signin { display: none; }

  .mobilenav {
    display: flex;
    flex-direction: column;
    padding: 6px var(--gutter) 16px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
  }
  .mobilenav a {
    padding: 14px 0;                /* 44px+ rows */
    color: var(--text-2);
    text-decoration: none;
    font-size: 15.5px;
    border-bottom: 1px solid var(--line-soft);
  }
  .mobilenav a:last-child { border-bottom: 0; }
  .mobilenav a:active { color: var(--accent-hi); }

  /* Notch and home-indicator clearance on the landing itself. */
  header { padding-top: env(safe-area-inset-top); height: auto; min-height: 68px; }
  footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .navtoggle span { transition: none; }
}

/* Hero call-to-action, replacing the email capture. */
.hero-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn-quiet {
  color: var(--text-3); text-decoration: none; font-size: 15px;
  padding: 10px 4px;
}
.btn-quiet:hover { color: var(--text); }

@media (max-width: 760px) {
  /* The header had brand + Start free + hamburger fighting for ~360px and
     wrapping. On a phone the menu carries the actions instead. */
  header .only-wide { display: none; }
  .hero-solo .hero-cta { justify-content: center; }
  .hero-cta { width: 100%; }
  .hero-cta .btn-lg { flex: 1; text-align: center; justify-content: center; }
}

/* ---------------------------------------------- hero session panel ------
   The .hero grid always reserved a 600px right column; nothing was ever put
   in it, which is why the landing was a centred block of text with a void
   beside it and a long drop to the feature cards. This fills it with the
   thing the copy is describing. */

.hero-copy { min-width: 0; }

.session { min-width: 0; }

.session-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.stab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-4);
  font: 500 12.5px var(--font);
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.stab:hover { color: var(--text-2); }
.stab.is-on {
  color: var(--accent-hi);
  border-color: rgba(224, 123, 69, .45);
  background: rgba(224, 123, 69, .1);
}

.session-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}
.session-head {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font: 500 12px var(--mono);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 123, 69, .16);
}
.session-repo { color: var(--text-2); }
.session-ref { color: var(--text-5); }
.session-state { margin-left: auto; color: var(--accent-hi); font-size: 11px; }

.session-body {
  padding: 15px 16px 18px;
  font: 400 12.5px/1.65 var(--mono);
  color: var(--text-3);
  /* A transcript is the one thing that genuinely needs to scroll rather than
     stretch the page; the height keeps the hero a predictable size. */
  height: 330px;
  overflow-y: auto;
}
.srow { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.srow + .srow { margin-top: 5px; }
.s-user { color: var(--text); }
.s-cmd { color: var(--accent-hi); }
.s-out { color: var(--text-5); }
.s-ok { color: #8fd6a4; }
.s-file { color: var(--text-2); margin-top: 10px; }
.s-add { color: #8fd6a4; }
.s-del { color: var(--danger-text); }

@media (max-width: 1180px) {
  /* One column: the panel goes under the copy rather than being squeezed. */
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 56px; }
  .session-body { height: 280px; }
}

@media (max-width: 760px) {
  .hero { padding: 40px var(--gutter) 48px; text-align: left; }
  .hero-copy { text-align: center; }
  .hero-cta { justify-content: center; }
  .session-body { height: 240px; font-size: 11.5px; padding: 13px 13px 15px; }
  .session-head { font-size: 11px; padding: 11px 13px; gap: 7px; }
  .session-ref { display: none; }   /* the branch name is the first thing to go */
  .session-panel { border-radius: 16px; }
}
