/* GuiDev Labs — preview interno S3 */
:root {
  --bg0: #06090e;
  --bg1: #0a1018;
  --bg2: #101820;
  --line: rgba(90, 200, 255, 0.16);
  --text: #e6edf5;
  --muted: #8092a6;
  --blue: #5ac8ff;
  --blue-dim: #2a8fc4;
  --green: #3dd68c;
  --amber: #e8b84a;
  --card: rgba(12, 18, 26, 0.94);
  --radius: 12px;
  --font-display: "Segoe UI Semibold", "Segoe UI", Tahoma, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", "Courier New", monospace;
  --font-body: "Segoe UI", Tahoma, Geneva, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(90, 200, 255, 0.1), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 10%, rgba(61, 214, 140, 0.07), transparent 45%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 50%, var(--bg0));
  background-attachment: fixed;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: #fff; }

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.cat-link:focus-visible,
.filter-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(6, 9, 14, 0.88);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand strong {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--blue);
  letter-spacing: 0.02em;
}

.brand span {
  font-size: 0.7rem;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.88rem;
  flex: 1 1 220px;
  max-width: 100%;
}

.nav a {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 8px;
  line-height: 1.2;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  border-color: var(--line);
  background: rgba(90, 200, 255, 0.06);
}

.nav a[aria-current="page"] {
  border-color: rgba(90, 200, 255, 0.35);
  color: var(--blue);
}

.badge-global {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(232, 184, 74, 0.35);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  background: rgba(232, 184, 74, 0.08);
  white-space: nowrap;
}

.hero {
  padding: 3rem 0 2.25rem;
  animation: fadeup 0.65s ease both;
}

@keyframes fadeup {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.hero-kicker {
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  line-height: 1.18;
  margin: 0 0 0.8rem;
  max-width: 18ch;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 44rem;
}

.notice {
  margin: 1.35rem 0 0;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(232, 184, 74, 0.25);
  border-radius: 8px;
  background: rgba(232, 184, 74, 0.06);
  font-size: 0.92rem;
  font-family: var(--font-mono);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.05rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue-dim), #1a5f86);
  color: #061018;
  border-color: rgba(90, 200, 255, 0.45);
}

.btn-primary:hover { color: #061018; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-external {
  background: transparent;
  color: var(--muted);
  border-color: rgba(128, 146, 166, 0.35);
  font-size: 0.85rem;
}

.section { padding: 1.75rem 0 2.5rem; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  align-items: end;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 34rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.is-active {
  color: var(--bg0);
  background: var(--blue);
  border-color: var(--blue);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 1.35rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
  animation: fadeup 0.55s ease both;
}

.card:hover { border-color: rgba(90, 200, 255, 0.4); }

.card.is-hidden { display: none; }

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(6, 9, 14, 0.5));
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.media-pos-top img { object-position: center top; }
.media-pos-center img { object-position: center center; }
.media-pos-bottom img { object-position: center bottom; }
.media-pos-40 img { object-position: center 40%; }

.meta-compact {
  margin: 0.15rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: grid;
  gap: 0.25rem;
}

.card-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.card-body h3 {
  margin: 0;
  font-size: 1.08rem;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: #a8b8c8;
  line-height: 1.25;
}

.tag-dev {
  color: #f0c96a;
  border-color: rgba(232, 184, 74, 0.45);
  background: rgba(232, 184, 74, 0.1);
}

.tag-arch {
  color: #7ad4ff;
  border-color: rgba(90, 200, 255, 0.45);
}

.tag-ext {
  color: #55e09a;
  border-color: rgba(61, 214, 140, 0.45);
}

.tag-sep {
  color: var(--muted);
  border-color: rgba(128, 146, 166, 0.55);
  border-style: dashed;
  background: rgba(128, 146, 166, 0.08);
}

.tag-warn {
  color: #ff9a8c;
  border-color: rgba(255, 138, 122, 0.45);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: 0.75rem;
}

.cat-link {
  display: block;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  transition: border-color 0.15s ease;
}

.cat-link:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.cat-link small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-family: var(--font-body);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}

.panel h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

.panel p,
.panel ul {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.panel ul {
  padding-left: 1.1rem;
  display: grid;
  gap: 0.3rem;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.aside-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-mono);
  border-left: 2px solid var(--line);
  padding-left: 0.65rem;
  line-height: 1.4;
}

.card-sep {
  border-style: dashed;
  opacity: 0.92;
}

.footer {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer a { color: var(--muted); }
.footer a:hover { color: var(--blue); }

@media (max-width: 640px) {
  .hero { padding-top: 2.1rem; }

  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .brand {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .badge-global {
    align-self: flex-start;
  }

  .nav {
    flex: 1 1 auto;
    gap: 0.35rem;
    width: 100%;
  }

  .nav a {
    flex: 1 1 calc(50% - 0.35rem);
    justify-content: center;
    text-align: center;
    min-height: 2.75rem;
    font-size: 0.78rem;
    padding: 0.5rem 0.55rem;
  }
}

@media (max-width: 390px) {
  .wrap {
    width: min(1120px, calc(100% - 1.25rem));
  }

  .nav a {
    flex: 1 1 100%;
    justify-content: flex-start;
    padding-inline: 0.75rem;
  }

  .tag {
    font-size: 0.7rem;
    padding: 0.28rem 0.5rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 320px) {
  .wrap {
    width: calc(100% - 1rem);
  }

  .hero h1 {
    font-size: clamp(1.4rem, 8vw, 1.9rem);
  }

  .filters {
    gap: 0.35rem;
  }
}
