/* ============================================================
   DevTrap Studio - style.css
   ============================================================ */

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

:root {
  --red: #e5003f;
  --red-dark: #ff6b8a;
  --red-badge-bg: #3a000f;
  --text-primary: #f2f2f0;
  --text-secondary: #a8b0a6;
  --text-tertiary: #5a605a;
  --text-card-title: #dde3dd;
  --text-card-sub: #9aa098;
  --border: rgba(255,255,255,0.1);
  --border-hover: rgba(255,255,255,0.22);
  --bg: #1e1e1c;
  --bg-card: rgba(255,255,255,0.05);
  --bg-muted: rgba(255,255,255,0.04);
  --bg-input: rgba(255,255,255,0.07);
  --radius-md: 8px;
  --radius-lg: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg);
  position: relative;
}

/* Patina texture overlay at 5% */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../assets/images/bg-patina.png');
  background-size: cover;
  background-position: center;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

.site {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* ---- Nav ---- */

nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 0 1rem;
  border-bottom: 0.5px solid var(--border);
}

.nav-brand { display: flex; align-items: center; gap: 8px; }
.nav-brand img { width: 22px; height: 22px; object-fit: contain; filter: brightness(0) saturate(100%) invert(14%) sepia(97%) saturate(5000%) hue-rotate(340deg) brightness(100%); }
.nav-wordmark { font-size: 15px; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-primary); }
.nav-wordmark strong { font-weight: 700; }
.nav-links { display: flex; gap: 2rem; font-size: 14px; color: var(--text-secondary); }
.nav-links a { text-decoration: none; color: inherit; transition: color 0.15s; }
.nav-links a:hover { color: var(--text-primary); }

/* ---- Hero ---- */

.hero {
  padding: 5rem 0 4rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem;
  border-bottom: 0.5px solid var(--border);
}

.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 500; line-height: 1.15; max-width: 680px; }
.hero p { font-size: 17px; color: var(--text-secondary); line-height: 1.7; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 0.5rem; }

/* ---- Buttons ---- */

.btn-primary {
  display: inline-block; padding: 10px 22px; border-radius: var(--radius-md);
  background: var(--red); color: #fff; font-size: 14px; font-weight: 500;
  text-decoration: none; border: none; cursor: pointer; transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.88; }

.btn-ghost {
  display: inline-block; padding: 10px 22px; border-radius: var(--radius-md);
  background: transparent; color: var(--text-primary); font-size: 14px; font-weight: 500;
  text-decoration: none; border: 0.5px solid var(--border-hover); cursor: pointer;
}

/* ---- Sections ---- */

section { padding: 4rem 0; border-bottom: 0.5px solid var(--border); }

.section-label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-tertiary); margin-bottom: 2rem;
}

/* ---- Games ---- */

.games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.game-card {
  border: 0.5px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; background: var(--bg-card);
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.game-card.featured {
  border-color: #ff8c42;
}
.game-card.terminal {
  border-color: #5fa3b0;
}
.game-card.fun {
  border-color: #4a9b6f;
}

.card-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-engine-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; flex-shrink: 0; margin-top: 2px; }

.game-badge {
  display: inline-block; font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
  padding: 3px 10px; border-radius: 20px;
  background: var(--red-badge-bg); color: var(--red-dark); width: fit-content;
}
.game-badge.wip { background: var(--bg-muted); color: var(--text-secondary); }

.game-card h3 { font-size: 18px; font-weight: 500; color: var(--text-primary); }
.game-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }
.game-link { font-size: 13px; color: var(--red); text-decoration: none; font-weight: 500; }
.game-link:hover { text-decoration: underline; }

/* ---- About ---- */

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }

.about-text h2 { font-size: 22px; font-weight: 500; margin-bottom: 1rem; }
.about-text p { font-size: 15px; color: var(--text-secondary); line-height: 1.75; margin-bottom: 1rem; }
.about-text p:last-child { margin-bottom: 0; }

.credentials { display: flex; flex-direction: column; gap: 10px; }
.cred-item { padding: 0.75rem 1rem; border-radius: var(--radius-md); background: var(--bg-muted); border: 0.5px solid rgba(255,255,255,0.08); }
.cred-title { font-size: 13px; font-weight: 500; color: var(--text-card-title); }
.cred-sub { font-size: 12px; color: var(--text-card-sub); margin-top: 2px; line-height: 1.6; }

.about-manifesto {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 0.5px solid var(--border);
}
.about-manifesto p { font-size: 15px; color: var(--text-secondary); line-height: 1.75; margin-bottom: 1rem; }
.about-manifesto p:last-child { margin-bottom: 0; }

/* ---- Contact ---- */

.contact-form { max-width: 520px; display: flex; flex-direction: column; gap: 1rem; }
.contact-form h2 { font-size: 22px; font-weight: 500; margin-bottom: 0.25rem; }
.contact-form > p { font-size: 15px; color: var(--text-secondary); margin-bottom: 0.5rem; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.field input, .field textarea {
  padding: 10px 12px; border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
  background: var(--bg-input); color: var(--text-primary);
  font-family: inherit; font-size: 14px; width: 100%; outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-tertiary); }
.field input:focus, .field textarea:focus { border-color: var(--red); background: rgba(255,255,255,0.1); }
.field textarea { min-height: 120px; resize: vertical; }

.form-status { font-size: 13px; min-height: 18px; }
.form-status.ok  { color: #4daa80; }
.form-status.err { color: var(--red-dark); }

.captcha-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border: 0.5px solid var(--border);
  border-radius: var(--radius-md); background: var(--bg-muted);
  cursor: default; user-select: none; width: fit-content;
}
.captcha-wrap input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--red); cursor: pointer; flex-shrink: 0; }
.captcha-label { font-size: 14px; color: var(--text-card-title); }
.captcha-logo { margin-left: auto; padding-left: 16px; font-size: 10px; color: var(--text-tertiary); text-align: center; line-height: 1.3; }

/* ---- Page footer ---- */

.page-footer { display: flex; flex-direction: column; align-items: center; padding: 3.5rem 0; gap: 3.5rem; }
.footer-divider { border: none; border-top: 0.5px solid var(--border); width: 100%; }

.made-with {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
}
.made-with span { color: var(--red); }
.studio-logo-big { width: auto; max-width: 75%; object-fit: contain; display: block; }

/* ---- Footer ---- */

footer {
  padding: 1.5rem 0 2rem; font-size: 12px;
  color: var(--text-tertiary); border-top: 0.5px solid rgba(255,255,255,0.08); text-align: center;
}
footer a { color: inherit; text-decoration: none; }
footer a:hover { color: var(--text-secondary); }

/* ---- Responsive ---- */

@media (max-width: 620px) {
  .about-grid, .games-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 1.25rem; }
}
