/* ---------------------------------- */
/* RoyStacks — dark, premium, minimal */
/* ---------------------------------- */

:root {
  --bg: #0a0a0c;
  --bg-raised: #111114;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f2;
  --text-dim: rgba(244, 244, 242, 0.62);
  --text-faint: rgba(244, 244, 242, 0.38);
  --accent: #d8c9a3;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --container: 1120px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
}

h1 em, h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

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

.eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  margin-bottom: 1.4rem;
}

.lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-dim);
  max-width: 34em;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 12, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.wordmark {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.wordmark span {
  color: var(--accent);
}

.wordmark.small {
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text) !important;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-cta:hover {
  border-color: var(--accent);
}

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

.hero {
  padding: clamp(96px, 16vh, 180px) 24px clamp(80px, 12vh, 140px);
}

.hero .lede {
  margin-top: 1.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2.6rem;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

/* ---------- Thesis ---------- */

.thesis {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
  padding: clamp(72px, 10vh, 120px) 0;
}

.thesis-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.thesis-copy p {
  color: var(--text-dim);
  font-size: 1.08rem;
}

.thesis-copy p + p {
  margin-top: 1.2rem;
}

/* ---------- Products ---------- */

.products {
  padding: clamp(80px, 12vh, 140px) 24px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 3rem;
}

.section-head p {
  color: var(--text-faint);
  font-size: 0.95rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), transparent 55%);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.product-card:hover {
  border-color: rgba(216, 201, 163, 0.4);
  transform: translateY(-3px);
}

.card-index {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-faint);
}

.product-card h3 {
  font-size: 1.3rem;
}

.product-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  flex-grow: 1;
}

.badge {
  align-self: flex-start;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(216, 201, 163, 0.45);
  color: var(--accent);
}

.badge-muted {
  border-color: var(--border);
  color: var(--text-faint);
}

.product-card.is-empty {
  border-style: dashed;
}

/* ---------- Studio teaser ---------- */

.studio-teaser {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 80% at 50% 100%, rgba(216, 201, 163, 0.07), transparent),
    var(--bg-raised);
  padding: clamp(80px, 12vh, 140px) 0;
  text-align: center;
}

.studio-teaser-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.studio-teaser .btn {
  margin-top: 0.8rem;
}

/* ---------- Contact ---------- */

.contact {
  padding: clamp(80px, 12vh, 140px) 24px;
}

.contact .lede {
  margin-top: 1rem;
}

.contact-mail {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(216, 201, 163, 0.35);
  padding-bottom: 4px;
  transition: border-color 0.2s ease;
}

.contact-mail:hover {
  border-color: var(--accent);
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

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

.footer-note {
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ---------- Studio page ---------- */

.page-hero {
  padding: clamp(96px, 14vh, 160px) 24px clamp(56px, 8vh, 96px);
}

.principles {
  padding-bottom: clamp(80px, 12vh, 140px);
}

.principle-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.principle {
  display: grid;
  grid-template-columns: 80px 1fr 1.4fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.principle-num {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-faint);
  font-size: 1.1rem;
}

.principle h3 {
  font-size: 1.25rem;
}

.principle p {
  color: var(--text-dim);
  font-size: 0.98rem;
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .thesis-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .principle {
    grid-template-columns: 48px 1fr;
  }
  .principle p {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .nav-links {
    gap: 18px;
  }
  .nav-links a:not(.nav-cta) {
    display: none;
  }
}
