/*
Theme Name: JAH Wordpress
Theme URI: https://example.com/jah-wordpress
Author: sre
Description: Custom WordPress theme scaffold for a homepage-focused site.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: jah-wordpress
*/

:root {
  --jah-bg: #000000;
  --jah-surface: #ffffff;
  --jah-ink: #1f1c19;
  --jah-muted: #72685f;
  --jah-border: #ddd2c5;
  --jah-link: #c62020;
  --jah-width: 920px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(160deg, #000000 0%, #1a1a1a 55%, #2d2d2d 100%) fixed;
  color: #f3f3f3;
  line-height: 1.6;
}

a {
  color: var(--jah-link);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

a:hover,
a:focus {
  color: var(--jah-link);
}

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

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  min-height: 100vh;
  padding-top: 24px;
}

.site-header {
  padding: 24px 0 0;
}

.site-header__inner,
.site-footer__inner,
.content-wrap {
  width: min(calc(100% - 32px), var(--jah-width));
  margin: 0 auto;
}

.site-header__inner {
  padding-bottom: 18px;
}

.site-branding {
  display: inline-block;
  text-decoration: none;
}

.site-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
}

.site-tagline {
  margin: 8px 0 0;
  color: var(--jah-muted);
  font-size: 1rem;
}

.site-banner {
  width: 100%;
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
}

.site-banner__image,
.site-banner__placeholder {
  width: 110px;
  height: 140px;
  background: transparent;
}

.site-banner__image {
  object-fit: cover;
}

.site-banner__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--jah-muted);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.content-wrap {
  padding-bottom: 72px;
}

.layout-with-sidebar {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.sidebar-column {
  position: static;
}

.pages-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--jah-border);
  background: #ffffff;
  color: var(--jah-ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.pages-toggle__icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.pages-toggle__icon span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--jah-ink);
}

.pages-box {
  padding: 18px;
  border: 1px solid var(--jah-border);
  background: #ffffff;
}

.pages-box + .pages-box {
  margin-top: 12px;
}

.pages-box__title {
  margin: 0 0 14px;
  font-size: 1rem;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pages-box__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pages-box__list li + li {
  margin-top: 10px;
}

.menu-modal__panel .pages-box__list li + li {
  margin-top: 22px;
}

/* Desktop: inline horizontal nav bar */
.sidebar-column .pages-box {
  padding: 14px 0;
  border: none;
  background: transparent;
}

.sidebar-column .pages-box + .pages-box {
  margin-top: 0;
}

.sidebar-column .pages-box__title {
  display: none;
}

.sidebar-column .pages-box__list {
  display: flex;
  flex-direction: row;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.sidebar-column .pages-box__list a {
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
}

.sidebar-column .pages-box__list li + li {
  margin-top: 0;
}

/* Keep modal list vertical */
.menu-modal__panel .pages-box__list {
  flex-direction: column;
}

.menu-modal__panel .pages-box__list a {
  color: var(--jah-link);
}

.pages-box__list a {
  color: var(--jah-link);
}

.pages-box__list a:hover,
.pages-box__list a:focus {
  color: var(--jah-link);
}

.pages-box__empty {
  margin: 0;
  color: var(--jah-muted);
}

.menu-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.menu-modal.is-open {
  display: flex;
}

.menu-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.menu-modal__panel {
  position: relative;
  width: min(calc(100% - 64px), 340px);
  padding: 36px 28px;
  overflow: visible;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: #ffffff;
  color: var(--jah-ink);
  text-align: center;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    4px 6px 0px 0px rgba(198, 32, 32, 0.85);
  transform: translateY(-12px);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.menu-modal.is-open .menu-modal__panel {
  transform: translateY(0);
  opacity: 1;
}

.menu-modal__close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  background: #ffffff;
  color: var(--jah-ink);
  line-height: 1;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.35),
    3px 4px 0px 0px rgba(198, 32, 32, 0.85);
}

body.menu-modal-open {
  overflow: hidden;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.post-entry {
  padding: 28px 28px 24px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--jah-ink);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    4px 6px 0px 0px rgba(198, 32, 32, 0.85);
  transform: translateY(0);
}

.post-entry:last-child {
  border-bottom: none;
}

.post-entry__title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.1;
  color: var(--jah-ink);
}

.post-entry__title a {
  text-decoration: none;
}

.post-entry__meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
  color: var(--jah-muted);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.post-entry__meta a {
  color: var(--jah-link);
}

.post-entry__content > :first-child {
  margin-top: 0;
}

.post-entry__content > :last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--jah-border);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 36px;
  color: var(--jah-muted);
}

@media (max-width: 980px) {
  .layout-with-sidebar {
    gap: 24px;
  }

  .sidebar-column {
    display: flex;
    flex-direction: column;
  }

  .pages-toggle {
    display: inline-flex;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 120;
    width: 48px;
    height: 48px;
    margin-bottom: 0;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    gap: 0;
    font-size: 0;
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.25),
      0 8px 24px rgba(0, 0, 0, 0.35),
      3px 4px 0px 0px rgba(198, 32, 32, 0.85);
  }

  .pages-toggle__icon {
    gap: 3px;
  }

  .pages-toggle__icon span {
    width: 16px;
  }

  .menu-modal {
    order: 2;
  }

  .pages-box {
    display: none;
  }

  .site-banner {
    order: 1;
    margin-top: 0;
  }

  .menu-modal__panel .pages-box__title {
    padding-right: 40px;
  }

  .site-footer__inner {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .site-header__inner,
  .content-wrap,
  .site-banner,
  .site-footer__inner {
    width: min(calc(100% - 24px), var(--jah-width));
  }

  .site-title {
    font-size: 1.8rem;
  }

  .post-entry__title {
    font-size: 1.5rem;
  }
}