/* ─────────────────────────────────────────────────────────────
   Stackschmiede Demo Landing — page-specific styles
   Builds on colors_and_type.css. No frameworks, no CDN scripts.
   ───────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--color-fg); text-decoration: none; }
[hidden] { display: none !important; }

/* ── Grain overlay ─────────────────────────────────────────── */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
  opacity: .55;
}
.grain svg { width: 100%; height: 100%; }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) 1.25rem clamp(2rem, 5vw, 3.5rem);
  max-width: var(--container-md);
  margin: 0 auto;
  z-index: 2;
}

.forge-logo-mount {
  width: clamp(220px, 38vw, 320px);
  aspect-ratio: 1 / 1;
  margin-bottom: 2rem;
  position: relative;
}

.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-live);
  margin-right: 0.55rem;
  box-shadow: 0 0 0 0 rgba(127, 176, 105, 0.6);
  animation: live-pulse 2.4s var(--ease-brand) infinite;
  vertical-align: 1px;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(127, 176, 105, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(127, 176, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(127, 176, 105, 0); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 1.2rem;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.2rem, 6.5vw, 3.6rem);
  letter-spacing: var(--heading-tracking);
  line-height: 1.05;
  max-width: 18ch;
}
.hero-title .amber {
  color: var(--color-primary);
  font-style: italic;
}

.hero-lead {
  margin: 1.5rem 0 0;
  max-width: 38ch;
  color: var(--color-muted);
}

/* ── BENTO ─────────────────────────────────────────────────── */
.bento {
  position: relative;
  z-index: 2;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 1.25rem clamp(2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.bento-tile {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform var(--dur-base) var(--ease-brand),
              border-color var(--dur-base) var(--ease-brand),
              box-shadow var(--dur-base) var(--ease-brand);
  overflow: hidden;
}
.bento-tile::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(212,165,116,0.08), transparent 55%);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-brand);
  pointer-events: none;
}
.bento-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 165, 116, 0.35);
  box-shadow: var(--shadow-card);
}
.bento-tile:hover::before { opacity: 1; }

.tile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.tile-icon {
  width: 28px; height: 28px;
  color: var(--color-primary);
  opacity: 0.85;
  flex: 0 0 auto;
}
.bento-tile h3 {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: var(--heading-weight);
}
.tile-desc {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  flex: 1 1 auto;
}
.tile-desc .note {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-warn);
}

.tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background var(--dur-fast) var(--ease-brand),
              color var(--dur-fast) var(--ease-brand),
              border-color var(--dur-fast) var(--ease-brand),
              transform var(--dur-fast) var(--ease-brand);
}
.btn-primary {
  background: var(--color-primary);
  color: #1A1308;
}
.btn-primary:hover {
  background: var(--color-primary-soft);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-fg);
}
.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ── Credentials toggle ───────────────────────────────────── */
.creds-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  align-self: flex-start;
  transition: color var(--dur-fast) var(--ease-brand);
}
.creds-toggle:hover { color: var(--color-primary); }
.creds-toggle-icon {
  width: 12px; height: 12px;
  transition: transform var(--dur-base) var(--ease-brand);
}
.creds-toggle[aria-expanded="true"] .creds-toggle-icon { transform: rotate(180deg); }

.creds {
  margin: 0.2rem 0 0;
  padding: 0.85rem 0.95rem;
  background: var(--color-bg);
  border: 1px dashed rgba(212, 165, 116, 0.4);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  animation: creds-in 220ms var(--ease-brand);
}
@keyframes creds-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.creds dt {
  color: var(--color-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: center;
}
.creds dt.meta-label {
  margin-top: 0.4rem;
  color: var(--color-accent);
}
.creds dd {
  margin: 0;
  color: var(--color-fg);
  align-self: center;
  word-break: break-all;
}
.creds code {
  background: rgba(212, 165, 116, 0.1);
  color: var(--color-primary-soft);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

/* ── Infra strip ──────────────────────────────────────────── */
.infra-strip {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 1.4rem 1.25rem;
  margin-top: 2rem;
  background: rgba(26, 26, 28, 0.4);
}
.infra-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--container-xl);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem 1.5rem;
}
.infra-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.infra-key {
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
}
.infra-val { color: var(--color-fg); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.25rem 3rem;
  color: var(--color-muted);
  font-size: 0.82rem;
}
.site-footer a {
  color: var(--color-primary);
  border-bottom: 1px dotted rgba(212, 165, 116, 0.4);
}
.site-footer a:hover { color: var(--color-primary-soft); }
.footer-sep { margin: 0 0.6rem; opacity: 0.5; }
.site-footer .ok { color: var(--color-success); margin-left: 0.2rem; }

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; box-shadow: 0 0 0 0 rgba(127, 176, 105, 0); }
  .bento-tile { transition: none; }
  .creds { animation: none; }
}
