/* ============================================================
   Studio Isora — product site + dev blog
   Cinematic dark theme.
   ============================================================ */

:root {
  --bg: #050505;
  --bg-2: #0b0b0d;
  --bg-3: #111114;
  --fg: #f5f5f3;
  --muted: #9a9a96;
  --accent: #e63a2e;
  --accent-soft: rgba(230, 58, 46, 0.14);
  --live: #6fbf73;
  --line: rgba(255, 255, 255, 0.12);
  --maxw: 1200px;

  --f-display: "Playfair Display", "Times New Roman", serif;
  --f-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.85; }
[id] { scroll-margin-top: 88px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.container--narrow { max-width: 760px; }
.muted { color: var(--muted); }

/* -------- NAV -------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
body.home .nav {
  position: fixed;
  left: 0; right: 0;
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
body.home .nav.is-scrolled {
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
}
.brand__mark { color: var(--accent); font-size: 20px; line-height: 1; transform: translateY(-1px); }
.brand__name { letter-spacing: 0.18em; }
.brand__accent { color: var(--accent); margin-left: 6px; }

.nav__list { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav__link:hover, .nav__link.is-active { color: #fff; opacity: 1; border-bottom-color: var(--accent); }

.nav__toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 30px;
  height: 24px;
  padding: 2px 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.nav__toggle span { display: block; height: 2px; background: #fff; width: 100%; }

/* -------- BUTTONS -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--f-sans);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #ff4a3d; opacity: 1; }
.btn--ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn--ghost:hover { border-color: #fff; opacity: 1; }

.link-arrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.link-arrow:hover { color: #fff; opacity: 1; }

/* -------- HERO -------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  background: #0a0706;
}
.hero__video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  z-index: -2;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.2) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.9) 100%);
}
.hero__content { padding-top: 120px; padding-bottom: 120px; }
.hero__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: 1.05;
  margin: 18px 0 24px;
  max-width: 15ch;
}
.hero__lede { font-size: clamp(16px, 1.5vw, 20px); color: rgba(255,255,255,0.8); max-width: 52ch; margin: 0 0 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.status-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 40px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  font-size: 14px;
}
.status-bar:empty { display: none; }
.status-bar__label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 14px;
}

/* -------- SECTIONS -------- */
.section { padding: 120px 0; background: var(--bg); }
.section--dark { background: var(--bg-2); }
.section__head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 56px; }
.section__head--row { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 24px; }

.eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}
.section__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.1;
  margin: 0;
  max-width: 20ch;
}
.section__lede { font-size: clamp(16px, 1.3vw, 18px); color: var(--muted); max-width: 60ch; margin: 0; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start; }

/* -------- WORKFLOW -------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.step { background: var(--bg); padding: 36px 30px 40px; display: flex; flex-direction: column; gap: 18px; }
.step__num { font-family: var(--f-display); font-size: 30px; color: var(--accent); }
.step h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.step p { margin: 0; color: var(--muted); }

/* -------- PRINCIPLES -------- */
.principles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.principles li { padding: 22px 0; border-top: 1px solid var(--line); }
.principles li:last-child { border-bottom: 1px solid var(--line); }
.principles h3 { font-family: var(--f-display); font-weight: 400; font-size: 22px; margin: 0 0 6px; }
.principles p { margin: 0; color: var(--muted); }

/* -------- VIDEOS -------- */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.video-item { margin: 0; }
.video-item figcaption { margin-top: 12px; font-family: var(--f-display); font-size: 20px; }
.video-embed { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose .video-embed { margin: 2em 0; }

/* -------- BLOG CARDS -------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.post-card a { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.post-grid .post-card { background: var(--bg); border: 1px solid var(--line); transition: border-color 0.3s ease; }
.post-grid .post-card:hover { border-color: rgba(255,255,255,0.3); }
.post-grid .post-card a { padding: 28px; }
.post-list .post-card { border-bottom: 1px solid var(--line); }
.post-list .post-card a { padding: 36px 0; }
.post-card a:hover { opacity: 1; }
.post-card time { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.post-card h3 { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.2; margin: 0; }
.post-list .post-card h3 { font-size: clamp(24px, 2.6vw, 32px); }
.post-card p { margin: 0; color: var(--muted); max-width: 70ch; }
.post-card__more { margin-top: auto; padding-top: 8px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }

/* -------- CTA -------- */
.cta { background: radial-gradient(ellipse at 20% 0%, var(--accent-soft), transparent 60%), var(--bg); }
.cta__inner { display: flex; flex-direction: column; gap: 20px; }
.mailto {
  font-family: var(--f-display);
  font-size: clamp(20px, 2vw, 26px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  margin-left: 12px;
}

/* -------- POST -------- */
.page { min-height: 60vh; }
.post { padding-top: 64px; }
.post__back { display: inline-block; margin-bottom: 48px; }
.post__header { margin-bottom: 40px; }
.post__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.1;
  margin: 16px 0 0;
}
.prose { font-size: 18px; line-height: 1.75; color: #dcdcd8; }
.prose p { margin: 0 0 1.3em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--f-display); font-weight: 400; color: var(--fg); line-height: 1.25; margin: 2em 0 0.6em; }
.prose h2 { font-size: 30px; }
.prose h3 { font-size: 24px; }
.prose a { color: var(--fg); border-bottom: 1px solid var(--accent); }
.prose strong { color: var(--fg); }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.3em; }
.prose li { margin-bottom: 0.6em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 1.6em 0; padding-left: 20px; border-left: 2px solid var(--accent); color: var(--fg); font-family: var(--f-display); font-size: 22px; }
.prose code { font-size: 0.9em; background: var(--bg-3); padding: 2px 6px; }
.prose pre { background: var(--bg-3); padding: 18px; overflow-x: auto; border: 1px solid var(--line); }
.prose pre code { background: none; padding: 0; }
.prose figure { margin: 2em 0; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }

.post__cta {
  margin: 64px 0 40px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
}
.post__cta p { margin: 0; font-family: var(--f-display); font-size: 22px; }
.pager { display: flex; justify-content: space-between; gap: 24px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.pager a:hover { color: #fff; opacity: 1; }
.pager__newer { text-align: right; }

/* -------- FOOTER -------- */
.footer { padding: 64px 0 48px; border-top: 1px solid var(--line); background: var(--bg); }
.footer__grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.footer__tag { margin: 14px 0 0; font-size: 14px; }
.footer__meta { text-align: right; }
.footer__meta p { margin: 10px 0 0; font-size: 12px; letter-spacing: 0.08em; }
.footer__mail { font-family: var(--f-display); font-size: 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .steps, .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav, body.home .nav { padding: 16px 20px; }
  .nav__toggle { display: flex; }
  .nav__list {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(5, 5, 5, 0.97);
    padding: 8px 20px 20px;
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav.is-open .nav__list { opacity: 1; transform: none; pointer-events: auto; }
  body.home .nav.is-open { background: rgba(5, 5, 5, 0.97); }
  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__list li:last-child { border-bottom: 0; }
  .nav__link { display: block; padding: 16px 0; border-bottom: 0; }

  .container { padding: 0 20px; }
  .section { padding: 80px 0; }
  .grid-2 { grid-template-columns: 1fr; gap: 28px; }
  .status-bar { padding: 14px 20px; font-size: 13px; }
  .status-bar__label { display: block; margin: 0 0 4px; }
  .section__head--row { flex-direction: column; align-items: flex-start; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__meta { text-align: left; }
  .mailto { margin-left: 0; }
}

@media (max-width: 640px) {
  .steps, .post-grid, .videos { grid-template-columns: 1fr; }
  .hero__content { padding-top: 110px; padding-bottom: 140px; }
  .btn { width: 100%; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .prose { font-size: 17px; }
  .post__cta { padding: 22px; }
  .pager { flex-direction: column; }
  .pager__newer { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__video-bg { display: none; }
}
