/* ===========================================================================
   style.css — no framework, no build step.
   A dark, monospace-accented developer-tool look: thin rules, numbered
   sections, one teal accent doing all the work.
   =========================================================================== */

:root {
  --bg: #0b0f10;
  --bg-raise: #101719;
  --panel: #0e1416;
  --code-bg: #080c0d;
  --line: #1d2a2d;
  --line-soft: #16211f;

  --text: #dde6e7;
  --text-strong: #f2f8f8;
  --muted: #8a9b9d;
  --faint: #5f7275;

  --teal: #05bdba;
  --teal-soft: rgba(5, 189, 186, 0.12);
  --amber: #f0c274;
  --rose: #f08d7f;

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

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 74rem;
  --radius: 4px;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(5, 189, 186, 0.09), transparent 70%),
    linear-gradient(180deg, #0c1112 0%, var(--bg) 40%);
  background-attachment: fixed;
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Fixed, non-interactive grain. Never on a scrolling container. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

main,
.topbar,
.footer {
  position: relative;
  z-index: 1;
}

/* --- typography ---------------------------------------------------------- */

h1,
h2,
h3 {
  color: var(--text-strong);
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.3rem, 6.5vw, 4rem);
}
h1 em {
  color: var(--teal);
  font-style: normal;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--teal);
  text-decoration-color: rgba(5, 189, 186, 0.35);
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
a:hover {
  color: #4fdedb;
}

strong {
  color: var(--text-strong);
  font-weight: 600;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: #9fe9e6;
  background: var(--teal-soft);
  border-radius: 3px;
  padding: 0.1em 0.35em;
  word-break: break-word;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

/* --- topbar -------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--gutter);
  background: rgba(11, 15, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--text-strong);
  text-decoration: none;
}

.wordmark-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(5, 189, 186, 0.18);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: 500 0.82rem/1 var(--mono);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  transition:
    transform 0.12s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--teal);
}
.btn:active {
  transform: translateY(0);
}
.btn-lg {
  padding: 0.8rem 1.4rem;
  font-size: 0.9rem;
}

.btn-solid {
  background: var(--teal);
  border-color: var(--teal);
  color: #04211f;
  font-weight: 600;
}
.btn-solid:hover {
  background: #34d3d0;
  color: #04211f;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
}

.btn-copy {
  padding: 0.4rem 0.75rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.btn-copy[data-copied] {
  color: var(--teal);
  border-color: var(--teal);
}

.inline-link {
  font-family: var(--mono);
  font-size: 0.85rem;
}

/* --- layout -------------------------------------------------------------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter) 5rem;
}

.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 3.5rem;
  max-width: 46rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.5rem;
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  color: var(--muted);
  max-width: 38rem;
  margin-top: 1.75rem;
}
.lede strong {
  color: var(--text-strong);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 1.75rem;
}

/* --- status line --------------------------------------------------------- */

.status {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--faint);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
}
.status-dot {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--faint);
}
.status[data-state='ready'] {
  border-left-color: var(--teal);
}
.status[data-state='ready'] .status-dot {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(5, 189, 186, 0.16);
  animation: pulse 2.4s ease-in-out infinite;
}
.status[data-state='absent'] {
  border-left-color: var(--amber);
}
.status[data-state='absent'] .status-dot {
  background: var(--amber);
}
.status[data-state='error'] {
  border-left-color: var(--rose);
}
.status[data-state='error'] .status-dot {
  background: var(--rose);
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(5, 189, 186, 0);
  }
}

/* --- tool chips ---------------------------------------------------------- */

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.tool-chips li {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
.tool-chips code {
  background: none;
  padding: 0;
  color: var(--text-strong);
}
.tool-chips span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

/* --- sections ------------------------------------------------------------ */

.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line-soft);
}

.section > h2 {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}
.num {
  font-size: 0.75rem;
  color: var(--faint);
  letter-spacing: 0.1em;
}

.section-note {
  max-width: 44rem;
  margin-top: 0.9rem;
  color: var(--muted);
}

/* --- panels: profile + guestbook ---------------------------------------- */

.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-raise), var(--panel));
  padding: 1.5rem;
}

.profile-name {
  font-size: 1.5rem;
}
.profile-tagline {
  color: var(--muted);
  margin: 0.4rem 0 1.25rem;
}

.profile-meta {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0 0 1.25rem;
  border-bottom: 1px dashed var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}
.profile-meta li {
  display: flex;
  gap: 0.75rem;
  padding: 0.2rem 0;
}
.profile-meta span {
  flex: none;
  width: 5.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 0.2em;
}

.profile-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.profile-links li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.profile-links li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.profile-links a {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
}
.profile-links p {
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}
.profile-links .tags {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 0.3rem;
}

/* skeleton loaders, shaped like the content they replace */
.skeleton {
  height: 0.8rem;
  border-radius: 3px;
  background: linear-gradient(90deg, #16201f, #1d2b2b, #16201f);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  margin-bottom: 0.7rem;
}
.skeleton-title {
  height: 1.6rem;
  width: 55%;
  margin-bottom: 1.1rem;
}
.skeleton-line {
  width: 100%;
}
.skeleton-line.short {
  width: 62%;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* --- guestbook ----------------------------------------------------------- */

.panel-head h3 {
  font-size: 1rem;
}
.panel-head p {
  margin: 0.35rem 0 1.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.msg-form {
  display: grid;
  gap: 0.6rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed var(--line);
}
.msg-form input,
.msg-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--text);
  font: 400 0.88rem/1.5 var(--mono);
  resize: vertical;
}
.msg-form input::placeholder,
.msg-form textarea::placeholder {
  color: var(--faint);
}
.msg-form input:focus,
.msg-form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(5, 189, 186, 0.12);
}

.msg-form-foot {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.form-error {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--rose);
}

.messages {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  max-height: 20rem;
  overflow-y: auto;
}
.msg {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--teal);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}
.msg-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.3rem;
  font-family: var(--mono);
  font-size: 0.72rem;
}
.msg-head time {
  color: var(--faint);
}
.msg-body {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.msg-empty {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
  padding: 0.85rem 0;
}

/* --- quickstart steps ---------------------------------------------------- */

.steps {
  counter-reset: step;
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.5rem 3.25rem;
  border-bottom: 1px solid var(--line-soft);
  max-width: 46rem;
}
.steps > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: 500 0.78rem/1 var(--mono);
  color: var(--teal);
  background: var(--panel);
}
.steps h3 {
  margin-bottom: 0.5rem;
  padding-top: 0.4rem;
}
.steps p {
  color: var(--muted);
}

.callout {
  border-left: 2px solid var(--teal);
  background: rgba(5, 189, 186, 0.05);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.callout-warn {
  display: block;
  border-left-color: var(--amber);
  background: rgba(240, 194, 116, 0.06);
  margin-top: 2rem;
}
.callout-warn code {
  color: #f3d9a8;
  background: rgba(240, 194, 116, 0.12);
}

/* --- annotated walkthrough ---------------------------------------------- */

.walk {
  margin-top: 2.5rem;
  max-width: 52rem;
}
.walk h3 {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 0.85rem;
}
.walk h3 code {
  font-size: 1em;
  background: none;
  padding: 0;
  color: var(--teal);
}
.walk p {
  color: var(--muted);
}

.code,
.prompt-body {
  margin: 1rem 0 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  overflow-x: auto;
  font: 400 0.79rem/1.7 var(--mono);
  color: #cfe0e0;
  tab-size: 2;
}
.code code,
.prompt-body code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.tok-comment {
  color: #5f7d7c;
  font-style: italic;
}
.tok-string {
  color: #e6c07b;
}
.tok-keyword {
  color: #67d7d4;
}

/* --- prompts ------------------------------------------------------------- */

.prompt {
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--code-bg);
}
.prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem 0.6rem 1.25rem;
  background: var(--bg-raise);
  border-bottom: 1px solid var(--line);
}
.prompt-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.prompt-body {
  margin: 0;
  border: 0;
  border-radius: 0;
  white-space: pre-wrap;
  color: #d5e3e3;
  /* The prompts are long by design — they carry the whole API contract — so
     cap them and let them scroll rather than pushing the page down. */
  max-height: 30rem;
  overflow: auto;
}

/* Each prompt is introduced by a heading and a "use this when" line, because
   choosing the wrong one wastes an agent run. */
.prompt-choice {
  margin-top: 3rem;
  max-width: 52rem;
}
.prompt-choice h3 {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line-soft);
}
.prompt-use {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.prompt-use strong {
  color: var(--text-strong);
}

/* --- file map ------------------------------------------------------------ */

.filemap {
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: minmax(14rem, auto) 1fr;
  gap: 0 1.75rem;
  max-width: 54rem;
}
.filemap dt {
  padding: 0.7rem 0;
  border-top: 1px solid var(--line-soft);
}
.filemap dt code {
  background: none;
  padding: 0;
  font-size: 0.82rem;
  color: var(--text-strong);
}
.filemap dd {
  margin: 0;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line-soft);
  font-size: 0.88rem;
  color: var(--muted);
}

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

.footer {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(900px 400px at 85% 0%, rgba(5, 189, 186, 0.12), transparent 70%),
    #080c0d;
}
.footer-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4rem var(--gutter) 2rem;
}
.footer-cta {
  max-width: 40rem;
}
.footer-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.footer-cta h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}
.footer-cta p {
  color: var(--muted);
  margin-top: 1rem;
}
.footer-cta em {
  color: var(--text-strong);
  font-style: normal;
}
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.netlify-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
}
/* Netlify's official logo, inlined unmodified. Only its size is set here —
   never its colours. `width: auto` keeps the 512×209 aspect ratio. */
.netlify-logo {
  display: block;
  height: 1.4rem;
  width: auto;
}
.netlify-mark:hover {
  color: var(--text-strong);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 0.76rem;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--teal);
}

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

@media (max-width: 820px) {
  .panels,
  .filemap {
    grid-template-columns: 1fr;
  }
  .filemap dd {
    border-top: 0;
    padding-top: 0;
  }
  .topbar-nav a:not(.btn) {
    display: none;
  }
}

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