/* components.css — cards, buttons, hero, screenshots, marquee, badges */

/* ── panels & cards ─────────────────────────────────── */

.panel {
  background: var(--bg-elevated);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.2vw, 1.6rem);
  box-shadow: var(--shadow-card);
  position: relative;
}

.panel.tape::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 1.2rem;
  width: 4.5rem;
  height: 18px;
  background: rgba(214, 183, 115, 0.7);
  border: 1px dashed var(--brass-dark);
  transform: rotate(-3deg);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.06);
}

.panel.tape.right::before {
  left: auto;
  right: 1.2rem;
  transform: rotate(3deg);
}

.panel-row {
  display: grid;
  gap: var(--gap);
}

@media (min-width: 50rem) {
  .panel-row.split-2 {
    grid-template-columns: 1fr 1fr;
  }

  .panel-row.hero-split {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }
}

/* ── marquee header strip ─────────────────────────────── */

.marquee {
  background: linear-gradient(180deg, var(--studio-dark), #0a0e14);
  color: var(--ink);
  border: 2px solid var(--studio-dark);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow: hidden;
  position: relative;
}

.marquee::before {
  content: "";
  position: absolute;
  inset: 4px 4px auto 4px;
  height: 4px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--brass) 0 6px,
      transparent 6px 12px
    );
  opacity: 0.7;
}

.marquee::after {
  content: "";
  position: absolute;
  inset: auto 4px 4px 4px;
  height: 4px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--brass) 0 6px,
      transparent 6px 12px
    );
  opacity: 0.7;
}

.marquee-bulb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 6px var(--brass), 0 0 12px rgba(214, 183, 115, 0.6);
  flex: none;
  animation: bulb 1.6s infinite ease-in-out;
}

.marquee-bulb:nth-child(2) {
  animation-delay: 0.4s;
}

.marquee-text {
  margin-left: 0.2rem;
}

@keyframes bulb {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── buttons ──────────────────────────────────────────── */

.btn {
  --bg: #2d5080;
  --bg-edge: var(--studio-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: linear-gradient(180deg, var(--bg), var(--bg-edge));
  color: #fff;
  text-decoration: none;
  border: 1.5px solid var(--bg-edge);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font: 700 0.95rem var(--font-body);
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--bg-edge);
  transition: transform 110ms ease, box-shadow 110ms ease, filter 110ms ease;
  min-height: 2.75rem;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--bg-edge);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--bg-edge);
}

.btn.green {
  --bg: var(--terminal);
  --bg-edge: var(--terminal-dark);
}

.btn.brass {
  --bg: var(--brass);
  --bg-edge: var(--brass-dark);
  color: var(--bg);
}

.btn.red {
  --bg: var(--reel-red);
  --bg-edge: #8c2625;
}

.btn.ghost {
  background: var(--bg-surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45);
}

.btn.ghost:hover,
.btn.ghost:focus-visible {
  background: var(--brass);
  color: var(--bg);
  border-color: var(--brass-dark);
}

.btn-icon {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}

/* ── button rows ──────────────────────────────────────── */

.btn-row {
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 32rem) {
  .btn-row.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .btn-row.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 56rem) {
  .btn-row.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── hero ─────────────────────────────────────────────── */

.hero {
  padding: clamp(1.1rem, 2.6vw, 1.8rem);
  background:
    radial-gradient(600px 240px at 100% 0%, rgba(214, 183, 115, 0.25), transparent 70%),
    linear-gradient(180deg, var(--bg-surface), var(--bg-elevated));
  border: 2px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: clamp(1.3rem, 0.9rem + 2.6vw, 2.2rem);
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

.hero-title em {
  font-style: normal;
  color: var(--reel-red);
}

.hero-lead {
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.1rem);
  max-width: 36rem;
}

.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.hero-art svg {
  width: 100%;
  max-width: 22rem;
  height: auto;
  filter: drop-shadow(0 8px 0 rgba(18, 33, 66, 0.18));
}

/* ── feature cards (3-up) ─────────────────────────────── */

.cards {
  display: grid;
  gap: var(--gap);
}

@media (min-width: 44rem) {
  .cards.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  background: var(--bg-surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-card);
  height: 100%;
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--studio);
  margin-bottom: 0.5rem;
}

.card-num {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--brass);
  color: var(--bg);
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  flex: none;
}

/* ── inline stat strip ────────────────────────────────── */

.stat-strip {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.6rem;
}

@media (min-width: 36rem) {
  .stat-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat {
  background: var(--bg-surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--studio);
  margin-bottom: 0.25rem;
}

.stat span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ── badges & tags ────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1.5px solid var(--line);
  background: var(--bg-surface);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font: 700 0.78rem var(--font-body);
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge.green {
  border-color: var(--terminal);
  color: var(--terminal);
}

.badge.brass {
  border-color: var(--brass-dark);
  color: var(--brass);
  background: rgba(232, 200, 120, 0.12);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  font: 700 0.78rem var(--font-body);
  background: var(--bg-surface);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── screenshot gallery ───────────────────────────────── */

.gallery {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.shot {
  border: 1.5px solid var(--studio);
  border-radius: var(--radius-sm);
  background: #000;
  padding: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
}

.shot img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  image-rendering: pixelated;
  display: block;
  border-radius: 3px;
}

.shot figcaption {
  background: var(--studio-dark);
  color: var(--ink);
  font: 700 0.78rem var(--font-body);
  padding: 0.35rem 0.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 4px;
  border-radius: 3px;
}

/* ── projection room (preview with toggles) ───────────── */

.projection {
  display: grid;
  gap: var(--gap);
}

/* Preview fills horizontal space; image upscales with crisp pixels */
.projection-main {
  width: 100%;
  min-width: 0;
}

@media (min-width: 50rem) {
  .projection {
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 22rem);
    align-items: start;
  }
}

.preview {
  border: 2px solid var(--studio);
  border-radius: var(--radius);
  background: #050606;
  padding: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.7);
  width: 100%;
}

.preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  background: #050606;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.toggle-row button {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--ink-soft);
  font: 700 0.85rem var(--font-body);
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  transition: background 110ms ease, color 110ms ease;
}

.toggle-row button:hover {
  background: var(--brass);
}

.toggle-row button[aria-pressed="true"] {
  background: var(--brass);
  color: var(--bg);
  border-color: var(--brass-dark);
}

.projection-side {
  min-width: 0;
}

.projection-side h3 {
  margin-bottom: 0.4rem;
}

.projection-side dl {
  margin: 0.4rem 0 0;
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.45rem 1rem;
  font-size: 0.92rem;
}

@media (min-width: 50rem) {
  .projection-side dl {
    grid-template-columns: 6.25rem 1fr;
    gap: 0.5rem 1.1rem;
    font-size: 0.95rem;
  }
}

.projection-side dt {
  font-weight: 700;
  color: var(--studio);
}

.projection-side dd {
  margin: 0;
  color: var(--ink-soft);
}

/* ── video shell (hidden until clicked) ───────────────── */

.video-shell[hidden] {
  display: none;
}

.video-shell {
  margin-top: 1rem;
}

.video-placeholder {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--radius);
  border: 2px dashed var(--line);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(158, 196, 240, 0.04) 0 10px,
      transparent 10px 20px
    ),
    var(--bg-surface);
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  padding: 1.2rem;
  font-size: 0.92rem;
}

.video-placeholder strong {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--studio);
  display: block;
  margin-bottom: 0.4rem;
}

/* ── manual / file row ────────────────────────────────── */

.file-row {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.file-icon {
  width: 3rem;
  height: 3.6rem;
  border: 2px solid var(--studio);
  border-radius: 4px;
  background:
    linear-gradient(180deg, var(--bg-surface), var(--bg-elevated));
  position: relative;
  flex: none;
  box-shadow: var(--shadow-card);
}

.file-icon::before {
  content: "";
  position: absolute;
  inset: 0.45rem 0.45rem 0.55rem;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 6px;
}

.file-icon::after {
  content: "PDF";
  position: absolute;
  bottom: -0.4rem;
  left: 50%;
  transform: translateX(-50%);
  font: 700 0.7rem var(--font-display);
  background: var(--reel-red);
  color: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

/* ── compact list ─────────────────────────────────────── */

.spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.spec-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--line);
}

.spec-list li:last-child {
  border-bottom: none;
}

.spec-list strong {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--studio);
  letter-spacing: 0.04em;
}

/* ── inline icon button (utility) ────────────────────── */

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--brass);
  font-weight: 700;
}

.inline-link:hover {
  color: var(--seymour);
  text-decoration: underline;
}

/* ════════════════════════════════════════════════════════
   HAND-DRAWN INK THEME — wobbly chalk outlines on the dark
   studio background. Pure CSS + one tiny inline SVG filter
   (#ink / #ink2). Zero image weight.
   ════════════════════════════════════════════════════════ */

/* ── buttons: outlined keycaps with a scribbled hover fill ── */

.btn {
  --btn-ink: var(--ink-line);
  position: relative;
  isolation: isolate;
  background: transparent;
  color: var(--ink);
  border: none;
  border-radius: var(--sketch-r1);
  box-shadow: none;
  transition: transform 120ms ease, color 120ms ease;
}

/* the drawn outline */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2.5px solid var(--btn-ink);
  border-radius: var(--sketch-r1);
  filter: url(#ink);
  pointer-events: none;
}

/* the scribble fill that grows in on hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -1;
  border-radius: var(--sketch-r2);
  background:
    repeating-linear-gradient(46deg, var(--btn-ink) 0 0.9px, transparent 0.9px 5px),
    repeating-linear-gradient(-46deg, var(--btn-ink) 0 0.9px, transparent 0.9px 5px);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 130ms ease, transform 130ms ease;
  pointer-events: none;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px) rotate(-0.4deg);
  box-shadow: none;
  filter: none;
}

.btn:hover::before,
.btn:focus-visible::before {
  opacity: 0.16;
  transform: scale(1);
}

.btn:active {
  transform: translateY(1px) rotate(0deg);
  box-shadow: none;
}

.btn.green  { --btn-ink: var(--terminal); color: var(--terminal); }
.btn.brass  { --btn-ink: var(--brass);    color: var(--brass); }
.btn.red    { --btn-ink: var(--reel-red);  color: #ffb3b1; }
.btn.ghost  { --btn-ink: var(--ink-line-soft); color: var(--ink); }

/* ── cards & panels: sketchbook frames (double / single stroke) ── */

.card {
  position: relative;
  isolation: isolate;
  background: var(--bg-surface);
  border: none;
  border-radius: var(--sketch-r1);
  box-shadow: 0 14px 30px -20px rgba(0, 0, 0, 0.7);
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--ink-line);
  border-radius: var(--sketch-r1);
  filter: url(#ink);
  pointer-events: none;
}

.card::after {
  inset: 3px;
  border-width: 1px;
  border-radius: var(--sketch-r2);
  opacity: 0.4;
  filter: url(#ink2);
}

.panel {
  border: none;
  border-radius: var(--sketch-r1);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--ink-line);
  border-radius: var(--sketch-r1);
  filter: url(#ink);
  pointer-events: none;
}

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