/* ─────────────────────────────────────────────────────────────
   Basta — components.css
   Shared UI components: nav, footer, buttons, modals, cards.
   ───────────────────────────────────────────────────────────── */

/* ─── NAV ───────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 240, 232, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(92, 107, 58, 0.1);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--olive);
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  color: var(--bark-light);
  font-weight: 400;
  transition: color var(--transition);
  position: relative;
  padding: 4px 0;
}
.nav-links a:hover { color: var(--olive); }
.nav-links a.active {
  color: var(--olive);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 1px;
  background: var(--olive);
}

.nav-cta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.nav-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(92,107,58,0.08);
  color: var(--olive);
  transition: all var(--transition);
}
.nav-cta a:hover {
  background: var(--olive);
  color: var(--cream);
  transform: translateY(-1px);
}
.nav-cta svg {
  width: 16px;
  height: 16px;
}

/* Mobile nav: hide text links, show hamburger */
.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--bark);
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 768px) {
  .site-nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta { gap: 6px; }
  .nav-cta a { width: 30px; height: 30px; }
}

/* Mobile nav drawer */
.nav-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  height: 100dvh;
  background: var(--cream);
  z-index: 200;
  padding: 80px 32px 32px;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: -16px 0 40px rgba(42,35,24,0.12);
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42,35,24,0.4);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.nav-drawer a {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--bark);
  padding: 8px 0;
  border-bottom: 1px solid rgba(92,107,58,0.1);
}
.nav-drawer a.active { color: var(--olive); }
.nav-drawer-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warm-grey);
  font-size: 18px;
}

/* ─── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-primary {
  background: var(--olive);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--olive-light);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--cream);
  color: var(--olive);
  border: 1px solid rgba(92,107,58,0.3);
}
.btn-secondary:hover {
  background: rgba(92,107,58,0.08);
  border-color: var(--olive);
}

.btn-ghost {
  background: transparent;
  color: var(--warm-grey);
  border-bottom: 1px solid var(--olive-muted);
  border-radius: 0;
  padding: 4px 0;
  font-size: 13px;
}
.btn-ghost:hover { color: var(--bark); }

/* Store badges (App Store / Play Store) */
.store-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bark);
  color: var(--cream);
  padding: 12px 22px;
  border-radius: 8px;
  transition: all var(--transition);
  text-decoration: none;
  min-height: 56px;
}
.store-badge:hover {
  background: #1A1208;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(42,35,24,0.2);
}
.store-badge svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.store-badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}
.store-badge-text .small {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 3px;
}
.store-badge-text .big {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
}

/* ─── FOOTER ────────────────────────────────────────────────── */
.site-footer {
  background: #1E1A12;
  color: var(--cream);
  padding: 56px 32px 32px;
}
.footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(245,240,232,0.08);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--olive-muted);
}
.footer-tag {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: rgba(245,240,232,0.5);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 14px 56px;
}
.footer-links a {
  font-size: 13px;
  color: rgba(245,240,232,0.5);
  transition: color var(--transition);
  white-space: nowrap;
}
.footer-links a:hover { color: var(--olive-muted); }

.footer-meta {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(245,240,232,0.3);
}
.footer-meta-links {
  display: flex;
  gap: 24px;
}
.footer-meta-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(245,240,232,0.3);
  transition: color var(--transition);
}
.footer-meta-links a:hover { color: var(--olive-muted); }

@media (max-width: 640px) {
  .site-footer { padding: 40px 20px 24px; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-links {
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
  }
}

/* ─── MODAL ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42,35,24,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--cream);
  border-radius: var(--radius-md);
  max-width: 720px;
  width: 100%;
  max-height: 84vh;
  max-height: 84dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  transform: translateY(10px);
  transition: transform 0.3s ease;
  overflow: hidden;
  position: relative;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px 32px 16px;
  border-bottom: 1px solid rgba(92,107,58,0.12);
  flex-shrink: 0;
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 2;
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--bark);
}
.modal-title em { font-style: italic; color: var(--olive); }
.modal-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-grey);
}

.modal-close {
  background: rgba(42,35,24,0.04);
  border: none;
  color: var(--warm-grey);
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  margin-left: 12px;
}
.modal-close:hover {
  color: var(--bark);
  background: rgba(42,35,24,0.1);
}
.modal-close:active { transform: scale(0.95); }

.modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 32px 32px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--bark-light);
}
.modal-body h3 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--bark);
  margin-top: 24px;
  margin-bottom: 8px;
}
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin-bottom: 10px; }
.modal-body strong { font-weight: 500; color: var(--bark); }
.modal-body em { font-style: italic; color: var(--olive); }
.modal-body .effective {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--warm-grey);
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(92,107,58,0.1);
}
.modal-body .intro {
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 20px;
  color: var(--bark);
}
.modal-body a {
  color: var(--olive);
  border-bottom: 1px solid rgba(92,107,58,0.3);
}

.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(164,175,136,0.4);
  border-radius: 4px;
}

@media (max-width: 640px) {
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal {
    max-width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
  .modal-header {
    padding: max(20px, env(safe-area-inset-top)) 22px 14px;
  }
  .modal-title { font-size: 18px; }
  .modal-body {
    padding: 18px 22px max(40px, env(safe-area-inset-bottom));
  }
  .modal-close {
    width: 40px;
    height: 40px;
  }
}

/* ─── CARDS ─────────────────────────────────────────────────── */
.card {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: transform var(--transition);
}
.card-bordered {
  border-top: 3px solid var(--olive);
}

/* ─── REVEAL ON SCROLL ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── PLACEHOLDER IMAGE ANCHORS ─────────────────────────────── */
/* Used during build before real screenshots are dropped in. */
.img-anchor {
  background: linear-gradient(135deg,
    rgba(92,107,58,0.08) 0%,
    rgba(164,175,136,0.12) 100%);
  border: 1.5px dashed rgba(92,107,58,0.35);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--olive);
  font-family: var(--font-mono);
}
.img-anchor-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 8px;
  font-weight: 500;
}
.img-anchor-desc {
  font-size: 11px;
  color: var(--warm-grey);
  line-height: 1.6;
  font-family: var(--font-sans);
  max-width: 220px;
}
.img-anchor-dims {
  font-size: 9px;
  color: var(--warm-grey);
  letter-spacing: 0.08em;
  margin-top: 8px;
  opacity: 0.7;
}
