/* ============================================================
   URFIT — Design System (v1)
   Brand: bold black + white with a "work for it" amber accent
   ============================================================ */

:root {
  --bg: #0b0b0c;
  --bg-elev-1: #151516;
  --bg-elev-2: #1e1e20;
  --bg-elev-3: #29292c;
  --border: #2c2c2f;
  --text: #f5f5f4;
  --text-dim: #a3a3a1;
  --text-faint: #6f6f6d;
  --accent: #f2b705;
  --accent-dim: #7a5e03;
  --accent-ink: #1a1400;
  --success: #4ade80;
  --danger: #f87171;
  --info: #60a5fa;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 24px rgba(0,0,0,0.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-w: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  padding-bottom: 84px; /* room for bottom app nav on client pages */
}
body.no-app-nav { padding-bottom: 0; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Top bar (marketing) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11,11,12,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.5px; font-size: 18px; }
.brand img { height: 30px; width: auto; }
.brand.brand-lockup img { height: 26px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.hero-logo { height: 96px; width: auto; margin: 0 auto 26px; display: block; }
@media (max-width: 600px) { .hero-logo { height: 72px; } }
.topnav { display: flex; gap: 28px; align-items: center; }
.topnav a { color: var(--text-dim); font-size: 14px; font-weight: 600; }
.topnav a:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: 0.92; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--text-dim); }
.btn-ghost { background: var(--bg-elev-2); color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 56px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--accent); background: rgba(242,183,5,0.1);
  border: 1px solid rgba(242,183,5,0.35); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(22px, 3.5vw, 38px); line-height: 1.08; margin: 0 0 18px; font-weight: 800; letter-spacing: -0.5px; }
.hero h1 span { color: var(--accent); }
.hero p.lead { font-size: 18px; color: var(--text-dim); max-width: 620px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 12px; font-weight: 800; letter-spacing: -0.3px; }
.section-head p { color: var(--text-dim); font-size: 16px; margin: 0; }

/* ---------- Cards / grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-card);
}

/* ---------- Pricing ---------- */
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card.featured { border-color: var(--accent); background: linear-gradient(180deg, rgba(242,183,5,0.08), var(--bg-elev-1) 60%); }
.price-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 800;
  padding: 5px 14px; border-radius: 999px; letter-spacing: 0.4px; text-transform: uppercase;
}
.price-name { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); }
.price-amount { font-size: 42px; font-weight: 800; margin: 10px 0 2px; }
.price-amount small { font-size: 15px; font-weight: 600; color: var(--text-dim); }
.price-desc { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.price-features { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.price-features li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--text); }
.price-features li svg { flex: none; margin-top: 2px; }
.price-card .btn { margin-top: auto; }

.founding-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(242,183,5,0.14), rgba(242,183,5,0.03));
  border: 1px solid rgba(242,183,5,0.35); border-radius: var(--radius-lg); padding: 24px 28px; margin: 34px 0 0;
}
.founding-banner h3 { margin: 0 0 6px; font-size: 19px; }
.founding-banner p { margin: 0; color: var(--text-dim); font-size: 14.5px; }
.founding-price { font-size: 26px; font-weight: 800; color: var(--accent); }

/* ---------- Feature rows ---------- */
.feature-row { display: flex; gap: 18px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--border); }
.feature-row:last-child { border-bottom: none; }
.feature-icon {
  flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--bg-elev-2);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.feature-row h4 { margin: 0 0 4px; font-size: 15.5px; }
.feature-row p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
footer .foot-links { display: flex; gap: 22px; }
footer .foot-links a { color: var(--text-dim); font-size: 13.5px; }
footer .foot-note { color: var(--text-faint); font-size: 12.5px; }

/* ============================================================
   APP SHELL (logged-in pages: dashboard, library, progress)
   ============================================================ */
.app-header {
  position: sticky; top: 0; z-index: 40; background: rgba(11,11,12,0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.app-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: 480px; }
.app-shell { max-width: 480px; margin: 0 auto; padding: 20px 18px 40px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.hello { font-size: 13.5px; color: var(--text-dim); }
.hello strong { color: var(--text); font-size: 16px; display: block; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.stat-tile { background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 10px; text-align: center; }
.stat-tile .num { font-size: 22px; font-weight: 800; color: var(--accent); }
.stat-tile .lbl { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; }

.section-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); margin: 26px 0 12px; }

.coach-note {
  display: flex; gap: 12px; background: var(--bg-elev-1); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 18px;
}
.coach-note .avatar { width: 32px; height: 32px; font-size: 12px; }
.coach-note strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.coach-note p { margin: 0; font-size: 13.5px; color: var(--text-dim); }

.day-card { background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; margin-bottom: 10px; }
.day-card.today { border-color: var(--accent); }
.day-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.day-name { font-weight: 700; font-size: 14.5px; }
.day-tag { font-size: 10.5px; font-weight: 800; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--bg-elev-3); color: var(--text-dim); }
.day-tag.today { background: var(--accent); color: var(--accent-ink); }
.day-list { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--text-dim); display: flex; flex-direction: column; gap: 4px; }
.day-list li:before { content: "• "; color: var(--text-faint); }

.lib-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; }
.lib-tab { flex: none; padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--bg-elev-2); color: var(--text-dim); cursor: pointer; border: 1px solid transparent; }
.lib-tab.active { background: var(--accent); color: var(--accent-ink); }

.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.video-card { background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.video-thumb {
  aspect-ratio: 16/10; background: linear-gradient(135deg, var(--bg-elev-3), var(--bg-elev-2));
  display: flex; align-items: center; justify-content: center; color: var(--text-faint); position: relative;
}
.video-thumb .play { width: 34px; height: 34px; border-radius: 50%; background: rgba(242,183,5,0.9); display:flex;align-items:center;justify-content:center; }
.video-meta { padding: 10px 12px; }
.video-meta .name { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.video-meta .src { font-size: 11px; color: var(--text-faint); }

.progress-chart { background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; margin-bottom: 18px; }
.progress-chart svg { width: 100%; height: auto; display: block; }

.log-form { display: flex; flex-direction: column; gap: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--text); font-size: 14.5px; font-family: var(--font);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }

.app-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(11,11,12,0.92); backdrop-filter: blur(12px); border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; padding: 8px 6px calc(env(safe-area-inset-bottom, 0px) + 8px);
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-faint); font-size: 10.5px; font-weight: 700; padding: 6px 10px; border-radius: 10px; }
.nav-item.active { color: var(--accent); }
.nav-item svg { width: 21px; height: 21px; }

.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .brand { justify-content: center; margin-bottom: 6px; font-size: 20px; }
.auth-card .brand img { height: 40px; }
.app-logo { height: 22px; width: auto; }
.auth-card .tagline { text-align: center; color: var(--text-dim); font-size: 13.5px; margin-bottom: 28px; }
.auth-tabs { display: flex; background: var(--bg-elev-2); border-radius: 999px; padding: 4px; margin-bottom: 22px; }
.auth-tab { flex: 1; text-align: center; padding: 9px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--text-dim); cursor: pointer; }
.auth-tab.active { background: var(--accent); color: var(--accent-ink); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: 12px; margin: 18px 0; }
.divider:before, .divider:after { content: ""; flex: 1; height: 1px; background: var(--border); }
.demo-note { text-align: center; font-size: 12px; color: var(--text-faint); margin-top: 18px; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pill-founding { background: rgba(242,183,5,0.14); color: var(--accent); border: 1px solid rgba(242,183,5,0.35); }
