/* stugo landing — A-style (modern personal). Mobile-first. No external deps. */

:root {
  --c-blue:   #3B82F6;
  --c-green:  #10B981;
  --c-amber:  #F59E0B;
  --c-pink:   #EC4899;

  --bg:       #FAFAFA;
  --bg-card:  #FFFFFF;
  --bg-nav:   #FFFFFFEE;
  --bg-alt:   #F3F4F6;
  --text:     #1F2937;
  --text-mut: #6B7280;
  --border:   #E5E7EB;

  --shadow:        0 1px 2px rgba(0,0,0,.04), 0 12px 32px rgba(15,23,42,.08);
  --shadow-hover:  0 2px 4px rgba(0,0,0,.06), 0 24px 48px rgba(15,23,42,.12);
  --radius:        14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- nav: centered group --- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-nav);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  align-items: center;
  justify-content: center;
  padding: .85rem 1.25rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo-svg { width: 24px; height: 24px; }
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-links a { color: var(--text); font-weight: 500; }
.nav-links a:hover { color: var(--c-blue); text-decoration: none; }

/* --- hero: centered with soft gradient bg --- */

.hero {
  padding: 4.5rem 1.25rem 3rem;
  text-align: center;
  background: radial-gradient(ellipse at top, #EFF6FF 0%, var(--bg) 55%);
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: clamp(1.75rem, 3vw + 1rem, 2.75rem);
  margin: 0 auto 1.25rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--c-blue), var(--c-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  margin: .5rem auto;
  max-width: 55ch;
  color: var(--text);
  font-size: 1.08rem;
}
.hero-tag {
  color: var(--text-mut);
  margin-top: 1.25rem !important;
  font-size: .98rem;
}

/* --- apps section --- */

.apps-section {
  padding: 3rem 1.25rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -.01em;
}
.section-head .count {
  color: var(--text-mut);
  font-size: .95rem;
}
.apps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 768px) {
  .apps-grid { grid-template-columns: 1fr 1fr; }
}
.apps-loading {
  text-align: center;
  color: var(--text-mut);
  padding: 2rem 0;
  grid-column: 1 / -1;
}

/* --- card --- */

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.app-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.card-shot {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #94A3B8, #64748B);  /* default fallback */
}
.app-card[data-slug="shotik"]  .card-shot { background: linear-gradient(135deg, #3B82F6, #1E40AF); }
.app-card[data-slug="startik"] .card-shot { background: linear-gradient(135deg, #10B981, #047857); }
.card-shot::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 30%, rgba(255,255,255,.22), transparent 60%);
  pointer-events: none;
}
.card-shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  position: relative; z-index: 1;
}
.card-shot-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 5.5rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -.05em;
}
.play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0);
  border: 0; cursor: pointer;
  z-index: 2;
  transition: background .2s;
}
.play-overlay:hover { background: rgba(0,0,0,.25); }
.play-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  padding-left: 5px;
  color: var(--text);
  box-shadow: 0 8px 16px rgba(0,0,0,.3);
}

.card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.card-title {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -.01em;
}
.card-desc {
  margin: 0;
  color: var(--text-mut);
  font-size: .98rem;
}

.card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: .85rem;
  border: 1px solid var(--border);
}
.badge-version { background: #DBEAFE; color: #1E3A8A; border-color: #BFDBFE; font-weight: 600; }
.badge-warn    { background: #FEF3C7; color: #78350F; border-color: #FDE68A; }
.vt-link       { color: inherit; text-decoration: none; }
.vt-link:hover { text-decoration: underline; }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s, background .12s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--c-green); color: #fff; }
.btn-primary:hover { background: #0EA371; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-alt); }
.btn-disabled, .btn[aria-disabled="true"] {
  opacity: .55;
  pointer-events: none;
}

.card-details {
  margin-top: .25rem;
  font-size: .88rem;
}
.card-details summary {
  cursor: pointer;
  color: var(--text-mut);
  list-style-position: inside;
}
.sha-code {
  display: block;
  margin-top: .5rem;
  padding: .55rem .7rem;
  border-radius: 6px;
  background: var(--bg-alt);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* --- footer --- */

.footer {
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
  color: var(--text-mut);
  font-size: .9rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* --- lightbox --- */

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(90vw, 960px);
  width: 90vw;
  margin: auto;
}
.lightbox::backdrop { background: rgba(0,0,0,.7); }
.lightbox[open] {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.lightbox-close {
  position: absolute;
  top: -2.25rem;
  right: 0;
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
