/* ============================================================
   vectorio.io — project page styles (shared across projects/*.html)
   Sits on top of site.css. Inherits all CSS variables from there.
   ============================================================ */

/* ── masthead overrides — bigger V mark, hide kicker on narrow ── */
.masthead .brand .mark {
  width: 36px; height: 36px; display: inline-block;
  filter: brightness(0); opacity: .92;
  transition: filter var(--fast) var(--ease), opacity var(--fast) var(--ease);
}
.masthead .brand:hover .mark { opacity: 1; }
@media (max-width: 1100px) {
  .masthead .brand .kicker, .masthead .brand .rule-v { display: none; }
}

/* ── project hero ── */
.proj-hero {
  position: relative;
  min-height: 72vh;
  background: #0c0d0a;
  color: var(--paper);
  overflow: hidden;
  border-bottom: 3px solid var(--vermilion);
}
.proj-hero .bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.55) contrast(1.06) saturate(0.85);
}
.proj-hero .vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(12,13,10,.55) 0%, rgba(12,13,10,.10) 35%, rgba(12,13,10,.55) 100%),
    radial-gradient(ellipse at center, rgba(12,13,10,0) 0%, rgba(12,13,10,.40) 100%);
}
.proj-hero .grain {
  position: absolute; inset: 0; opacity: .15; mix-blend-mode: overlay; pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
}
.proj-hero .inner {
  position: relative; z-index: 2;
  max-width: var(--col-max); margin: 0 auto;
  padding: 168px var(--gutter) 56px;
  display: flex; flex-direction: column; gap: 22px;
}
.proj-hero .breadcrumb {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(242,239,230,.78);
  border: 1px solid rgba(242,239,230,.30);
  padding: 6px 12px; border-radius: 99px;
  align-self: flex-start;
}
.proj-hero .breadcrumb::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--vermilion); }
.proj-hero .breadcrumb a { color: rgba(242,239,230,.78); border-bottom: 0; }
.proj-hero .breadcrumb a:hover { color: var(--paper); }
.proj-hero .breadcrumb b { color: var(--paper); font-weight: 600; }

.proj-hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(48px, 7.4vw, 112px); line-height: 0.96; letter-spacing: -0.038em;
  color: var(--paper); margin: 0; max-width: 14ch;
  text-shadow: 0 1px 60px rgba(0,0,0,.40);
}
.proj-hero h1 em { color: var(--vermilion); font-style: italic; }
.proj-hero p.lede {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(18px, 1.8vw, 24px); line-height: 1.45;
  color: rgba(242,239,230,.92); max-width: 56ch; margin: 4px 0 0;
}
.proj-hero p.lede b { color: var(--paper); font-weight: 700; }

.proj-hero .rail {
  margin-top: 22px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid rgba(242,239,230,.20);
  border-bottom: 1px solid rgba(242,239,230,.10);
}
@media (max-width: 720px) { .proj-hero .rail { grid-template-columns: 1fr 1fr; } }
.proj-hero .rail .cell {
  padding: 18px 22px 18px 0; border-right: 1px solid rgba(242,239,230,.10);
}
.proj-hero .rail .cell:nth-child(4) { border-right: 0; }
.proj-hero .rail .cell:not(:first-child) { padding-left: 22px; }
.proj-hero .rail .k {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(242,239,230,.55); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.proj-hero .rail .k::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--vermilion);
  box-shadow: 0 0 0 3px rgba(214,58,20,.18);
}
.proj-hero .rail .v {
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(22px, 2.6vw, 32px); line-height: 1; color: var(--paper);
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
}
.proj-hero .rail .v .u { font-size: 13px; color: rgba(242,239,230,.55); margin-left: 4px; font-weight: 500; }
.proj-hero .rail .note { font-family: var(--mono); font-size: 11px; color: rgba(242,239,230,.55); margin-top: 6px; }

.proj-hero .cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.proj-hero .cta .btn {
  padding: 13px 22px; border-radius: 99px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  border: 1px solid; transition: all var(--fast) var(--ease);
}
.proj-hero .cta .btn.primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.proj-hero .cta .btn.primary:hover { background: var(--vermilion); color: var(--paper); border-color: var(--vermilion); }
.proj-hero .cta .btn.outline { background: transparent; color: var(--paper); border-color: rgba(242,239,230,.40); }
.proj-hero .cta .btn.outline:hover { background: rgba(242,239,230,.10); border-color: var(--paper); }
.proj-hero .cta .btn .arrow { font-family: var(--mono); margin-left: 4px; }

/* ── body sections ── */
/* no opaque background here: the full-bleed surf-* band (a z-index:-1 ::before)
   must show through, and the body is already --paper */
.proj-body .block { padding: clamp(88px, 11vw, 160px) 0; border-top: 1px solid var(--rule); }
.proj-body .block:first-of-type { border-top: 0; }
.proj-body .section-title em { font-style: italic; color: var(--vermilion); }

/* readability (matches landing) */
.proj-body p { color: #1f1c16; font-weight: 440; line-height: 1.62; font-size: 16.5px; }
.proj-body p.lead { font-size: 19.5px; font-weight: 450; line-height: 1.55; }
.proj-body p.caption { color: var(--ink-3); font-size: 12.5px; font-family: var(--mono); }

/* ── pipeline diagram ── */
.proj-pipeline {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 26px 24px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  font-family: var(--mono); font-size: 13px;
  overflow-x: auto;
}
.proj-pipeline .n {
  display: inline-flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; min-width: 130px;
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 6px;
  color: var(--ink); font-weight: 500;
}
.proj-pipeline .n .l { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.proj-pipeline .n.accent { border-color: var(--vermilion); box-shadow: 0 0 0 2px rgba(214,58,20,.08); }
.proj-pipeline .arr { color: var(--vermilion); font-size: 16px; padding: 0 2px; }

/* ── scale table ── */
.proj-table {
  width: 100%; border-collapse: collapse; margin-top: 24px;
  font-family: var(--mono); font-size: 13.5px;
  border-top: 1px solid var(--rule-ink); border-bottom: 1px solid var(--rule-ink);
}
.proj-table thead th {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); font-weight: 600;
  background: var(--paper-2); padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--rule-ink);
}
.proj-table tbody tr:nth-child(even) { background: var(--paper-tint); }
.proj-table tbody tr:hover { background: var(--card); }
.proj-table td { padding: 12px 16px; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.proj-table .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.proj-table .h { color: var(--vermilion); font-weight: 600; }
.proj-table .f { color: var(--ink-3); font-size: 12px; }
.proj-table tbody tr:last-child td { border-bottom: 0; }

/* ── code block ── */
.proj-code {
  background: #0E0E0C; color: #EAE7DD;
  border-radius: var(--r-md);
  padding: 28px 32px; margin-top: 24px;
  font-family: var(--mono); font-size: 13px; line-height: 1.65;
  overflow-x: auto; position: relative;
  box-shadow: var(--shadow-card);
}
.proj-code .filename {
  position: absolute; top: 12px; right: 18px;
  font-size: 10.5px; color: rgba(242,239,230,.5); letter-spacing: .12em; text-transform: uppercase;
}
.proj-code .k { color: #E89060; }
.proj-code .s { color: #B5D7AE; }
.proj-code .n { color: #D6CFA8; }
.proj-code .c { color: #6A675F; font-style: italic; }
.proj-code .p { color: #BFBBB0; }

/* ── screen gallery (real product screenshots for project pages) ── */
.screen-gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  margin-top: 28px;
}
@media (max-width: 820px) { .screen-gallery { grid-template-columns: 1fr; } }
.screen-gallery figure {
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.screen-gallery img {
  width: 100%; display: block;
  background: #0c0d0a;
}
.screen-gallery figcaption {
  padding: 14px 18px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
  background: var(--paper-tint);
  line-height: 1.5;
}
.screen-gallery figcaption b { color: var(--ink); font-weight: 600; }

/* ── related projects mini-grid ── */
.proj-related {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule);
  margin-top: 32px;
}
@media (max-width: 920px) { .proj-related { grid-template-columns: 1fr; } }
.proj-related a {
  background: var(--paper); padding: 24px;
  display: flex; flex-direction: column; gap: 10px; min-height: 200px;
  border: 0; transition: background var(--base) var(--ease);
}
.proj-related a:hover { background: var(--card); border: 0; }
.proj-related .topic { font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--vermilion); font-weight: 600; }
.proj-related h3 { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.018em; margin: 4px 0 0; color: var(--ink); }
.proj-related p { font-size: 14px; color: var(--ink-2); margin: 4px 0; flex: 1; }
.proj-related .more { margin-top: auto; font-family: var(--mono); font-size: 12px; color: var(--ink); }
.proj-related a:hover .more { color: var(--vermilion); }

/* ── hamburger (mobile drawer) ── */
.masthead .hamburger {
  display: none; width: 36px; height: 36px; padding: 6px;
  flex-direction: column; justify-content: center; gap: 5px;
  background: transparent; border: 0; cursor: pointer;
}
.masthead .hamburger span {
  display: block; width: 100%; height: 2px; background: var(--ink); border-radius: 1px;
  transition: transform .26s var(--ease), opacity .2s var(--ease); transform-origin: center;
}
.masthead .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.masthead .hamburger.open span:nth-child(2) { opacity: 0; }
.masthead .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 920px) {
  .masthead-inner { grid-template-columns: 1fr auto; gap: 16px; }
  .masthead .nav, .masthead .top-actions { display: none; }
  .masthead .hamburger { display: flex; }
}
.nav-drawer {
  position: absolute; top: 100%; left: 0; right: 0;
  background: rgba(242,239,230,.98); border-bottom: 1px solid var(--rule);
  padding: 8px var(--gutter) 24px; display: none; flex-direction: column; z-index: 29;
}
.nav-drawer.open { display: flex; }
.nav-drawer > a { padding: 16px 0; font-size: 18px; font-weight: 500; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.nav-drawer > a.active { color: var(--vermilion); }
