/* Serwus Studio — shared project page styles */

:root {
  --accent: #1ea896;
  --ink: #0a0a0a;
  --ink-2: #2a2a2a;
  --ink-3: #6a6a6a;
  --ink-4: #a8a8a8;
  --paper: #fafaf7;
  --paper-2: #f1f0ec;
  --rule: #e8e6df;
  --font-display: 'Inter Tight', system-ui, sans-serif;
  --font-body: 'Inter Tight', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --maxw: 1280px;
  --gutter: clamp(24px, 4vw, 64px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px var(--gutter);
  display: flex; justify-content: space-between; align-items: center;
  background: color-mix(in oklch, var(--paper) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, padding .3s;
}
.nav.scrolled { border-bottom-color: var(--rule); padding: 12px var(--gutter); }
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.02em;
}
.nav-brand .dot-grid {
  display: grid; grid-template-columns: repeat(3, 4px); grid-template-rows: repeat(3, 4px); gap: 2px;
}
.nav-brand .dot-grid span { width: 4px; height: 4px; background: var(--accent); border-radius: 1px; }
.nav-brand .dot-grid span.off { background: var(--ink-4); opacity: 0.3; }
.nav-links {
  display: flex; gap: 24px; align-items: center;
  font-family: var(--font-mono); font-size: 12.5px;
}
.nav-links a { color: var(--ink-3); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a .slash { color: var(--accent); margin-right: 4px; }
.nav-sep { color: var(--ink-4); }
@media (max-width: 720px) {
  .nav-links .nav-link-text { display: none; }
}

/* ===== PROJECT HEADER ===== */
.proj-header {
  position: relative;
  padding: 140px var(--gutter) 60px;
  max-width: var(--maxw);
  margin: 0 auto;
  overflow: hidden;
}
.proj-header-bg {
  position: absolute;
  top: -40px; right: -60px;
  width: min(720px, 70%);
  z-index: 0;
  opacity: 0.85;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.proj-header-bg::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--paper) 15%, transparent 60%);
  z-index: 2;
}
.proj-header-bg img { width: 100%; height: auto; }
.proj-header > * { position: relative; z-index: 2; }

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-3);
  padding-bottom: 3px; border-bottom: 1px solid transparent;
  transition: color .2s, gap .2s, border-color .2s;
  margin-bottom: 36px;
}
.back-link:hover { color: var(--accent); gap: 12px; border-bottom-color: var(--accent); }

.status-badge {
  display: inline-block;
  font-family: var(--font-mono); font-size: 11px;
  padding: 5px 12px;
  background: color-mix(in oklch, var(--accent) 10%, white);
  color: oklch(0.36 0.08 180);
  border: 1px solid color-mix(in oklch, var(--accent) 20%, transparent);
  border-radius: 999px;
  margin-bottom: 12px;
}

.proj-tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent);
  border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.proj-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(56px, 9vw, 140px);
  line-height: 0.92; letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.proj-subtitle {
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.45; color: var(--ink-2);
  max-width: 680px; margin-bottom: 32px;
  letter-spacing: -0.005em;
}
.proj-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 32px; padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.proj-meta span {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 5px 12px;
}

/* ===== PROJECT BODY ===== */
.proj-body {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px var(--gutter) 120px;
}
.proj-section { margin-bottom: 80px; }
.proj-section:last-child { margin-bottom: 0; }
.proj-section h2 {
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--accent); margin-bottom: 20px; letter-spacing: 0.02em;
}
.proj-section p {
  font-size: 16.5px; line-height: 1.7;
  color: var(--ink-2); max-width: 760px; margin-bottom: 14px;
}
.proj-section p strong { color: var(--ink); font-weight: 600; }

/* ===== ROLE LIST ===== */
.role-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 14px;
  max-width: 780px; margin-top: 8px;
}
.role-list li {
  display: flex; gap: 14px;
  font-size: 15.5px; line-height: 1.6;
  color: var(--ink-2);
}
.role-list li::before {
  content: "//"; font-family: var(--font-mono);
  color: var(--accent); font-size: 13px;
  flex-shrink: 0; padding-top: 3px;
}
.role-list li strong { color: var(--ink); font-weight: 600; margin-right: 4px; }

/* ===== TECH PILLS ===== */
.tech-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-pill {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  padding: 7px 12px; border-radius: 999px;
  background: color-mix(in oklch, var(--accent) 10%, white);
  color: oklch(0.36 0.08 180);
  border: 1px solid color-mix(in oklch, var(--accent) 20%, transparent);
}

/* ===== GALLERY GRID (new style) ===== */
.proj-gallery {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 12px; margin-top: 16px;
}
.proj-gallery .tile {
  position: relative; border-radius: 6px; overflow: hidden;
  background: var(--paper-2); aspect-ratio: 4 / 3;
  border: 1px solid var(--rule);
}
.proj-gallery .tile.big { grid-column: span 12; aspect-ratio: 16/8; }
.proj-gallery .tile.wide { grid-column: span 8; aspect-ratio: 16/10; }
.proj-gallery .tile.narrow { grid-column: span 4; }
.proj-gallery .tile.half { grid-column: span 6; }
.proj-gallery .tile img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ===== IMAGE GRID (detail page style) ===== */
.proj-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px; margin-top: 16px;
}
.proj-img-grid img {
  width: 100%; aspect-ratio: 16/10;
  object-fit: cover; border-radius: 6px;
  border: 1px solid var(--rule);
  cursor: zoom-in;
  transition: transform .3s ease;
}
.proj-img-grid img:hover { transform: scale(1.01); }
.proj-img-placeholder {
  padding: 24px;
  border: 1px dashed var(--rule);
  border-radius: 6px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--ink-4); line-height: 1.5;
}

/* ===== SUBCASE GRID ===== */
.subcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-top: 20px;
}
.subcase {
  display: block; border: 1px solid var(--rule);
  border-radius: 6px; background: var(--paper);
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.subcase:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklch, var(--accent) 40%, var(--rule));
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.12);
}
.subcase-media { aspect-ratio: 4/3; position: relative; overflow: hidden; }
.subcase-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.subcase-body { padding: 16px 18px 20px; }
.subcase-kicker { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); margin-bottom: 6px; letter-spacing: 0.02em; }
.subcase-title { font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 8px; }
.subcase-desc { font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }

/* CSS placeholder art for subcases */
.ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: -0.03em; line-height: 0.9;
  font-size: clamp(28px, 4vw, 56px); overflow: hidden;
}
.ph .ph-stripe {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,0.06) 14px 15px);
  pointer-events: none;
}
.ph-caption {
  position: absolute; left: 12px; bottom: 12px;
  font-family: var(--font-mono); font-size: 10.5px;
  color: rgba(255,255,255,0.88); background: rgba(0,0,0,0.4);
  padding: 4px 8px; border-radius: 3px;
  letter-spacing: 0.02em; font-weight: 400;
  backdrop-filter: blur(4px);
}
.ph-caption.dark { color: #1a1a1a; background: rgba(255,255,255,0.6); }
.ph.shovel { background: repeating-linear-gradient(45deg,#1a3a2e 0 20px,#0f2a20 20px 40px); color: #f4ead2; }
.ph.shovel .ttl { transform: skew(-4deg); }
.ph.shovel em { color:#bfa262; font-style: normal; display: block; }
.ph.revocure { background: linear-gradient(135deg, #1ea896 0%, #0d4d47 100%); color: #fff; }
.ph.revocure-sand { background: linear-gradient(160deg, #e8d2a0 0%, #c9a973 100%); color: #3a2d14; }
.ph.revocure-arena { background: linear-gradient(180deg, #0b2541 0%, #1a4870 100%); color: #f4c77a; }
.ph.vrotki { background: #d6e0b5; color: #1e4a3a; }
.ph.vrotki .ttl { font-style: italic; }
.ph.virnova { background: #eaf2ea; color: #c85a3a; }
.ph.virnova .ph-stripe { background-image: repeating-linear-gradient(135deg,transparent 0 14px,rgba(0,0,0,0.04) 14px 15px); }
.ph.noir { background: #0f1212; color: #d0c9a8; }
.ph.pastel { background: linear-gradient(135deg,#f2c9c3 0%,#c3daf2 100%); color: #3b2a2a; }
.ph.dark-env { background: #1a2028; color: #8ec5c1; }
.ph.bright { background: linear-gradient(135deg,#fbe7c2 0%,#f2b078 100%); color:#4a2a1a; }

/* ===== EXTERNAL LINK BTN ===== */
.proj-link-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-size: 12.5px;
  border-radius: 999px; margin-top: 10px;
  transition: background .25s, transform .15s;
}
.proj-link-btn:hover { background: var(--accent); transform: translateY(-2px); }
.proj-link-btn .arrow { transition: transform .2s; }
.proj-link-btn:hover .arrow { transform: translate(2px, -2px); }

/* ===== NEXT PROJECT ===== */
.next-block {
  border-top: 1px solid var(--rule);
  padding-top: 60px; margin-top: 40px;
}
.next-label { font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 14px; }
.next-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.95; letter-spacing: -0.035em;
  display: inline-flex; align-items: center; gap: 24px;
  transition: color .25s;
}
.next-title:hover { color: var(--accent); }
.next-title .arrow { display: inline-block; transition: transform .3s; }
.next-title:hover .arrow { transform: translateX(12px); }

/* ===== PREV/NEXT NAV (detail pages) ===== */
.proj-nav {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-top: 40px; margin-top: 40px;
  border-top: 1px solid var(--rule);
  gap: 24px;
}
.proj-nav-link {
  display: flex; flex-direction: column; gap: 6px;
}
.proj-nav-label {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-3);
}
.proj-nav-title {
  font-family: var(--font-display); font-size: 22px; font-weight: 500;
  letter-spacing: -0.01em; color: var(--ink);
  transition: color .2s;
}
.proj-nav-link:hover .proj-nav-title { color: var(--accent); }
.proj-nav-link--next { text-align: right; }

/* ===== VIDEO EMBED ===== */
.video-embed {
  width: 100%; aspect-ratio: 16/9;
  border: 1px solid var(--rule); border-radius: 6px;
  margin-top: 12px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,0.55);
  padding: 32px var(--gutter);
  font-family: var(--font-mono); font-size: 11.5px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.site-footer a { color: rgba(255,255,255,0.8); border-bottom: 1px solid rgba(255,255,255,0.2); }
.site-footer a:hover { border-color: var(--accent); color: var(--accent); }

/* ===== CURSOR HALO ===== */
.cursor-halo {
  position: fixed; top: 0; left: 0;
  width: 22px; height: 22px;
  border: 1.5px solid var(--accent); border-radius: 50%;
  pointer-events: none; z-index: 999;
  transform: translate(-50%, -50%);
  transition: width .25s, height .25s, opacity .2s;
  opacity: 0; mix-blend-mode: multiply;
}
.cursor-halo.show { opacity: 1; }
.cursor-halo.big { width: 56px; height: 56px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (hover: none) { .cursor-halo { display: none; } }

/* ===== REVEAL ===== */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.2,.6,.2,1), transform .8s cubic-bezier(.2,.6,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,10,10,0.92);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
  animation: lbIn .2s ease;
}
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 92vw; max-height: 90vh;
  object-fit: contain; border-radius: 4px;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.8);
}
.lightbox-close {
  position: fixed; top: 20px; right: 24px;
  font-family: var(--font-mono); font-size: 22px;
  color: rgba(255,255,255,0.7); cursor: pointer;
  transition: color .2s;
}
.lightbox-close:hover { color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
  .proj-gallery .tile.big,
  .proj-gallery .tile.wide,
  .proj-gallery .tile.narrow,
  .proj-gallery .tile.half { grid-column: span 12; }
  .proj-header { padding-top: 120px; padding-bottom: 40px; }
  .proj-header-bg { width: 90%; right: -40px; }
  .proj-img-grid { grid-template-columns: 1fr; }
  .proj-nav { flex-direction: column; gap: 24px; }
  .proj-nav-link--next { text-align: left; }
}
