/* =========================================================
   layout.css — site header & footer (shared by every page)
   ========================================================= */

/* ---------- Header ---------- */
.site-header {
  height: var(--header-h); padding: 0 52px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; position: relative;
  background: var(--chrome); color: #fff; box-shadow: 0 8px 24px rgba(30, 4, 6, .35);
}
.wordmark {
  font-family: 'Playfair Display', serif; font-size: 27px; font-weight: 500; letter-spacing: 1px;
  line-height: 1; color: #fff; text-transform: uppercase; flex: none;
}
.wordmark span {
  display: block; font-family: 'Lato', sans-serif; font-size: 9px; letter-spacing: 3.4px;
  font-weight: 700; margin-top: 7px; color: var(--signal-soft);
}
.desktop-nav { display: flex; gap: 30px; }
.desktop-nav a {
  font-size: 14px; position: relative; padding-block: 12px; letter-spacing: 1.4px;
  text-transform: uppercase; font-weight: 700; color: #f3dedc; transition: color .2s;
}
.desktop-nav a:hover { color: var(--hover-text-dark); }
.desktop-nav a.active { color: #fff; }
.desktop-nav a.active::after {
  content: ''; position: absolute; bottom: 4px; left: 0; right: 0; height: 2px; background: var(--signal-bright);
}
.header-tools { display: flex; align-items: center; gap: 8px; flex: none; }

.amazon-button {
  display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 9px 18px;
  background: var(--signal-bright); color: #fff; border-radius: 4px; font-size: 13px; font-weight: 700;
  letter-spacing: .5px; box-shadow: 0 8px 20px rgba(140, 16, 20, .4); transition: background .2s, transform .2s;
  white-space: nowrap;
}
.amazon-button:hover { background: #e0353a; transform: translateY(-1px); }

.menu-toggle { display: none; border: 0; background: none; padding: 10px; color: #fff; line-height: 0; }
.mobile-nav {
  position: absolute; top: 100%; left: 0; right: 0; background: var(--chrome);
  padding: 12px 25px 24px; box-shadow: 0 16px 30px rgba(0, 0, 0, .3);
}
.mobile-nav a:not(.button) {
  display: flex; justify-content: space-between; align-items: center; padding: 13px 0;
  border-bottom: 1px solid #ffffff1f; color: #fff; letter-spacing: 1px; text-transform: uppercase;
  font-size: 13px; font-weight: 700;
}
.skip-link { position: absolute; top: -100px; left: 8px; background: var(--paper); color: var(--ink); padding: 10px; z-index: 30; }
.skip-link:focus { top: 8px; }
.mobile-nav a:not(.button):hover { color: var(--hover-text-dark); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-deep); color: #e6d2d0; padding: 0 0 28px;
  border-top: 1px solid #ffffff14;
}
.footer-inner { max-width: 1240px; margin-inline: auto; padding-inline: 52px; }

/* Link columns */
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 56px; padding: 64px 0 52px;
}
.footer-brand p { font-size: 14px; line-height: 1.75; color: #c9aeac; margin-top: 20px; max-width: 320px; }
.footer-brand em { font-style: italic; color: #f1e2e0; }
.footer-col h3 {
  font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: #fff; margin-bottom: 18px; font-weight: 700;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-col a { font-size: 14px; color: #c9aeac; transition: color .2s, padding .2s; }
.footer-col a:hover { color: var(--hover-text-dark); }

.footer-bottom {
  border-top: 1px solid #ffffff17; padding-top: 24px; display: flex; justify-content: space-between;
  align-items: center; gap: 22px; font-size: 12px; color: #a98c8a;
}
.back-to-top { display: inline-flex; align-items: center; gap: 7px; color: #e6d2d0; font-weight: 700; }
.back-to-top:hover { color: var(--hover-text-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .site-header { padding-inline: 35px; }
  .desktop-nav { gap: 20px; }
  .desktop-nav a { font-size: 13px; letter-spacing: 1px; }
}
@media (max-width: 1024px) {
  .footer-inner { padding-inline: 35px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  /* Tablets & phones: no button in the navbar (the menu takes its place) */
  .header-tools .amazon-button { display: none; }
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
}
@media (min-width: 961px) {
  .mobile-nav { display: none !important; }
}
@media (max-width: 767px) {
  :root { --header-h: 82px; }
  .site-header { padding-inline: 24px; }
  .wordmark { font-size: 22px; }
  .wordmark span { font-size: 8px; letter-spacing: 1.5px; }
  .footer-inner { padding-inline: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; padding: 48px 0 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 480px) {
  .wordmark { font-size: 20px; }
}

/* ---------- Password prompt (pop-up + lock screen) — see js/protect.js ---------- */
.lock-dialog {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 14px;
  box-shadow: 0 30px 80px rgba(20, 3, 4, .45); color: var(--ink);
}
.lock-dialog::backdrop { background: rgba(28, 6, 7, .72); backdrop-filter: blur(3px); }
.lock-close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--quiet);
}
.lock-close:hover { background: var(--soft); color: var(--ink); }
.lock-form { padding: 36px 34px 32px; text-align: center; }
.lock-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--soft); color: var(--signal); margin-bottom: 14px;
}
.lock-form h2 { font-size: 24px; letter-spacing: -.02em; }
.lock-lead { color: var(--quiet); font-size: 15px; margin-top: 8px; }
.lock-label { display: block; text-align: left; font-size: 13px; font-weight: 700; margin: 22px 0 6px; }
.lock-field { position: relative; }
.lock-field input { font-size: 16px; padding-right: 48px; border-color: #dccbca; border-radius: 6px; }
.lock-field input:focus { outline: 2px solid var(--signal); outline-offset: 1px; border-color: transparent; }
.lock-reveal {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  display: grid; place-items: center; border: 0; background: none; color: var(--quiet);
}
.lock-reveal:hover { color: var(--ink); }
.lock-error { min-height: 1.5em; margin-top: 8px; font-size: 14px; color: var(--signal); text-align: left; }
.lock-actions .button { width: 100%; margin-top: 6px; }
.lock-form.is-busy .button { opacity: .7; cursor: progress; }

/* Protected pages start hidden until protect.js unlocks them */
body.is-locked main > :not(.lock-screen) { display: none !important; }
.lock-screen { display: grid; place-items: center; min-height: calc(100dvh - var(--header-h) - 120px); padding-block: 60px; }
.lock-card { width: min(460px, 100%); background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--lift); }
