/* ---------------------------------------------------------------- */
/* LaRoja Dev — terminal / developer theme                          */
/* ---------------------------------------------------------------- */

:root {
  --bg: #0a0e0d;
  --bg-raised: #0f1613;
  --bg-panel: #121a17;
  --border: #1f2b26;
  --border-soft: #182420;
  --text: #e3ece6;
  --text-muted: #7d9086;
  --text-dim: #56645d;
  --green: #3fd97f;
  --green-dim: #2a9b5c;
  --cyan: #4ad8e8;
  --red: #ff5f56;
  --yellow: #ffbd2e;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', monospace;
  --radius: 10px;
  --glow: 0 0 0 1px rgba(63, 217, 127, 0.15), 0 0 24px rgba(63, 217, 127, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* faint scanline texture over the whole page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.012) 0px,
    rgba(255,255,255,0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--green); }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

::selection { background: var(--green); color: #04150a; }

/* ---------------------------------- nav --------------------------------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 13, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  color: var(--text);
  font-weight: 600;
}
.brand:hover { color: var(--text); }
.brand .prompt { color: var(--green); }
.brand small {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
}
.nav-links { display: flex; gap: 0.5rem; }
.nav-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover {
  color: var(--green);
  border-color: var(--border);
  background: var(--bg-raised);
}

/* ---------------------------------- hero -------------------------------- */

.hero { padding: 4.5rem 0 4rem; border-bottom: 1px solid var(--border); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  color: var(--green);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
  animation: fadeInUp 0.5s ease both;
}
.hero h1 {
  font-size: 3rem;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  animation: fadeInUp 0.5s ease 0.05s both;
}
.hero h1 .cursor {
  color: var(--green);
  animation: blink 1s steps(1) infinite;
}
.hero .lead {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 480px;
  margin: 0 0 2rem;
  animation: fadeInUp 0.5s ease 0.1s both;
}
.hero .lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: 0.85rem; animation: fadeInUp 0.5s ease 0.15s both; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--green);
  color: #04150a;
  box-shadow: var(--glow);
}
.btn-primary:hover { background: #56e492; color: #04150a; box-shadow: 0 0 0 1px rgba(63,217,127,0.3), 0 0 28px rgba(63,217,127,0.25); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--green-dim); color: var(--green); }

/* terminal window */
.terminal-window {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  overflow: hidden;
  animation: fadeInUp 0.6s ease 0.2s both;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.65rem 0.9rem;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-red { background: var(--red); }
.dot-yellow { background: var(--yellow); }
.dot-green { background: var(--green); }
.terminal-title { margin-left: 0.5rem; font-size: 0.78rem; color: var(--text-dim); }
.terminal-body {
  padding: 1.1rem 1.1rem 1.3rem;
  font-size: 0.85rem;
  min-height: 220px;
  white-space: pre-wrap;
}
.terminal-body .line { display: block; }
.terminal-body .prompt { color: var(--green); }
.terminal-body .out { color: var(--text-muted); }
.terminal-body .caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

/* ------------------------------- sections -------------------------------- */

section { padding: 4rem 0; }
.section-title { margin-bottom: 2.25rem; }
.section-title .eyebrow { margin-bottom: 0.4rem; }
.section-title h2 { font-size: 1.6rem; margin: 0 0 0.4rem; font-weight: 700; }
.section-title p { color: var(--text-muted); margin: 0; }

/* language pills */
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.lang-java   { background: rgba(248,152,32,0.12); color: #f89820; border-color: rgba(248,152,32,0.3); }
.lang-csharp { background: rgba(155,79,150,0.14); color: #c17ec9; border-color: rgba(155,79,150,0.32); }
.lang-cpp    { background: rgba(74,216,232,0.12); color: var(--cyan); border-color: rgba(74,216,232,0.3); }

/* software grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.tool-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  animation: fadeInUp 0.4s ease both;
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--green-dim);
  box-shadow: var(--glow);
}
.tool-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.tool-bar .tool-version {
  color: var(--text-dim);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

.tool-preview {
  aspect-ratio: 16 / 9;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: filter 0.15s ease;
}
.tool-preview img:hover,
.tool-preview img:focus-visible {
  filter: brightness(1.08);
}
.tool-preview img:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
.tool-preview-empty {
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-body { padding: 1.1rem; display: flex; flex-direction: column; flex-grow: 1; }
.tool-body h3 { margin: 0 0 0.4rem; font-size: 1.05rem; color: var(--text); }
.tool-body p { margin: 0 0 1.1rem; color: var(--text-muted); font-size: 0.88rem; flex-grow: 1; }
.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: #04150a;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  border-radius: 7px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.btn-download:hover { background: #56e492; color: #04150a; box-shadow: var(--glow); }
.download-count {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.tool-card-empty, .tool-card-error {
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  grid-column: 1 / -1;
}

/* contact */
.contact-section { text-align: center; border-top: 1px solid var(--border); }
.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #5865F2;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.discord-btn:hover {
  background-color: #4752C4;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(88, 101, 242, 0.4);
}

/* request a tool */
.request-section { border-top: 1px solid var(--border); }
.request-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2rem;
  align-items: start;
}

/* left column: how it works */
.request-info { padding-top: 0.5rem; }
.request-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.request-steps::before {
  content: '';
  position: absolute;
  left: 1.05rem;
  top: 1.2rem;
  bottom: 1.2rem;
  border-left: 1px dashed var(--border);
}
.request-steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1.5rem;
  position: relative;
}
.request-steps li:last-child { padding-bottom: 0; }
.step-num {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-panel);
  border: 1px solid var(--green-dim);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
}
.request-steps strong { display: block; font-size: 0.95rem; color: var(--text); margin-top: 0.2rem; }
.request-steps p { margin: 0.2rem 0 0; font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.request-note {
  margin: 1.75rem 0 0;
  padding: 0.75rem 0.9rem;
  border-left: 2px solid var(--cyan);
  background: rgba(74, 216, 232, 0.05);
  border-radius: 0 6px 6px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* right column: form in a terminal window */
.request-window { animation: none; }
.request-form { padding: 1.4rem 1.4rem 1.5rem; }
.form-field {
  display: flex;
  flex-direction: column;
  margin: 0 0 1.15rem;
  position: relative;
}
.form-field label,
.form-field legend {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  padding: 0;
}
.form-field .prompt { color: var(--green); margin-right: 0.2rem; }
.form-field .req { color: var(--green); }
.form-field .opt { color: var(--text-dim); font-size: 0.75rem; }
.form-field input[type="text"],
.form-field textarea {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.7rem 0.85rem;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.form-field textarea { resize: vertical; min-height: 120px; line-height: 1.55; padding-bottom: 1.6rem; }
.form-field input[type="text"]:hover,
.form-field textarea:hover { border-color: #2a3a33; }
.form-field input[type="text"]:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--green-dim);
  background: #0c1210;
  box-shadow: 0 0 0 3px rgba(63, 217, 127, 0.12);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-dim); }
.form-field.invalid input { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 95, 86, 0.12); }

.char-count {
  position: absolute;
  right: 0.7rem;
  bottom: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  pointer-events: none;
}
.char-count.warn { color: var(--yellow); }

/* language chips */
.lang-choice { border: 0; margin: 0 0 1.15rem; padding: 0; min-width: 0; }
.lang-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lang-opt { position: relative; cursor: pointer; margin: 0; }
.lang-opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.lang-opt span {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.lang-opt:hover span { border-color: #2a3a33; color: var(--text); }
.lang-opt input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.lang-opt input:checked + span { background: rgba(63,217,127,0.12); color: var(--green); border-color: rgba(63,217,127,0.4); }
.lang-opt-java   input:checked + span { background: rgba(248,152,32,0.12); color: #f89820; border-color: rgba(248,152,32,0.4); }
.lang-opt-csharp input:checked + span { background: rgba(155,79,150,0.14); color: #c17ec9; border-color: rgba(155,79,150,0.45); }
.lang-opt-cpp    input:checked + span { background: rgba(74,216,232,0.12); color: var(--cyan); border-color: rgba(74,216,232,0.4); }
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-soft);
}
.form-actions .btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.form-status { margin: 0; font-size: 0.82rem; }
.form-status:empty { display: none; }
.form-status.ok::before { content: '\2713  '; }
.form-status.err::before { content: '\2717  '; }
.form-status.sending::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 4px;
  background: currentColor;
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
.form-status.ok { color: var(--green); }
.form-status.err { color: var(--red); }
.form-status.sending { color: var(--text-muted); }

/* support */
.support-section { border-top: 1px solid var(--border); }
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}
.support-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1.4rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.support-card:hover {
  border-color: var(--green-dim);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}
.support-icon { font-size: 1.6rem; line-height: 1; }
.support-name { font-weight: 600; font-size: 1rem; }
.support-desc { color: var(--text-muted); font-size: 0.82rem; }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 7, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 2rem;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(90vw, 1100px);
  max-height: 85vh;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  line-height: 1;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lightbox-close:hover { border-color: var(--green-dim); color: var(--green); }

/* footer */
footer {
  margin-top: auto;
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* responsive */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 2.5rem; text-align: left; }
  .hero h1 { font-size: 2.3rem; }
  .request-layout { grid-template-columns: 1fr; gap: 1.75rem; }
  .request-info { order: 2; padding-top: 0; }
}
@media (max-width: 560px) {
  .navbar .container { flex-direction: column; gap: 0.6rem; align-items: flex-start; }
  .nav-links { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .request-form { padding: 1.1rem; }
  .form-actions .btn { width: 100%; justify-content: center; }
}
