/* ==========================================================================
   Infinity N5 in Graz — Har Brodir
   "Tischjournal": one column of text and photos of the real table.
   Vollkorn for text, IBM Plex Mono for labels. No frameworks, no build.

   Dark only: the same table, after dark. Warm brown-black, not a cold grey-black.

   The palette is sampled from the photos, not from any Corvus Belli material:
   the rust-brown mat, the red containers, bone-white card terrain.
   Spacing stays on an 8px grid.
   ========================================================================== */

/* Fonts are served from this site, not from Google, so no visitor IP goes to a
   third party (GDPR). Latin subset only; licences in assets/fonts/OFL-*.txt. */
@font-face {
  font-family: "Vollkorn";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/vollkorn-400.woff2") format("woff2");
}
@font-face {
  font-family: "Vollkorn";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/vollkorn-600.woff2") format("woff2");
}
@font-face {
  font-family: "Vollkorn";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/vollkorn-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
}

:root {
  --paper:     #18130f;
  --paper-hi:  #211b16;
  --ink:       #ece3d6;
  --muted:     #a8998a;
  --rule:      #2f2721;
  --edge:      #463c33;
  --accent:    #ea6b62;
  --accent-hi: #f38a80;
  --on-accent: #1a120e;
  --rust:      #c48a6c;
  --ok:        #7fd09a;
  --shadow:    0 1px 2px rgb(0 0 0 / 0.5), 0 14px 32px -18px rgb(0 0 0 / 0.9);
  --grain:     url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .92 0 0 0 0 .82 1.4 0 0 0 -.66'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-opacity: 0.22;
  color-scheme: dark;
}

:root {
  --serif:   "Vollkorn", Georgia, "Times New Roman", serif;
  --mono:    "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --measure: 38rem;   /* ~65 characters of Vollkorn */
  --wide:    62rem;   /* photos break out of the text column to this */
  --gutter:  16px;
}
@media (min-width: 40rem) { :root { --gutter: 24px; } }

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
}

/* Paper grain. Sits behind the content but above the body colour. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--grain);
  opacity: var(--grain-opacity);
}

.page {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Breakout: wider than the text column, never wider than the viewport. */
.wide {
  margin-inline: calc((100% - min(var(--wide), 100vw - 2 * var(--gutter))) / 2);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--accent-hi); text-decoration-thickness: 2px; }

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

p  { margin: 0 0 16px; }
strong { font-weight: 600; }

/* --- Skip link + honeypot ------------------------------------------------- */
.hp { position: absolute; left: -9999px; opacity: 0; }
a.hp:focus {
  left: 8px;
  top: 8px;
  opacity: 1;
  z-index: 10;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  text-decoration: none;
}

/* --- Top line ------------------------------------------------------------- */
.topbar { border-bottom: 1px solid var(--rule); }
.topbar .page {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-block: 16px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.topbar nav { display: flex; gap: 24px; }
.topbar a {
  color: var(--muted);
  text-decoration: none;
}
.topbar a::after { content: " →"; }
.topbar a:hover { color: var(--accent); }

main .page { padding-top: 32px; }

/* --- Photos --------------------------------------------------------------- */
/* Printed photos on a page: a thin light mount and a soft shadow. */
figure { margin: 32px 0; }
figure img {
  display: block;
  width: 100%;
  height: auto;
  padding: 6px;
  background: var(--paper-hi);
  border-radius: 3px;
  box-shadow: var(--shadow);
}
figcaption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}
figcaption::before { content: "↑ "; color: var(--rust); }

.hero { margin-top: 8px; }

/* The miniature hangs to the right of its text and, on wide screens,
   out into the margin. */
.tall { max-width: 24rem; }
@media (min-width: 44rem) {
  .tall { float: right; width: 15rem; margin: 8px 0 16px 32px; }
}
@media (min-width: 64rem) {
  .tall { width: 17rem; margin-right: -7rem; }
}
section { display: flow-root; }

/* --- Headline + intro ----------------------------------------------------- */
h1, h2 {
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 48px 0 24px;
}
h1 span {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.intro {
  font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.375rem);
  line-height: 1.55;
  margin-bottom: 8px;
}
.signoff {
  text-align: right;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--muted);
}

/* --- Sections ------------------------------------------------------------- */
/* Numbered like entries in a log. On wide screens the number hangs in the
   left margin; on phones it sits above the heading. */
main { counter-reset: entry; }
h2 {
  counter-increment: entry;
  position: relative;
  font-size: 1.625rem;
  line-height: 1.2;
  margin: 64px 0 16px;
}
h2::before {
  content: counter(entry, decimal-leading-zero);
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--rust);
}
@media (min-width: 60rem) {
  h2::before {
    position: absolute;
    right: 100%;
    top: 0.62em;
    margin: 0 24px 0 0;
  }
}

ul.checks {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.checks li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 8px;
}
.checks li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  top: 0;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--accent);
}

/* --- Contact -------------------------------------------------------------- */
.card {
  margin: 24px 0 24px;
  padding: 24px;
  background: var(--paper-hi);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: var(--shadow);
}
@media (min-width: 40rem) { .card { padding: 32px; } }

.field { margin-bottom: 16px; }

label {
  display: block;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 8px;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 3px;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
textarea { resize: vertical; min-height: 140px; }

button {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 12px 24px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
button:hover { background: var(--accent); color: var(--on-accent); }
button:disabled { opacity: 0.6; cursor: default; }

.form-status { margin: 16px 0 0; min-height: 1.4em; font-size: 1rem; }
.form-status:empty { display: none; }
.form-status.ok  { color: var(--ok); }
.form-status.err { color: var(--accent); }

/* Discord is the quickest way in, so it comes first, as a real button in
   Discord's own colour. White on #5865f2 is 4.6:1, enough for this text. */
.discord {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 24px 0 0;
}
.discord-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 12px 18px;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.3;
  color: #fff;
  background: #5865f2;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(30 30 80 / 0.25), 0 8px 20px -10px rgb(88 101 242 / 0.7);
  transition: background-color 0.15s, transform 0.15s;
}
.discord-button:hover {
  color: #fff;
  background: #4752c4;
  text-decoration: none;
  transform: translateY(-1px);
}
.discord-button:active { transform: none; }
.discord-logo { width: 24px; height: 24px; flex: none; }

.discord-meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}
.handle {
  color: var(--ink);
  font-weight: 500;
  user-select: all;
}

.or {
  margin: 32px 0 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}
.or + .card { margin-top: 12px; }

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted);
}
.site-footer .page { padding-block: 24px 64px; }
.site-footer p { margin: 0 0 4px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* --- Arrival -------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero, h1, .intro, .signoff {
    animation: arrive 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  h1       { animation-delay: 0.08s; }
  .intro   { animation-delay: 0.16s; }
  .signoff { animation-delay: 0.24s; }
  @keyframes arrive {
    from { opacity: 0; transform: translateY(10px); }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
