@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --bg:         #F8F7F3;
  --surface:    #FFFFFF;
  --surface-2:  #F1F0EB;
  --border:     #E6E4DC;
  --text:       #18181A;
  --text-2:     #58584F;
  --text-3:     #9A9990;
  --green:      #4A7A5C;
  --green-dk:   #3A6049;
  --green-bg:   #EBF3EE;
  --warm:       #C96B3A;
  --warm-dk:    #A8562D;
  --warm-bg:    #FCF0E8;
  --r:          12px;
  --r-sm:       8px;
  --r-lg:       20px;
  --sh:         0 1px 3px rgba(0,0,0,0.05), 0 4px 14px rgba(0,0,0,0.06);
  --sh-lg:      0 8px 32px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  --t:          0.15s ease;
  --max-w:      740px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── Navigation ───────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(248,247,243,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}

.logo {
  font-size: 1.05rem; font-weight: 800;
  color: var(--green); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
  letter-spacing: -0.01em;
}
.logo .logo-icon { font-size: 1.25em; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  padding: 7px 13px; border-radius: var(--r-sm);
  transition: var(--t);
}
.nav-links a:hover { background: var(--surface-2); color: var(--text); }

/* ── Layout ───────────────────────────────────────────────────────── */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container--wide { max-width: 1020px; }

/* ── Buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px;
  border-radius: var(--r);
  font-size: 0.9rem; font-weight: 600;
  font-family: inherit;
  cursor: pointer; border: none;
  text-decoration: none;
  transition: var(--t);
  white-space: nowrap;
  line-height: 1.4;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dk); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(74,122,92,0.3); }
.btn-warm { background: var(--warm); color: #fff; }
.btn-warm:hover { background: var(--warm-dk); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201,107,58,0.3); }
.btn-ghost {
  background: transparent; color: var(--text-2);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--text-3); }
.btn-sm { padding: 7px 14px; font-size: 0.825rem; border-radius: var(--r-sm); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--r-lg); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Cards ────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--sh);
}
.card + .card { margin-top: 16px; }

/* ── Forms ────────────────────────────────────────────────────────── */

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-2); letter-spacing: 0.04em;
  text-transform: uppercase; margin-bottom: 7px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: 0.95rem; font-family: inherit;
  color: var(--text); background: var(--surface);
  transition: var(--t);
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-bg);
}
.form-group textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-hint { font-size: 0.8rem; color: var(--text-3); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── SMS Consent ─────────────────────────────────────────────────── */
.sms-consent-box {
  background: var(--green-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.sms-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.83rem;
  color: var(--text-1);
  line-height: 1.5;
}
.sms-consent-label input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  cursor: pointer;
}
.sms-consent-links {
  font-size: 0.75rem;
  color: var(--text-3);
  margin: 8px 0 0 26px;
  line-height: 1.5;
}

/* ── Modal ────────────────────────────────────────────────────────── */

.overlay {
  position: fixed; inset: 0;
  background: rgba(20,20,18,0.4);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border-radius: var(--r-lg) var(--r-lg) var(--r-sm) var(--r-sm);
  width: 100%; max-width: 500px;
  max-height: 92vh; overflow-y: auto;
  padding: 28px 24px 32px;
  transform: translateY(24px);
  transition: transform 0.22s cubic-bezier(.4,0,.2,1);
}
.overlay.open .modal { transform: translateY(0); }

@media (min-width: 600px) {
  .overlay { align-items: center; }
  .modal { border-radius: var(--r-lg); }
}

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  background: var(--surface-2); border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: var(--t);
}
.modal-close:hover { background: var(--border); color: var(--text); }

/* ── Category Grid ────────────────────────────────────────────────── */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 4px;
}
.cat-item {
  padding: 14px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  text-align: center; cursor: pointer;
  transition: var(--t); background: var(--surface);
}
.cat-item:hover { border-color: var(--green); background: var(--green-bg); }
.cat-item.selected { border-color: var(--green); background: var(--green-bg); }
.cat-item .ci { font-size: 1.75rem; display: block; margin-bottom: 5px; }
.cat-item .cl { font-size: 0.72rem; font-weight: 500; color: var(--text-2); line-height: 1.3; }

/* ── Need Items ───────────────────────────────────────────────────── */

.need-item {
  display: flex; gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
  transition: var(--t);
}
.need-item:hover { border-color: #d5e8db; box-shadow: var(--sh); }

.need-icon {
  font-size: 1.5rem;
  width: 44px; height: 44px;
  background: var(--green-bg);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.need-body { flex: 1; min-width: 0; }
.need-title { font-size: 0.95rem; font-weight: 700; }
.need-desc { font-size: 0.83rem; color: var(--text-2); margin-top: 2px; }

/* ── Slots ────────────────────────────────────────────────────────── */

.slot-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }

.slot {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.slot.open { background: var(--green-bg); }
.slot-date { font-weight: 600; flex: 1; min-width: 100px; }
.slot-time { color: var(--text-2); font-size: 0.8rem; }
.slot-helper { font-size: 0.8rem; color: var(--green-dk); font-weight: 600; }
.slot-open { font-size: 0.79rem; color: var(--text-3); }

/* ── Leaderboard ──────────────────────────────────────────────────── */

.lb-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.lb-item:last-child { border-bottom: none; }
.lb-rank { font-size: 1.2rem; width: 30px; text-align: center; }
.lb-name { flex: 1; font-weight: 500; font-size: 0.95rem; }
.lb-score { display: flex; align-items: center; gap: 5px; font-size: 0.875rem; color: var(--text-2); }

/* ── Blog Posts ───────────────────────────────────────────────────── */

.post {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.post:last-child { border-bottom: none; }
.post-meta {
  font-size: 0.78rem; color: var(--text-3);
  margin-bottom: 9px; display: flex; justify-content: space-between; align-items: center;
}
.post-content { font-size: 0.93rem; line-height: 1.75; white-space: pre-wrap; color: var(--text-2); }

/* ── Date pill tabs ───────────────────────────────────────────────── */

.method-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.method-tab {
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem; font-weight: 500;
  cursor: pointer; border: 1.5px solid var(--border);
  background: transparent; color: var(--text-2);
  font-family: inherit;
  transition: var(--t);
}
.method-tab.active { border-color: var(--green); background: var(--green-bg); color: var(--green-dk); }

/* ── Dates preview ────────────────────────────────────────────────── */

.date-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px; min-height: 32px;
}
.date-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-bg); color: var(--green-dk);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.8rem; font-weight: 500;
}
.date-chip .rm {
  cursor: pointer; font-size: 0.9em; opacity: 0.6;
  background: none; border: none; color: inherit;
  padding: 0; line-height: 1;
}
.date-chip .rm:hover { opacity: 1; }

/* ── Tabs ─────────────────────────────────────────────────────────── */

.tabs {
  display: flex; gap: 4px;
  background: var(--surface-2);
  border-radius: var(--r); padding: 4px;
  margin-bottom: 24px;
}
.tab {
  flex: 1; padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 0.875rem; font-weight: 500;
  text-align: center; cursor: pointer;
  transition: var(--t); background: transparent;
  border: none; color: var(--text-2); font-family: inherit;
}
.tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── Manage Bar ───────────────────────────────────────────────────── */

.manage-bar {
  display: flex; align-items: center; gap: 14px;
  background: var(--green-bg);
  border: 1.5px solid var(--green);
  border-radius: var(--r); padding: 13px 18px;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.manage-bar-text { flex: 1; font-size: 0.875rem; color: var(--green-dk); font-weight: 500; }
.manage-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Profile Header ───────────────────────────────────────────────── */

.profile-header { display: flex; gap: 18px; align-items: flex-start; }
.profile-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--green-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: var(--green-dk);
  flex-shrink: 0;
}
.profile-name { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.profile-loc { font-size: 0.85rem; color: var(--text-3); margin-top: 3px; }
.profile-since { font-size: 0.78rem; color: var(--text-3); margin-top: 4px; }
.profile-desc {
  font-size: 0.93rem; color: var(--text-2); line-height: 1.72;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border);
  white-space: pre-wrap;
}
.need-desc { white-space: pre-wrap; }

/* ── Payment Buttons ──────────────────────────────────────────────── */

.payment-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--r);
  font-size: 0.875rem; font-weight: 600;
  text-decoration: none; transition: var(--t);
  border: none; cursor: pointer; font-family: inherit;
}
.pay-btn:hover { transform: translateY(-1px); }
.pay-venmo { background: #3D95CE; color: #fff; }
.pay-paypal { background: #003087; color: #fff; }

/* ── Section Header ───────────────────────────────────────────────── */

.section-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.section-title { font-size: 1.05rem; font-weight: 700; }

/* ── Toast ────────────────────────────────────────────────────────── */

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff;
  padding: 11px 22px; border-radius: 100px;
  font-size: 0.875rem; font-weight: 500;
  z-index: 1000; opacity: 0;
  transition: opacity 0.25s; pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; }

/* ── URL Share Box ────────────────────────────────────────────────── */

.url-box {
  display: flex; gap: 10px; align-items: center;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 11px 15px;
}
.url-text {
  flex: 1; font-size: 0.82rem; font-family: 'SF Mono', 'Fira Mono', monospace;
  color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Misc ─────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 600;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-warm  { background: var(--warm-bg);  color: var(--warm);  }
.badge-gray  { background: var(--surface-2); color: var(--text-2); }

.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.empty {
  text-align: center; padding: 44px 20px;
  color: var(--text-3);
}
.empty .ei { font-size: 2.5rem; margin-bottom: 12px; }
.empty p { font-size: 0.9rem; }

.alert { padding: 13px 17px; border-radius: var(--r); font-size: 0.875rem; margin-bottom: 16px; }
.alert-success { background: var(--green-bg); color: var(--green-dk); }
.alert-warm    { background: var(--warm-bg);  color: var(--warm-dk); }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

footer {
  padding: 40px 0 32px;
  text-align: center;
  font-size: 0.8rem; color: var(--text-3);
  border-top: 1px solid var(--border);
  margin-top: 64px;
}

/* ── Landing ──────────────────────────────────────────────────────── */

.hero {
  padding: 80px 0 64px;
  text-align: center;
}

/* Wordmark */
.hero-wordmark {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin-bottom: 18px;
}
.hero-wordmark-icon { font-size: 2.6rem; line-height: 1; }
.hero-brand {
  font-size: clamp(2.8rem, 8vw, 4.8rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  color: var(--text);
}
.hero-brand .hjelpe { color: var(--green); }

/* Norwegian callout */
.hero-norsk { margin-bottom: 28px; }
.norsk-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-bg);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 7px 18px;
  font-size: 0.875rem; color: var(--text-2); line-height: 1.4;
}
.norsk-pill em { color: var(--green-dk); font-style: italic; font-weight: 600; }

.hero-title {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 700; line-height: 1.3;
  letter-spacing: -0.02em; margin-bottom: 14px;
  color: var(--text-2);
}
.hero-sub {
  font-size: 1.05rem; color: var(--text-2);
  max-width: 500px; margin: 0 auto 36px; line-height: 1.7;
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.how { padding: 48px 0 60px; }
.how-label {
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3); text-align: center;
  margin-bottom: 10px;
}
.how-title {
  font-size: 1.5rem; font-weight: 800; text-align: center;
  letter-spacing: -0.02em; margin-bottom: 32px;
}
.how-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.how-card {
  background: var(--surface); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--sh);
}
.how-card-title {
  font-size: 0.95rem; font-weight: 700; margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px; color: var(--text);
}
.how-step { display: flex; gap: 13px; margin-bottom: 14px; }
.how-step:last-child { margin-bottom: 0; }
.how-n {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--green-bg); color: var(--green-dk);
  font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.how-step p { font-size: 0.875rem; color: var(--text-2); }

.hotdog-section {
  text-align: center; padding: 48px 24px;
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--sh); margin: 0 0 60px;
}
.hotdog-icon { font-size: 3rem; margin-bottom: 12px; }
.hotdog-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 10px; }
.hotdog-text { font-size: 0.9rem; color: var(--text-2); max-width: 440px; margin: 0 auto; }

/* ── Register / Find pages ────────────────────────────────────────── */

.page-top { padding: 44px 0 28px; }
.page-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.page-sub { color: var(--text-2); margin-top: 6px; font-size: 0.95rem; }

.success-box {
  text-align: center; padding: 44px 28px;
}
.success-icon { font-size: 3rem; margin-bottom: 14px; }
.success-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.success-sub { color: var(--text-2); font-size: 0.9rem; margin-bottom: 28px; }

.search-result {
  display: flex; align-items: center; gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 10px; cursor: pointer;
  text-decoration: none; color: inherit;
  transition: var(--t);
}
.search-result:hover { border-color: var(--green); box-shadow: var(--sh); }
.sr-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--green-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; color: var(--green-dk); flex-shrink: 0;
}
.sr-name { font-weight: 700; font-size: 1rem; }
.sr-loc { font-size: 0.83rem; color: var(--text-3); margin-top: 2px; }

/* ── Manage pin box ───────────────────────────────────────────────── */

.manage-pin-box {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 16px 18px;
  margin-bottom: 20px;
}
.manage-pin-title { font-size: 0.85rem; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.manage-pin-row { display: flex; gap: 10px; align-items: center; }
.manage-pin-row input {
  max-width: 220px; padding: 9px 13px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-size: 0.95rem; font-family: inherit;
  background: var(--surface); color: var(--text);
  transition: var(--t);
}
.manage-pin-row input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }

/* ── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 620px) {
  .nav { padding: 0 16px; }
  .container { padding: 0 16px; }
  .card { padding: 20px; }
  .modal { padding: 24px 18px 28px; }
  .how-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 40px; }
  .hero-title { font-size: 1.75rem; }
  .manage-bar { flex-direction: column; align-items: flex-start; }
  .tabs { font-size: 0.82rem; }
  .tab { padding: 8px 6px; }
}
