/* ============================================================
   RitualSoft — Developer Page
   Token system derived from the studio mark: warm cream rings
   on dark charcoal. Serif carries "Ritual", mono carries "Soft".
   ============================================================ */

:root {
  --bg:        #161310;
  --bg-panel:  #1f1b17;
  --bg-panel-hover: #262019;
  --ink:       #efe7d6;
  --ink-muted: #a89d8a;
  --ink-faint: #6f6655;
  --ember:     #d98f4e;
  --ember-dim: #8a5a30;
  --line:      rgba(239, 231, 214, 0.12);
  --line-strong: rgba(239, 231, 214, 0.22);

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;

  --container: 920px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--ink);
  text-decoration: none;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- Hero ---------- */

.hero {
  min-height: clamp(480px, 86vh, 760px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 64px;
}

.js .hero__mark {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 1.1s ease, transform 1.1s ease;
}

.hero__mark {
  width: 132px;
  height: 132px;
}

.hero__mark.is-in {
  opacity: 1;
  transform: scale(1);
}

.hero__rule {
  width: 64px;
  height: 1px;
  background: var(--line-strong);
  margin: 22px 0 20px;
}

.js .hero__rule {
  opacity: 0;
  transition: opacity 1.1s ease 0.5s;
}

.hero__rule.is-in { opacity: 1; }

.hero__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 8vw, 64px);
  letter-spacing: 0.01em;
  margin: 0;
}

.js .hero__title {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.9s ease 0.25s, transform 0.9s ease 0.25s;
}

.hero__title.is-in { opacity: 1; transform: translateY(0); }

.hero__tagline {
  max-width: 480px;
  margin: 18px 0 0;
  color: var(--ink-muted);
  font-size: 17px;
}

.js .hero__tagline {
  opacity: 0;
  transition: opacity 0.9s ease 0.6s;
}

.hero__tagline.is-in { opacity: 1; }

.js .hero__eyebrow {
  opacity: 0;
  transition: opacity 0.9s ease 0.05s;
}
.hero__eyebrow.is-in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js .hero__mark, .js .hero__rule, .js .hero__title,
  .js .hero__tagline, .js .hero__eyebrow {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Sections ---------- */

section.block {
  padding: 56px 0;
}

.block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.block__head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  margin: 4px 0 0;
  color: var(--ink);
}

.block__count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}

/* ---------- Status ring ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status__ring {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  margin-right: 2px;
}

.status--live .status__ring {
  background: var(--ember);
  box-shadow: 0 0 0 3px rgba(217, 143, 78, 0.18);
}
.status--live { color: var(--ember); }

.status--dev .status__ring {
  background: transparent;
  border: 1.5px dashed var(--ink-faint);
  animation: spin 6s linear infinite;
}
.status--dev { color: var(--ink-faint); }

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .status--dev .status__ring { animation: none; }
}

/* ---------- Cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  background: var(--bg-panel-hover);
  border-color: var(--line-strong);
}

.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card__tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.card h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

.card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14.5px;
  line-height: 1.6;
  flex: 1;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.card__platform {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-faint);
}

.card__link {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ember);
  border-bottom: 1px solid var(--ember-dim);
  padding-bottom: 1px;
}

.card__link:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- About ---------- */

.about p {
  max-width: 640px;
  color: var(--ink-muted);
  font-size: 16px;
}

.about a { color: var(--ember); border-bottom: 1px solid var(--ember-dim); }
.about a:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
}

footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer, footer a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}

footer a:hover { color: var(--ink); }
