/* ─── Nav ────────────────────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s, backdrop-filter 0.3s;
}

header.scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 78px;
  gap: 0;
  max-width: 100vw;
  overflow: hidden;
  position: relative;
}

.nav-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: 78px;
  gap: 0;
}

/* Logo badge — text-based brand mark, centered in nav */
.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--pine);
  text-align: center;
}

.logo-badge .brand {
  font-size: 22px;
  font-weight: 600;
  color: var(--pine);
  letter-spacing: 0.04em;
}

.logo-badge .brand small {
  color: var(--ink-faint);
  font-weight: 400;
  letter-spacing: 0.22em;
}

.brand {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
}

.brand small {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 5px;
}

.nav-middle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding: 0 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  font-size: 14.5px;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--henna);
  transition: width 0.28s var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-right {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 22px;
  padding-right: 40px;
}

.nav-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}
.nav-wa:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}
.nav-wa svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  display: block;
  transition: 0.3s;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
}

.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pine);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.nav-user-name {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 500;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--pine);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  padding: 32px 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mm-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mm-top .brand {
  color: var(--paper);
}

.mm-close {
  background: none;
  border: 0;
  color: var(--paper);
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
}

.mm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mm-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(238, 229, 236, 0.5);
}

.mm-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 0.9;
  color: var(--paper);
  margin-top: 2px;
}

.mm-links {
  margin-top: auto;
  margin-bottom: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mm-links a {
  font-family: var(--serif);
  font-size: clamp(2rem, 9vw, 3rem);
  color: var(--paper);
  padding: 8px 0;
  border-bottom: 1px solid var(--pine-line);
}

.mm-links a em {
  font-style: italic;
  color: var(--honey);
}

/* ─── Nav profile dropdown (desktop, full-width panel) ──────────────────── */
.nav-profile {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-profile > .nav-profile-link {
  font-size: 14.5px;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
  white-space: nowrap;
  cursor: pointer;
}

.nav-profile > .nav-profile-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--henna);
  transition: width 0.28s var(--ease);
}

.nav-profile > .nav-profile-link:hover {
  color: var(--ink);
}

.nav-profile > .nav-profile-link:hover::after {
  width: 100%;
}

/* Chevron toggle button */
.nav-profile-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: color 0.2s;
}

.nav-profile-toggle:hover {
  color: var(--ink);
}

.nav-profile-chevron {
  transition: transform 0.25s var(--ease);
}

.nav-profile.is-open .nav-profile-chevron {
  transform: rotate(180deg);
}

/* Full-width slide-down panel */
.nav-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 12px 40px -8px rgba(34, 19, 36, 0.12);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  z-index: 100;
}

.nav-panel.is-open {
  max-height: 400px;
  opacity: 1;
}

.nav-panel-inner {
  display: flex;
  gap: 48px;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 40px;
}

.nav-panel-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-panel-heading {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.nav-panel a {
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  display: block;
  color: var(--ink-soft);
  transition: color 0.15s, background 0.15s;
}

.nav-panel a:hover {
  color: var(--pine);
  background: var(--paper-deep);
}

/* Logged-in nav indicator */
.nav-profile-link.logged-in {
  color: var(--pine);
  font-weight: 500;
}

/* ─── Mobile profile submenu ────────────────────────────────────────────── */
.mm-submenu {
  display: none;
  flex-direction: column;
  padding-left: 24px;
  gap: 2px;
}

.mm-submenu.open {
  display: flex;
}

.mm-submenu a {
  font-family: var(--sans);
  font-size: 16px;
  color: rgba(241, 232, 216, 0.7);
  padding: 6px 0;
  border-bottom: none;
}

.mm-submenu a:hover {
  color: var(--honey);
}

.mm-profile-link.logged-in {
  color: var(--honey);
}

/* ─── Mobile offerings submenu ─────────────────────────────────────────── */
.mm-offerings-link {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mm-offerings-chevron {
  transition: transform 0.25s var(--ease);
  flex-shrink: 0;
}

.mm-offerings-submenu {
  display: none;
  flex-direction: column;
  padding-left: 24px;
  gap: 2px;
}

.mm-offerings-submenu.open {
  display: flex;
}

.mm-offerings-submenu a {
  font-family: var(--sans);
  font-size: 16px;
  color: rgba(241, 232, 216, 0.7);
  padding: 6px 0;
  border-bottom: none;
}

.mm-offerings-submenu a:hover {
  color: var(--honey);
}

/* ─── Figure / Image placeholder ────────────────────────────────────────── */
.figure {
  position: relative;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  overflow: hidden;
}

.figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.figure-label {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper);
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.figure-cap {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 34px;
}

.figure-cap span {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  color: var(--ink-soft);
  line-height: 1.4;
  max-width: 24ch;
}

/* ─── Proof / Marquee ────────────────────────────────────────────────────── */
.proof {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-soft);
  overflow: hidden;
  padding: 0;
}

.proof-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: slide 38s linear infinite;
}

.proof:hover .proof-track {
  animation-play-state: paused;
}

.proof-item {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 16px 30px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.proof-item::after {
  content: "\2726";
  color: var(--henna);
  font-size: 10px;
}

@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
  background: var(--pine);
  color: rgba(241, 232, 216, 0.7);
  padding: 72px 0 36px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 40px;
}

.foot-brand .brand {
  color: var(--paper);
  font-size: 26px;
}

.foot-brand .brand small {
  color: rgba(241, 232, 216, 0.5);
}

.foot-tag {
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(241, 232, 216, 0.6);
  max-width: 34ch;
  margin: 20px 0;
}

.foot-social {
  display: flex;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.foot-social a {
  color: var(--honey);
}

.foot-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: 18px;
}

.foot-col a {
  display: block;
  font-size: 14.5px;
  color: rgba(241, 232, 216, 0.62);
  padding: 6px 0;
  transition: color 0.2s;
}

.foot-col a:hover {
  color: var(--honey);
}

.foot-bottom {
  border-top: 1px solid var(--pine-line);
  margin-top: 56px;
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.foot-bottom span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(241, 232, 216, 0.45);
}

.foot-bottom .disc {
  max-width: 560px;
  line-height: 1.7;
}
.foot-legal {
  display: flex;
  gap: 8px;
  align-items: center;
}
.foot-legal a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(241, 232, 216, 0.45);
  text-decoration: none;
}
.foot-legal a:hover { color: rgba(241, 232, 216, 0.7); }

/* ─── Hide CTA on auth/user pages ───────────────────────────────────────── */
.no-cta .nav-right .btn-primary,
.no-cta .nav-right .btn-ghost,
.no-cta .sticky-book { display: none !important; }
.no-cta { padding-bottom: 0 !important; }

/* ─── Mobile sticky book bar ─────────────────────────────────────────────── */
.sticky-book {
  display: none;
}

/* ═══════════════════ SHARED UI: TOAST ═══════════════════ */
.sfs-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.sfs-toast {
  pointer-events: auto;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--paper);
  animation: sfs-toast-in 0.3s ease;
  max-width: 380px;
}
.sfs-toast--error   { background: var(--henna); }
.sfs-toast--success { background: var(--pine); }
.sfs-toast--info    { background: var(--ink); }

@keyframes sfs-toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════ SHARED UI: CONFIRM ═══════════════════ */
.sfs-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
}
.sfs-confirm-overlay.open {
  display: flex;
}
.sfs-confirm-modal {
  background: var(--paper);
  border-radius: 12px;
  padding: 28px 32px 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
.sfs-confirm-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 8px;
}
.sfs-confirm-message {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft, #666);
  margin: 0 0 20px;
  line-height: 1.5;
}
.sfs-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.sfs-confirm-cancel,
.sfs-confirm-ok {
  padding: 8px 20px;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
}
.sfs-confirm-cancel {
  background: transparent;
  color: var(--ink-soft, #666);
}
.sfs-confirm-cancel:hover { background: rgba(0,0,0,0.05); }
.sfs-confirm-ok {
  background: var(--pine);
  color: var(--paper);
}
.sfs-confirm-ok:hover { opacity: 0.9; }
