/* ============================================================
   PASTFORWARD.AI — project website stylesheet
   Clean institutional: white paper, ink text, deep teal accent.
   Type: Archivo (display) · Public Sans (body) · Spline Sans Mono (codes)
   ============================================================ */

:root {
  --ink:      #1c2a36;
  --ink-soft: #51606d;
  --paper:    #ffffff;
  --paper-2:  #f4f6f7;
  --line:     #dfe5e9;
  --line-ink: #c4ced5;

  --accent:       #0e6b66;
  --accent-dark:  #0a514d;
  --accent-tint:  #e9f2f1;

  /* phase colours, echoing the proposal figures */
  --ph1: #1f3a5f;   /* foundations — navy   */
  --ph2: #c8731f;   /* experimentation — ochre */
  --ph3: #2a8a93;   /* reflection — teal    */

  --font-display: "Archivo", "Helvetica Neue", sans-serif;
  --font-body:    "Public Sans", "Segoe UI", sans-serif;
  --font-mono:    "Spline Sans Mono", "Consolas", monospace;

  --wrap: 1140px;
  --radius: 2px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: .6rem 1.2rem;
  font-family: var(--font-mono); font-size: .85rem;
}
.skip-link:focus { left: 0; color: #fff; }

/* ── Header ─────────────────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-head::before {
  content: "";
  display: block; height: 4px;
  background: linear-gradient(90deg, var(--ph1) 0 33%, var(--ph2) 33% 66%, var(--ph3) 66% 100%);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 2rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.12rem; letter-spacing: .04em;
  color: var(--ink); white-space: nowrap;
}
.brand span { color: var(--accent); }
.brand:hover { color: var(--ink); }

.site-nav { display: flex; gap: 1.7rem; }
.site-nav a {
  font-size: .9rem; font-weight: 600; color: var(--ink-soft);
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav-btn {
  display: none;
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase;
  background: none; border: 1px solid var(--line-ink); border-radius: var(--radius);
  color: var(--ink); padding: .45rem .9rem; cursor: pointer;
}

@media (max-width: 860px) {
  .nav-btn { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem 1.5rem 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .65rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--accent); }
}

/* ── Section scaffolding ────────────────────────── */

.section { padding: 4.5rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.alt { background: var(--paper-2); }

.kicker {
  display: flex; align-items: center; gap: .8rem;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.1rem;
}
.kicker::before {
  content: ""; width: 2rem; height: 1px; background: var(--accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800; line-height: 1.18; letter-spacing: -.01em;
  color: var(--ink);
}
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 1rem; max-width: 26ch; }
h3 { font-size: 1.18rem; margin-bottom: .55rem; }

.lede {
  font-size: 1.08rem; color: var(--ink-soft);
  max-width: 68ch; margin-bottom: 2.5rem;
}
.lede:last-child { margin-bottom: 0; }
.lede strong { color: var(--ink); }

.prose p { max-width: 72ch; margin-bottom: 1.1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { max-width: 70ch; margin: 0 0 1.1rem 1.2rem; }
.prose li { margin-bottom: .4rem; }

/* ── Buttons ────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  letter-spacing: .02em;
  padding: .8rem 1.8rem; border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent); color: #fff;
  transition: background .18s, color .18s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-tint); color: var(--accent-dark); }
.btn-row { display: flex; gap: .9rem; flex-wrap: wrap; }

/* ── Hero ───────────────────────────────────────── */

.hero { padding: 5rem 0 4.5rem; overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 4rem; align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.5rem);
  letter-spacing: -.02em; margin-bottom: 1.4rem;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-bottom: 2.2rem; }

.hero-fig { position: relative; }
.hero-fig svg { width: 100%; height: auto; display: block; }
.hero-fig figcaption {
  margin-top: .8rem;
  font-family: var(--font-mono); font-size: .74rem;
  letter-spacing: .06em; color: var(--ink-soft);
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 3rem; }
  .hero-fig { max-width: 460px; }
}

/* scanline animation inside the hero figure */
.scanline { animation: scan 5.5s ease-in-out infinite alternate; }
@keyframes scan {
  from { transform: translateX(0); }
  to   { transform: translateX(150px); }
}
@media (prefers-reduced-motion: reduce) {
  .scanline { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── Stat strip ─────────────────────────────────── */

.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.stats .wrap {
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.stat {
  padding: 1.6rem 1rem;
  text-align: center;
}
.stat + .stat { border-left: 1px solid var(--line); }
.stat b {
  display: block;
  font-family: var(--font-mono); font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1;
  color: var(--accent);
}
.stat span {
  font-size: .82rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-soft);
}
@media (max-width: 760px) {
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: none !important; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: none; }
  .stat:nth-child(even) { border-left: 1px solid var(--line) !important; }
}

/* ── Card grids ─────────────────────────────────── */

.grid { display: grid; gap: 1.4rem; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid.cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid var(--line-ink);
  border-radius: var(--radius);
  padding: 1.8rem 1.7rem;
  position: relative;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
a.card { color: inherit; display: block; }
a.card:hover, .card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(28, 42, 54, .08);
  transform: translateY(-3px);
}
.card .icon {
  width: 46px; height: 46px; margin-bottom: 1.2rem;
  color: var(--accent);
}
.card .icon svg { width: 100%; height: 100%; }
.card p { font-size: .93rem; color: var(--ink-soft); }
.card .tag {
  position: absolute; top: 1.45rem; right: 1.5rem;
  font-family: var(--font-mono); font-size: .72rem;
  color: var(--line-ink);
}
a.card .more {
  display: inline-block; margin-top: 1rem;
  font-size: .86rem; font-weight: 700; color: var(--accent);
}

/* ── Phases ─────────────────────────────────────── */

.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 820px) { .phases { grid-template-columns: 1fr; } }

.phase {
  border: 1px solid var(--line-ink);
  border-top: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1.7rem 1.6rem;
}
.phase.p1 { border-top-color: var(--ph1); }
.phase.p2 { border-top-color: var(--ph2); }
.phase.p3 { border-top-color: var(--ph3); }
.phase .meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: .76rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: .9rem;
}
.phase .meta b { font-size: 1.5rem; letter-spacing: 0; color: var(--ink); }
.phase p { font-size: .93rem; color: var(--ink-soft); }

/* ── Figures ────────────────────────────────────── */

.figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1.2rem;
  margin: 2.5rem 0;
}
.figure img { margin: 0 auto; }
.figure figcaption {
  margin-top: 1rem; padding-top: .8rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: .76rem;
  letter-spacing: .04em; color: var(--ink-soft);
}

/* ── Timeline (gantt) ───────────────────────────── */

.gantt-scroll { overflow-x: auto; margin: 2.5rem 0 0; }
.gantt {
  min-width: 640px;
  border: 1px solid var(--line-ink);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1.4rem 1.4rem 1rem;
}
.gantt-row {
  display: grid; grid-template-columns: 110px 1fr;
  align-items: center; gap: 1rem;
  margin-bottom: .55rem;
}
.gantt-row .glabel {
  font-family: var(--font-mono); font-size: .76rem;
  color: var(--ink-soft); white-space: nowrap; line-height: 1.3;
}
.gantt-row .glabel b { color: var(--ink); font-weight: 600; display: block; }
.gantt-track {
  position: relative; height: 22px;
  background:
    repeating-linear-gradient(90deg,
      var(--line) 0 1px, transparent 1px calc(100% / 8));
  border-right: 1px solid var(--line);
}
.gantt-row.thin .gantt-track { height: 10px; }
.gantt-bar {
  position: absolute; top: 3px; bottom: 3px;
  left: calc((var(--s) - 1) / 48 * 100%);
  width: calc((var(--e) - var(--s) + 1) / 48 * 100%);
  background: var(--accent);
  border-radius: 2px;
  min-width: 6px;
}
.gantt-row.thin .gantt-bar { top: 1px; bottom: 1px; }
.gantt-bar.p1 { background: var(--ph1); }
.gantt-bar.p2 { background: var(--ph2); }
.gantt-bar.p3 { background: var(--ph3); }
.gantt-axis {
  display: grid; grid-template-columns: 110px 1fr; gap: 1rem;
  margin-top: .4rem;
}
.gantt-axis .gscale {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: .72rem; color: var(--ink-soft);
}
.gantt-sep {
  border: none; border-top: 1px dashed var(--line-ink);
  margin: .9rem 0;
}
.gantt-legend {
  display: flex; flex-wrap: wrap; gap: 1.4rem;
  margin-top: 1.2rem;
  font-family: var(--font-mono); font-size: .76rem; color: var(--ink-soft);
}
.gantt-legend i {
  display: inline-block; width: 22px; height: 10px;
  border-radius: 2px; margin-right: .5rem; vertical-align: baseline;
}
.gantt-legend .p1 i { background: var(--ph1); }
.gantt-legend .p2 i { background: var(--ph2); }
.gantt-legend .p3 i { background: var(--ph3); }

/* ── Work packages ──────────────────────────────── */

.wp-list { margin-top: 2.5rem; }
.wp {
  border: 1px solid var(--line-ink);
  border-radius: var(--radius);
  background: var(--paper);
  margin-bottom: .9rem;
}
.wp summary {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 1.15rem 1.4rem;
  cursor: pointer; list-style: none;
}
.wp summary::-webkit-details-marker { display: none; }
.wp summary:hover { background: var(--paper-2); }
.wp .wp-code {
  font-family: var(--font-mono); font-weight: 600; font-size: .95rem;
  color: #fff; background: var(--ink);
  padding: .25rem .6rem; border-radius: 2px;
  flex-shrink: 0;
}
.wp.ph1 .wp-code { background: var(--ph1); }
.wp.ph2 .wp-code { background: var(--ph2); }
.wp.ph3 .wp-code { background: var(--ph3); }
.wp .wp-title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; flex: 1; }
.wp .wp-months {
  font-family: var(--font-mono); font-size: .76rem; color: var(--ink-soft);
  white-space: nowrap;
}
.wp summary::after {
  content: "+";
  font-family: var(--font-mono); font-size: 1.2rem; color: var(--accent);
  line-height: 1;
}
.wp[open] summary::after { content: "–"; }
.wp-body {
  border-top: 1px solid var(--line);
  padding: 1.4rem 1.5rem 1.6rem;
}
.wp-body > p { font-size: .95rem; color: var(--ink-soft); max-width: 76ch; margin-bottom: 1.3rem; }

.task-list { list-style: none; margin-bottom: 1.5rem; }
.task-list li {
  display: grid; grid-template-columns: 64px 1fr auto;
  gap: 1rem; align-items: baseline;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.task-list li:first-child { border-top: 1px solid var(--line); }
.task-list .tcode { font-family: var(--font-mono); font-size: .8rem; color: var(--accent); }
.task-list .tmonths { font-family: var(--font-mono); font-size: .76rem; color: var(--ink-soft); white-space: nowrap; }

.deliv-label {
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: .6rem;
}
.deliv-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.deliv-table td {
  padding: .45rem .6rem .45rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.deliv-table td:first-child {
  font-family: var(--font-mono); font-size: .78rem;
  color: var(--accent); white-space: nowrap; width: 80px;
}
.deliv-table td:last-child {
  font-family: var(--font-mono); font-size: .78rem;
  color: var(--ink-soft); white-space: nowrap; text-align: right;
}

@media (max-width: 640px) {
  .wp summary { flex-wrap: wrap; gap: .6rem; }
  .wp .wp-months { width: 100%; }
  .task-list li { grid-template-columns: 56px 1fr; }
  .task-list .tmonths { grid-column: 2; }
}

/* ── Application sections ───────────────────────── */

.app-section {
  display: grid; grid-template-columns: 64px 1fr;
  gap: 1.8rem;
  padding: 2.6rem 0;
}
.app-section + .app-section { border-top: 1px solid var(--line); }
.app-section .icon { width: 52px; height: 52px; color: var(--accent); }
.app-section .icon svg { width: 100%; height: 100%; }
.app-section h3 { font-size: 1.35rem; }
.app-section .app-kicker {
  font-family: var(--font-mono); font-size: .74rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: .4rem;
}
.app-section p { max-width: 70ch; color: var(--ink-soft); margin-bottom: .9rem; }
.app-section p:last-child { margin-bottom: 0; }
.app-section p strong { color: var(--ink); }
@media (max-width: 600px) {
  .app-section { grid-template-columns: 1fr; gap: 1rem; }
}

/* ── Notice / callout ───────────────────────────── */

.notice {
  border: 1px solid var(--line-ink);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-tint);
  padding: 1.2rem 1.5rem;
  font-size: .94rem; color: var(--ink);
  max-width: 76ch;
  margin: 2.5rem 0 0;
}

/* ── Blog ───────────────────────────────────────── */

.post-card {
  display: block;
  border: 1px solid var(--line-ink);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1.8rem 1.8rem;
  color: inherit;
  transition: border-color .18s, box-shadow .18s, transform .18s;
  margin-bottom: 1.2rem;
}
.post-card:hover {
  border-color: var(--accent); color: inherit;
  box-shadow: 0 10px 28px rgba(28, 42, 54, .08);
  transform: translateY(-3px);
}
.post-card time {
  font-family: var(--font-mono); font-size: .76rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.post-card h3 { margin: .5rem 0 .5rem; }
.post-card p { font-size: .94rem; color: var(--ink-soft); }

.post-head { padding: 4rem 0 2.2rem; border-bottom: 1px solid var(--line); }
.post-head time {
  font-family: var(--font-mono); font-size: .8rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.post-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-top: .7rem; max-width: 24ch; }
.post-body { padding: 2.8rem 0 4.5rem; }
.post-body p { max-width: 68ch; margin-bottom: 1.2rem; font-size: 1.02rem; }
.post-body .back {
  display: inline-block; margin-top: 1.6rem;
  font-family: var(--font-mono); font-size: .82rem;
}

/* ── Downloads ──────────────────────────────────── */

.dl-group { margin-top: 2.4rem; }
.dl-group h3 {
  display: flex; align-items: baseline; gap: .8rem;
  padding-bottom: .7rem; border-bottom: 2px solid var(--ink);
  margin-bottom: 1rem;
}
.dl-group h3 .count {
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  color: var(--ink-soft);
}
.dl-group > p { font-size: .94rem; color: var(--ink-soft); max-width: 70ch; margin-bottom: 1rem; }
.dl-empty {
  font-family: var(--font-mono); font-size: .8rem; color: var(--ink-soft);
  border: 1px dashed var(--line-ink); border-radius: var(--radius);
  padding: 1rem 1.2rem;
  background: var(--paper);
}

/* ── Footer ─────────────────────────────────────── */

.site-foot { border-top: 1px solid var(--line); background: var(--paper-2); }
.foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1.6fr;
  gap: 3rem; padding: 3.2rem 1.5rem;
}
.foot-grid h4 {
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 1rem;
}
.foot-brand .brand { font-size: 1.05rem; }
.foot-brand p {
  font-size: .88rem; color: var(--ink-soft);
  margin-top: .9rem; max-width: 34ch;
}
.foot-links ul { list-style: none; }
.foot-links li { margin-bottom: .45rem; }
.foot-links a { font-size: .9rem; color: var(--ink-soft); }
.foot-links a:hover { color: var(--accent); }
.foot-logos { display: flex; align-items: center; flex-wrap: wrap; gap: 1.8rem; }
.foot-logos a { opacity: .8; transition: opacity .18s; }
.foot-logos a:hover { opacity: 1; }
.foot-logos img { height: 34px; width: auto; }
.foot-logos .logo-kikirpa { height: 30px; }
.foot-logos .logo-p4s { height: 26px; }
.foot-logos .logo-belspo { height: 48px; }
.foot-logos .logo-be { height: 18px; }
.foot-bar {
  background: var(--ink); color: #aebac4;
  font-size: .8rem;
}
.foot-bar .wrap {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  padding-top: 1rem; padding-bottom: 1rem;
}
.foot-bar a { color: #d6dee4; }
.foot-bar a:hover { color: #fff; }
.foot-bar .mono { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .04em; }

@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr; gap: 2.2rem; }
}

/* ── Page intro band ────────────────────────────── */

.page-head {
  padding: 4.2rem 0 3.4rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--paper-2), var(--paper));
}
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); max-width: 22ch; margin-bottom: 1.2rem; }
.page-head .lede { margin-bottom: 0; }

/* ── Reveal on scroll (progressive enhancement) ── */

.js .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
