/* ─── Variables (match mobile site) ─────────────────────────────────────────── */
:root {
  --color-primary:        #000000;
  --color-secondary:      #0071c2;
  --color-accent:         #febb02;
  --color-bg:             #FFFFFF;
  --color-text-primary:   #000000;
  --color-text-secondary: #3E2C23;
  --font-heading: 'DM Serif Text', Georgia, serif;
  --font-body:    'Newsreader', Georgia, serif;
  --header-height: 62px;
  --padding-inline: 1.25rem;
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 var(--padding-inline);
  background: var(--color-bg);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.site-header__name {
  font-family: var(--font-body);
  font-size: 1.44rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-primary);
  padding-top: 4px;
}

/* ─── Nav toggle ─────────────────────────────────────────────────────────────── */
.nav-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text-primary);
  padding: 0;
}

.nav-toggle-icon {
  width: 15px;
  height: 15px;
}

.nav-toggle-label {
  display: none;
}

/* ─── Nav overlay & drawer ───────────────────────────────────────────────────── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 240;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 280px;
  background: var(--color-bg);
  z-index: 250;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: var(--padding-inline);
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer__heading {
  font-family: var(--font-body);
  font-size: 1.44rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2rem;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav-list a {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--color-text-primary);
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--color-secondary);
}

/* ─── Main content ───────────────────────────────────────────────────────────── */
.main-content {
  padding: 16px var(--padding-inline) 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ─── Image grid (4 × 3) ─────────────────────────────────────────────────────── */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.grid-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.grid-number {
  position: absolute;
  top: 8px;
  left: 8px;
  color: #463C2F;
  font-family: var(--font-body);
  font-size: 0.6125rem;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}

.grid-item:hover .grid-thumb {
  opacity: 0.85;
  transform: scale(1.02);
}

.grid-thumb {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ─── Final row (currently node) ─────────────────────────────────────────────── */
.final-row {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 1rem;
  /* align to the left column of the grid above */
  width: calc(25% - 12px);
}

.final-row__img {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  display: block;
  cursor: default;
  border-radius: 2px;
}

.final-row__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--color-text-primary);
  margin-top: 0.5rem;
}

.final-row__text {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
}

.final-row__text a {
  color: var(--color-secondary);
  text-decoration: none;
}

.final-row__cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--color-primary);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 2px solid var(--color-primary);
  transition: background 0.2s, color 0.2s;
}

.final-row__cta:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

/* ─── Modal overlay ──────────────────────────────────────────────────────────── */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-panel {
  position: relative;
  display: flex;
  width: calc(90vh * 9 / 16 + 400px);
  max-width: 90vw;
  max-height: 90vh;
  background: #fff;
  overflow: hidden;
  border-radius: 4px;
}

/* ─── Modal image column ─────────────────────────────────────────────────────── */
.modal-image-col {
  flex: 0 0 calc(90vh * 9 / 16);
  width: calc(90vh * 9 / 16);
  max-height: 90vh;
  display: flex;
  align-items: center;
  background: #f0ede8;
}

#modal-img {
  width: 100%;
  max-height: 90vh;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
  transition: opacity 280ms ease;
}

/* ─── Modal text column ──────────────────────────────────────────────────────── */
.modal-text-col {
  flex: 0 0 400px;
  overflow-y: auto;
  padding: 30px 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

#modal-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: 1.2;
}

#modal-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

#modal-text a {
  color: var(--color-secondary);
  text-decoration: none;
}

#modal-text a:hover {
  text-decoration: underline;
}

/* ─── Modal content wrap (slide transition) ─────────────────────────────────── */
.modal-content-wrap {
  overflow: hidden;
  transition: transform 280ms ease, opacity 280ms ease;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.slide-exit-left {
  transform: translateX(-110%);
  opacity: 0;
}

.slide-enter-right {
  transform: translateX(110%);
  opacity: 0;
}

/* ─── Modal next button ──────────────────────────────────────────────────────── */
#modal-next {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  padding: 0.5rem 1.25rem;
  background: var(--color-primary);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  z-index: 10;
}

#modal-next:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

#modal-next:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ─── Modal close button ─────────────────────────────────────────────────────── */
#modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.08);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  color: var(--color-text-primary);
  transition: background 0.15s ease;
  z-index: 10;
}

#modal-close:hover {
  background: rgba(0,0,0,0.18);
}
