/* Behrad Journal 2.0 — aligned with the precision editorial language of This Is Behrad. */

:root {
  --grid-line: rgba(242, 233, 221, .042);
  --grid-size: clamp(48px, 5.35vw, 82px);
  --frame-line: rgba(242, 233, 221, .2);
}

body {
  background-color: var(--ink);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    radial-gradient(circle at 84% 5%, rgba(242, 233, 221, .045), transparent 32rem);
  background-size: var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size), auto;
  background-attachment: fixed;
}

.site-header {
  padding: 0 var(--gutter);
}

.site-header__inner {
  min-height: 84px;
  padding-inline: 22px;
  border: 1px solid var(--line);
  border-top: 0;
}

.wordmark { padding: 0; line-height: 1; }
.primary-nav a { padding: 30px 0 27px; font-size: .78rem; }

.language-switch {
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
}

.language-switch a {
  min-width: 42px;
  padding: 10px 9px;
  border: 0;
  border-inline-end: 1px solid var(--line);
  font-size: .64rem;
}

.language-switch a:last-child { border-inline-end: 0; }
.language-switch a[aria-current="page"] {
  color: var(--ink);
  border-color: transparent;
  background: var(--parchment);
}

.journal-hero {
  min-height: 72svh;
  padding-top: clamp(126px, 15vh, 172px);
  padding-bottom: clamp(76px, 10vh, 118px);
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .62fr);
  gap: clamp(48px, 8vw, 130px);
  border-inline: 1px solid var(--line);
}

.journal-hero h1 {
  max-width: 970px;
  font-size: clamp(4.1rem, 9vw, 9.2rem);
  font-weight: 720;
  letter-spacing: -.075em;
}

.journal-hero > p {
  color: rgba(242, 233, 221, .64);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
}

.eyebrow { color: rgba(242, 233, 221, .5); }
.eyebrow::before { background: var(--wine-bright); }

.journal-index {
  background-color: var(--ink-deep);
  background-image:
    linear-gradient(rgba(242, 233, 221, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 233, 221, .032) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
}

.section-heading { margin-bottom: clamp(40px, 6vw, 72px); }
.section-heading > span { color: rgba(242, 233, 221, .4); }
.section-heading h2 { font-weight: 650; }

.story-row {
  min-height: 0;
  padding: clamp(36px, 4.6vw, 66px) 0;
  grid-template-columns: 64px minmax(0, 1fr) minmax(390px, .72fr);
  gap: clamp(28px, 5vw, 76px);
}

.story-row:not(:has(.story-row__image)) {
  grid-template-columns: 64px minmax(0, 1fr);
}

.story-row__body h2 {
  font-size: clamp(1.8rem, 3.5vw, 3.9rem);
  font-weight: 620;
  line-height: 1.25;
}

.story-row__image {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--frame-line);
}

.story-row__image img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.text-link span { color: var(--wine-bright); }

.empty-state {
  min-height: 330px;
  padding: 54px 0;
}

.empty-state__mark { color: var(--wine-bright); }

.single-note__header {
  width: min(1180px, 100%);
  padding-top: clamp(92px, 13vw, 160px);
  border-inline: 1px solid var(--line);
}

.single-note__header h1 {
  font-size: clamp(3rem, 6.8vw, 7.2rem);
  font-weight: 680;
  letter-spacing: -.065em;
}

.single-note__cover {
  width: min(1320px, calc(100% - 2 * var(--gutter)));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--frame-line);
  background: var(--ink-deep);
}

.single-note__cover img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.single-note__content {
  color: rgba(242, 233, 221, .8);
  font-size: clamp(1.05rem, 1.42vw, 1.2rem);
}

.single-note__content figure {
  margin-inline: min(-10vw, -110px);
}

.single-note__content figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--frame-line);
}

.site-footer {
  width: min(var(--content), calc(100% - 2 * var(--gutter)));
  padding: 34px 22px 40px;
  border: 1px solid var(--line);
  border-bottom: 0;
}

@media (max-width: 980px) {
  .site-header { padding-top: 0; }
  .site-header__inner { min-height: 70px; }
  .wordmark { padding: 0; }

  .menu-button {
    margin-bottom: 0;
    border-radius: 0;
  }

  .site-navigation {
    top: 69px;
    padding: 14px;
    border: 1px solid var(--line);
    background: rgba(22, 15, 30, .98);
  }

  .primary-nav a { padding: 12px 4px; }
  .language-switch { padding: 0; }

  .journal-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 130px;
    gap: 34px;
  }

  .journal-hero .eyebrow { grid-column: auto; }

  .story-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .story-row:not(:has(.story-row__image)) {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .story-row__image {
    grid-column: 2;
    width: min(680px, 100%);
  }
}

@media (max-width: 620px) {
  :root {
    --grid-size: 54px;
    --gutter: 20px;
  }

  .site-header { padding-inline: var(--gutter); }
  .site-header__inner { min-height: 64px; padding-inline: 13px; }
  .site-navigation { top: 63px; }

  .journal-hero {
    padding-top: 104px;
    padding-bottom: 76px;
  }

  .journal-hero h1 {
    font-size: clamp(3.65rem, 18vw, 6rem);
    line-height: 1;
  }

  .journal-index { padding-top: 82px; }

  .story-row,
  .story-row:not(:has(.story-row__image)) {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 32px 0 44px;
  }

  .story-row__number,
  .story-row__image { grid-column: 1; }

  .story-row__image {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .single-note__header {
    padding-top: 88px;
    border-inline: 0;
  }

  .single-note__cover {
    width: calc(100% - 2 * var(--gutter));
    aspect-ratio: 4 / 3;
  }

  .single-note__content figure { margin-inline: 0; }
  .site-footer { padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  body { background-attachment: scroll; }
}
