/* Scale House blog — shared styles */

:root {
  --eggshell: #fbead2;
  --red: #de3831;
  --ink: #171312;
  --muted: #62564f;
  --off-white: #fffaf2;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--eggshell);
  font-family: "Libre Franklin", sans-serif;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  cursor: url('/cursor-default.svg') 3 2, auto;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: url('/cursor-pointer.svg') 10 2, pointer;
}

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

/* --- Top scroll progress bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: var(--red);
  z-index: 1000;
  transition: width 0.05s linear;
  box-shadow: 0 0 16px rgba(222, 56, 49, 0.5);
}

/* --- Top bar (back to home) --- */
.blog-topbar {
  position: fixed;
  top: 16px;
  left: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: rgba(251, 234, 210, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 16px;
  border-radius: 6px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.blog-topbar:hover { transform: translateX(-2px); background: var(--off-white); }
.blog-topbar img { width: 24px; height: 24px; }

/* --- Index page --- */
.blog-index-hero {
  padding: 180px 24px 80px;
  max-width: 1120px;
  margin: 0 auto;
}
.blog-index-kicker {
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 16px;
}
.blog-index-title {
  font-size: clamp(56px, 9vw, 110px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 24px;
}
.blog-index-dek {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--muted);
  max-width: 640px;
  font-weight: 300;
}

.posts-grid {
  max-width: 1120px;
  margin: 60px auto 120px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
@media (max-width: 800px) {
  .posts-grid { grid-template-columns: 1fr; gap: 32px; }
}

.post-card {
  display: block;
  background: var(--off-white);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  box-shadow: 0 2px 0 rgba(23, 19, 18, 0.08);
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(23, 19, 18, 0.12);
}
.post-card-cover {
  aspect-ratio: 16 / 9;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}
.post-card-cover video,
.post-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card-body { padding: 28px 32px 32px; }
.post-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--red);
  margin-bottom: 12px;
}
.post-card-meta span:nth-child(2) { color: var(--muted); }
.post-card-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--ink);
}
.post-card-dek {
  font-size: 15px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.55;
}

/* --- Post page --- */
.post-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.post-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 19, 18, 0.2) 0%, rgba(23, 19, 18, 0.85) 100%);
  z-index: 1;
}
.post-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px 80px;
  width: 100%;
  color: var(--off-white);
}
.post-hero-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 24px;
}
.post-hero-meta span:nth-child(2),
.post-hero-meta span:nth-child(3) { color: var(--off-white); opacity: 0.7; }
.post-hero-title {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 14ch;
}
.post-hero-dek {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 300;
  max-width: 640px;
  opacity: 0.85;
}

.post-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 24px 160px;
}
.post-article p {
  font-size: 19px;
  line-height: 1.7;
  margin-bottom: 28px;
  color: var(--ink);
  font-weight: 400;
}
.post-article p.lead {
  font-size: 24px;
  line-height: 1.5;
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 48px;
}
.post-article h2 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 64px 0 24px;
  color: var(--ink);
}
.post-article h3 {
  font-size: 24px;
  font-weight: 800;
  margin: 40px 0 16px;
}
.post-article a {
  color: var(--ink);
  border-bottom: 2px solid var(--red);
  font-weight: 600;
}
.post-article a:hover { background: var(--red); color: var(--off-white); border-bottom-color: var(--ink); }
.post-article ul, .post-article ol {
  margin: 0 0 28px 24px;
  font-size: 19px;
  line-height: 1.7;
}
.post-article li { margin-bottom: 8px; }
.post-article blockquote {
  border-left: 4px solid var(--red);
  padding: 8px 0 8px 28px;
  margin: 40px 0;
  font-size: 24px;
  font-weight: 300;
  font-style: italic;
  color: var(--muted);
}
.post-article hr {
  border: none;
  height: 1px;
  background: rgba(23, 19, 18, 0.15);
  margin: 64px 0;
}
.post-article img {
  border-radius: 16px;
  margin: 32px 0;
}

/* --- Inline voice sample buttons (used in posts) --- */
.voice-samples {
  margin: 48px 0;
}
.voice-samples-intro {
  font-size: 16px !important;
  color: var(--muted) !important;
  font-style: italic;
  margin-bottom: 24px !important;
}
.voice-samples-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.voice-samples-row-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) {
  .voice-samples-row,
  .voice-samples-row-3 { grid-template-columns: 1fr; }
}
.voice-sample {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: var(--off-white);
  border: 2px solid var(--ink);
  border-radius: 12px;
  text-align: left;
  font-family: inherit;
  color: var(--ink);
  cursor: url('/cursor-pointer.svg') 10 2, pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  width: 100%;
}
.voice-sample:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
  background: var(--eggshell);
}
.voice-sample:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--ink);
}
.voice-sample-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red);
  color: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.voice-sample-icon svg { width: 14px; height: 14px; }
.voice-sample .icon-pause { display: none; }
.voice-sample.is-playing .icon-play { display: none; }
.voice-sample.is-playing .icon-pause { display: block; }
.voice-sample.is-playing { background: var(--eggshell); }
.voice-sample-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.voice-sample-label {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.voice-sample-meta {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

/* --- Narration player (floating, bottom right) --- */
.narration-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--off-white);
  padding: 12px 18px 12px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(23, 19, 18, 0.3);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: transform 0.2s ease, background 0.2s ease;
}
.narration-player:hover { transform: translateY(-2px); background: var(--red); }
.narration-player[hidden] { display: none; }
.narration-player .play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--off-white);
  cursor: url('/cursor-pointer.svg') 10 2, pointer;
  transition: background 0.2s ease;
}
.narration-player:hover .play-btn { background: var(--ink); }
.narration-player .play-btn svg { width: 14px; height: 14px; }
.narration-player .play-btn .icon-pause { display: none; }
.narration-player.is-playing .play-btn .icon-play { display: none; }
.narration-player.is-playing .play-btn .icon-pause { display: block; }

/* --- Footer --- */
.blog-footer {
  background: var(--off-white);
  padding: 80px 24px;
  text-align: center;
  border-top: 1px solid rgba(23, 19, 18, 0.08);
}
.blog-footer-cta {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 24px;
}
.blog-footer-link {
  display: inline-block;
  padding: 20px 36px;
  background: var(--red);
  color: var(--off-white);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  border-radius: 6px;
  box-shadow: 0 6px 0 rgba(23, 19, 18, 0.85);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-footer-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(23, 19, 18, 0.85);
}
.blog-footer-link:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(23, 19, 18, 0.85);
}
.blog-footer-meta {
  margin-top: 60px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
