/* ============================================================
   VARDIA — shared design system («Το Βιβλίο Βάρδιας»)
   All values resolve to DESIGN.md tokens (see theme.css).
   Used by: about.html, contact.html, blog.html, blog/*.html
   ============================================================ */
:root {
  --color-primary: #B23A16;
  --color-primary-pressed: #9C300F;
  --color-on-primary: #FFF8EF;
  --color-ink: #20262B;
  --color-paper: #F6F1E7;
  --color-paper-raised: #FFFDF9;
  --color-clockedin: #1F6E5A;
  --color-dim: #59615D;
  --color-lamp: #E9A13B;
  --color-hairline: rgba(32, 38, 43, .16);
  --hairline-2: rgba(32, 38, 43, .08);

  --font-display: 'GFS Didot', 'Times New Roman', Georgia, serif;
  --font-body: 'Commissioner', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, monospace;

  --text-display: clamp(2.4rem, 5.4vw, 3.9rem);
  --text-headline-lg: clamp(2rem, 4.4vw, 2.9rem);
  --text-headline-md: 1.55rem;
  --text-body-lg: clamp(1.02rem, 1.5vw, 1.14rem);
  --text-body-md: 1rem;
  --text-body-sm: .9rem;
  --text-label-mono: .72rem;
  --tracking-label: .22em;

  --radius-sm: 3px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --spacing-xs: .5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  --spacing-2xl: 7rem;

  --shadow-sheet: 0 18px 50px -30px rgba(32, 38, 43, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

::selection { background: var(--color-primary); color: var(--color-on-primary); }

.wrap { width: min(1180px, 92vw); margin-inline: auto; }
.wrap-narrow { width: min(760px, 92vw); margin-inline: auto; }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- ledger voice ---------- */
.entry {
  font-family: var(--font-mono);
  font-size: var(--text-label-mono);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-dim);
  display: flex; align-items: center; gap: .9rem;
  margin: 0 0 1.5rem;
}
.entry .no { color: var(--color-primary); }
.entry::after { content: ""; height: 1px; flex: 1; background: var(--color-hairline); }
.entry.center { justify-content: center; }
.entry.center::after { flex: 0 0 3rem; }
.entry.center::before { content: ""; height: 1px; flex: 0 0 3rem; background: var(--color-hairline); }

h1, h2, h3 { margin: 0; text-wrap: balance; }
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.01em;
}
h1.display { font-size: var(--text-display); line-height: 1.06; }
h2.display { font-size: var(--text-headline-lg); }
.em { font-style: italic; color: var(--color-primary); }

p { margin: 0; }
.lede { color: var(--color-dim); font-size: var(--text-body-lg); max-width: 58ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: 600 var(--text-body-md) var(--font-body);
  padding: .95rem 1.7rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .18s, border-color .18s, color .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn-stamp {
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: 0 10px 26px -14px rgba(178, 58, 22, .55);
}
.btn-stamp:hover { background: var(--color-primary-pressed); transform: translateY(1px); box-shadow: 0 6px 16px -10px rgba(178, 58, 22, .6); }
.btn-ghost { border-color: var(--color-hairline); color: var(--color-ink); background: transparent; }
.btn-ghost:hover { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper); }
.night .btn-ghost { border-color: rgba(246, 241, 231, .35); color: var(--color-paper); }
.night .btn-ghost:hover { background: var(--color-paper); color: var(--color-ink); }

/* ---------- live badge ---------- */
.live-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .78rem var(--font-body);
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--color-clockedin);
  color: var(--color-on-primary);
  border-radius: var(--radius-full);
  padding: .32rem .85rem;
}
.live-badge i {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--color-on-primary);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--color-paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.on { border-bottom-color: var(--color-hairline); }
.nav-in { display: flex; align-items: center; gap: 1.4rem; padding-block: .95rem; }
.mark {
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-decoration: none;
  color: var(--color-ink);
  display: inline-flex; align-items: baseline; gap: .1rem;
}
.mark b { font-weight: 400; }
.mark .dot { color: var(--color-primary); }
.nav-links { display: flex; gap: 1.3rem; margin-left: auto; align-items: center; }
.nav-links a {
  font: 500 .95rem var(--font-body);
  color: var(--color-dim);
  text-decoration: none;
  transition: color .18s;
}
.nav-links a:hover { color: var(--color-ink); }
.nav-links a[aria-current="page"] { color: var(--color-primary); font-weight: 600; }
.nav .btn { padding: .58rem 1.15rem; font-size: .92rem; }
@media (max-width: 720px) {
  .nav-links { gap: .9rem; }
  .nav-links a { font-size: .86rem; }
  .nav .btn { display: none; }
}
@media (max-width: 460px) {
  .mark { font-size: 1.35rem; }
  .nav-links a { font-size: .8rem; }
}

/* ---------- sections & reveal ---------- */
section { padding-block: clamp(3.5rem, 8vw, 6rem); position: relative; }
.rule-top { border-top: 1px solid var(--color-hairline); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.16, 1, .3, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .live-badge i { animation: none; }
}

/* ---------- cards ---------- */
.sheet {
  background: var(--color-paper-raised);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sheet);
}

/* ---------- stamps ---------- */
.stamp {
  display: inline-block;
  font: 700 .62rem var(--font-mono);
  letter-spacing: .14em; text-transform: uppercase;
  border: 2px solid currentColor;
  border-radius: var(--radius-sm);
  padding: .22rem .5rem;
  transform: rotate(-4deg);
  mix-blend-mode: multiply;
}
.stamp.red { color: var(--color-primary); }
.stamp.green { color: var(--color-clockedin); }

/* ---------- night band + footer ---------- */
.dusk { height: 7px; background: linear-gradient(90deg, var(--color-primary), var(--color-lamp) 45%, var(--color-ink)); }
.night {
  background: var(--color-ink);
  color: var(--color-paper);
  position: relative;
  overflow: hidden;
}
.night::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(46% 38% at 50% 8%, rgba(233, 161, 59, .13), transparent 70%);
  pointer-events: none;
}
.night-cta { text-align: center; padding-block: clamp(3.6rem, 8vw, 6rem) 0; position: relative; }
.night-cta h2 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); max-width: 24ch; margin-inline: auto; }
.night .em { color: var(--color-lamp); }
.night .lede { color: rgba(246, 241, 231, .72); margin: 1.4rem auto 0; max-width: 50ch; }
.night .cta-row { justify-content: center; margin-top: 2.4rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.3rem; }

.night footer {
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid rgba(246, 241, 231, .14);
  padding-block: 2.2rem;
  position: relative;
}
.foot {
  display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; align-items: center; justify-content: space-between;
  color: rgba(246, 241, 231, .6); font-size: var(--text-body-sm);
}
.foot .mark { color: var(--color-paper); font-size: 1.2rem; }
.foot .mark .dot { color: var(--color-lamp); text-shadow: 0 0 14px rgba(233, 161, 59, .8); }
.foot a { color: var(--color-paper); text-decoration: none; }
.foot a:hover { text-decoration: underline; color: var(--color-lamp); }
.foot .cols { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }

/* ---------- page hero (inner pages) ---------- */
.page-hero { padding-block: clamp(3rem, 6.5vw, 5rem) clamp(2.5rem, 5vw, 4rem); }
.page-hero .lede { margin-top: 1.4rem; }

/* ---------- blog cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 3rem; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--color-paper-raised);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sheet);
  text-decoration: none;
  color: var(--color-ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 26px 60px -30px rgba(32, 38, 43, .45); }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-bottom: 1px solid var(--color-hairline); }
.post-card .body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.post-card .meta { font: 500 .64rem var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--color-dim); }
.post-card .meta b { color: var(--color-primary); font-weight: 700; }
.post-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.32rem; line-height: 1.25; }
.post-card p { color: var(--color-dim); font-size: .92rem; }
.post-card .more { margin-top: auto; font: 600 .88rem var(--font-body); color: var(--color-clockedin); }
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }

/* ---------- article ---------- */
.article-head { padding-block: clamp(2.8rem, 6vw, 4.5rem) 0; }
.article-head h1 { max-width: 24ch; }
.article-head .lede { margin-top: 1.3rem; }
.article-figure { margin: clamp(2rem, 5vw, 3rem) 0 0; }
.article-figure img {
  width: 100%; display: block;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sheet);
}
.article-body { padding-block: clamp(2.4rem, 5vw, 3.5rem) clamp(3rem, 6vw, 4.5rem); }
.article-body > * + * { margin-top: 1.15rem; }
.article-body p { color: #3A413F; font-size: 1.04rem; line-height: 1.8; }
.article-body h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin-top: 2.6rem;
  line-height: 1.2;
}
.article-body h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; margin-top: 2rem; }
.article-body b, .article-body strong { color: var(--color-ink); }
.article-body a { color: var(--color-clockedin); text-decoration: none; font-weight: 600; }
.article-body a:hover { text-decoration: underline; }
.article-body ul, .article-body ol { padding-left: 1.3rem; color: #3A413F; }
.article-body li { margin-top: .45rem; line-height: 1.7; }
.article-body blockquote {
  margin: 1.8rem 0; padding: 1.2rem 1.6rem;
  border-left: 3px solid var(--color-primary);
  background: var(--color-paper-raised);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display); font-style: italic;
  font-size: 1.15rem; color: var(--color-ink);
}
.article-body table { width: 100%; border-collapse: collapse; font-size: .95rem; margin-top: 1.4rem; }
.article-body th {
  font: 700 .68rem var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
  text-align: left; color: var(--color-dim);
  border-bottom: 2px solid var(--color-ink);
  padding: .6rem .7rem;
}
.article-body td { border-bottom: 1px solid var(--color-hairline); padding: .7rem; vertical-align: top; color: #3A413F; }
.article-cta {
  margin-top: 2.8rem;
  padding: 1.8rem 2rem;
  border: 1px solid var(--color-hairline);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--color-paper-raised);
  box-shadow: var(--shadow-sheet);
}
.article-cta .t { font-family: var(--font-display); font-size: 1.35rem; }
.article-cta p { margin-top: .5rem; color: var(--color-dim); font-size: .97rem; }
.article-cta .btn { margin-top: 1.2rem; }
.article-meta {
  font: 500 var(--text-label-mono) var(--font-mono);
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--color-dim);
  display: flex; flex-wrap: wrap; gap: .7rem; align-items: center;
  margin-bottom: 1.4rem;
}
.article-meta .cat { color: var(--color-primary); font-weight: 700; }
.article-meta .sep { opacity: .5; }
.back-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font: 600 .9rem var(--font-body);
  color: var(--color-clockedin); text-decoration: none;
  margin-bottom: 1.6rem;
}
.back-link:hover { text-decoration: underline; }

/* ---------- wow layer: stamp cursor + ink imprints (see wow.js) ---------- */
@keyframes stampIn {
  0% { opacity: 0; transform: scale(2.6) rotate(-14deg); }
  60% { opacity: 1; transform: scale(.94) rotate(-2deg); }
  100% { opacity: 1; transform: scale(1) rotate(-4deg); }
}
html.cc, html.cc * { cursor: none !important; }
#cursor {
  position: fixed; left: 0; top: 0; z-index: 300;
  width: 16px; height: 16px;
  border: 2px solid var(--color-primary);
  border-radius: 3px;
  transform: translate(-50%, -50%) rotate(-8deg);
  pointer-events: none;
  mix-blend-mode: multiply;
  transition: width .18s, height .18s, border-radius .18s;
  will-change: transform;
}
#cursor::after {
  content: ""; position: absolute; inset: 4px;
  background: var(--color-primary); opacity: .25; border-radius: 1px;
}
#cursor.hov { width: 34px; height: 34px; border-radius: 6px; }
#cursor.press { width: 12px; height: 12px; }
.ink-splat {
  position: fixed; z-index: 299;
  width: 42px; height: 42px;
  margin: -21px 0 0 -21px;
  border: 3px solid var(--color-primary);
  border-radius: 6px;
  transform: rotate(-8deg);
  pointer-events: none;
  mix-blend-mode: multiply;
  animation: splat .55s ease-out forwards;
}
@keyframes splat {
  0% { opacity: .55; transform: scale(.4) rotate(-8deg); }
  100% { opacity: 0; transform: scale(1.25) rotate(-4deg); }
}
.stamp.animate { animation: stampIn .5s cubic-bezier(.2, 1.4, .4, 1) backwards; }
@media (prefers-reduced-motion: reduce) {
  #cursor, .ink-splat { display: none; }
  html.cc, html.cc * { cursor: auto !important; }
  .stamp.animate { animation: none; }
}

/* ---------- φόρμα επικοινωνίας ---------- */
.vd-form { margin-top: 1.3rem; display: flex; flex-direction: column; gap: .85rem; }
.vd-f-row { display: flex; flex-direction: column; gap: .3rem; }
.vd-f-row label {
  font: 500 .64rem var(--font-mono);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--color-dim);
}
.vd-f-row label span { color: var(--color-primary); }
.vd-f-row input, .vd-f-row select, .vd-f-row textarea {
  font: 400 .98rem var(--font-body);
  color: var(--color-ink);
  background: var(--color-paper);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-sm);
  padding: .62rem .8rem;
  width: 100%;
  transition: border-color .18s, box-shadow .18s;
}
.vd-f-row textarea { resize: vertical; min-height: 4.5rem; }
.vd-f-row input:focus, .vd-f-row select:focus, .vd-f-row textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(178, 58, 22, .14);
}
.vd-f-row input.bad, .vd-f-row textarea.bad { border-color: var(--color-primary); background: rgba(178, 58, 22, .05); }
.vd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.vd-form .btn { width: 100%; margin-top: .3rem; }
.vd-form .btn[disabled] { opacity: .6; cursor: progress; }
.vd-f-status { font-size: .9rem; line-height: 1.55; min-height: 1px; }
.vd-f-status.ok {
  color: var(--color-clockedin); font-weight: 600;
  border-left: 3px solid var(--color-clockedin);
  padding: .6rem .8rem; background: rgba(31, 110, 90, .07);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.vd-f-status.err {
  color: var(--color-primary); font-weight: 600;
  border-left: 3px solid var(--color-primary);
  padding: .6rem .8rem; background: rgba(178, 58, 22, .06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.contact-card { padding: clamp(1.8rem, 4vw, 2.6rem); }
.contact-rows { display: flex; flex-direction: column; margin-top: .4rem; }
.contact-row {
  display: flex; gap: 1.2rem; align-items: baseline;
  padding: 1.05rem .2rem;
  border-bottom: 1px solid var(--hairline-2);
}
.contact-row:last-child { border-bottom: 0; }
.contact-row .k {
  flex: 0 0 7.5rem;
  font: 500 .66rem var(--font-mono);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--color-dim);
}
.contact-row .v { font-size: 1.02rem; }
.contact-row .v a { color: var(--color-ink); text-decoration: none; font-weight: 600; }
.contact-row .v a:hover { color: var(--color-primary); }
.contact-row .v small { display: block; color: var(--color-dim); font-size: .85rem; font-weight: 400; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
