/* ============ Kasade — public site styles ============ */
:root {
  --rose: #a4133c;
  --rose-dark: #800f2f;
  --rose-light: #ff4d6d;
  --rose-soft: #fff0f3;
  --gold: #c9a227;
  --ink: #2b2118;
  --ink-soft: #6b5e55;
  --cream: #fff8f3;
  --card: #ffffff;
  --line: #f0e2da;
  --ok: #2a9d5c;
  --warn: #d98e04;
  --err: #c92a2a;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(43, 33, 24, 0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--rose); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5rem; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }

.container { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }
.main-content { padding: 1.5rem 0 3rem; }
.narrow { max-width: 480px; }
.muted { color: var(--ink-soft); }

/* ---------- header ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; }
.brand-logo { height: 52px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.site-nav > a { color: var(--ink); font-weight: 600; font-size: 0.95rem; padding: 0.3rem 0.2rem; }
.site-nav > a:hover, .site-nav > a.active { color: var(--rose); text-decoration: none; border-bottom: 2px solid var(--rose); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 22px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; }
.inline-form { display: inline; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--rose-dark) 0%, var(--rose) 55%, var(--rose-light) 100%);
  color: #fff;
  padding: 3rem 0 4rem;
}
.hero-copy h1 { font-size: 2.1rem; max-width: 620px; }
.hero-copy p { font-size: 1.05rem; opacity: 0.92; max-width: 560px; }
.hero-search { margin-top: 1.5rem; padding: 1rem; }
.hero-search-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.hero-search label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; color: var(--ink-soft); min-width: 110px; flex: 1; }
.hero-search-join { padding-bottom: 0.65rem; color: var(--ink-soft); }
.hero-search select {
  border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.6rem;
  font-size: 0.95rem; background: #fff; color: var(--ink); min-width: 100%;
}

/* ---------- stats band ---------- */
.stats-band {
  display: flex; gap: 1rem; justify-content: space-around; flex-wrap: wrap;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.25rem; margin: -2rem auto 0; position: relative;
}
.stats-band div { text-align: center; }
.stats-band strong { display: block; font-size: 1.5rem; color: var(--rose); }
.stats-band span { color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- sections & cards ---------- */
.section { margin: 2.5rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.link-more { font-weight: 600; font-size: 0.9rem; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.empty-state { text-align: center; padding: 2.5rem 1rem; }

/* ---------- profile cards ---------- */
.pcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}
.pcard {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pcard:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(43,33,24,0.12); }
.pcard-photo { display: block; position: relative; aspect-ratio: 4 / 4.4; background: var(--rose-soft); }
.pcard-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--gold); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 0.2rem 0.5rem; border-radius: 999px;
}
.pcard-body { padding: 0.85rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.pcard-body h3 { margin: 0; font-size: 1.05rem; }
.pcard-body h3 a { color: var(--ink); }
.pcard-body h3 a:hover { color: var(--rose); text-decoration: none; }
.pcard-code { color: var(--ink-soft); font-size: 0.78rem; font-weight: 500; }
.pcard-meta { margin: 0; font-size: 0.86rem; color: var(--ink-soft); flex: 1; }

/* ---------- avatars ---------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: 700; color: #fff; background: var(--rose);
  width: 40px; height: 40px; font-size: 1.1rem; flex-shrink: 0;
}
.avatar-male { background: #14526e; }
.avatar-lg { width: 100%; height: 100%; border-radius: 0; font-size: 3.5rem; aspect-ratio: 1; }
.avatar-xl { width: 160px; height: 160px; font-size: 4rem; }

/* ---------- buttons, chips, flashes ---------- */
.btn {
  display: inline-block; border: 2px solid transparent; border-radius: 8px;
  padding: 0.6rem 1.3rem; font-size: 0.95rem; font-weight: 700; cursor: pointer;
  text-align: center; font-family: inherit; line-height: 1.3;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-primary { background: var(--rose); color: #fff; }
.btn-outline { background: #fff; color: var(--rose); border-color: var(--rose); }
.btn-ghost { background: transparent; color: var(--rose); }
.btn-danger { background: var(--err); color: #fff; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.btn-block { display: block; width: 100%; margin: 0.5rem 0; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.chip {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; background: var(--rose-soft); color: var(--rose-dark);
  text-transform: capitalize;
}
.chip-ok { background: #e6f6ec; color: var(--ok); }
.chip-warn { background: #fdf3e0; color: var(--warn); }
.chip-err { background: #fde8e8; color: var(--err); }
.chip-active { outline: 2px solid currentColor; }

.flash {
  border-radius: 8px; padding: 0.75rem 1rem; margin: 0 0 1rem; font-weight: 600;
}
.flash-ok { background: #e6f6ec; color: var(--ok); }
.flash-err { background: #fde8e8; color: var(--err); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 0; }
.field > span { font-size: 0.83rem; font-weight: 600; color: var(--ink-soft); }
.field em { color: var(--rose); font-style: normal; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.65rem;
  font-size: 0.95rem; font-family: inherit; background: #fff; color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--rose); outline-offset: -1px; border-color: var(--rose);
}
.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row .field { min-width: 150px; }
.form-grid { display: flex; flex-direction: column; gap: 1rem; margin: 0.75rem 0 1.5rem; }
.field-err { color: var(--err); font-size: 0.8rem; font-weight: 600; }
.hint { color: var(--ink-soft); font-weight: 400; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.75rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin-bottom: 1.5rem; }
.filter-bar .field { min-width: 120px; flex: 1; }
.filter-bar .field-keyword { flex: 2; min-width: 180px; }

/* ---------- auth & register ---------- */
.auth-card { margin-top: 2rem; padding: 2rem; }
.auth-card h1 { text-align: center; }
.auth-alt { text-align: center; margin-top: 1rem; font-size: 0.9rem; }
.register-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; margin-top: 1rem; }
.register-intro { padding-top: 1rem; }
.register-intro ul { padding-left: 1.2rem; }
.check-list li { margin: 0.4rem 0; }
.register-form h2 {
  font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--rose); border-bottom: 1px solid var(--line); padding-bottom: 0.4rem; margin-top: 0.5rem;
}

/* ---------- dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.dash-profile { display: flex; align-items: center; gap: 1rem; }
.dash-photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem; margin: 1.25rem 0;
}
.stat { text-align: center; padding: 1rem; }
.stat strong { display: block; font-size: 1.6rem; color: var(--rose); }

/* ---------- profile detail ---------- */
.detail-grid { display: grid; grid-template-columns: 320px 1fr; gap: 1.5rem; align-items: start; }
.detail-left { text-align: center; position: sticky; top: 90px; }
.detail-photo { width: 100%; border-radius: var(--radius); object-fit: cover; aspect-ratio: 4/4.6; }
.detail-right { display: flex; flex-direction: column; gap: 1.25rem; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 0.45rem 1rem; margin: 0; }
.kv dt { font-weight: 600; color: var(--ink-soft); font-size: 0.88rem; }
.kv dd { margin: 0; }

/* ---------- interests ---------- */
.interest-list { display: flex; flex-direction: column; gap: 0.75rem; }
.interest-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.interest-profile { display: flex; align-items: center; gap: 0.75rem; min-width: 230px; color: var(--ink); }
.interest-profile img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.interest-profile strong { display: block; }
.interest-profile span.muted { font-size: 0.82rem; }
.interest-mid { flex: 1; min-width: 180px; }
.interest-mid p { margin: 0 0 0.25rem; font-style: italic; }
.interest-actions { display: flex; gap: 0.5rem; align-items: center; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
  text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-soft); padding: 0.5rem 0.6rem; border-bottom: 2px solid var(--line);
}
.table td { padding: 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ---------- pager ---------- */
.pager { display: flex; gap: 0.4rem; justify-content: center; margin: 1.5rem 0; flex-wrap: wrap; }
.pager-btn {
  padding: 0.4rem 0.85rem; border-radius: 8px; background: #fff;
  border: 1px solid var(--line); font-weight: 600; font-size: 0.9rem; color: var(--ink);
}
.pager-btn:hover { border-color: var(--rose); color: var(--rose); text-decoration: none; }
.pager-current { background: var(--rose); color: #fff; border-color: var(--rose); }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.step { position: relative; padding-top: 1.75rem; }
.step-num {
  position: absolute; top: -14px; left: 1rem; width: 34px; height: 34px;
  background: var(--gold); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}

/* ---------- error page ---------- */
.error-page { padding: 3rem 0; }
.error-card { max-width: 480px; margin: 2rem auto; text-align: center; padding: 2.5rem; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--rose); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #f3e9e2; margin-top: 2rem; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding: 2.5rem 0 1.5rem;
}
.footer-logo { height: 44px; filter: brightness(0) invert(1); margin-bottom: 0.5rem; }
.site-footer h4 { margin: 0 0 0.6rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); }
.site-footer a { display: block; color: #f3e9e2; font-size: 0.9rem; margin: 0.3rem 0; opacity: 0.85; }
.site-footer a:hover { opacity: 1; text-decoration: none; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.12); padding: 1rem 0; font-size: 0.82rem; opacity: 0.7;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-left { position: static; }
  .register-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; flex-direction: column; align-items: stretch;
    width: 100%; padding: 0.5rem 0; gap: 0;
  }
  .site-nav.open { display: flex; }
  .site-nav > a { padding: 0.7rem 0.5rem; border-bottom: 0 !important; }
  .header-inner { flex-wrap: wrap; }
  .hero { padding: 2rem 0 3rem; }
  .hero-copy h1 { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .kv dt { margin-top: 0.5rem; }
}
