/* ============================================================
   SITE CSS — nickgammon.com
   Save as /assets/css/site.css

   Consolidated from the inline <style> blocks that were
   duplicated across index, 1990_2000, statement, catalogue,
   press and aboutme. Link it with a version query so you can
   force a cache refresh after editing:

     <link rel="stylesheet" href="/assets/css/site.css?v=1">

   Cleaned up on the way in:
   - .spacerbottom10 and .spacerbottom40 were declared twice
   - a stray closing brace after .spacertop20 broke the rules
     that followed it on catalogue, press and aboutme
   - the .body class matched no element; replaced with a real
     body rule
   ============================================================ */

/* ── SPACERS ─────────────────────────────────────────────── */

.spacerbottom10  { margin-bottom: 10px; }
.spacerbottom40  { margin-bottom: 40px; }
.spacerbottom100 { margin-bottom: 100px; }
.spacerbottom300 { margin-bottom: 300px; }
.spacertop10     { margin-top: 10px; }
.spacertop20     { margin-top: 22px; }
.spacertop30     { margin-top: 30px; }
.spacertop40     { margin-top: 40px; }
.spacertop100    { margin-top: 100px; }
.spacertop200    { margin-top: 200px; }
.spacertop300    { margin-top: 300px; }

/* ── BASE TYPE ───────────────────────────────────────────── */

body {
	background-color: #fff;
}

a,
a:link,
a:visited,
a:hover,
a:active {
	font-family: 'Raleway', sans-serif;
	font-style: normal;
	font-size: 13px;
	color: #5a5a5a;
	text-decoration: none;
}

p {
	font-family: 'Raleway', sans-serif;
	font-style: normal;
	font-size: 13px;
	color: gray;
}

h1 {
	display: block;
	font-family: 'Raleway', sans-serif;
	line-height: 22px;
	margin: 15px 0 30px;
	color: silver;
}

h2 {
	font-family: 'Raleway', sans-serif;
	font-style: normal;
	font-weight: 200;
	font-size: 15px;
}

h3 {
	font-family: 'Raleway', sans-serif;
	font-style: normal;
	font-weight: 400;
	font-size: 28px;
}

h5 {
	font-size: 11px;
	font-family: 'Raleway', sans-serif;
	color: gray;
}

/* ── NAVBAR ──────────────────────────────────────────────── */

.navbar ul li a       { color: #7c7c7c; }
.navbar ul li a:hover { color: #000; }

/* ── SLIDESHOW (ported from nickgammon.net) ──────────────── */

.carousel-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #fff;
	margin-bottom: 8px;
	aspect-ratio: 800 / 610;
}
.carousel-track {
	display: flex;
	height: 100%;
	transition: transform 0.5s ease;
}
.carousel-track img {
	width: 100%;
	height: 100%;
	flex-shrink: 0;
	object-fit: contain;
}
.carousel-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-top: 10px;
	margin-bottom: 4px;
}
.carousel-btn {
	background: none;
	border: none;
	color: #b0b0b0;
	font-size: 1.6rem;
	line-height: 1;
	padding: 4px 10px;
	cursor: pointer;
	transition: color 0.2s;
}
.carousel-btn:hover { color: #000; }
.carousel-btn:focus-visible { outline: 1px solid #5a5a5a; }
.carousel-counter {
	font-family: 'Raleway', sans-serif;
	font-size: 11px;
	color: #999;
	min-width: 48px;
	text-align: center;
}
.carousel-caption-text {
	font-family: 'Raleway', sans-serif;
	font-weight: 300;
	font-size: 13px;
	color: gray;
	line-height: 1.6;
	margin-top: 4px;
	margin-bottom: 40px;
	min-height: 4.5em;
	white-space: pre-line;
}
@media (prefers-reduced-motion: reduce) {
	.carousel-track { transition: none; }
}

/* ── IMAGE CAPTIONS (statement page) ─────────────────────── */

.figure-caption-small {
	font-family: 'Raleway', sans-serif;
	font-size: 9px;
	color: gray;
}

/* ── FOOTER PINNING ──────────────────────────────────────── */
/*
   Reproduces the behaviour of the .net video page: the document
   is a flex column at least as tall as the viewport, and the
   footer block is pushed to the bottom by margin-top:auto. On
   pages taller than the viewport the footer simply flows after
   the content, as before.

   Two cases are handled, because the pages nest differently:
   1. Footer wrapper is a direct child of <body>       -> the
      margin-top:auto rule alone does the work.
   2. Footer wrapper sits inside the outer page container ->
      that container also has to become a full-height flex
      column, which is what the :has() rule below does.

   Requires the footer's wrapping div to carry class
   "site-footer-wrap".
*/

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

body > .container:has(> .site-footer-wrap) {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.site-footer-wrap {
	margin-top: auto;
}

/* ── CONTACT FORM ────────────────────────────────────────── */

.contact-title {
	font-family: 'Raleway', sans-serif;
	font-weight: 300;
	font-size: 1.4rem;
	color: #7c7c7c;
	margin: 0 0 28px;
}
.contact-details { margin-bottom: 32px; }
.contact-details p {
	font-family: 'Raleway', sans-serif;
	font-weight: 300;
	font-size: 13px;
	color: #555;
	line-height: 1.75;
	margin: 0;
}
.contact-form { max-width: 900px; }
.contact-form-row {
	display: flex;
	gap: 24px;
	margin-bottom: 16px;
}
.contact-form-left {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.contact-form-right {
	flex: 1.2;
	display: flex;
}
.contact-form input,
.contact-form textarea {
	width: 100%;
	border: none;
	background: #eee;
	padding: 14px 16px;
	font-family: 'Raleway', sans-serif;
	font-weight: 300;
	font-size: 13px;
	color: #333;
	outline: none;
	transition: background 0.15s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #999; }
.contact-form input:focus,
.contact-form textarea:focus { background: #e4e4e4; }
.contact-form textarea {
	flex: 1;
	resize: vertical;
	min-height: 140px;
}
.contact-form-submit {
	max-width: 900px;
	margin-top: 16px;
}
.contact-form-submit button {
	width: 100%;
	border: none;
	background: #ddd;
	padding: 14px;
	font-family: 'Raleway', sans-serif;
	font-weight: 400;
	font-size: 13px;
	letter-spacing: 0.15em;
	color: #555;
	cursor: pointer;
	transition: background 0.15s;
}
.contact-form-submit button:hover { background: #ccc; }
.contact-success {
	font-family: 'Raleway', sans-serif;
	font-weight: 300;
	font-size: 13px;
	color: #6aab9a;
	margin-top: 8px;
}
.contact-error {
	font-family: 'Raleway', sans-serif;
	font-weight: 300;
	font-size: 13px;
	color: #a44;
	margin-top: 8px;
}
/* Honeypot — hidden from real users */
.hp-field {
	position: absolute;
	left: -9999px;
	opacity: 0;
	height: 0;
	width: 0;
	overflow: hidden;
}
@media (max-width: 768px) {
	.contact-form-row { flex-direction: column; }
}