:root {
  --bg: #14110d;          /* deep bark */
  --bg-elev: #1c1812;     /* darker soil */
  --bg-card: #221d15;     /* card surface */
  --border: #322a20;      /* muted bark */
  --text: #ece4d3;        /* soft cream */
  --muted: #a39681;       /* faded sand */
  --accent: #7fae5a;      /* leaf green */
  --accent-2: #b08a4a;    /* warm bronze/brown */
  --success: #8ec07c;     /* moss */
  --danger: #c46a52;      /* clay red */
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --max: 1100px;
}

* { box-sizing: border-box; }

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(127, 174, 90, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(176, 138, 74, 0.15), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
}

/* Subtle leafy texture across the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'><g fill='none' stroke='%237fae5a' stroke-width='1.2' stroke-linecap='round'><path d='M30 60 Q60 30 100 50 Q70 65 30 60 Z'/><path d='M60 50 Q60 30 100 50'/><path d='M150 150 Q180 120 215 145 Q185 165 150 150 Z'/><path d='M180 140 Q180 120 215 145'/><path d='M40 170 Q70 145 100 175 Q72 195 40 170 Z'/><path d='M65 160 Q70 145 100 175'/></g></svg>");
  background-size: 360px 360px;
  background-repeat: repeat;
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(20, 17, 13, 0.75);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.3px;
}
.brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--text); background: var(--bg-elev); text-decoration: none; }
.nav-links a.active { color: var(--text); background: var(--bg-elev); }


/* Hero */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 20px;
  width: 280px;
  height: 280px;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  opacity: 0.55;
}
.hero::before {
  left: -60px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><g fill='none' stroke='%237fae5a' stroke-width='2' stroke-linecap='round'><path d='M10 180 Q60 120 130 60 Q150 45 180 30'/><path d='M60 130 Q70 100 50 70 Q90 80 100 110 Q70 115 60 130 Z' fill='%237fae5a' fill-opacity='0.18'/><path d='M50 90 Q70 100 100 110'/><path d='M90 90 Q100 60 80 35 Q120 40 130 75 Q105 85 90 90 Z' fill='%237fae5a' fill-opacity='0.14'/><path d='M85 60 Q100 60 130 75'/><path d='M120 110 Q140 110 160 90 Q160 130 130 140 Q115 125 120 110 Z' fill='%23b08a4a' fill-opacity='0.18'/><path d='M125 120 Q140 110 160 90'/></g></svg>");
  transform: rotate(-8deg);
}
.hero::after {
  right: -60px;
  top: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><g fill='none' stroke='%237fae5a' stroke-width='2' stroke-linecap='round'><path d='M190 190 Q140 130 70 70 Q50 55 20 40'/><path d='M140 130 Q130 100 150 70 Q110 80 100 110 Q130 115 140 130 Z' fill='%237fae5a' fill-opacity='0.18'/><path d='M150 90 Q130 100 100 110'/><path d='M110 90 Q100 60 120 35 Q80 40 70 75 Q95 85 110 90 Z' fill='%23b08a4a' fill-opacity='0.16'/><path d='M115 60 Q100 60 70 75'/><path d='M80 110 Q60 110 40 90 Q40 130 70 140 Q85 125 80 110 Z' fill='%237fae5a' fill-opacity='0.16'/></g></svg>");
  transform: rotate(8deg) scaleX(-1);
}
.hero-watermark {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: clamp(-100px, -8vw, -35px);
  width: var(--hero-watermark-width, 76vw);
  height: auto;
  transform: translateY(-10%);
  opacity: 0.12;
  pointer-events: none;
  mask-image: linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.12) 100%, transparent 42%);
}
.hero > .container { position: relative; z-index: 2; }
.hero-logo {
  width: min(100%, 760px);
  height: auto;
  margin: 0 auto 32px;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.3));
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 14px;
  background: linear-gradient(90deg, #f4ecd8, #b6d199 55%, #d8b274);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto 28px;
}
.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (orientation: landscape) {
  :root { --hero-watermark-width: 76vw; }
}
@media (orientation: portrait) {
  :root { --hero-watermark-width: 88vw; }
}
@media (min-aspect-ratio: 9/10) and (max-aspect-ratio: 10/9) {
  :root { --hero-watermark-width: 82vw; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: #2a241b; border-color: #4a3f30; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: white;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; border-radius: 9px; }

/* Sections */
.section {
  padding: 50px 0;
}
.section h2 {
  font-size: 1.6rem;
  margin: 0 0 8px;
}
.section .subtitle {
  color: var(--muted);
  margin: 0 0 28px;
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.15s ease, border-color 0.2s ease;
  overflow: hidden;
}
.card:hover { border-color: #4a3f30; transform: translateY(-2px); }
.card-with-hero { padding: 0; }
.card-with-hero .card-body { padding: 18px 22px 22px; }
.card-hero {
  height: 150px;
  background-size: cover;
  background-position: center;
  background-color: #1a1610;
  border-bottom: 1px solid var(--border);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.card-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--muted);
  background: linear-gradient(135deg, rgba(127,174,90,0.15), rgba(176,138,74,0.15));
}
.card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.card p { color: var(--muted); margin: 6px 0 16px; font-size: 0.95rem; }
.card .card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Forms */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 700px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(127, 174, 90, 0.18);
}

.notice {
  background: rgba(127, 174, 90, 0.08);
  border: 1px solid rgba(127, 174, 90, 0.3);
  color: #d6e4c2;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 22px;
}

/* Backlog */
.backlog-list { display: flex; flex-direction: column; gap: 12px; }
.backlog-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  align-items: center;
}
.vote-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  user-select: none;
}
.vote-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 38px; height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s ease;
}
.vote-btn:hover { color: var(--text); border-color: #4a3f30; }
.vote-btn.active.up { color: var(--success); border-color: var(--success); }
.vote-btn.active.down { color: var(--danger); border-color: var(--danger); }
.vote-score { font-weight: 700; font-size: 1rem; min-width: 22px; text-align: center; }
.backlog-item h4 { margin: 0 0 4px; font-size: 1.02rem; }
.backlog-item .meta { color: var(--muted); font-size: 0.85rem; }
.backlog-item p { margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.chip {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.active { color: var(--text); background: linear-gradient(135deg, rgba(127,174,90,0.22), rgba(176,138,74,0.22)); border-color: rgba(127,174,90,0.5); }

/* Feedback list */
.fb-list { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.fb-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.fb-item .fb-meta { color: var(--muted); font-size: 0.8rem; margin-bottom: 4px; }
.fb-item p { margin: 0; font-size: 0.95rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 26px 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer .footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 12px;
}

.site-footer .footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.site-footer .footer-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 600px) {
  .hero { padding: 50px 0 30px; }
  .nav-links a { padding: 6px 8px; font-size: 0.88rem; }
  .hero::before, .hero::after { width: 170px; height: 170px; opacity: 0.35; }
}

/* Branch divider — decorative separator between sections */
.leaf-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 -10px;
  pointer-events: none;
}
.leaf-divider svg {
  width: min(560px, 90%);
  height: 38px;
  opacity: 0.7;
}

/* Small leaf accent before section headings */
.section h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section h2::before {
  content: "";
  width: 22px;
  height: 22px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 21 Q9 13 14 9 Q19 5 22 3' fill='none' stroke='%237fae5a' stroke-width='2' stroke-linecap='round'/><path d='M9 17 Q11 12 9 7 Q15 9 16 14 Q12 16 9 17 Z' fill='%237fae5a' fill-opacity='0.55' stroke='%237fae5a' stroke-width='1.2'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* Tiny leaf in card top-right */
.card { position: relative; }
.card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 20 Q11 12 20 5' fill='none' stroke='%23b08a4a' stroke-width='1.5' stroke-linecap='round' opacity='0.6'/><path d='M10 16 Q12 11 10 6 Q16 8 17 13 Q13 15 10 16 Z' fill='%237fae5a' fill-opacity='0.35' stroke='%237fae5a' stroke-width='1' opacity='0.85'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.3s ease;
  z-index: 2;
}
.card:hover::after { opacity: 1; transform: rotate(-12deg); }
.card-with-hero::after { top: 12px; right: 12px; }

/* Card as link */
a.card-link { color: var(--text); display: block; }
a.card-link:hover { text-decoration: none; }
a.card-link h3 { color: var(--text); }

.card-head-text { flex: 1; min-width: 0; }
.card-tagline { color: var(--text); margin: 0 0 4px; font-size: 0.95rem; font-weight: 500; }
.card-desc { color: var(--muted); margin: 0 0 10px; font-size: 0.9rem; line-height: 1.5; }
.card-platforms { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.2px; }

/* Muted (planned) cards */
.card-muted { filter: saturate(0.35) opacity(0.78); }
.card-muted:hover { filter: saturate(0.6) opacity(0.95); }

/* App rows (Apps page list) */
.app-rows {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.app-row {
  display: grid;
  grid-template-columns: 220px 1fr 44px;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  position: relative;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.app-row:hover {
  text-decoration: none;
  border-color: rgba(127, 174, 90, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}
.app-row:hover .app-row-arrow { color: var(--accent); transform: translateX(4px); }
.app-row:hover .app-row-splash::after { opacity: 1; }
.app-row h3 { color: var(--text); margin: 0; font-size: 1.2rem; }

.app-row-splash {
  position: relative;
  background-color: #1a1610;
  background-size: cover;
  background-position: center;
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
}
/* Soft inner edge so splash blends into card */
.app-row-splash::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(34, 29, 21, 0.6) 100%);
  pointer-events: none;
}
.app-row-splash::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(127, 174, 90, 0.18), transparent 50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.app-row-letter {
  font-size: 3rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.55;
  position: relative;
  z-index: 1;
}

.app-row-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.app-row-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.app-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.app-row-tagline {
  margin: 6px 0 4px;
  color: var(--text);
  font-size: 0.98rem;
}
.app-row-desc {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}
.app-row-platforms {
  color: var(--muted);
  font-size: 0.8rem;
}

.app-row-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  padding-right: 14px;
  transition: transform 0.2s ease, color 0.2s ease;
}

/* Muted (planned / not yet started) rows */
.app-row-muted {
  background: #1a1813;
  border-color: #2a2620;
  filter: saturate(0.35);
  opacity: 0.78;
}
.app-row-muted .app-row-splash { filter: grayscale(0.85) brightness(0.85); }
.app-row-muted .tag {
  color: #8a8275;
  border-color: #3a342a;
  background: rgba(255,255,255,0.02);
}
.app-row-muted h3 { color: #cfc7b6; }
.app-row-muted .app-row-tagline { color: #a39d8d; }
.app-row-muted .app-row-desc,
.app-row-muted .app-row-platforms { color: #7d7768; }
.app-row-muted:hover {
  filter: saturate(0.6);
  opacity: 0.95;
  border-color: #3a342a;
  box-shadow: 0 8px 18px rgba(0,0,0,0.3);
}
.app-row-muted:hover .app-row-arrow { color: var(--muted); }
.app-row-muted:hover .app-row-splash::after { opacity: 0; }

@media (max-width: 720px) {
  .app-row {
    grid-template-columns: 1fr;
    grid-template-rows: 160px auto;
  }
  .app-row-splash {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-height: 160px;
  }
  .app-row-splash::before {
    background: linear-gradient(180deg, transparent 60%, rgba(34, 29, 21, 0.7) 100%);
  }
  .app-row-arrow {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(20, 17, 13, 0.6);
    border-radius: 999px;
    width: 34px;
    height: 34px;
    padding: 0;
  }
}

/* App detail hero */
.app-hero {
  position: relative;
  padding: 60px 0 50px;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg-elev);
  background-size: cover;
  background-position: center;
}
.app-hero.has-hero { padding: 80px 0 60px; }
.app-hero-inner { position: relative; z-index: 2; }
.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--text); text-decoration: none; }
.app-hero-row {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.app-hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.app-hero h1 {
  margin: 6px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

/* Footer gets a thin branch on top */
.site-footer {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 30' preserveAspectRatio='none'><path d='M0 15 Q150 5 300 15 T600 15' fill='none' stroke='%237fae5a' stroke-width='1.2' opacity='0.5'/><circle cx='120' cy='12' r='2.5' fill='%237fae5a' opacity='0.6'/><circle cx='280' cy='17' r='2' fill='%23b08a4a' opacity='0.6'/><circle cx='440' cy='13' r='2.5' fill='%237fae5a' opacity='0.6'/></svg>");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 90% 24px;
  padding-top: 40px;
}
