/*
  Atlas Guidebooks static website
  - No framework required
  - Minimal JavaScript only controls the mobile menu
  - Brand colors follow the supplied Atlas Guidebooks palette
  - Edit the CSS custom properties below to adjust the whole site
*/
:root {
  --atlas-blue: #043451;
  --lionet-gold: #CAA869;
  --dark-bark: #634C3C;
  --black-cherry: #6B181C; /* Added hover/accent color for text on white */
  --ink: #221E21;
  --paper: #ffffff;
  --soft-paper: #f8f5ee;
  --max-width: 1120px;
  --header-height: 78px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Sabon, Georgia, 'Times New Roman', serif;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--atlas-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover, a:focus-visible { color: var(--black-cherry); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--lionet-gold); outline-offset: 4px; }

/* Header and brand */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  padding: .75rem clamp(1rem, 4vw, 3rem);
  background: var(--atlas-blue);
  border-bottom: 4px solid var(--lionet-gold);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  text-decoration: none;
}
.brand__mark { width: 62px; min-width: 62px; }
.brand__wordmark { width: 154px; }

/* Primary navigation with second-level menus */
.main-nav { display: flex; align-items: center; }
.nav-list, .submenu { list-style: none; margin: 0; padding: 0; }
.nav-list { display: flex; gap: .15rem; align-items: center; }
.nav-item { position: relative; }
.nav-item > a {
  display: block;
  padding: .65rem .72rem;
  color: #fff;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav-item > a:hover, .nav-item > a:focus-visible { color: var(--lionet-gold); }
.has-submenu > a::after { content: ' ▾'; font-size: .7rem; }
.submenu {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 220px;
  padding: .45rem 0;
  background: var(--paper);
  border-top: 3px solid var(--lionet-gold);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(.35rem);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.nav-item:hover .submenu, .nav-item:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu a {
  display: block;
  padding: .55rem .9rem;
  color: var(--atlas-blue);
  font-size: .82rem;
  line-height: 1.25;
  text-decoration: none;
}
.submenu a:hover, .submenu a:focus-visible { color: var(--black-cherry); background: var(--soft-paper); }
.menu-toggle { display: none; }

/* Main page layout */
.content-grid {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.content-grid--wide { grid-template-columns: 1fr; }
.page-copy { font-size: clamp(1rem, 1.6vw, 1.08rem); }
h1, h2, .eyebrow { font-family: 'Century Schoolbook', Georgia, 'Times New Roman', serif; }
h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: .03em;
  text-transform: uppercase;
}
h2 { margin: 2rem 0 .75rem; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; }
p { margin: 0 0 1rem; }
.dek { font-size: 1.12rem; color: var(--dark-bark); }
.note { font-size: .92rem; color: var(--dark-bark); }

/* Book feature card */
.book-card { border-left: 1px solid rgba(99,76,60,.25); padding-left: 1.5rem; }
.book-card h2 { margin-top: 0; }
.book-card__inner { display: grid; grid-template-columns: 112px 1fr; gap: 1rem; align-items: start; }
.book-card img { background: var(--lionet-gold); box-shadow: 0 10px 25px rgba(0,0,0,.12); }
.book-card p { font-size: .85rem; line-height: 1.35; }
.eyebrow { margin-bottom: .3rem; color: var(--dark-bark); font-weight: bold; }
.button-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: .75rem; }
.button { display: inline-block; padding: .48rem .85rem; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-size: .78rem; }
.button:hover, .button:focus-visible { color: #fff; background: var(--black-cherry); }
.text-link { font-size: .78rem; }

/* Supporting media */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.gallery img, .hero-image, .portrait { box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.hero-image { margin: 0 0 1.5rem; }
.portrait { width: min(360px, 100%); margin: 0 0 1.5rem; }
.link-list { padding-left: 1.2rem; }
.link-list li { margin: .45rem 0; }
/* Desktop-only lightbox for example images.
   The HTML still works without JavaScript because each thumbnail links directly to the image file. */
.gallery a { display: block; }
.gallery a img { width: 100%; height: 100%; object-fit: cover; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(4, 52, 81, .88);
}
.lightbox.is-open { display: flex; }
.lightbox__figure { margin: 0; max-width: min(1100px, 94vw); max-height: 90vh; }
.lightbox__image { max-height: 82vh; width: auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.lightbox__caption { margin-top: .65rem; color: #fff; text-align: center; font-size: .95rem; }
.lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover, .lightbox__close:focus-visible { background: var(--black-cherry); }

@media (max-width: 900px) {
  .lightbox { display: none !important; }
}

.site-footer {
  border-top: 1px solid rgba(99,76,60,.25);
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--dark-bark);
}
.site-footer p { margin: 0; }

@media (max-width: 900px) {
  .site-header { align-items: center; flex-wrap: wrap; }
  .brand__mark { width: 52px; min-width: 52px; }
  .brand__wordmark { width: 138px; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
  }
  .menu-toggle span, .menu-toggle::before, .menu-toggle::after {
    content: '';
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
  }
  .menu-toggle span { font-size: 0; }
  .menu-toggle::before { transform: translateY(-8px); }
  .menu-toggle::after { transform: translateY(8px); }
  .main-nav { display: none; width: 100%; padding: .85rem 0 .2rem; }
  .main-nav.is-open { display: block; }
  .nav-list { display: block; }
  .nav-item > a { padding: .65rem 0; }
  .submenu {
    position: static;
    min-width: 0;
    padding: 0 0 .35rem .85rem;
    background: transparent;
    border-top: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .submenu a { color: #fff; padding: .32rem 0; font-size: .78rem; }
  .submenu a:hover, .submenu a:focus-visible { color: var(--lionet-gold); background: transparent; }
  .content-grid { grid-template-columns: 1fr; }
  .book-card { border-left: 0; border-top: 1px solid rgba(99,76,60,.25); padding: 1.5rem 0 0; }
}

@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .book-card__inner { grid-template-columns: 92px 1fr; }
}
