/* Leave Salt Now — single stylesheet, mobile-first */

:root {
  --bg: #111111;
  --accent: #e63946;
  --text: #e0e0e0;
  --headline: #ffffff;
  --card: #1a1a1a;
  --muted: #888888;
  --font-head: Impact, "Arial Black", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.site-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(2rem, 8vw, 3.25rem);
  font-weight: normal;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--headline);
}

.site-title .accent {
  color: var(--accent);
}

.tagline {
  margin: 1rem 0 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.disclaimer {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Compact header used on post/inner pages */
.site-header--compact {
  padding: 1rem 1.25rem 0.75rem;
  text-align: left;
  max-width: 72rem;
  margin: 0 auto;
}

.site-brand {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.site-brand__link {
  color: var(--headline);
  text-decoration: none;
}

.site-brand__link:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-brand__link .accent {
  color: var(--accent);
}

/* Site navigation bar */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0 1.25rem;
  max-width: 72rem;
  margin: 0 auto;
  border-bottom: 1px solid #2a2a2a;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-nav a {
  display: inline-block;
  padding: 0.6rem 0.75rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
  margin-bottom: -1px;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.noscript-msg {
  margin: 0;
  padding: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.noscript-msg code {
  font-size: 0.8em;
  color: var(--text);
}

.noscript-fallback {
  max-width: 40rem;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
}

.noscript-nav-label {
  margin: 1rem 0 0.5rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.noscript-post-list {
  margin: 0;
  padding: 0 0 0 1.25rem;
  list-style-type: disc;
  color: var(--muted);
}

.noscript-post-list li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.noscript-post-list a {
  color: var(--text);
  text-decoration: none;
}

.noscript-post-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.noscript-main {
  padding-top: 2rem;
}

.post-fallback-msg {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--muted);
}

.label-caps {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* Post grid */
.post-grid-section {
  padding: 0 1.25rem 3rem;
  max-width: 72rem;
  margin: 0 auto;
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 4px;
  border-left: 3px solid var(--accent);
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.post-card--featured {
  border-left-width: 4px;
  box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.3);
}

@media (min-width: 640px) {
  .post-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .post-card--featured .post-card__link {
    flex-direction: row;
  }

  .post-card--featured .post-card__thumb {
    width: 50%;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
  }

  .post-card--featured .post-card__title {
    font-size: 1.6rem;
  }

  .post-card--featured .post-card__subtitle {
    font-size: 0.95rem;
  }

  .post-card--featured .post-card__body {
    padding: 1.5rem;
    justify-content: center;
  }
}

.post-card:hover {
  box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.45);
}

.post-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.post-card__link:hover {
  text-decoration: none;
}

.post-card__thumb {
  position: relative;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  background-color: #1a1a1a;
  overflow: hidden;
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  font-size: 0.65rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.35;
  font-family: var(--font-body);
}

.post-card__body {
  padding: 1rem 1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--headline);
  font-weight: normal;
  line-height:1.2;
}

.post-card__subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Site footer */
.site-footer {
  margin-top: auto;
  padding: 1.5rem 1.25rem 2rem;
  border-top: 1px solid var(--accent);
}

.site-footer__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

/* Post page */
.post-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.post-main {
  flex: 1;
  padding: 1rem 1.25rem 3rem;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-family: var(--font-body);
}

.back-link:hover {
  color: var(--accent);
}

.post-header {
  margin-bottom: 1.5rem;
}

.post-header__title {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: normal;
  line-height: 1.15;
  color: var(--headline);
}

.post-header__title .accent {
  color: var(--accent);
}

.title-rule {
  border: none;
  height: 3px;
  background: var(--accent);
  margin: 1rem 0 0;
}

/* Markdown caption (post page) */
.post-caption {
  max-width: 680px;
  width: 100%;
  margin: 40px auto 0;
  padding: 32px;
  background: #1a1a1a;
  border-left: 3px solid #e63946;
  border-radius: 4px;
  color: #e0e0e0;
  font-family: var(--font-body);
  line-height: 1.7;
}

.post-caption > *:first-child {
  margin-top: 0;
}

.post-caption > *:last-child {
  margin-bottom: 0;
}

.post-caption p {
  margin: 0 0 1em;
  line-height: 1.7;
}

.post-caption h2,
.post-caption h3 {
  font-family: var(--font-head);
  color: #ffffff;
  font-weight: normal;
  line-height: 1.2;
  margin: 1.25em 0 0.5em;
}

.post-caption h2:first-child,
.post-caption h3:first-child {
  margin-top: 0;
}

.post-caption a {
  color: #e63946;
}

.post-caption a:hover {
  text-decoration: underline;
}

.post-caption ul,
.post-caption ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.post-caption li {
  margin-bottom: 0.35em;
}

.post-caption ul li::marker,
.post-caption ol li::marker {
  color: #e63946;
}

.post-caption blockquote {
  margin: 0 0 1em;
  padding-left: 1rem;
  border-left: 3px solid var(--muted);
  color: var(--text);
}

.post-caption code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  background: #111;
  border-radius: 3px;
}

.post-caption pre {
  overflow-x: auto;
  padding: 1rem;
  background: #111;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.post-caption pre code {
  padding: 0;
  background: none;
}

.post-caption hr {
  border: none;
  border-top: 1px solid #333;
  margin: 1.5em 0;
}

.sources-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
}

.sources-list li {
  margin-bottom: 1em;
  padding-left: 0;
}

.sources-list a {
  color: var(--accent);
  font-weight: 600;
  display: block;
  line-height: 1.4;
}

.sources-cited {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2em;
  line-height: 1.4;
}

.post-caption strong {
  font-weight: 700;
  color: var(--headline);
}

/* Inline slides (interleaved with article text) */
.inline-slide {
  margin: 2rem 0;
  padding: 0;
  border: none;
  background: transparent;
}

.inline-slide img {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
  border-left: 3px solid var(--accent);
  box-sizing: border-box;
}

.post-article {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  color: #e0e0e0;
  font-family: var(--font-body);
  line-height: 1.7;
}

.post-article > *:first-child {
  margin-top: 0;
}

.post-article p {
  margin: 0 0 1em;
  line-height: 1.7;
}

.post-article h2,
.post-article h3 {
  font-family: var(--font-head);
  color: #ffffff;
  font-weight: normal;
  line-height: 1.2;
  margin: 1.25em 0 0.5em;
}

.post-article h2:first-child,
.post-article h3:first-child {
  margin-top: 0;
}

.post-article a {
  color: #e63946;
}

.post-article a:hover {
  text-decoration: underline;
}

.post-article ul,
.post-article ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.post-article li {
  margin-bottom: 0.35em;
}

.post-article ul li::marker,
.post-article ol li::marker {
  color: #e63946;
}

.post-article blockquote {
  margin: 0 0 1em;
  padding-left: 1rem;
  border-left: 3px solid var(--muted);
  color: var(--text);
}

.post-article strong {
  font-weight: 700;
  color: var(--headline);
}

.post-article hr {
  border: none;
  border-top: 1px solid #333;
  margin: 1.5em 0;
}

.post-article em {
  font-style: italic;
}

/* Slides section label */
.slides-label {
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid #2a2a2a;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* Slides: no-JS = stacked; JS enhances */
.slides-root {
  margin-top: 0;
}

.carousel-prev,
.carousel-next,
.carousel-dots,
.view-all-toggle {
  display: none;
}

html.js .carousel-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 1rem;
}

html.js .carousel-prev,
html.js .carousel-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html.js .carousel-dots {
  display: flex;
}

html.js .view-all-toggle {
  display: inline-block;
}

html.js .slides-root.is-expanded .carousel-prev,
html.js .slides-root.is-expanded .carousel-next,
html.js .slides-root.is-expanded .carousel-dots {
  display: none !important;
}

.slide-viewport {
  position: relative;
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  outline: none;
}

/* No JS: viewport is full-width block, not flex child */
html:not(.js) .slide-viewport {
  max-width: 600px;
}

.carousel-prev,
.carousel-next {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--accent);
  background: var(--card);
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  font-family: var(--font-body);
}

.carousel-prev:hover,
.carousel-next:hover {
  background: var(--accent);
  color: var(--headline);
}

.carousel-prev:focus-visible,
.carousel-next:focus-visible,
.carousel-dot:focus-visible,
.view-all-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.slides-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.slide {
  margin: 0 0 1.25rem;
  padding: 0;
  border: none;
  background: transparent;
}

.slide img {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
  border-left: 3px solid var(--accent);
  box-sizing: border-box;
}

.slide:last-child {
  margin-bottom: 0;
}

.slide-placeholder {
  aspect-ratio: 1 / 1;
  max-width: 600px;
  margin: 0 auto;
  background: var(--card);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
  font-family: var(--font-body);
}

/* JS carousel: one slide at a time */
html.js .slides-container.is-carousel .slide:not(.is-active) {
  display: none;
  margin-bottom: 0;
}

html.js .slides-container.is-carousel .slide.is-active {
  display: block;
  margin-bottom: 0;
}

html.js .slides-root.is-expanded .slides-container .slide {
  display: block !important;
  margin-bottom: 1.25rem;
}

html.js .slides-root.is-expanded .slides-container .slide:last-child {
  margin-bottom: 0;
}

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

.carousel-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #444444;
  cursor: pointer;
}

.carousel-dot[aria-current="true"] {
  background: var(--accent);
}

.view-all-toggle {
  margin-top: 1.25rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
}

.view-all-toggle:hover {
  background: rgba(230, 57, 70, 0.12);
}
