/* =========================================================
   GHID RAPID CSS
   - Culori globale: :root
   - Layout proiecte alternant: .project + nth-child
   - Animatii scroll: .reveal, .visible si transform pe .media-wrap
   ========================================================= */

:root {
  --bg: #0a0d12;
  --bg-soft: #111723;
  --panel: #101722;
  --text: #f3f7fb;
  --muted: #97a6b6;
  --accent: #ffb347;
  --accent-2: #47d5c6;
  --line: #1d2b3a;
  --ok: #9ff0d0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html:focus-within {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(900px 500px at 8% 10%, #1a2635 0%, transparent 60%),
    radial-gradient(700px 350px at 92% 22%, #1f2437 0%, transparent 58%),
    var(--bg);
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: radial-gradient(#ffffff 0.7px, transparent 0.7px);
  background-size: 3px 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  background: rgba(10, 13, 18, 0.78);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 12px;
  top: 10px;
  z-index: 200;
  background: #0d1825;
  color: #fff;
  border: 1px solid #36506a;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  text-decoration: none;
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.logo span { color: var(--accent); }

.logo small {
  margin-left: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}


nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1rem;
  font-weight: 600;
}

nav a:hover { color: var(--text); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

main {
  max-width: 1150px;
  margin: 0 auto;
  padding: 2rem 1.1rem 4rem;
}

.hero {
  min-height: 40vh;
  display: grid;
  align-content: center;
  gap: 0.9rem;
}

.kicker {
  color: var(--accent-2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0;
}

.hero h1 {
  margin: 0;
  line-height: 1.05;
  font-size: clamp(1.35rem, 3.2vw, 2.25rem);
  max-width: 35ch;
}

.sub {
  margin: 0;
  color: var(--muted);
  max-width: 82ch;
  font-size: 0.98rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-block;
  padding: 0.62rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  color: #10151d;
  font-weight: 600;
  background: var(--accent);
  border: 1px solid transparent;
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--line);
}

.categories h2,
.section-head h2,
.about h2,
.contact h2 {
  margin: 0 0 0.75rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  border: 1px solid var(--line);
  background: #111b27;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  cursor: pointer;
  font-weight: 600;
}

.chip.active,
.chip:hover {
  color: var(--text);
  border-color: var(--accent-2);
}

.section-head {
  margin-top: 1.3rem;
  margin-bottom: 1rem;
}

.section-note {
  margin: 0;
  color: var(--ok);
  font-size: 0.92rem;
}

.featured {
  margin-top: 0.7rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.featured-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #111b27;
  color: var(--text);
  text-decoration: none;
}

.featured-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.featured-card span {
  display: block;
  padding: 0.55rem 0.7rem;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Lista proiectelor */
.project-list {
  display: grid;
  gap: 1.1rem;
}

.project {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(16, 23, 34, 0.9), rgba(13, 20, 30, 0.95));
}

/* Alternare stanga/dreapta */
.project:nth-child(even) .media-wrap { order: 2; }
.project:nth-child(even) .project-copy { order: 1; }

.media-wrap {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transform: scale(1);
  transition: transform 0.22s linear;
  transform-origin: center;
  border: 1px solid #26384c;
}

.media-wrap:hover {
  border-color: var(--accent-2);
}

.project-media {
  width: 100%;
  height: clamp(320px, 44vw, 560px);
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.media-wrap::after {
  content: "TeoGame&3D";
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(8, 12, 18, 0.58);
  border: 1px solid rgba(120, 152, 184, 0.55);
  color: #e4edf7;
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  pointer-events: none;
  text-transform: uppercase;
}

.project-copy {
  padding: 0.3rem 0.4rem;
}

.project-tag {
  margin: 0 0 0.35rem;
  color: var(--accent-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.project-copy h3 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
}

.project-copy p {
  margin: 0;
  color: var(--muted);
}

.about,
.contact {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.contact a {
  color: var(--accent);
  text-decoration: none;
}

.contact a:hover { text-decoration: underline; }

/* Formular request */
.request-form {
  display: grid;
  gap: 0.55rem;
  max-width: 640px;
}

.request-form label {
  font-size: 0.9rem;
  color: var(--text);
}

.request-form input,
.request-form select,
.request-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0f1622;
  color: var(--text);
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  font: inherit;
}

.request-form textarea {
  resize: vertical;
}

.request-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.attach-btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: #0f1722;
  color: var(--text);
  border-radius: 999px;
  padding: 0.52rem 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.attach-btn:hover {
  border-color: var(--accent-2);
}

.attachments-input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-list-info {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.file-preview-grid {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
}

.file-preview-card {
  border: 1px solid var(--line);
  background: #0f1722;
  border-radius: 10px;
  overflow: hidden;
  min-height: 120px;
  display: grid;
  grid-template-rows: 88px auto;
}

.file-preview-media {
  width: 100%;
  height: 88px;
  object-fit: cover;
  display: block;
}

.file-preview-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  padding: 0.3rem;
}

.file-preview-name {
  padding: 0.35rem 0.45rem 0.5rem;
  font-size: 0.72rem;
  color: var(--text);
  word-break: break-word;
}

.form-status {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.form-status.ok {
  color: #8ee7bf;
}

.form-status.err {
  color: #ff8d8d;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  padding: 1.2rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Reveal: vizibil implicit; animat doar cand JS este activ */
.reveal {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.media-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(5, 8, 12, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.media-modal.open {
  display: flex;
}

.media-modal-body {
  max-width: min(96vw, 1300px);
  max-height: 90vh;
}

.media-modal-body img,
.media-modal-body video {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid #2b3e54;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
}

.media-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #3a4e63;
  background: #0f1722;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.media-modal-download {
  position: absolute;
  top: 14px;
  right: 68px;
  border-radius: 999px;
  border: 1px solid #3a4e63;
  background: #101f2f;
  color: #eef4fb;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.58rem 0.9rem;
}

.media-modal-download:hover {
  border-color: var(--accent-2);
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  nav {
    width: 100%;
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
  }

  nav a {
    margin-left: 0;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #0f1722;
    font-size: 0.86rem;
  }

  .featured-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .project:nth-child(even) .media-wrap,
  .project:nth-child(even) .project-copy {
    order: initial;
  }
}

@media (max-width: 640px) {
  main {
    padding: 1.2rem 0.7rem 3.2rem;
  }

  .hero {
    min-height: auto;
    padding-top: 0.65rem;
  }

  .hero h1 {
    font-size: clamp(1.15rem, 6vw, 1.5rem);
    max-width: 26ch;
  }

  .project-media {
    height: clamp(230px, 58vw, 330px);
  }

  .media-modal-download {
    right: 58px;
    padding: 0.5rem 0.7rem;
    font-size: 0.75rem;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }
}
