/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root{
  --ink:        #1C1F2E;
  --paper:      #F1F0EA;
  --paper-alt:  #E8E6DD;
  --panel:      #FFFFFF;
  --line:       #D9D6C9;
  --gold:       #C08A2E;
  --gold-soft:  #EFDFB8;
  --teal:       #1F6F5C;
  --teal-soft:  #DCEAE6;
  --muted:      #6B6E7E;
  --danger:     #A73B3B;
  --danger-soft:#F4DCDC;

  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Inter', -apple-system, Helvetica, Arial, sans-serif;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  font-family:var(--sans);
  background:var(--paper);
  color:var(--ink);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
a{ color:inherit; text-decoration:none; }
img,svg{ display:block; max-width:100%; }
button{ font-family:inherit; cursor:pointer; }
:focus-visible{ outline:2px solid var(--teal); outline-offset:2px; }

.wrap{ max-width:1120px; margin:0 auto; padding:0 24px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(241,240,234,0.92);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.site-header .wrap{ display:flex; align-items:center; justify-content:space-between; height:72px; }
.logo{ font-family:var(--serif); font-size:22px; font-weight:600; display:flex; align-items:baseline; gap:2px; }
.logo span{ color:var(--gold); font-style:italic; font-weight:500; }
.main-nav{ display:flex; gap:28px; font-size:15px; font-weight:500; }
.main-nav a{ color:var(--muted); transition:color .15s; }
.main-nav a:hover{ color:var(--ink); }

/* ============================================================
   HERO
   ============================================================ */
.hero{ padding:72px 0 56px; }
.hero .wrap{ display:grid; grid-template-columns:1.3fr 0.9fr; gap:56px; align-items:end; }
.hero h1{ font-family:var(--serif); font-weight:500; font-size:clamp(34px, 5vw, 54px); line-height:1.08; letter-spacing:-0.01em; max-width:14ch; }
.hero .lede{ margin-top:20px; max-width:46ch; font-size:17px; color:var(--muted); }
.hero-cta{ margin-top:32px; display:flex; gap:14px; flex-wrap:wrap; }
.btn{ display:inline-flex; align-items:center; gap:8px; padding:13px 24px; border-radius:3px; font-size:15px; font-weight:600; border:1px solid transparent; transition:transform .15s, background .15s; }
.btn-primary{ background:var(--ink); color:var(--paper); }
.btn-primary:hover{ transform:translateY(-1px); background:#0F1120; }
.btn-ghost{ border-color:var(--ink); color:var(--ink); }
.btn-ghost:hover{ background:var(--ink); color:var(--paper); }
.btn-small{ padding:8px 14px; font-size:13px; }
.btn-danger{ background:var(--danger); color:#fff; }
.btn-danger:hover{ background:#8A2E2E; }

.stat-panel{ background:var(--panel); border:1px solid var(--line); padding:28px; display:flex; flex-direction:column; gap:20px; }
.stat-row{ display:flex; justify-content:space-between; align-items:baseline; padding-bottom:16px; border-bottom:1px solid var(--line); }
.stat-row:last-child{ border:0; padding-bottom:0; }
.stat-num{ font-family:var(--serif); font-size:30px; }
.stat-label{ font-size:13px; color:var(--muted); text-align:right; max-width:16ch; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar{ padding:8px 0 32px; display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); margin-bottom:40px; }
.chip-row{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{ padding:9px 16px; border:1px solid var(--line); background:var(--panel); font-size:14px; font-weight:500; color:var(--muted); border-radius:20px; transition:all .15s; }
.chip:hover{ border-color:var(--ink); color:var(--ink); }
.chip.active{ background:var(--ink); border-color:var(--ink); color:var(--paper); }
.mentor-select{ padding:10px 14px; border:1px solid var(--line); background:var(--panel); font-size:14px; font-family:inherit; color:var(--ink); border-radius:20px; }

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.section-head{ display:flex; justify-content:space-between; align-items:end; margin-bottom:28px; gap:20px; flex-wrap:wrap; }
.section-head h2{ font-family:var(--serif); font-weight:500; font-size:28px; }
.section-head p{ color:var(--muted); font-size:14px; max-width:40ch; }

.grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:20px; }
.card{ background:var(--panel); border:1px solid var(--line); display:flex; flex-direction:column; overflow:hidden; }
.card-icon{ height:104px; display:flex; align-items:center; padding:0 20px; background:var(--paper-alt); }
.card-icon svg{ width:34px; height:34px; stroke:var(--ink); }
.card-body{ padding:20px; display:flex; flex-direction:column; gap:10px; flex:1; }
.card-tag{ font-size:12px; font-weight:600; color:var(--teal); display:flex; align-items:center; gap:6px; }
.card-tag::before{ content:''; width:5px; height:5px; background:var(--teal); border-radius:50%; }
.card h3{ font-family:var(--serif); font-size:19px; font-weight:500; line-height:1.3; }
.card .mentor-name{ font-size:13px; color:var(--muted); }
.card p{ font-size:14px; color:var(--muted); flex:1; }
.card-cta{ margin-top:6px; font-size:14px; font-weight:600; color:var(--ink); display:flex; align-items:center; justify-content:space-between; padding-top:14px; border-top:1px solid var(--line); }
.card-cta:hover{ color:var(--gold); }
.empty-state{ grid-column:1/-1; text-align:center; padding:48px 20px; color:var(--muted); border:1px dashed var(--line); font-size:14px; }

/* ============================================================
   FREEBIES
   ============================================================ */
.freebies{ background:var(--gold-soft); padding:56px 0; margin:64px 0; }
.freebies .section-head h2{ color:var(--ink); }
.free-grid{ display:grid; grid-template-columns:repeat(2, 1fr); gap:16px; }
.free-card{ background:var(--panel); padding:22px; display:flex; gap:16px; align-items:flex-start; border:1px solid rgba(28,31,46,0.08); }
.free-card svg{ width:26px; height:26px; stroke:var(--gold); flex-shrink:0; margin-top:2px; }
.free-card h3{ font-family:var(--serif); font-size:17px; font-weight:500; margin-bottom:4px; }
.free-card p{ font-size:13px; color:var(--muted); margin-bottom:10px; }
.free-card a{ font-size:13px; font-weight:600; color:var(--teal); }

/* ============================================================
   MENTORS
   ============================================================ */
.mentors{ padding:24px 0 72px; }
.mentor-grid{ display:grid; grid-template-columns:repeat(5, 1fr); gap:16px; }
.mentor-card{ background:var(--panel); border:1px solid var(--line); padding:22px 18px; text-align:left; display:flex; flex-direction:column; gap:12px; align-items:flex-start; }
.avatar{ width:44px; height:44px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-family:var(--serif); font-size:16px; color:var(--panel); flex-shrink:0; }
.mentor-card h3{ font-family:var(--serif); font-size:16px; font-weight:500; }
.mentor-card .niche{ font-size:12px; color:var(--muted); }
.mentor-card .bio{ font-size:13px; color:var(--muted); flex:1; }
.mentor-card button{ font-size:13px; font-weight:600; color:var(--teal); background:none; border:0; padding:0; border-bottom:1px solid var(--teal-soft); }

footer{ border-top:1px solid var(--line); padding:32px 0; }
footer .wrap{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
footer p{ font-size:13px; color:var(--muted); }

/* ============================================================
   ADMIN — LOGIN
   ============================================================ */
.login-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.login-card{ background:var(--panel); border:1px solid var(--line); padding:40px 32px; width:100%; max-width:380px; }
.login-card .logo{ margin-bottom:6px; }
.login-card p.hint{ font-size:13px; color:var(--muted); margin-bottom:24px; }

/* ============================================================
   ADMIN — SHELL
   ============================================================ */
.admin-header{ background:var(--ink); color:var(--paper); }
.admin-header .wrap{ display:flex; align-items:center; justify-content:space-between; height:64px; }
.admin-header .logo{ color:var(--paper); }
.admin-header .logo span{ color:var(--gold); }
.admin-main{ padding:32px 0 80px; }

.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:28px; }
.tab-btn{ padding:12px 18px; background:none; border:0; font-size:14px; font-weight:600; color:var(--muted); border-bottom:2px solid transparent; }
.tab-btn.active{ color:var(--ink); border-color:var(--gold); }
.tab-panel{ display:none; }
.tab-panel.active{ display:block; }

.toolbar{ display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; gap:12px; flex-wrap:wrap; }
.toolbar h2{ font-family:var(--serif); font-size:22px; font-weight:500; }

.form-card{ background:var(--panel); border:1px solid var(--line); padding:24px; margin-bottom:28px; display:none; }
.form-card.open{ display:block; }
.form-card h3{ font-family:var(--serif); font-size:17px; font-weight:500; margin-bottom:18px; }
.form-grid{ display:grid; grid-template-columns:repeat(2, 1fr); gap:16px; }
.form-group{ display:flex; flex-direction:column; gap:6px; }
.form-group.full{ grid-column:1/-1; }
.form-group label{ font-size:13px; font-weight:600; color:var(--ink); }
.form-group .help{ font-size:12px; color:var(--muted); font-weight:400; }
input, select, textarea{
  font-family:inherit; font-size:14px; color:var(--ink);
  padding:10px 12px; border:1px solid var(--line); background:var(--paper); border-radius:3px;
}
textarea{ resize:vertical; min-height:70px; }
.form-actions{ display:flex; gap:10px; margin-top:20px; }

.data-table{ width:100%; border-collapse:collapse; background:var(--panel); border:1px solid var(--line); }
.data-table th, .data-table td{ text-align:left; padding:12px 14px; border-bottom:1px solid var(--line); font-size:14px; }
.data-table th{ font-size:12px; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); font-weight:600; background:var(--paper-alt); }
.data-table tr:last-child td{ border-bottom:0; }
.row-actions{ display:flex; gap:8px; }
.row-actions button{ font-size:12px; font-weight:600; background:none; border:1px solid var(--line); padding:5px 10px; border-radius:3px; color:var(--ink); }
.row-actions button:hover{ border-color:var(--ink); }
.row-actions button.danger{ color:var(--danger); }
.row-actions button.danger:hover{ border-color:var(--danger); }

.msg{ padding:12px 16px; border-radius:3px; font-size:13px; margin-bottom:20px; display:none; }
.msg.show{ display:block; }
.msg.success{ background:var(--teal-soft); color:var(--teal); }
.msg.error{ background:var(--danger-soft); color:var(--danger); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px){
  .hero .wrap{ grid-template-columns:1fr; gap:32px; }
  .grid{ grid-template-columns:repeat(2, 1fr); }
  .free-grid{ grid-template-columns:1fr; }
  .mentor-grid{ grid-template-columns:repeat(2, 1fr); }
  .main-nav{ display:none; }
  .form-grid{ grid-template-columns:1fr; }
  .data-table{ display:block; overflow-x:auto; white-space:nowrap; }
}
@media (max-width: 520px){
  .grid{ grid-template-columns:1fr; }
  .mentor-grid{ grid-template-columns:1fr; }
  .filter-bar{ flex-direction:column; align-items:stretch; }
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ transition:none !important; }
}
