/* ===================================================================
   Onlyview — project case-study pages (single + /projects list)
   Loaded on top of ov.css and scoped to body.t-projects, so nothing
   leaks onto other pages. Wired via the {{ define "head" }} block in
   layouts/projects/single.html and layouts/projects/list.html.

   The :root tokens + primitives (.overline, .gradient-text, .btn, .wrap,
   .rule) mirror static/landing.css and static/pricing.css on purpose:
   each page loads its own stylesheet, so the duplication is isolated. If
   a fourth page needs them, hoist the shared block into a tokens.css.
   =================================================================== */

:root {
  --ink:        #0b0b0f;
  --ink-2:      #101015;
  --paper:      #ffffff;
  --paper-2:    #f4f4f7;
  --text:       #16161c;
  --text-dim:   #5c5c68;
  --text-inv:   #f3f3f6;
  --text-inv-dim: rgba(243,243,246,.68);
  --magenta: #E6007E;
  --grad:      linear-gradient(100deg, #FF7A00, #FF1E50, #E6007E, #8A2BE2);
  --grad-soft: linear-gradient(100deg, rgba(255,122,0,.16), rgba(230,0,126,.16), rgba(138,43,226,.18));
  --line:    #e7e7ee;
  --maxw: 1180px;
  --maxw-text: 760px;
  --r: 14px;
  --font-display: 'Now', 'Montserrat', system-ui, sans-serif;
  --font-body:    'Now', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- base (opt project pages into the brand palette) ---------- */
body.t-projects {
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.6; color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.t-projects h1, .t-projects h2, .t-projects h3 {
  font-family: var(--font-display); font-weight: 700;
  line-height: 1.06; letter-spacing: -0.02em; margin: 0;
}
.t-projects h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.t-projects h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.t-projects h3 { font-size: 1.35rem; letter-spacing: -0.01em; }

.t-projects .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.t-projects .measure { max-width: var(--maxw-text); margin-left: auto; margin-right: auto; }
.t-projects .center { text-align: center; }
.t-projects .muted { color: var(--text-dim); }

/* ---------- accents ---------- */
.t-projects .overline {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .2em; font-size: 13px; display: inline-block; margin-bottom: 16px;
}
.t-projects .gradient-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.t-projects .rule { height: 4px; width: 64px; border: 0; border-radius: 4px; background: var(--grad); margin: 0 0 26px; }

/* ---------- buttons ---------- */
.t-projects .btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  padding: 14px 28px; border-radius: 100px; text-decoration: none;
  border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .25s ease, opacity .2s ease;
}
.t-projects .btn:hover { transform: translateY(-2px); }
.t-projects .btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 28px rgba(230,0,126,.35); }
.t-projects .btn-ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; opacity: .85; }
.t-projects .btn-ghost:hover { opacity: 1; }
.t-projects .btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- section rhythm ---------- */
.t-projects .pr-section { padding: 80px 0; }
.t-projects .pr-section--tight { padding: 56px 0; }
.t-projects .pr-section--paper { background: var(--paper-2); }
.t-projects .dark { background: var(--ink); color: var(--text-inv); }

/* ===================================================================
   Branded header — dark, NO project photo (the feature image lives in a
   band below). A faint brand glow keeps it from reading as a flat slab.
   =================================================================== */
.proj-head { position: relative; isolation: isolate; background: var(--ink-2); color: #fff; overflow: hidden; }
.proj-head::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 120%; z-index: -1;
  background: radial-gradient(60% 60% at 75% 0%, rgba(230,0,126,.30), transparent 70%),
              radial-gradient(50% 50% at 20% 10%, rgba(138,43,226,.22), transparent 70%);
}
.proj-head-content { padding: 2.5rem 0 4.5rem; }
.proj-back {
  display: inline-block; margin-bottom: 22px; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .06em;
  color: rgba(255,255,255,.78);
}
.proj-back:hover { color: #fff; }
.proj-head h1 { color: #fff; max-width: 18ch; margin-bottom: 18px; }
.proj-head-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: rgba(255,255,255,.85);
  max-width: 56ch; margin: 0;
}

/* ===================================================================
   Full-bleed feature image (the signature shot, under the header)
   =================================================================== */
.feature-img { margin: 0; }
.feature-img img { width: 100%; height: auto; display: block; }

/* Responsive video embed (feature_video + the {{< vimeo >}} shortcode) */
.embed-video {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--r); overflow: hidden; background: #000;
}
.embed-video iframe,
.embed-video video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.embed-video video { object-fit: contain; background: #000; }
.figcap {
  max-width: var(--maxw); margin: 14px auto 0; padding: 0 24px;
  font-size: 13px; color: var(--text-dim); text-align: center;
}

/* ===================================================================
   Story — the markdown body, set as readable prose
   =================================================================== */
.proj-body { max-width: var(--maxw-text); margin: 0 auto; }
.proj-body > * + * { margin-top: 1.3em; }
.proj-body > h2 { margin-top: 1.6em; }
.proj-body > h3 { margin-top: 1.5em; margin-bottom: -.4em; }
.proj-body p { font-size: 1.2rem; color: var(--text-dim); margin: 0; }
.proj-body p strong { color: var(--text); font-weight: 700; }
.proj-body a { color: var(--magenta); text-decoration: none; font-weight: 700; }
.proj-body a:hover { text-decoration: underline; }
.proj-body ul, .proj-body ol { color: var(--text-dim); font-size: 1.12rem; padding-left: 1.2em; }
.proj-body li + li { margin-top: .4em; }
.proj-body img { width: 100%; height: auto; display: block; border-radius: var(--r); }
.proj-body figure { margin: 0; }
.proj-body figure img { margin: 0; }
.proj-body figcaption { font-size: 13px; color: var(--text-dim); margin-top: 10px; text-align: center; }
.proj-body figcaption p { font-size: 13px; color: var(--text-dim); margin: 0; }
.proj-body blockquote {
  margin: 0; padding: 4px 0 4px 24px; border-left: 3px solid transparent;
  border-image: var(--grad) 1; font-size: 1.35rem; color: var(--text); font-weight: 700;
}

/* ===================================================================
   Facts strip — driven by the front-matter `facts` list
   =================================================================== */
.facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
@media (max-width: 720px){ .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px){ .facts { grid-template-columns: 1fr; } }
.fact { background: var(--paper); padding: 24px 26px; }
.fact .k {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; font-size: 11px; color: var(--text-dim); margin-bottom: 8px;
}
.fact .v { font-size: 1.05rem; color: var(--text); }

/* ===================================================================
   Gallery — masonry via CSS columns (handles mixed aspect ratios)
   =================================================================== */
.gallery { columns: 2; column-gap: 16px; }
@media (max-width: 640px){ .gallery { columns: 1; } }
.gallery figure { margin: 0 0 16px; break-inside: avoid; border-radius: var(--r); overflow: hidden; background: #000; }
.gallery img { width: 100%; height: auto; display: block; transition: transform .35s ease, opacity .25s ease; }
.gallery .gallery-zoom { display: block; cursor: zoom-in; position: relative; }
.gallery .gallery-zoom::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .25s ease;
  background:
    linear-gradient(to top, rgba(11,11,15,.45), transparent 45%),
    no-repeat center / 40px 40px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3M11 8v6M8 11h6'/%3E%3C/svg%3E");
}
.gallery .gallery-zoom:hover img,
.gallery .gallery-zoom:focus-visible img { transform: scale(1.04); }
.gallery .gallery-zoom:hover::after,
.gallery .gallery-zoom:focus-visible::after { opacity: 1; }

/* ---------- Fullscreen lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(8, 8, 12, .92); backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  display: block; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.lightbox-cap {
  position: absolute; left: 0; right: 0; bottom: 16px; margin: 0; padding: 0 24px;
  text-align: center; color: rgba(255,255,255,.82); font-size: 13px;
}
.lightbox button {
  position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 0;
  cursor: pointer; border-radius: 100px; transition: background .2s ease, transform .15s ease;
  display: flex; align-items: center; justify-content: center;
}
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lightbox-close { top: 18px; right: 18px; width: 46px; height: 46px; font-size: 30px; line-height: 1; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; font-size: 34px; line-height: 1; }
.lightbox-nav:hover { transform: translateY(-50%) scale(1.08); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
@media (max-width: 560px) {
  .lightbox-nav { width: 44px; height: 44px; font-size: 26px; }
  .lightbox-prev { left: 8px; } .lightbox-next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .gallery .gallery-zoom:hover img { transform: none; } }

/* ===================================================================
   CTA band
   =================================================================== */
.proj-cta { background: var(--ink-2); color: #fff; text-align: center; }
.proj-cta .rule { margin: 0 auto 26px; }
.proj-cta h2 { color: #fff; max-width: 20ch; margin: 0 auto 28px; }
.proj-cta .btn-row { justify-content: center; }

/* ===================================================================
   Press & reception — driven by `press_quote` + the `press` link list
   =================================================================== */
.press-quote {
  margin: 0 0 30px; padding: 4px 0 4px 24px;
  border-left: 3px solid transparent; border-image: var(--grad) 1;
  font-size: 1.4rem; line-height: 1.42; color: var(--text); font-weight: 700;
}
.press-quote cite {
  display: block; margin-top: 14px; font-style: normal; font-weight: 600;
  font-size: .95rem; color: var(--text-dim);
}
.press-list { list-style: none; margin: 0; padding: 0; }
.press-list li {
  padding: 16px 0; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
}
.press-list li:last-child { border-bottom: 1px solid var(--line); }
.press-list a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.press-list a:hover { color: var(--magenta); }
.press-src { color: var(--text-dim); font-size: .9rem; }

/* ===================================================================
   /projects index — card grid
   =================================================================== */
.proj-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
@media (max-width: 900px){ .proj-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px){ .proj-grid { grid-template-columns: 1fr; } }

.proj-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; transition: transform .15s ease, box-shadow .25s ease, border-color .2s ease;
}
.proj-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px rgba(16,16,28,.12); border-color: transparent; }
.proj-card-media { aspect-ratio: 16/10; background: var(--ink-2); overflow: hidden; }
.proj-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj-card-body { padding: 22px 22px 26px; }
.proj-card .eyebrow {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; font-size: 11px; color: var(--text-dim); display: block; margin-bottom: 10px;
}
.proj-card h2 { font-size: 1.3rem; margin-bottom: 8px; }
.proj-card p { color: var(--text-dim); font-size: .98rem; margin: 0; }
.proj-empty { color: var(--text-dim); text-align: center; font-size: 1.1rem; }

@media (prefers-reduced-motion: reduce){ .t-projects * { transition-duration: .001ms !important; } }
