/* Hallmark · custom (Nick's own reference: a gamified isometric scroll journey) · genre playful · shape: Journey with stops · signature: a ship sailing a scroll-driven route through five shipboard cyber calls set on the Limassol coast · material: own FLUX low-poly scenes, IACS E26/E27 primer · absent: logos, quotes, metrics */
/* critique: one idea per screen (a stop = one picture + one question); copy stays under 80 words a screen; the score is computed in the browser and never invented */

:root {
  --paper: #efefef;
  --paper-raised: #fbfaf7;
  --ink: #2f3337;
  --ink-soft: #5b6167;
  --line: #d6d8da;
  --sea: #0f7272;
  --sea-soft: #d7efee;
  --sun: #f2b01e;
  --hull: #e4572e;
  --right: #1f8a4c;
  --right-soft: #e2f4e8;
  --wrong: #b3392b;
  --wrong-soft: #f8e4e1;
  --font-body: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-display: "Bahnschrift", "DIN Alternate", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --radius-card: 18px;
  --radius-btn: 999px;
  --radius-answer: 12px;
  --shadow: 0 18px 40px rgba(47, 51, 55, 0.12);
  --shadow-ship: rgba(47, 51, 55, 0.25);
  --flag-white: #ffffff;
  --flag-copper: #d57800;
  --flag-olive: #4e5b31;
  --container: 1120px;
  --gap: 32px;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
}
img { display: block; max-width: 100%; height: auto; }

.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }

a { color: var(--sea); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px;
  border-radius: var(--radius-btn); border: 2px solid var(--ink);
  background: var(--paper-raised); color: var(--ink);
  font: 600 16px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--sea); border-color: var(--sea); color: var(--paper-raised); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); }
.btn--small { min-height: 40px; padding: 0 20px; font-size: 15px; }

.nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.wordmark { font: 700 22px/1 var(--font-display); color: var(--ink); text-decoration: none; }

.hero { text-align: center; padding-top: 24px; }
.hero h1, h2 { font-family: var(--font-display); font-weight: 700; color: var(--ink); overflow-wrap: break-word; min-width: 0; }
.hero h1 { font-size: clamp(40px, 6vw, 76px); line-height: 1.02; margin: 0 auto 16px; max-width: 14ch; text-wrap: balance; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-soft); margin: 0 auto 24px; max-width: 42ch; }
.hero-scene { margin: 8px auto 0; max-width: 980px; }

.voyage { position: relative; padding: 40px 0 20px; }
.route { position: absolute; inset: 0 0 0 50%; width: 220px; height: 100%; transform: translateX(-50%); overflow: visible; }
.route path { fill: none; stroke: var(--sea); stroke-width: 0.6; stroke-dasharray: 2 2.4; vector-effect: non-scaling-stroke; stroke-width: 3; opacity: 0.55; }
.ship { position: absolute; left: calc(50% - 110px); top: 0; width: 64px; height: 48px; z-index: 3; will-change: transform; pointer-events: none; }
.ship svg { filter: drop-shadow(0 6px 6px var(--shadow-ship)); }

.stop {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--gap);
  align-items: center; padding: 72px 0;
}
.stop:nth-of-type(even) .scene { order: 2; }
.scene { margin: 0; }
/* the scenes are rendered on near-white; multiply lets them float on the page grey like one continuous world */
/* scenes are cut out (transparent WebP, cutout.py), so they sit directly on the page grey */
.card {
  background: var(--paper-raised); border-radius: var(--radius-card); box-shadow: var(--shadow);
  padding: 28px;
}
.stop-n { margin: 0 0 8px; font-size: 15px; color: var(--ink-soft); }
.card h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.12; margin: 0 0 20px; text-wrap: balance; }

.answers { display: grid; gap: 12px; }
.answers button {
  text-align: left; padding: 12px 16px; min-height: 48px;
  border: 2px solid var(--line); border-radius: var(--radius-answer);
  background: var(--paper-raised); color: var(--ink); font: 500 16px/1.35 var(--font-body); cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.answers button:hover:not(:disabled) { border-color: var(--sea); transform: translateX(3px); }
.answers button:active:not(:disabled) { transform: translateX(0); }
.answers button:disabled { cursor: default; color: var(--ink-soft); }
.answers button.is-right { border-color: var(--right); background: var(--right-soft); color: var(--ink); }
.answers button.is-wrong { border-color: var(--wrong); background: var(--wrong-soft); color: var(--ink); }

.explain { margin-top: 16px; }
.explain summary { cursor: pointer; font-weight: 600; color: var(--sea); }
.explain p { margin: 8px 0 0; color: var(--ink-soft); }
.js .stop:not(.answered) .explain { display: none; }
.verdict { margin: 12px 0 0; font-weight: 700; min-height: 1.5em; }
.stop.answered .verdict { color: var(--ink); }

.arrival {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap);
  align-items: start; padding: 72px 0 40px;
}
.arrival .scene { grid-column: 1 / -1; max-width: 980px; margin: 0 auto; }
.arrival h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.05; margin: 0 0 12px; text-wrap: balance; }
#score-line { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
.pitch { color: var(--ink-soft); margin: 0; max-width: 44ch; }

.demo-form { background: var(--paper-raised); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 28px; display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 15px; font-weight: 600; }
.field input, .field textarea {
  font: 16px/1.4 var(--font-body); color: var(--ink); background: var(--paper);
  border: 2px solid var(--line); border-radius: var(--radius-answer); padding: 12px 16px;
  transition: border-color 160ms ease;
}
.field input:hover, .field textarea:hover { border-color: var(--ink-soft); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--wrong); }
.form-note { font-size: 14px; color: var(--ink-soft); margin: 0; }
.hp { position: absolute; left: -9999px; }

.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 5; transition: opacity 200ms ease, transform 200ms ease; }
.js .to-top:not(.is-visible) { opacity: 0; transform: translateY(12px); pointer-events: none; }

.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 32px 0 48px; color: var(--ink-soft); font-size: 15px; border-top: 1px solid var(--line); }
.footer p { margin: 0; }
.footer summary { cursor: pointer; }
.footer details p { max-width: 52ch; margin-top: 8px; }

@media (max-width: 820px) {
  .stop, .arrival { grid-template-columns: minmax(0, 1fr); padding: 48px 0; }
  .stop:nth-of-type(even) .scene { order: 0; }
  .route { width: 120px; inset: 0 auto 0 0; transform: none; left: 0; opacity: 0.6; }
  .ship { left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .answers button, .to-top { transition: none; }
  .btn:hover, .answers button:hover:not(:disabled) { transform: none; }
  .ship { display: none; }
}

/* showcase stops (no quiz, 07.11) */
.card-text { margin: 0 0 16px; color: var(--ink-soft); font-size: 18px; }
.service { display: inline-block; margin: 0; padding: 8px 16px; border-radius: var(--radius-btn); background: var(--sea-soft); color: var(--ink); font-size: 15px; font-weight: 600; }
.arrival h2 { margin-bottom: 16px; }

/* blog (07.11) — mobile first: one column, readable measure */
.post { max-width: 720px; padding: 8px 0 48px; }
.post h1 { font-family: var(--font-display); font-size: clamp(32px, 7vw, 48px); line-height: 1.08; margin: 8px 0 16px; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
.post h2 { font-size: clamp(22px, 4.5vw, 28px); line-height: 1.2; margin: 40px 0 12px; text-wrap: balance; }
.post p, .post li { font-size: 18px; line-height: 1.65; }
.post ul, .post ol { padding-left: 24px; }
.post li { margin-bottom: 8px; }
.post-meta { font-size: 15px; color: var(--ink-soft); margin: 0; }
.post-lead { font-size: 20px; color: var(--ink); }
.post-figure { margin: 24px auto; max-width: 480px; }
.post-cta { margin-top: 48px; padding: 24px; border-radius: var(--radius-card); background: var(--paper-raised); box-shadow: var(--shadow); }
.post-cta p { margin-top: 0; }
.blog-list { padding: 8px 0 48px; }
.blog-list h1 { font-family: var(--font-display); font-size: clamp(36px, 8vw, 56px); margin: 8px 0; }
.blog-lead { margin: 0 0 32px; max-width: none; }
.post-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px; border-radius: var(--radius-card); background: var(--paper-raised); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform 160ms ease; }
.post-card:hover { transform: translateY(-2px); }
.post-card:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.post-card img { max-width: 220px; margin: 0 auto; }
.post-card-text { display: grid; gap: 8px; }
.post-card-date { font-size: 15px; color: var(--ink-soft); }
.post-card-title { font-family: var(--font-display); font-size: 24px; line-height: 1.2; font-weight: 700; }
.post-card-sum { color: var(--ink-soft); }
@media (min-width: 820px) { .post-card { grid-template-columns: 220px minmax(0, 1fr); align-items: center; } }
@media (prefers-reduced-motion: reduce) { .post-card { transition: none; } .post-card:hover { transform: none; } }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav-links a:not(.btn):hover { color: var(--sea); }
/* post tables (07.11) — scroll inside the wrapper on phones, never the page */
.table-wrap { overflow-x: auto; margin: 24px 0; -webkit-overflow-scrolling: touch; }
.post table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 16px; line-height: 1.45; background: var(--paper-raised); }
.post caption { text-align: left; font-size: 15px; color: var(--ink-soft); padding-bottom: 8px; }
.post th, .post td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.post thead th { background: var(--sea-soft); font-weight: 700; }
.post tbody th { font-weight: 700; white-space: nowrap; }
