@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink:        #0a0a0a;
  --ink-soft:   #141414;
  --paper:      #ffffff;
  --cream:      #f5e7d6;
  --coral:      #1a7f8b;
  --teal:       #007f8b;
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body:    "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --pad: clamp(22px, 4.4vw, 84px);
  --headerH: clamp(64px, 8vh, 96px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
::selection { background: var(--coral); color: #fff; }
a { color: inherit; }

/* ---------- header ---------- */
.p-header {
  position: sticky;
  top: 0; z-index: 40;
  height: var(--headerH);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(10,10,10,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.p-brand {
  width: clamp(100px, 9vw, 150px);
  height: clamp(26px, 2.4vw, 40px);
  -webkit-mask: url('assets/vinga-wordmark.png') no-repeat left center / contain;
          mask: url('assets/vinga-wordmark.png') no-repeat left center / contain;
  background: var(--paper);
}
.p-back {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.05vw, 14px);
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
  transition: color 0.25s ease;
}
.p-back svg { width: 18px; height: 18px; }
.p-back:hover { color: var(--coral); }

/* ---------- hero ---------- */
.p-hero {
  padding: clamp(60px,12vh,140px) var(--pad) clamp(40px,7vh,70px);
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: clamp(20px,4vw,60px);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.p-label {
  font-family: var(--font-mono);
  font-size: clamp(12px,1.05vw,15px);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--coral);
  display: block; margin-bottom: clamp(14px,2vh,26px);
}
.p-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 9vw, 9rem);
  line-height: 0.9; letter-spacing: -0.035em;
}
.p-intro {
  font-weight: 300;
  font-size: clamp(0.95rem, 1.2vw, 1.25rem);
  color: rgba(255,255,255,0.6);
  max-width: 34ch; text-wrap: pretty;
  padding-bottom: 0.6em;
}

/* ---------- grid ---------- */
.p-grid {
  padding: clamp(32px,6vh,72px) var(--pad) clamp(80px,12vh,140px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: clamp(28px, 3vw, 56px);
}
.card {
  display: flex; flex-direction: column;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.14);
  background: var(--ink-soft);
  transition: border-color 0.3s ease, transform 0.4s var(--ease);
}
.card:hover { border-color: var(--coral); transform: translateY(-4px); }
.card-vis {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #efece6;
}
.card-vis iframe, .card-vis img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; pointer-events: none;
  object-fit: cover;
}
.card-vis .ph {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: 10px;
  color: rgba(10,10,10,0.5);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
}
.card-open {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 14px;
  background: linear-gradient(180deg, rgba(10,10,10,0) 55%, rgba(10,10,10,0.55));
  opacity: 0; transition: opacity 0.3s ease;
}
.card:hover .card-open { opacity: 1; }
.card-open span {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--coral); color: #fff; padding: 8px 14px;
}
.card-meta {
  display: grid; grid-template-columns: 1fr auto;
  align-items: baseline; gap: 6px 16px;
  padding: clamp(16px,1.6vw,22px);
}
.card-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(1.2rem, 1.7vw, 1.6rem);
  letter-spacing: -0.02em; line-height: 1;
}
.card-num { font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,0.4); }
.card-tag {
  grid-column: 1 / -1;
  font-weight: 300; font-size: 0.95rem; color: rgba(255,255,255,0.55);
}

/* add-placeholder card */
.card.add {
  border-style: dashed; border-color: rgba(255,255,255,0.22);
  background: transparent;
}
.card.add:hover { border-color: var(--coral); transform: none; }
.card.add .card-vis { background: transparent; }
.card.add .ph { color: rgba(255,255,255,0.45); padding: 24px; text-align: center; line-height: 1.5; }
.card.add .ph code { color: var(--coral); }

/* ---------- lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(6,6,6,0.94);
  display: none;
  flex-direction: column;
  padding: clamp(16px,3vh,34px) clamp(16px,4vw,60px);
  gap: 16px;
}
.lb.open { display: flex; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex: none; }
.lb-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem,2vw,1.7rem); letter-spacing: -0.02em; }
.lb-actions { display: flex; align-items: center; gap: 18px; }
.lb-actions a, .lb-close {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  background: none; border: 0; color: var(--paper); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.2s ease;
}
.lb-actions a:hover, .lb-close:hover { color: var(--coral); }
.lb-close svg { width: 18px; height: 18px; }
.lb-frame { flex: 1; min-height: 0; border: 1px solid rgba(255,255,255,0.16); background: #2a2a2a; }
.lb-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- footer ---------- */
.p-foot {
  padding: clamp(28px,5vh,52px) var(--pad);
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-family: var(--font-mono); font-size: clamp(11px,0.9vw,13px);
  letter-spacing: 0.08em; color: rgba(255,255,255,0.5);
}
.p-foot a { text-decoration: none; transition: color 0.2s ease; }
.p-foot a:hover { color: var(--coral); }

@media (max-width: 720px) {
  .p-hero { grid-template-columns: 1fr; align-items: start; }
  .p-grid { grid-template-columns: 1fr; }
}
