/* =====================
   BASE
   ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #f5ede0;
  --bg-card:    #ffffff;
  --bg-dark:    #e8dfd3;
  --orange:     #f05100;
  --orange-10:  rgba(240, 81, 0, 0.10);
  --orange-05:  rgba(240, 81, 0, 0.05);
  --text:       #0d0b09;
  --text-muted: #6b5e52;
  --border:     rgba(13, 11, 9, 0.10);
  --border-md:  rgba(13, 11, 9, 0.16);
  --font:       'JetBrains Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* =====================
   BUTTONS
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 0.375rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.btn-primary:hover {
  background: #d94800;
  border-color: #d94800;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(240,81,0,0.3);
}

/* Ghost on dark (hero) */
.btn-ghost-light {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
}
.btn-ghost-light:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.4);
}

/* Ghost on light bg */
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-md);
}
.btn-ghost:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.btn-full { width: 100%; justify-content: center; }

/* =====================
   NAV
   ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(245, 237, 224, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.nav-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.nav-links a { transition: color 0.15s; }
.nav-links a:hover,
.nav-links .nav-active { color: var(--text); }
.nav-token { color: var(--orange) !important; font-weight: 600; }

/* =====================
   HERO — GLASS OFFICE BUILDING
   ===================== */
.hero {
  position: relative;
  min-height: calc(100vh - 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /* === Glass Office Building Background === */
  background:
    /* Diagonal glass reflection — top left sweep */
    linear-gradient(
      118deg,
      transparent 0%,
      transparent 28%,
      rgba(160, 200, 255, 0.05) 28%,
      rgba(160, 200, 255, 0.05) 52%,
      transparent 52%
    ),
    /* Second reflection sweep */
    linear-gradient(
      118deg,
      transparent 40%,
      rgba(200, 230, 255, 0.04) 40%,
      rgba(200, 230, 255, 0.04) 68%,
      transparent 68%
    ),
    /* Vertical window mullions */
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 78px,
      rgba(140, 180, 230, 0.18) 78px,
      rgba(140, 180, 230, 0.18) 80px,
      transparent 80px,
      transparent 158px
    ),
    /* Horizontal floor plates */
    repeating-linear-gradient(
      180deg,
      transparent 0px,
      transparent 52px,
      rgba(120, 165, 220, 0.14) 52px,
      rgba(120, 165, 220, 0.14) 54px,
      transparent 54px,
      transparent 106px
    ),
    /* Subtle window glow — warm light from inside */
    radial-gradient(ellipse 60% 40% at 70% 40%, rgba(255, 200, 100, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 30% 60%, rgba(200, 230, 255, 0.06) 0%, transparent 70%),
    /* Sky gradient + steel facade base */
    linear-gradient(
      170deg,
      #0a1628 0%,
      #0f2040 15%,
      #152d58 30%,
      #1a3870 45%,
      #16305a 60%,
      #0e2244 75%,
      #091830 90%,
      #060f20 100%
    );
}

/* Frosted glass bottom fade into page */
.hero-glass-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(245, 237, 224, 0.6) 70%, var(--bg) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding: 4rem 1.5rem 5rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
}
.status-badge strong { color: rgba(255,255,255,0.95); }

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #f05100;
  box-shadow: 0 0 6px rgba(240,81,0,0.8);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.terminal-prompt {
  font-size: 0.75rem;
  color: #f05100;
  font-weight: 500;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.cursor {
  display: inline-block;
  color: #f05100;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-sub {
  font-size: 0.85rem;
  color: rgba(200, 220, 245, 0.8);
  line-height: 1.75;
  max-width: 30rem;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

/* =====================
   PROTOCOL SECTION
   ===================== */
.protocol {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 5rem 1.5rem;
}

.section-inner {
  max-width: 72rem;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  letter-spacing: 0.06em;
}

.section-header h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 0.84rem;
  color: var(--text-muted);
  max-width: 30rem;
  margin: 0 auto;
  line-height: 1.65;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover {
  border-color: rgba(240,81,0,0.35);
  box-shadow: 0 4px 16px rgba(240,81,0,0.06);
}

.card-num {
  position: absolute;
  top: 0.9rem; right: 1rem;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.card-icon {
  font-size: 1rem;
  color: var(--orange);
  margin-bottom: 0.1rem;
}
.card h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}
.card p {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}
.card code {
  display: block;
  background: rgba(13,11,9,0.04);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.72rem;
  color: var(--orange);
  font-family: var(--font);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =====================
   MANIFESTO
   ===================== */
.manifesto {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
}
.manifesto-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.manifesto-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.55rem;
}
.manifesto-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 44rem;
}

/* =====================
   FOOTER
   ===================== */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 0;
}
.footer-top {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.footer-brand p {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 22rem;
  margin-top: 0.75rem;
}
.footer-col h4 {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.85rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul li a { font-size: 0.76rem; color: var(--text-muted); transition: color 0.15s; }
.footer-col ul li a:hover { color: var(--orange); }
.footer-bottom {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.footer-icons { display: flex; gap: 1rem; }
.footer-icons a { color: var(--text-muted); display: flex; align-items: center; transition: color 0.15s; }
.footer-icons a:hover { color: var(--text); }
.footer-terminal {
  background: var(--text);
  color: #7ab870;
  font-size: 0.7rem;
  padding: 0.6rem 1.5rem;
}

/* =====================
   TASKS PAGE
   ===================== */
.tasks-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
}
.tasks-header-inner {
  max-width: 40rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.tasks-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.tasks-header p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.tasks-community-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--orange);
  margin-top: 0.25rem;
  transition: opacity 0.15s;
}
.tasks-community-link:hover { opacity: 0.75; }

/* Filter bar */
.tasks-filters {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  position: sticky;
  top: 52px;
  z-index: 100;
}
.tasks-filters-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.filter-refresh {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font);
  font-size: 0.76rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: 0.25rem;
  transition: all 0.15s;
}
.filter-refresh:hover { color: var(--text); background: var(--bg-dark); }
.filter-refresh.spinning svg { animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.filter-tabs { display: flex; gap: 0.5rem; }
.filter-tab {
  font-family: var(--font);
  font-size: 0.76rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.25rem;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  transition: all 0.15s;
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

/* Tasks list */
.tasks-main {
  background: var(--bg);
  min-height: 60vh;
  padding: 1.5rem;
}
.tasks-main-inner {
  max-width: 72rem;
  margin: 0 auto;
}
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--bg-card);
}

/* Individual task row */
.task-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: rgba(240,81,0,0.02); }
.task-row.status-full { opacity: 0.55; }

.task-row-left { min-width: 0; }
.task-row-id {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.task-row-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.task-row-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.task-row-reward {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--orange);
  white-space: nowrap;
}

.task-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.task-status {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.task-status.available { background: rgba(22,163,74,0.1); color: #16a34a; border: 1px solid rgba(22,163,74,0.2); }
.task-status.full      { background: rgba(107,114,128,0.1); color: #6b7280; border: 1px solid rgba(107,114,128,0.2); }
.task-status.completed { background: rgba(59,130,246,0.1); color: #3b82f6; border: 1px solid rgba(59,130,246,0.2); }

.task-deadline {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.task-difficulty {
  font-size: 0.65rem;
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  border: 1px solid var(--border-md);
  color: var(--text-muted);
}

.task-claim-btn {
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 0.3rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.task-claim-btn:hover {
  background: #d94800;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(240,81,0,0.25);
}
.task-claim-btn:disabled {
  background: var(--bg-dark);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Empty state */
.tasks-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

/* =====================
   CLAIM MODAL
   ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: 0.75rem;
  width: 100%;
  max-width: 28rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--bg-dark); color: var(--text); }

.modal-body { padding: 1.5rem; }

.modal-task-info {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.modal-task-info strong { color: var(--text); display: block; margin-bottom: 0.25rem; font-size: 0.84rem; }
.modal-task-reward { color: var(--orange); font-weight: 700; font-size: 1rem; }

.modal-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.form-input,
.form-textarea {
  font-family: var(--font);
  font-size: 0.8rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border-md);
  border-radius: 0.375rem;
  color: var(--text);
  transition: border-color 0.15s;
  resize: none;
  outline: none;
  width: 100%;
}
.form-input:focus,
.form-textarea:focus { border-color: var(--orange); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); opacity: 0.7; }

.modal-actions { margin-top: 0.25rem; }

.modal-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
  margin-top: 0.25rem;
}

/* Success state */
.modal-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  padding: 1rem 0;
}
.modal-success-icon { font-size: 2rem; }
.modal-success h3 { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.modal-success p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.65; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .task-row { grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
  .task-row-reward { font-size: 0.85rem; }
}

@media (max-width: 640px) {
  .cards-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .manifesto-inner { flex-direction: column; align-items: flex-start; }
  .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .task-row { grid-template-columns: 1fr; }
  .task-row-meta { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .task-claim-btn { width: 100%; text-align: center; justify-content: center; }
}
