@font-face {
    font-family: Kanit;
    src: url('../fonts/Kanit-Regular.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Kanit;
    src: url('../fonts/Kanit-Bold.ttf') format('truetype');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --steel: #20252b;
    --night: #181b20;
    --iron: #363c43;
    --chalk: #efece5;
    --ash: #b7bcc2;
    --rust: #c8422d;
    --fire: #e2ab70;
    --slate: #50555b; /* secondary text on chalk */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--steel); color: var(--chalk); font: 400 16px/1.75 Kanit, Tahoma, sans-serif; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--fire); outline-offset: 6px; }
img { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
p, h1, h2, h3, h4, figure { margin: 0; }
h2 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; line-height: 1.35; }
h3 { font-size: 22px; font-weight: 700; line-height: 1.4; }
h4 { font-size: 20px; font-weight: 400; line-height: 1.4; }
code { font-family: Consolas, 'Courier New', monospace; font-size: .88em; overflow-wrap: anywhere; }
.container { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 5; top: -100px; left: 20px; padding: 12px 20px; background: var(--chalk); color: var(--steel); }
.skip-link:focus { top: 12px; }

.site-header { border-bottom: 1px solid #ffffff24; }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { width: 215px; flex-shrink: 0; }
.site-header nav { display: flex; align-items: center; gap: 32px; font-size: 14px; }
.site-header nav a { padding-block: 12px; }
.site-header nav a:hover { color: var(--fire); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-height: 52px; padding: 13px 24px; font-size: 15px; }
.button svg { width: 20px; height: 20px; }
.button-primary { color: #fff; background: var(--rust); border: 1px solid #e26c56; box-shadow: 4px 4px 0 #0005; }
.button-primary:hover { background: #ac3624; }
.button-dark { background: var(--steel); color: var(--chalk); border: 1px solid var(--steel); }
.button-dark:hover { background: var(--iron); }
.text-link { display: inline-flex; align-items: center; padding-block: 10px; border-bottom: 1px solid currentColor; font-size: 14px; }
.text-link:hover { color: var(--fire); }

/* Night. The campfire from the original Reboot artwork anchors the page; the
   copy sits on the dark rock at the left and the trailer frame on the right. */
.campfire { position: relative; isolation: isolate; overflow: hidden; background: var(--night); }
.campfire-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 64%; z-index: -2; }
.campfire::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(24, 27, 32, .88), rgba(24, 27, 32, .58) 48%, rgba(24, 27, 32, .5)), linear-gradient(180deg, rgba(24, 27, 32, .35), transparent 40%, rgba(24, 27, 32, .7)); }
.campfire-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); align-items: center; gap: 64px; padding-block: 64px 72px; }
.open-label { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; }
.open-label span { display: inline-block; width: 8px; height: 8px; background: var(--fire); box-shadow: 0 0 12px 3px #e2ab7088; transform: rotate(45deg); flex-shrink: 0; animation: ember 2.6s ease-in-out infinite; }
@keyframes ember { 50% { opacity: .45; box-shadow: 0 0 4px 1px #e2ab7044; } }
.campfire-logo { width: min(300px, 78%); margin: 26px 0 18px; }
h1 { font-size: clamp(48px, 5.6vw, 76px); font-weight: 700; line-height: 1.2; text-shadow: 0 2px 24px #0008; }
.campfire-message { margin-top: 10px; color: var(--fire); font-size: 20px; }
.campfire-description { margin-top: 12px; max-width: 30em; color: #ddd9d5; }
.campfire-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 28px; }
.campfire-platform { margin-top: 20px; color: var(--ash); font-size: 13px; }

/* The trailer: a small framed screen. The clip is low resolution, so it is kept
   at a modest size instead of being stretched across the page. */
.trailer-screen { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #000; border: 1px solid #ffffff4d; outline: 8px solid #181b20cc; outline-offset: 0; box-shadow: 14px 14px 0 #0006; margin: 8px; }
.trailer-still, .trailer-video { position: absolute; inset: 0; width: 100%; height: 100%; }
.trailer-still { object-fit: cover; object-position: center 38%; }
.trailer-video { opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.trailer.is-playing .trailer-video { opacity: 1; }
/* The player is three times as tall as the frame and centred on it. YouTube
   keeps the 16:9 picture at full width in the middle - exactly the frame - and
   pins its title bar, controls and logo to the top and bottom edges of the
   player, which are far outside the frame and clipped away. */
.trailer-video iframe { position: absolute; left: 0; top: 50%; width: 100%; height: 300%; border: 0; transform: translateY(-50%); }
.trailer figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 20px; margin: 20px 8px 0; color: var(--chalk); font-size: 14px; }
.trailer figcaption a { color: var(--ash); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.trailer figcaption a:hover { color: var(--fire); }

/* One light zone holds everything needed to start: download, install, specs.
   Each block is a label column and a content column on the same grid. */
.play { background: var(--chalk); color: var(--steel); border-top: 6px solid var(--rust); padding-block: 64px 28px; }
.play a:focus-visible { outline-color: var(--rust); }
.play-block { display: grid; grid-template-columns: minmax(0, 270px) minmax(0, 1fr); gap: 56px; padding-block: 40px 44px; border-top: 1px solid #20252b33; }
.play > .container > h2 { margin-bottom: 40px; }
.play-label p { margin-top: 8px; color: var(--slate); font-size: 15px; }
.play-note { margin-top: 18px; color: var(--slate); font-size: 13px; }

.download-options { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.download-option { display: flex; flex-direction: column; align-items: flex-start; padding: 26px 28px 28px; border: 1px solid #20252b40; }
.download-option-main { border: 2px solid var(--steel); }
.download-option p { margin: 6px 0 24px; color: var(--slate); font-size: 15px; }
.download-detail { display: block; margin-top: 4px; color: var(--steel); font-size: 13px; }
.download-option .button { margin-top: auto; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps li { position: relative; padding-top: 18px; border-top: 2px solid var(--steel); }
.step-number { display: block; color: var(--rust); font-size: 54px; font-weight: 700; line-height: 1; }
.steps h4 { margin: 12px 0 6px; }
.steps p { color: var(--slate); font-size: 15px; }
.steps code { color: var(--steel); }

.requirements-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; font-size: 15px; }
.requirements-table th, .requirements-table td { padding: 14px 20px 14px 0; border-bottom: 1px solid #20252b2e; vertical-align: top; overflow-wrap: anywhere; }
.requirements-table thead th { padding-top: 0; border-bottom: 2px solid var(--steel); font-size: 18px; font-weight: 400; }
.requirements-table thead th:first-child { width: 24%; color: var(--slate); font-size: 14px; }
.requirements-table tbody th { color: var(--slate); font-weight: 400; }
.requirements-table small { color: var(--slate); font-size: 12px; }

/* News: the page card stays beside the feed, which takes the wider column. */
.news { padding-block: 72px 80px; }
.news-layout { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); align-items: start; gap: 72px; }
.news-side { position: sticky; top: 24px; }
.news-intro { margin: 18px 0 26px; color: var(--ash); font-size: 15px; }
.news-layout--no-posts { grid-template-columns: 1fr; }
.news-layout--no-posts .news-side { position: static; max-width: 430px; }
.fb-card { background: #272d34; border: 1px solid #ffffff26; }
.fb-cover { height: 118px; background: var(--iron) center/cover no-repeat; }
.fb-cover--blank { background-image: url('../img/head_logo.png'); background-size: auto 100px; }
.fb-body { padding: 22px; }
.fb-avatar { width: 64px; height: 64px; margin-top: -54px; margin-bottom: 14px; object-fit: cover; border: 3px solid #272d34; position: relative; }
.fb-name { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.fb-name svg { width: 20px; height: 20px; color: #9bb9de; }
.fb-meta { display: flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--ash); font-size: 13px; }
.fb-meta svg { width: 14px; height: 14px; margin-right: 3px; }
.fb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; font-size: 13px; border: 1px solid #ffffff40; }
.btn svg { width: 16px; height: 16px; }
.btn-like { background: var(--chalk); border-color: var(--chalk); color: var(--steel); }
.btn-like:hover { background: #d6d3cb; }
.btn-msg:hover { background: var(--iron); }
.news-feed-title { padding-bottom: 14px; border-bottom: 2px solid var(--rust); color: var(--fire); font-size: 18px; font-weight: 400; }
.post { display: grid; grid-template-columns: 1fr; gap: 22px; padding-block: 26px; border-bottom: 1px solid #ffffff24; }
.post--picture { grid-template-columns: 168px minmax(0, 1fr); }
.post-picture { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--iron); }
.post-picture img { width: 100%; height: 100%; object-fit: cover; }
.post time { display: block; color: var(--fire); font-size: 13px; }
.post-message { margin: 6px 0 10px; color: #ddd9d5; font-size: 15px; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.post-link { display: inline-block; padding-block: 6px; color: var(--ash); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.post-link:hover { color: var(--fire); }
.news-feed > .text-link { margin-top: 22px; }

.site-footer { border-top: 1px solid #ffffff24; color: var(--ash); font-size: 12px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.footer-inner a { padding-block: 8px; overflow-wrap: anywhere; }
.footer-inner a:hover { color: var(--chalk); text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; }

@media (max-width: 1000px) {
    .campfire-inner { grid-template-columns: 1fr; gap: 44px; padding-block: 48px 56px; }
    .trailer { max-width: 640px; }
    .play-block { grid-template-columns: 1fr; gap: 22px; }
    .play-label p { max-width: 36em; }
    .news-layout { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 44px; }
    .post--picture { grid-template-columns: 132px minmax(0, 1fr); }
}

@media (max-width: 720px) {
    .container { width: calc(100% - 40px); }
    .header-inner { min-height: 74px; gap: 18px; }
    .brand { width: 150px; }
    .site-header nav { gap: 18px; font-size: 13px; }
    .site-header nav .nav-wide { display: none; }
    .campfire-inner { gap: 36px; padding-block: 36px 44px; }
    .campfire-scene { object-position: 45% center; }
    .campfire-logo { width: min(240px, 70%); margin-block: 20px 14px; }
    .open-label { font-size: 12px; gap: 9px; }
    .campfire-message { font-size: 18px; }
    .campfire-description { font-size: 14px; }
    .trailer-screen { box-shadow: 8px 8px 0 #0006; outline-width: 6px; margin: 6px; }
    .trailer figcaption { margin: 16px 6px 0; }
    .play { padding-block: 40px 10px; }
    .play > .container > h2 { margin-bottom: 26px; }
    .play-block { padding-block: 28px 32px; gap: 18px; }
    .download-options { grid-template-columns: 1fr; gap: 14px; }
    .download-option { padding: 22px; }
    .steps { grid-template-columns: 1fr; gap: 24px; }
    .steps li { padding: 16px 0 0 56px; }
    .step-number { position: absolute; left: 0; top: 16px; font-size: 48px; }
    .steps h4 { margin-top: 0; }
    .requirements-table { font-size: 13px; }
    .requirements-table th, .requirements-table td { padding: 12px 10px 12px 0; }
    .requirements-table thead th { font-size: 16px; }
    .requirements-table thead th:first-child { width: 27%; font-size: 12px; }
    .requirements-table small { font-size: 11px; }
    .news { padding-block: 44px 52px; }
    .news-layout { grid-template-columns: 1fr; gap: 36px; }
    .news-side { position: static; }
    .post { gap: 16px; padding-block: 22px; }
    .post--picture { grid-template-columns: 104px minmax(0, 1fr); }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 370px) {
    .brand { width: 128px; }
    .site-header nav { gap: 14px; font-size: 12px; }
    .button { width: 100%; padding-inline: 16px; gap: 16px; }
    .fb-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .open-label span { animation: none; }
    .trailer-video { display: none; }
}
