/* base.css — shared styles for every page (public + admin).
   Linked from base.html.tmpl and admin-base.html.tmpl. Tokens
   come from tokens.css (loaded first). */

/* ─── reset & base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--pf-font-body);
  font-size: var(--pf-text-base);
  color: var(--pf-ink-900);
  background: var(--pf-cream-50);
  line-height: var(--pf-leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
h1, h2, h3, h4 {
  font-family: var(--pf-font-display);
  font-weight: 460;
  letter-spacing: var(--pf-tracking-display);
  line-height: var(--pf-leading-tight);
  margin: 0;
  color: var(--pf-ink-900);
}
p, ul, ol { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

.pf-shell { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.pf-eyebrow {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--pf-ink-500); font-weight: 500;
}

/* ─── glass surfaces ────────────────────────────────────── */
.pf-glass, .pf-glass-strong, .pf-glass-modal {
  border-radius: var(--pf-r-lg);
  border: 1px solid var(--pf-glass-border);
  box-shadow: var(--pf-glass-shadow);
}
.pf-glass {
  background: var(--pf-glass-1);
  backdrop-filter: blur(var(--pf-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--pf-blur)) saturate(140%);
}
.pf-glass-strong {
  background: var(--pf-glass-2);
  backdrop-filter: blur(var(--pf-blur-strong)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--pf-blur-strong)) saturate(150%);
}
.pf-glass-modal {
  background: var(--pf-glass-3);
  border-radius: var(--pf-r-xl);
  backdrop-filter: blur(var(--pf-blur-strong)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--pf-blur-strong)) saturate(160%);
}

/* ─── buttons ───────────────────────────────────────────── */
.pf-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border: 0; cursor: pointer;
  font-weight: 500; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform var(--pf-dur-fast) var(--pf-ease),
              background var(--pf-dur-fast) var(--pf-ease),
              box-shadow var(--pf-dur-fast) var(--pf-ease);
  padding: 10px 18px; font-size: 14px; border-radius: 999px; height: 42px;
}
.pf-btn-lg { padding: 14px 26px; font-size: 16px; height: 52px; }
.pf-btn-sm { padding: 8px 14px; font-size: 13px; height: 34px; }
.pf-btn-primary {
  background: linear-gradient(135deg, var(--pf-rust-500) 0%, var(--pf-rust-600) 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 -1px 0 rgba(0,0,0,0.15) inset,
    0 6px 18px -4px rgba(184,90,54,0.45);
}
.pf-btn-primary:hover { transform: translateY(-1px); }
.pf-btn-secondary {
  background: var(--pf-glass-2);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--pf-glass-border);
  color: var(--pf-ink-900);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 4px 12px -2px rgba(58,32,18,0.10);
}
.pf-btn-ghost { background: transparent; color: var(--pf-ink-900); }
.pf-btn-on-photo {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(12px);
}

/* ─── pills ─────────────────────────────────────────────── */
.pf-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-size: 12px; font-weight: 500;
  border-radius: 999px; letter-spacing: -0.005em;
}
.pf-pill-rust    { background: rgba(184,90,54,0.12); color: var(--pf-rust-700); }
.pf-pill-forest  { background: rgba(74,88,60,0.14);  color: var(--pf-forest-700); }
.pf-pill-ok      { background: rgba(107,142,90,0.18);color: #3e5a30; }
.pf-pill-warn    { background: rgba(212,166,74,0.22);color: #7a5c1c; }
.pf-pill-danger  { background: rgba(181,69,69,0.14); color: #7a2222; }
.pf-pill-neutral { background: rgba(58,32,18,0.06);  color: var(--pf-ink-700); }
.pf-pill-on-photo {
  background: rgba(255,255,255,0.18); color: #fff;
  border: 1px solid rgba(255,255,255,0.3); backdrop-filter: blur(12px);
}

/* ─── public top nav ───────────────────────────────────── */
.pf-nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; padding: 20px 56px; color: #fff;
}
.pf-nav img { height: 36px; filter: brightness(0) invert(1); }
.pf-nav-links { margin-left: 32px; display: flex; gap: 24px; font-size: 13px; opacity: 0.92; }
.pf-nav-links a { padding-bottom: 2px; }
.pf-nav-links a.active { font-weight: 500; border-bottom: 1.5px solid #fff; }
.pf-nav-spacer { flex: 1; }

@media (max-width: 720px) {
  .pf-nav { padding: 16px 20px; }
  .pf-nav-links { display: none; }
}

/* ─── mobile-block ──────────────────────────────────────
   Showcase-only gate for phones / tablets — the prototype isn't
   responsive yet, so on screens ≤ 768 px we hide the actual page
   and surface a developer note pointing at the desktop. The mobile
   optimisation is part of the bundle and lands with go-live; this
   is just the placeholder for the showcase phase.

   The aside lives in every base via {{template "mobile-block" .}}
   (defined in _partials.html.tmpl). On desktop it's `display:none`
   and contributes nothing to the layout.
   ─────────────────────────────────────────────────────── */
.pf-mobile-block { display: none; }

@media (max-width: 768px) {
  /* Hide the actual page chrome — sidebar, content, error pages,
     email previews, everything that's not the gate. */
  body > *:not(.pf-mobile-block) { display: none !important; }
  /* The gate becomes the whole viewport. */
  .pf-mobile-block {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 22px; padding: 40px 28px;
    color: #fff; text-align: center;
    background-image:
      linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(46,20,8,0.65) 100%),
      url("/static/photos/julia-und-hunde.jpg");
    background-size: cover; background-position: center;
  }
  .pf-mobile-author {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 6px 14px 6px 6px; border-radius: 999px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 12px; color: #fff;
  }
  .pf-mobile-author img {
    width: 24px; height: 24px; border-radius: 50%;
    object-fit: contain; background: #fff; padding: 2px;
  }
  .pf-mobile-block h1 {
    font-family: var(--pf-font-display);
    font-size: clamp(28px, 8vw, 36px); font-weight: 460;
    color: #fff; line-height: 1.1; letter-spacing: -0.025em;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
  }
  .pf-mobile-block h1 em {
    font-style: italic; color: var(--pf-rust-200);
  }
  .pf-mobile-blurb {
    font-size: 15px; line-height: 1.55; max-width: 360px;
    color: rgba(255,255,255,0.92);
    text-shadow: 0 1px 2px rgba(46,20,8,0.45);
  }
  .pf-mobile-note {
    margin-top: 4px; padding: 10px 18px;
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    font-size: 12px; color: rgba(255,255,255,0.94);
    max-width: 380px;
  }
}
