/* LLMSecTest — llmsec.dev
   Aesthetic: diagnostic / security-console. Deep ink, bone text, one vermilion
   severity accent. IBM Plex Mono + Plex Sans. Hand-written, no build step. */

:root {
  --ink:      #0b0c0e;
  --ink-2:    #121417;
  --ink-3:    #171a1e;
  --bone:     #e9e5d8;
  --bone-dim: #9b988d;
  --line:     rgba(233, 229, 216, 0.12);
  --line-soft:rgba(233, 229, 216, 0.06);
  --signal:   #ff3d23;   /* severity / accent */
  --signal-dk:#c22a14;

  --s-done:   #6fcf97;
  --s-next:   #ffb84d;
  --s-plan:   #6b6f76;

  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* faint diagnostic grid + top glow */
  background-image:
    radial-gradient(1100px 520px at 78% -8%, rgba(255, 61, 35, 0.10), transparent 60%),
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
}

a { color: inherit; text-decoration: none; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--signal); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  background: rgba(11, 12, 14, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
  display: inline-flex; align-items: center;
}
.wordmark .prompt { color: var(--signal); margin-right: .4ch; }
.wordmark .cursor {
  width: .55ch; height: 1.05em; margin-left: .3ch;
  background: var(--signal); display: inline-block;
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wordmark .cursor { animation: none; } }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); font-family: var(--mono); font-size: .82rem; }
.nav a { color: var(--bone-dim); transition: color .18s; }
.nav a:hover { color: var(--bone); }
.nav .nav-cta {
  color: var(--bone); border: 1px solid var(--line);
  padding: .42rem .8rem; border-radius: 2px;
}
.nav .nav-cta:hover { border-color: var(--signal); color: var(--signal); }

/* ---------- layout helpers ---------- */
main { display: block; }
.band { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 9vw, 7.5rem) var(--gutter); border-top: 1px solid var(--line); }
.band-alt { background: linear-gradient(180deg, var(--ink-2), var(--ink)); }
.eyebrow { font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; color: var(--signal); margin: 0 0 1.4rem; }

h1, h2 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
h1 em, h1 { font-style: normal; }
h1 em { color: var(--signal); font-style: normal; }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(3.5rem, 8vw, 6.5rem);
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-copy { min-width: 0; }
.status {
  font-family: var(--mono); font-size: .78rem; color: var(--bone-dim);
  display: inline-flex; align-items: center; gap: .6ch;
  border: 1px solid var(--line); border-radius: 999px; padding: .3rem .85rem; margin: 0 0 1.8rem;
}
.status .dot {
  width: .6ch; height: .6ch; border-radius: 50%; background: var(--s-next);
  box-shadow: 0 0 0 0 rgba(255, 184, 77, .55); animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,184,77,.5); } 70% { box-shadow: 0 0 0 7px rgba(255,184,77,0); } 100% { box-shadow: 0 0 0 0 rgba(255,184,77,0); } }
@media (prefers-reduced-motion: reduce) { .status .dot { animation: none; } }

h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); margin: 0 0 1.4rem; }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: #cfccc0; max-width: 36ch; margin: 0 0 1.2rem; }
.lede strong { color: var(--bone); font-weight: 600; }
.honest {
  font-size: .94rem; color: var(--bone-dim); max-width: 42ch;
  border-left: 2px solid var(--signal); padding-left: .9rem; margin: 0 0 2rem;
}
.honest strong { color: var(--bone); font-weight: 600; }

.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn {
  font-family: var(--mono); font-size: .9rem; font-weight: 500;
  padding: .8rem 1.4rem; border-radius: 2px; border: 1px solid transparent;
  transition: transform .15s, background .18s, border-color .18s, color .18s;
  display: inline-block;
}
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { background: var(--signal-dk); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--bone); }
.btn-ghost:hover { border-color: var(--bone-dim); transform: translateY(-2px); }

/* terminal panel */
.hero-term { margin: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--ink-2); overflow: hidden; box-shadow: 0 30px 70px -30px rgba(0,0,0,.8); min-width: 0; }
.term-bar { display: flex; align-items: center; gap: .5ch; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--ink-3); }
.term-dot { width: 11px; height: 11px; border-radius: 50%; background: #2c3036; }
.term-dot:first-child { background: var(--signal); opacity: .8; }
.term-title { font-family: var(--mono); font-size: .74rem; color: var(--bone-dim); margin-left: .8ch; }
.term-body { margin: 0; padding: 1.3rem 1.4rem; overflow-x: auto; position: relative; }
.term-body code, .code-panel code { font-family: var(--mono); font-size: .83rem; line-height: 1.75; color: #d5d1c4; white-space: pre; }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(255,61,35,.65), transparent); animation: scan 5.5s ease-in-out infinite; }
@keyframes scan { 0%,100% { transform: translateY(2.5rem); opacity: 0; } 10% { opacity: 1; } 50% { transform: translateY(11rem); opacity: 1; } 90% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scan { display: none; } }

.c-key { color: var(--signal); }
.c-str { color: #c2b280; }
.c-com { color: #6b6f76; font-style: italic; }
.c-fn  { color: #e9e5d8; }
.c-num { color: #6fcf97; }

/* ---------- approach ---------- */
.approach-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); }
.approach-lead h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); margin: 0 0 1.2rem; }
.approach-lead p { color: var(--bone-dim); max-width: 40ch; }
.approach-points { margin: 0; display: grid; gap: 0; }
.approach-points > div { padding: 1.3rem 0; border-top: 1px solid var(--line); }
.approach-points > div:first-child { border-top: none; padding-top: 0; }
.approach-points dt { font-family: var(--mono); font-size: .95rem; font-weight: 500; color: var(--bone); margin-bottom: .4rem; }
.approach-points dt::before { content: "▸ "; color: var(--signal); }
.approach-points dd { margin: 0; color: var(--bone-dim); font-size: .96rem; }

/* ---------- coverage ---------- */
.band-h { font-size: clamp(1.8rem, 3.4vw, 2.7rem); margin: 0 0 .8rem; }
.band-sub { color: var(--bone-dim); max-width: 56ch; margin: 0 0 2.4rem; }
.cov-list { list-style: none; margin: 0 0 1.6rem; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.cov-list li { display: grid; grid-template-columns: 5.5rem 1fr auto; align-items: center; gap: 1rem; padding: .95rem 1.3rem; border-top: 1px solid var(--line-soft); transition: background .15s; }
.cov-list li:first-child { border-top: none; }
.cov-list li:hover { background: var(--ink-3); }
.cov-id { font-family: var(--mono); font-size: .85rem; color: var(--signal); }
.cov-name { font-size: .98rem; }
.cov-status { font-family: var(--mono); font-size: .72rem; letter-spacing: .03em; text-transform: uppercase; padding: .22rem .6rem; border-radius: 2px; border: 1px solid currentColor; }
.s-done { color: var(--s-done); }
.s-next { color: var(--s-next); }
.s-plan { color: var(--s-plan); }
.cov-legend { font-size: .82rem; color: var(--bone-dim); display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.cov-legend .cov-status { margin-right: .4ch; }

/* ---------- output ---------- */
.output-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.output-copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); margin: 0 0 1.2rem; }
.output-copy p { color: var(--bone-dim); }
.output-copy .micro { font-family: var(--mono); font-size: .76rem; color: #6b6f76; }
.code-panel { margin: 0; background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 1.4rem 1.6rem; overflow-x: auto; }

/* ---------- cta band ---------- */
.cta-band { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) var(--gutter); text-align: center; border-top: 1px solid var(--line); }
.cta-band h2 { font-size: clamp(1.7rem, 3.6vw, 2.8rem); margin: 0 auto 1rem; max-width: 22ch; }
.cta-band p { color: var(--bone-dim); max-width: 50ch; margin: 0 auto 2rem; }
.cta-band .btn-primary { font-size: .95rem; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--ink-2); }
.foot-grid { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.6rem, 5vw, 4rem) var(--gutter) 2rem; display: grid; grid-template-columns: 1.2fr 1.5fr 1fr; gap: clamp(1.6rem, 4vw, 3rem); }
.foot-label { font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--signal); margin: 0 0 .8rem; }
.wordmark.sm { font-size: .98rem; }
.foot-brand p { color: var(--bone-dim); font-size: .9rem; margin: .9rem 0 0; }
.foot-fund p { color: var(--bone-dim); font-size: .82rem; line-height: 1.65; margin: 0; }
.foot-fund a { color: var(--bone); text-decoration: underline; text-underline-offset: 2px; }
.foot-links { display: flex; flex-direction: column; gap: .6rem; }
.foot-links a { color: var(--bone-dim); font-size: .9rem; transition: color .15s; }
.foot-links a:hover { color: var(--signal); }
.foot-base { max-width: var(--maxw); margin: 0 auto; padding: 1.4rem var(--gutter); border-top: 1px solid var(--line-soft); font-family: var(--mono); font-size: .76rem; color: #6b6f76; }

/* ---------- reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(14px); animation: reveal .7s cubic-bezier(.2,.7,.2,1) forwards; }
[data-reveal="1"] { animation-delay: .05s; }
[data-reveal="2"] { animation-delay: .15s; }
[data-reveal="3"] { animation-delay: .27s; }
[data-reveal="4"] { animation-delay: .39s; }
[data-reveal="5"] { animation-delay: .51s; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { [data-reveal] { animation: none; opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .approach-grid, .output-grid { grid-template-columns: 1fr; }
  .output-grid { gap: 1.8rem; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav a:not(.nav-cta) { display: none; }
  .cov-list li { grid-template-columns: 4.2rem 1fr; }
  .cov-list .cov-status { grid-column: 2; justify-self: start; }
}
