/* ============================================================
   App shell — nav, layout, page headers, breadcrumbs.
   ============================================================ */

/* ---------- Nav bar ---------- */
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s-6);
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--text-strong);
}
.nav-brand:hover { color: var(--text-strong); }
.nav-logo { width: 28px; height: 28px; flex-shrink: 0; }

/* PaperOS wordmark — swap by theme */
.nav-wordmark-img {
  height: 30px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.nav-wordmark-img-light { display: none; }

/* Legacy text wordmark (still used in experiments) */
.nav-wordmark {
  font-family: var(--font-serif);
  font-size: var(--fs-20);
  font-weight: var(--fw-regular);
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
.nav-wordmark em {
  font-style: italic;
  color: var(--gold);
}
.nav-tag {
  font-size: var(--fs-12);
  color: var(--text-subtle);
  padding-left: var(--s-3);
  border-left: 1px solid var(--border);
  margin-left: var(--s-1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}
.nav-link {
  padding: 6px 12px;
  font-size: var(--fs-13);
  color: var(--text-muted);
  border-radius: var(--r-sm);
  font-weight: var(--fw-medium);
  transition: all var(--t-fast) var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link-active { color: var(--gold); }
.nav-link-active:hover { color: var(--gold); background: var(--gold-tint-08); }

.nav-user {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-left: var(--s-4);
  margin-left: var(--s-3);
  border-left: 1px solid var(--border);
}
.nav-avatar {
  width: 28px; height: 28px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--gold-deep), var(--gold-soft));
  color: #0A0A0C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: var(--fw-semibold);
}
.nav-email {
  font-size: var(--fs-12);
  color: var(--text-muted);
}

/* ---------- Container / layout ---------- */
.container {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: var(--s-8) var(--s-6);
}
.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-xl { max-width: var(--container-xl); }

/* ---------- Page header ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  margin-bottom: var(--s-7);
  flex-wrap: wrap;
}
.page-title {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-40);
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--text-strong);
}
.page-title em { font-style: italic; color: var(--gold); }
.page-sub {
  font-size: var(--fs-14);
  color: var(--text-muted);
  margin-top: var(--s-2);
  max-width: 540px;
  line-height: var(--lh-loose);
}
.page-actions { display: flex; gap: var(--s-2); align-items: center; }

/* ---------- Hero (for big moments) ---------- */
.hero {
  text-align: center;
  padding: var(--s-11) var(--s-4) var(--s-7);
}
.hero-eyebrow {
  display: inline-block;
  margin-bottom: var(--s-3);
  font-size: var(--fs-12);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: var(--fw-medium);
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin-bottom: var(--s-4);
}
.hero-title em { font-style: italic; color: var(--gold); }
.hero-sub {
  font-size: var(--fs-16);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: var(--lh-loose);
}

/* ---------- Breadcrumbs ---------- */
.crumbs {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-13);
  color: var(--text-subtle);
  margin-bottom: var(--s-5);
}
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--gold); }
.crumbs-sep { color: var(--text-faint); }
.crumbs-current { color: var(--text); }

/* ---------- Section ---------- */
.section { margin-bottom: var(--s-8); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s-4);
}
.section-title {
  font-size: var(--fs-18);
  font-weight: var(--fw-semibold);
  color: var(--text-strong);
  letter-spacing: -0.005em;
}
.section-desc {
  font-size: var(--fs-13);
  color: var(--text-muted);
  margin-top: var(--s-1);
}

/* ---------- Stat row (for dashboard summary) ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
.stat {
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.stat-label {
  font-size: var(--fs-12);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s-2);
}
.stat-value {
  font-size: var(--fs-24);
  font-weight: var(--fw-semibold);
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.stat-delta { font-size: var(--fs-12); color: var(--success); margin-left: var(--s-2); }

/* ---------- Gallery (landing index) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-4);
}
.tile {
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text);
  transition: all var(--t-fast) var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-height: 160px;
  position: relative;
  overflow: hidden;
}
.tile:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--gold-glow);
  color: var(--text-strong);
}
.tile::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle at top right, var(--gold-tint-08), transparent 70%);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
  pointer-events: none;
}
.tile:hover::after { opacity: 1; }
.tile-num {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--text-subtle);
}
.tile-title {
  font-family: var(--font-serif);
  font-size: var(--fs-24);
  font-weight: var(--fw-regular);
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
.tile-desc {
  font-size: var(--fs-13);
  color: var(--text-muted);
  line-height: var(--lh-loose);
  flex: 1;
}
.tile-arrow {
  color: var(--gold);
  font-size: var(--fs-14);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: var(--fw-medium);
}
