/*
 * style.css — Time Lapse Network
 * Shared CSS for all article pages (video, tutorial, interview, equipment review).
 * Listing pages (index, videos, tutorials, etc.) have their own inline CSS.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper:   #FFFFFF;
  --paper-2: #F5F5F4;
  --paper-3: #EBEBEB;
  --ink:     #0F0D0A;
  --ink-2:   #3A3630;
  --ink-3:   #7A746A;
  --ink-4:   #B0A99E;
  --rule:    rgba(15,13,10,0.08);
  --gold:    #2E7DC8;
  --white:   #FFFFFF;
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);

  --f-display: 'Plus Jakarta Sans', sans-serif;
  --f-body:    'Plus Jakarta Sans', sans-serif;
  --f-mono:    'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
}

/* ── BREADCRUMB ──────────────────────────────────── */
.breadcrumb {
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-4);
}
.breadcrumb a { color: var(--ink-3); text-decoration: none; transition: color .18s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb-sep { color: var(--ink-4); opacity: 0.4; }
.breadcrumb-current { color: var(--ink-3); }

/* ── VIDEO HERO ──────────────────────────────────── */
.video-hero { position: relative; background: #0a0806; }
.video-wrap { position: relative; width: 100%; height: min(72vh, 56.25vw); overflow: hidden; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.video-wrap > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.video-thumb-layer {
  position: absolute; inset: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.video-thumb-layer img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7);
}
.thumb-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,8,5,0.6) 0%, transparent 40%);
}
.play-btn {
  position: relative; z-index: 2;
  width: 72px; height: 72px;
  border: 2px solid rgba(248,246,242,0.7); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.play-btn svg { fill: var(--white); margin-left: 5px; }
.video-thumb-layer:hover .play-btn {
  transform: scale(1.1); border-color: var(--white);
  background: rgba(248,246,242,0.1);
}

/* Embed inline (for tutorials with embedded video in body) */
.embed-wrap {
  position: relative; aspect-ratio: 16/9; margin: 2em 0; background: #0a0806;
}
.embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ── VIDEOS BLOCKED UNTIL CONSENT (consenso/consenso.js) ── */
iframe[data-consenso]:not([src]) { visibility: hidden; }
.video-wrap .cns-segnaposto, .embed-wrap .cns-segnaposto {
  position: absolute; inset: 0; min-height: 0; border-radius: 0; padding: 20px; align-content: center;
  background: #14110d; color: rgba(248,246,242,0.88);
}
.video-wrap .cns-segnaposto .cns-b, .embed-wrap .cns-segnaposto .cns-b { --_a: #fff; --_at: #0F0D0A; }

/* ── ARTICLE LAYOUT ──────────────────────────────── */
.article {
  max-width: 1100px; margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) clamp(20px, 5vw, 72px);
  display: grid; grid-template-columns: 1fr 280px;
  gap: clamp(32px, 5vw, 64px); align-items: start;
}
@media (max-width: 768px) { .article { grid-template-columns: 1fr; } }

/* ── MAIN CONTENT ────────────────────────────────── */
.article-eyebrow {
  font-family: var(--f-body);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #fff; background: #2569A8;
  display: inline-flex; align-items: center;
  padding: 4px 10px; margin-bottom: 18px;
}

h1.article-title {
  font-family: var(--f-display);
  font-size: clamp(32px, 5vw, 56px); font-weight: 800;
  line-height: 1.02; letter-spacing: -0.03em;
  color: var(--ink); margin-bottom: 12px;
}

.article-byline {
  font-size: 13px; font-weight: 400; color: var(--ink-3);
  margin-bottom: 28px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.byline-sep { color: var(--ink-4); }

.article-desc {
  font-family: var(--f-body);
  font-size: clamp(16px, 1.8vw, 19px); font-style: italic; font-weight: 400;
  color: var(--ink-2); line-height: 1.7;
  border-left: 3px solid var(--gold); padding-left: 20px;
  margin-bottom: 32px;
  background: linear-gradient(90deg, rgba(46,125,200,0.04) 0%, transparent 100%);
  padding-top: 8px; padding-bottom: 8px;
}

/* Long article body (tutorials, interviews) */
.article-body { color: var(--ink-2); line-height: 1.8; }
.article-body p { margin-bottom: 1.2em; }
.article-body h2 {
  font-family: var(--f-display); font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700; color: var(--ink); margin: 2em 0 0.6em;
  padding-top: 1.5em; border-top: 1px solid var(--rule);
}
.article-body h3 {
  font-family: var(--f-display); font-size: clamp(18px, 2vw, 24px);
  font-weight: 600; color: var(--ink); margin: 1.5em 0 0.5em;
}
.article-body ul, .article-body ol { padding-left: 1.4em; margin-bottom: 1.2em; }
.article-body li { margin-bottom: 0.4em; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body > strong { display: block; margin-top: 10px; }
.article-body > strong:first-of-type { margin-top: 0; }
.article-body a { color: #2569A8; text-underline-offset: 3px; }
.article-body a:hover { color: var(--ink); }
.article-body img { max-width: 100%; height: auto; margin: 1.5em 0; border: 1px solid var(--rule); }
.article-body blockquote {
  font-size: 1.1em; font-style: italic;
  border-left: 3px solid var(--gold); padding-left: 20px;
  margin: 1.5em 0; color: var(--ink-2);
}
.article-body pre, .article-body code { font-family: var(--f-mono); font-size: 12px; background: var(--paper-3); padding: 2px 6px; }
.article-body pre { padding: 16px 20px; overflow-x: auto; margin-bottom: 1.2em; border: 1px solid var(--rule); }

/* Tags */
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 32px; }
.tag-pill {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--rule); padding: 5px 12px;
  color: var(--ink-3); text-decoration: none;
  transition: all .18s; display: inline-block;
}
.tag-pill:hover { border-color: var(--ink); color: var(--ink); }

/* CTA */
.cta-watch {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper);
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 14px 28px; text-decoration: none;
  transition: background .2s, transform .2s; margin-bottom: 40px;
}
.cta-watch:hover { background: var(--ink-2); transform: translateY(-1px); }
.cta-watch svg { fill: var(--paper); flex-shrink: 0; }

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-4); text-decoration: none;
  margin-bottom: 24px; transition: color .18s;
}
.back-link:hover { color: var(--gold); }
.back-link::before { content: '←'; font-size: 12px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper);
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 13px 26px; text-decoration: none; border: none; cursor: pointer;
  transition: background .2s;
}
.btn-primary:hover { background: var(--ink-2); }

.rule { border: none; border-top: 1px solid var(--rule); margin: 32px 0; }

/* ── SIDEBAR ─────────────────────────────────────── */
.sidebar-block { border: 1px solid var(--rule); margin-bottom: 16px; }
.sidebar-head {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #6B655C; padding: 10px 14px;
  border-bottom: 1px solid var(--rule); background: var(--paper-2);
}
.spec-row {
  padding: 10px 14px; border-bottom: 1px solid var(--rule);
  display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: baseline;
}
.spec-row:last-child { border-bottom: none; }
.spec-key {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase; color: #6B655C; white-space: nowrap;
}
.spec-val { font-size: 13px; color: var(--ink); font-weight: 400; text-align: right; }

/* TOC (article index) */
.toc { padding: 14px; }
.toc-item {
  display: block; padding: 6px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--ink-3); text-decoration: none; transition: color .18s;
}
.toc-item:last-child { border-bottom: none; }
.toc-item:hover { color: var(--gold); }
.toc-item::before { content: '↓ '; opacity: 0.4; }

/* Verdict box (equipment reviews) */
.verdict-box { border: 1px solid var(--rule); margin-bottom: 16px; background: var(--paper-2); }
.verdict-head {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-4); padding: 10px 14px; border-bottom: 1px solid var(--rule);
}
.verdict-score { padding: 20px 14px; text-align: center; }
.verdict-num {
  font-family: var(--f-display); font-size: 48px; font-weight: 800;
  color: var(--ink); line-height: 1; display: block;
}
.verdict-label {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-top: 4px;
}
.pros-label, .cons-label {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase; margin: 12px 0 6px;
}
.pros-label { color: #3A7A28; }
.cons-label { color: #8C3A3A; }
.pros-cons-item { font-size: 12px; color: var(--ink-2); padding: 3px 0; display: flex; gap: 6px; }
.pros-cons-item::before { opacity: 0.7; flex-shrink: 0; }
.pros-cons-item.pro::before  { content: '+'; color: #3A7A28; }
.pros-cons-item.con::before  { content: '−'; color: #8C3A3A; }

/* ── RELATED VIDEOS ──────────────────────────────── */
.related {
  border-top: 1px solid var(--rule);
  padding: clamp(32px, 4vw, 56px) clamp(20px, 5vw, 72px);
  max-width: 1100px; margin: 0 auto;
}
.related-head {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: 20px;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr; } }

.related-card {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
  text-decoration: none; display: block; background: var(--paper-3);
}
.related-card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: grayscale(40%) brightness(0.8);
  transition: filter .4s, transform .5s var(--ease);
}
.related-card:hover img { filter: grayscale(0%) brightness(0.85); transform: scale(1.04); }
.related-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,8,5,0.75) 0%, transparent 55%); }
.related-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px; }
.related-type {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(248,246,242,0.5); margin-bottom: 3px;
}
.related-title { font-family: var(--f-display); font-size: 18px; font-weight: 400; color: var(--white); line-height: 1.1; }
.related-author { font-size: 11px; color: rgba(248,246,242,0.45); font-weight: 300; }

/* ── CONTACT FORM (about page) ───────────────────── */
.contact-section {
  max-width: 620px; margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 72px) 64px;
}
.contact-section h2 {
  font-size: 28px; font-weight: 800; color: var(--ink); margin-bottom: 8px;
}
.contact-section .contact-sub {
  font-size: 15px; color: var(--ink-3); margin-bottom: 28px;
}
.contact-form { display: grid; gap: 16px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .contact-row { grid-template-columns: 1fr; } }
.contact-field { display: flex; flex-direction: column; gap: 6px; }
.contact-field label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-2);
}
.contact-field input, .contact-field textarea {
  font-family: var(--f-body);
  font-size: 14px; color: var(--ink);
  border: 1.5px solid var(--rule); border-radius: 0;
  padding: 10px 12px; outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s; background: var(--paper);
  resize: vertical;
}
.contact-field input:focus, .contact-field textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(46,125,200,0.12);
}
.contact-submit {
  font-family: var(--f-body);
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--gold); color: var(--white); border: none; border-radius: 0;
  padding: 14px 24px; cursor: pointer; margin-top: 8px;
  transition: background .15s; width: 100%;
}
.contact-submit:hover { background: #2569A8; }

/* ── 404 PAGE ────────────────────────────────────── */
.error-page {
  text-align: center;
  padding: 80px clamp(20px, 5vw, 72px);
}
.error-page h1 {
  font-family: var(--f-display);
  font-size: 80px; font-weight: 800; color: var(--gold);
  line-height: 1; margin-bottom: 12px;
}
.error-page p {
  font-size: 17px; color: var(--ink-3); margin-bottom: 32px;
}
.error-page a {
  display: inline-block;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--white); background: var(--ink);
  padding: 14px 28px; text-decoration: none;
  transition: background .2s;
}
.error-page a:hover { background: var(--ink-2); }

/* ── LEGAL PAGES (privacy-policy.html, cookie-policy.html) ── */
.legal .article-body h2 { font-size: clamp(20px, 2.2vw, 26px); margin-top: 1.6em; }
.legal .article-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal .article-body dl { margin-bottom: 1.2em; }
.legal .article-body dt { font-weight: 700; color: var(--ink); margin-top: 1em; }
.legal .article-body dd { margin: 0.2em 0 0; }
.legal-table { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--rule); }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.legal-table th { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #5F5950; background: var(--paper-2); }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table code { white-space: nowrap; }
.legal-btn {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: #2569A8; color: #fff; border: 0; border-radius: 4px; padding: 12px 18px; cursor: pointer;
  transition: background .15s;
}
.legal-btn:hover { background: #1D5487; }
.legal-toc { padding: 6px 16px 10px; }
.legal-toc a { display: block; padding: 7px 0; font-size: 13px; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.legal-toc a:last-child { border-bottom: 0; }
.legal-toc a:hover { color: #2569A8; }
.legal-aside-btn { padding: 16px; }
.legal-aside-btn .legal-btn { width: 100%; }
.legal main { min-width: 0; }
.legal-updated { font-size: 12px; color: var(--ink-3); margin: 0 0 24px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.legal .article-desc a { color: #2569A8; }

/* nav.js adds the share bar under the byline: reserve its height (32+1+20+36+32) so the text doesn't jump */
main:not(:has(.tli-share)) .article-byline + * { margin-top: 121px; }
