/* JUTTO tin-tuc pages: the listing and every article. Tokens and type from
   design.md. Load after assets/nav.css, which carries the whole bar; these
   pages are generated by lib/news-export.php, so the class names here and the
   markup that file writes must stay in step. */

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --bg: oklch(97.2% 0.005 255);
  --ink: oklch(24% 0.028 262);
  --accent: oklch(50% 0.22 262);
  --well: oklch(92.5% 0.012 255);
  --mid: oklch(52% 0.03 258);
  --line: color-mix(in oklab, var(--ink) 12%, transparent);

  --sh-1: 0 1px 2px color-mix(in oklab, var(--ink) 7%, transparent),
          0 6px 18px color-mix(in oklab, var(--ink) 6%, transparent);
  --sh-2: 0 2px 5px color-mix(in oklab, var(--ink) 8%, transparent),
          0 16px 40px color-mix(in oklab, var(--ink) 11%, transparent);
  --sh-3: 0 4px 10px color-mix(in oklab, var(--ink) 8%, transparent),
          0 34px 80px color-mix(in oklab, var(--ink) 15%, transparent);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  background: var(--bg); color: var(--ink);
  font-family: 'Lexend', sans-serif; font-weight: 400;
  font-size: 16px; line-height: 1.65;
  overflow-x: hidden;
}
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { display: block; max-width: 100%; }

.display {
  font-family: 'Archivo', sans-serif; font-stretch: 125%; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.05;
}
.wrap { max-width: 1280px; margin: 0 auto; padding-inline: clamp(20px, 4vw, 40px); }
section { padding-block: clamp(40px, 5vw, 72px); }

.eyebrow {
  font: 500 12.5px 'Spline Sans Mono', monospace; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--accent); margin-bottom: 14px;
}
.tag {
  font: 400 11.5px 'Spline Sans Mono', monospace; color: var(--mid);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.btn {
  font: 500 15px 'Lexend', sans-serif; padding: 13px 24px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn:active { transform: scale(0.98); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: color-mix(in oklab, var(--ink) 88%, var(--accent)); }
.btn-accent { background: var(--accent); color: var(--bg); }
.btn-accent:hover { background: color-mix(in oklab, var(--accent) 88%, var(--ink)); }
.btn-ghost { border-color: color-mix(in oklab, var(--ink) 30%, transparent); color: var(--ink); background: none; }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- breadcrumb ---------- */
.crumbs {
  font: 400 12.5px 'Spline Sans Mono', monospace; color: var(--mid);
  padding-top: 22px;
}
.crumbs a { color: var(--mid); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: 0.5; margin-inline: 2px; }

/* ---------- listing ---------- */
.list-head { padding-block: clamp(28px, 4vw, 52px) 0; }
.list-head h1 { font-size: clamp(34px, 6vw, 62px); }
.list-head .lede {
  margin-top: 16px; font-size: clamp(17px, 1.5vw, 20px); font-weight: 300;
  color: var(--mid); max-width: 34em;
}

.news-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.news-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  text-decoration: none; color: var(--ink);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.news-card:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--ink) 26%, transparent); box-shadow: var(--sh-2); }
.news-card .shot { aspect-ratio: 3 / 2; overflow: hidden; background: var(--well); }
.news-card .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.news-card:hover .shot img { transform: scale(1.05); }
.news-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.news-body h3 { font-size: 17.5px; font-weight: 500; }
.news-body p { font-size: 14.5px; color: var(--mid); margin-bottom: auto; }
.news-body .more { margin-top: 12px; font-weight: 500; font-size: 13.5px; color: var(--accent); }
.news-card:hover .more { text-decoration: underline; }
@media (max-width: 980px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .news-grid { grid-template-columns: 1fr; } }

.list-footnote {
  margin-top: 26px; font-size: 13.5px; color: var(--mid); max-width: 68ch;
  border-top: 1px solid var(--line); padding-top: 16px;
}

.pager { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding-bottom: clamp(40px, 5vw, 72px); }
.page-link {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 14.5px;
}
.page-link:hover { border-color: var(--ink); }
.page-link.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- article ---------- */
.art { max-width: 880px; padding-block: clamp(28px, 4vw, 52px) clamp(40px, 5vw, 72px); }
.art-head { margin-bottom: 26px; }
.art-meta { margin-bottom: 14px; }
.art-meta time { font: 400 12.5px 'Spline Sans Mono', monospace; color: var(--mid); }
.art-head h1 { font-size: clamp(30px, 5vw, 52px); }
.art-head .lede {
  margin-top: 16px; font-size: clamp(17px, 1.5vw, 20px); font-weight: 300;
  color: var(--mid); max-width: 34em;
}
.art-cover { border-radius: 14px; overflow: hidden; box-shadow: var(--sh-2); margin-bottom: clamp(26px, 4vw, 44px); }
.art-cover img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }

.art-body { font-size: 16.5px; line-height: 1.7; }
.art-body h2 { font-size: clamp(21px, 2.2vw, 26px); margin: 30px 0 10px; clear: both; }
.art-body p { margin-bottom: 16px; }
.art-body ul { padding-left: 24px; margin-bottom: 16px; display: grid; gap: 8px; }
.art-body blockquote {
  border-left: 3px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, var(--bg));
  border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 22px 0; clear: both;
  font: 400 14.5px/1.8 'Spline Sans Mono', monospace;
}
.art-img { margin: 22px 0; }
.art-img img { width: 100%; border-radius: 12px; }
.art-img figcaption { font-size: 13px; color: var(--mid); margin-top: 8px; }
.art-img-left { float: left; width: min(46%, 380px); margin: 6px 24px 14px 0; }
.art-img-right { float: right; width: min(46%, 380px); margin: 6px 0 14px 24px; }
.art-img-left img, .art-img-right img { width: 100%; }
.art-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; clear: both; }
.art-pair img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.art-body::after { content: ""; display: block; clear: both; }
@media (max-width: 640px) {
  .art-img-left, .art-img-right { float: none; width: 100%; margin: 22px 0; }
  .art-pair { grid-template-columns: 1fr; }
}

/* ---------- related + cta ---------- */
.related { border-top: 1px solid var(--line); }
.related .sec { font-size: clamp(24px, 2.8vw, 36px); margin-bottom: 24px; }

.ctaband {
  background: var(--well); border-radius: 14px;
  padding: clamp(28px, 4vw, 52px);
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(20px, 3vw, 44px); align-items: center;
}
.ctaband h2 { font-size: clamp(24px, 2.8vw, 34px); }
.ctaband p { color: var(--mid); margin-top: 10px; }
.ctaband .acts { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
@media (max-width: 860px) {
  .ctaband { grid-template-columns: 1fr; }
  .ctaband .acts { justify-content: flex-start; }
}

/* ---------- footer ---------- */
footer { background: var(--ink); color: var(--bg); padding-block: clamp(40px, 6vw, 72px); }
.foot { display: grid; grid-template-columns: 5fr 3fr 4fr; gap: 32px; align-items: start; }
.foot-mark { height: 34px; width: auto; }
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.foot p, .foot a { color: color-mix(in oklab, var(--bg) 82%, var(--ink)); font-size: 14.5px; text-decoration: none; }
.foot a:hover { color: var(--bg); }
.foot-nav, .foot-info { display: grid; gap: 8px; }
.foot h4 { font: 500 12.5px 'Spline Sans Mono', monospace; color: color-mix(in oklab, var(--bg) 60%, var(--ink)); margin-bottom: 4px; }
@media (max-width: 860px) { .foot { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
