/* =========================================================================
   SarjanaHerald — homepage
   Hero copy beside the Shadow Fiend model, then the tool cards in the
   YOS Space card language (glass panel, amber hover, mono metadata).
   ========================================================================= */

.home { padding-top: 8px; }

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  align-items: center;
  gap: 28px;
  min-height: calc(100vh - 84px);
  padding: 24px 0 72px;
}

.hero-copy { max-width: 640px; }

.hero .display { font-size: clamp(2.5rem, 5.6vw, 4.7rem); }

.hero .lede { margin-top: 22px; max-width: 54ch; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 30px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}

.hero-meta span::before {
  content: "◆";
  margin-right: 7px;
  font-size: 7px;
  color: var(--amber);
  vertical-align: middle;
}

/* ---------- 3D stage ---------- */

.hero-stage {
  position: relative;
  /* A definite height, not min-height: the canvas is absolutely positioned so
     it can never feed its own size back into the container. */
  height: clamp(340px, 44vw, 580px);
  /* A soft pool of light under the model so it does not float in nothing. */
  background: radial-gradient(
    46% 38% at 50% 62%,
    rgba(255, 148, 58, .1),
    transparent 70%
  );
}

.hero-stage canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.hero-stage canvas:active { cursor: grabbing; }

.stage-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
  pointer-events: none;
}

.stage-hint[hidden] { display: none !important; }

/* ---------- tools ---------- */

.tools-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 18px;
}

.tools-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.01em;
}

.tools-head span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}

.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* The fifth card closes the grid, so it gets both columns instead of leaving
   a hole beside it. */
.tool--wide { grid-column: span 2; }

.tool {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
  text-decoration: none;
  color: var(--text);
  transition: border-color .3s ease, background .3s ease, transform .3s ease;
}

.tool:hover {
  border-color: rgba(255, 179, 71, .5);
  background: var(--surface-hover);
  transform: translateY(-3px);
}

.tool:focus-visible {
  outline: 2px solid rgba(255, 179, 71, .7);
  outline-offset: 2px;
}

.tool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

.tool-glyph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--amber);
  font-size: 16px;
  line-height: 1;
}

.tool h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.16;
}

.tool p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.pill {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(246, 241, 233, .5);
}

.tool-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
}

/* ---------- note ---------- */

.home-note {
  margin: 46px 0 0;
  padding: 20px 22px;
  max-width: 76ch;
  border: 1px solid var(--line);
  border-left: 2px solid rgba(255, 179, 71, .55);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 255, 255, .022);
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.home-note b { color: var(--text-soft); font-weight: 600; }

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

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 4px;
    padding: 8px 0 48px;
  }

  .hero-stage {
    order: -1;
    height: clamp(260px, 62vw, 380px);
  }

  .hero-actions { margin-top: 26px; }
  .tools { grid-template-columns: 1fr; }
  .tool--wide { grid-column: span 1; }
}

@media (max-width: 480px) {
  .hero .display { font-size: clamp(2.2rem, 11vw, 3rem); }
  .tool { padding: 20px; }
  .hero-meta { gap: 4px 16px; font-size: 9px; }
}
