/* =============================================
   Frosty Wren Studios — studio design system
   Loaded after /css/main.css on studio pages (home, about, labs hub, tools, kiln).
   main.css keeps the shared variables, .btn, .footer and .fade-in; this file adds
   the studio look: Inter headings, one accent per pillar, and the page components.
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --accent: var(--gold);
  --accent-light: var(--gold-light);
  --accent-soft: rgba(201, 168, 76, 0.1);
  --accent-line: rgba(201, 168, 76, 0.22);
  --line: rgba(232, 228, 217, 0.1);
  --head: 'Inter', 'Lato', sans-serif;
  --text-body: #d8d2c6;
}

/* Labs pillar: cool accent */
.pillar-labs {
  --accent: #9fc4ff;
  --accent-light: #c9ddff;
  --accent-soft: rgba(159, 196, 255, 0.09);
  --accent-line: rgba(159, 196, 255, 0.22);
}

body.studio { background: #0e0f14; }
.studio a { color: var(--accent); }
.studio a:hover { color: var(--accent-light); }
.studio .btn { border-color: var(--accent); color: var(--accent); font-family: var(--head); letter-spacing: 0.06em; }
.studio .btn:hover { background: var(--accent); color: #0e0f14; }
.studio .footer { font-family: 'Lato', sans-serif; }

/* ---------- layout ---------- */
.st-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.st-section { padding: 5.5rem 0; }
.st-section + .st-section { border-top: 1px solid var(--line); }
.st-eyebrow {
  font-family: var(--head); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem;
}
.st-h1 {
  font-family: var(--head); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1;
  font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--text-primary);
}
.st-h2 {
  font-family: var(--head); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2;
  font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--text-primary); margin-bottom: 1rem;
}
.st-h3 { font-family: var(--head); font-weight: 600; font-size: 1.2rem; color: var(--text-primary); margin-bottom: 0.4rem; }
.st-lede { font-size: 1.15rem; line-height: 1.65; color: var(--text-body); max-width: 46rem; }
.st-text p { color: var(--text-body); margin-bottom: 1rem; max-width: 46rem; }
.st-text p:last-child { margin-bottom: 0; }
.st-muted { color: var(--text-muted); font-size: 0.92rem; }
.st-center { text-align: center; }
.st-center .st-lede, .st-center .st-text p { margin-left: auto; margin-right: auto; }

/* ---------- page header (inner pages) ---------- */
.st-head { padding: calc(64px + 4.5rem) 0 3.5rem; }
.st-head .st-lede { margin-top: 1.1rem; }
.st-points {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin-top: 1.6rem; padding: 0; list-style: none;
  font-family: var(--head); font-size: 0.85rem; letter-spacing: 0.02em; color: var(--text-muted);
}
.st-points li::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 0.55rem 0.12rem 0; border-radius: 50%; background: var(--accent); }

/* ---------- homepage top ---------- */
.home-top { padding-top: calc(64px + 4.5rem); }
.home-top .st-lede { margin-top: 1rem; }

/* ---------- cards ---------- */
.st-grid { display: grid; gap: 1.5rem; }
.st-grid-3 { grid-template-columns: repeat(3, 1fr); }
.st-grid-2 { grid-template-columns: repeat(2, 1fr); }
.st-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 10px;
  border: 1px solid var(--line); background: #15161e; color: inherit; text-decoration: none;
  transition: border-color 0.25s, transform 0.25s;
}
.st-card:hover { border-color: var(--accent-line); transform: translateY(-2px); color: inherit; }
.st-card-img { aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.st-card-img img { width: 100%; height: 100%; object-fit: cover; }
.st-card-body { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.3rem 1.4rem 1.5rem; flex: 1; }
.st-card-kicker { font-family: var(--head); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.st-card-title { font-family: var(--head); font-size: 1.25rem; font-weight: 600; color: var(--text-primary); }
.st-card-text { font-size: 0.95rem; line-height: 1.6; color: var(--text-body); }
.st-card-link { margin-top: auto; padding-top: 0.6rem; font-family: var(--head); font-size: 0.85rem; font-weight: 600; color: var(--accent); }
.st-card:hover .st-card-link { color: var(--accent-light); }
.st-card-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; }
.st-card-wide .st-card-img { aspect-ratio: auto; min-height: 100%; }
.st-card-wide .st-card-body { padding: 2rem 2.2rem; justify-content: center; }

/* pillar cards on the homepage: each carries its pillar's accent */
.pillar-card .st-card-title { font-size: 1.45rem; }
.st-card-list { list-style: none; padding: 0; margin: 0.2rem 0 0; display: grid; gap: 0.45rem; font-size: 0.95rem; line-height: 1.45; color: var(--text-body); }
.st-card-list strong { display: block; font-family: var(--head); font-weight: 600; color: var(--text-primary); }

/* ---------- featured ---------- */
.feature { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center; }
.feature-img { overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: #000; }
.feature-img img { width: 100%; }

/* ---------- numbers ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stat { display: block; padding: 1.5rem 1.3rem; background: #111219; color: inherit; text-decoration: none; }
a.stat:hover { background: #171822; color: inherit; }
.stat-num { display: block; font-family: var(--head); font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }
.stat-label { display: block; margin-top: 0.2rem; font-size: 0.88rem; line-height: 1.45; color: var(--text-muted); }

/* ---------- writing list ---------- */
.writing { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.writing li { border-bottom: 1px solid var(--line); }
.writing a { display: grid; grid-template-columns: 9rem 1fr auto; gap: 1.5rem; align-items: baseline; padding: 1.1rem 0.25rem; color: inherit; text-decoration: none; }
.writing a:hover .writing-title { color: var(--accent); }
.writing-meta { font-family: var(--head); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.writing-title { font-family: var(--head); font-size: 1.05rem; font-weight: 500; color: var(--text-primary); transition: color 0.2s; }
.writing-date { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }

/* ---------- figures and galleries ---------- */
.st-figure { margin: 0; }
.st-figure img, .st-figure picture img { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #000; }
.st-figure figcaption { margin-top: 0.7rem; font-size: 0.9rem; line-height: 1.55; color: var(--text-muted); }
.st-figure figcaption strong { color: var(--text-primary); font-weight: 600; }
.st-gallery { display: grid; gap: 1.5rem; }
.st-gallery-2 { grid-template-columns: repeat(2, 1fr); }
.st-gallery-4 { grid-template-columns: repeat(4, 1fr); }
.st-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.st-split-wide { grid-template-columns: 1.3fr 1fr; }
.st-block { margin-top: 2.5rem; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; padding: 0; list-style: none; }
.steps li { counter-increment: step; padding: 1.3rem 1.4rem; border: 1px solid var(--line); border-radius: 10px; background: #13141b; }
.steps li::before { content: counter(step); display: block; font-family: var(--head); font-size: 0.8rem; font-weight: 700; color: var(--accent); margin-bottom: 0.4rem; }
.steps h3 { font-family: var(--head); font-size: 1.02rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.35rem; }
.steps p { font-size: 0.92rem; line-height: 1.6; color: var(--text-body); }

/* ---------- contact ---------- */
.st-contact { display: flex; flex-wrap: wrap; gap: 0.8rem 2rem; align-items: baseline; margin-top: 1.4rem; font-family: var(--head); }
.st-contact .contact-email { font-size: 1.3rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .feature, .st-split, .st-split-wide, .st-card-wide { grid-template-columns: 1fr; }
  .st-grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .st-gallery-4 { grid-template-columns: 1fr 1fr; }
  .st-card-wide .st-card-img { aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) {
  .st-inner { padding: 0 16px; }
  .st-section { padding: 4rem 0; }
  .st-grid-3, .st-grid-2, .steps, .st-gallery-2 { grid-template-columns: 1fr; }
  .writing a { grid-template-columns: 1fr; gap: 0.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .st-card { transition: none; }
  .st-card:hover { transform: none; }
}

/* main.css sets Cinzel on these; studio pages use the studio face */
.studio .contact-email { font-family: var(--head); color: var(--accent); border-bottom-color: var(--accent-line); }
.studio .btn-subtle { border-color: var(--line); color: var(--text-primary); }
.studio .btn-subtle:hover { border-color: var(--accent); background: transparent; color: var(--accent); }

/* card images that must not be cropped (diagrams, plots) */
.st-card-img.fit img { object-fit: contain; }
.st-card-img.light { background: #fff; }
.st-card-img.term { background: #161724; }
.studio code { font-family: Consolas, 'SFMono-Regular', monospace; font-size: 0.9em; padding: 0.05em 0.35em; border-radius: 4px; background: rgba(232, 228, 217, 0.08); color: var(--text-primary); }
