/* ============================================================================
 * site.css — shared warm base for the bunkorbase.studio public site.
 * Used by: index.html (homepage) and apps/index.html (Application Center).
 * Warm plum/ember palette, self-hosted Fraunces + Sora, zero CDN.
 * Class hooks required by apps/index.html + content.js are preserved:
 *   .site-header .header-inner .brand .mark .brand-name .nav .nav-login
 *   .wrap .hero .hero-center .eyebrow .dot .subtitle .grid .apps-grid
 *   .card (--card-accent) .tag .desc .note .links .btn .arr
 *   .btn.primary .btn-green .site-footer .line .noscript-msg #card-list
 * ==========================================================================*/

:root {
  --bg-0: #17101c;  /* deepest plum-black */
  --bg-1: #221424;  /* dusk plum */
  --bg-2: #2c1a26;  /* mauve */
  --ember: #ffb45e; --ember-2: #ff8c5a; --ember-3: #ff6b6b; --gold: #ffd9a0;
  --ivory: #f6ead9; --cream: #efe0cc; --muted: #b7a392; --faint: #7d6a63;
  --accent: #ff9d5c; --ring: rgba(255, 180, 94, 0.55);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-ui: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  background:
    radial-gradient(1100px 560px at 18% -12%, rgba(255, 140, 90, 0.14), transparent 62%),
    radial-gradient(900px 500px at 88% 4%, rgba(255, 180, 94, 0.10), transparent 58%),
    radial-gradient(700px 700px at 50% 120%, rgba(255, 107, 107, 0.08), transparent 60%),
    var(--bg-0);
  color: var(--ivory);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(255, 180, 94, 0.35); color: var(--ivory); }

:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 4px; }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 10px 16px; background: var(--bg-1); color: var(--gold);
  font-family: var(--font-ui); font-size: 14px; text-decoration: none;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(23, 16, 28, 0.55);
  border-bottom: 1px solid rgba(255, 180, 94, 0.12);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

.header-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ivory);
  font-family: var(--font-ui); font-weight: 700;
  letter-spacing: -0.01em; font-size: 15px;
}
.brand .mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--ember), var(--ember-2));
  color: #241307; font-family: var(--font-ui); font-size: 13px; font-weight: 800;
  display: grid; place-items: center; letter-spacing: 0;
  box-shadow: 0 4px 12px -4px rgba(255, 140, 90, 0.55);
}

.nav { display: flex; align-items: center; gap: 16px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color 0.15s ease; }
.nav a:hover { color: var(--ivory); }
.nav a.active { color: var(--ivory); }
.nav a.nav-login {
  font-size: 12.5px; letter-spacing: 0.02em;
  color: var(--cream); border: 1px solid rgba(255, 180, 94, 0.28);
  border-radius: 999px; padding: 6px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.nav a.nav-login:hover {
  color: var(--gold); border-color: rgba(255, 180, 94, 0.55);
  box-shadow: 0 0 14px -2px rgba(255, 180, 94, 0.35);
}

/* ---------- layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px 56px; }

/* ---------- hero ---------- */
.hero { padding: 52px 0 8px; }
.hero-center { text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(255, 180, 94, 0.22);
  background: rgba(255, 180, 94, 0.06);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px var(--gold); flex: none;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.12;
  color: var(--ivory);
}

.subtitle { margin: 14px auto 0; color: var(--muted); font-size: 16.5px; max-width: 640px; }
.hero-center .subtitle { margin-inline: auto; }

/* ---------- cards / project grid ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.apps-grid { margin-top: 44px; }

.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid rgba(255, 180, 94, 0.10); border-radius: 18px;
  padding: 24px 22px 20px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--card-accent, var(--accent)), transparent 70%);
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 180, 94, 0.28);
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.7), 0 0 24px -8px rgba(255, 180, 94, 0.16);
}
.card .tag {
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--card-accent, var(--accent));
}
.card h2 { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.card .desc { color: var(--muted); font-size: 14.5px; flex: 1; }
.card .note {
  margin-top: 4px; padding-top: 12px; border-top: 1px dashed rgba(255, 180, 94, 0.16);
  font-family: var(--font-ui); font-size: 11.5px; color: var(--faint); line-height: 1.5;
}

.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; font-family: var(--font-ui);
  font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 12px; border: 1px solid rgba(255, 180, 94, 0.18);
  color: var(--ivory); background: rgba(255, 180, 94, 0.05);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  cursor: pointer;
}
.btn:hover { background: rgba(255, 180, 94, 0.12); border-color: rgba(255, 180, 94, 0.38); }
.btn .arr { transition: transform 0.15s ease; }
.btn:hover .arr { transform: translateX(2px); }
.btn.primary {
  background: linear-gradient(135deg, var(--ember), var(--ember-2));
  border-color: transparent; color: var(--ivory);
  box-shadow: 0 10px 24px -10px rgba(255, 140, 90, 0.55);
}
.btn.primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--ember), var(--ember-2)); }
.btn.btn-green {
  background: linear-gradient(135deg, #b8935a, #8a6d3b);
  border-color: transparent; color: #241307;
  box-shadow: 0 10px 24px -10px rgba(184, 147, 90, 0.45);
}
.btn.btn-green:hover { filter: brightness(1.08); background: linear-gradient(135deg, #b8935a, #8a6d3b); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid rgba(255, 180, 94, 0.12); padding: 26px 20px 40px; text-align: center; }
.site-footer .line { font-family: var(--font-ui); font-size: 12.5px; color: var(--faint); }

.noscript-msg {
  text-align: center; color: var(--muted);
  font-family: var(--font-ui); font-size: 12.5px; padding: 0 20px 24px;
}

/* ---------- responsive (mobile-first) ---------- */
@media (max-width: 560px) {
  .header-inner { flex-wrap: wrap; row-gap: 6px; }
  .nav { gap: 12px; }
}
/* small phones: tightened brand + nav so the header fits 320px cleanly
   (brand row + nav row, deliberate stack — no overflow, no touching) */
@media (max-width: 360px) {
  .header-inner { padding: 10px 12px; gap: 6px; row-gap: 8px; }
  .brand { font-size: 13.5px; gap: 7px; }
  .brand .mark { width: 22px; height: 22px; font-size: 11.5px; border-radius: 7px; }
  .nav { gap: 10px; }
  .nav a { font-size: 13px; }
  .nav a.nav-login { font-size: 12px; padding: 5px 11px; }
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .hero { padding-top: 68px; }
}
@media (min-width: 900px) {
  .hero { padding-top: 84px; }
  .grid { gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
