/* =============================================
   CSS VARIABLES & RESET
============================================= */
:root {
  --black: #000000;
  --dark: #222222;
  --surface: #111111;
  --surface2: #181818;
  --border: #2a2a2a;
  --accent: #c8a84b;
  --accent2: #ffe28b;
  --military-green: #393f2c;
  --text: #d4d0c8;
  --text-dim: #7a7870;
  --text-bright: #f0ece0;
  --green: #4a8c4a;
  --mono: 'Space Mono', monospace;
  --display: 'Barlow Condensed', sans-serif;
  --body: 'Barlow', sans-serif;
  --saira: 'Saira', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}


/* =============================================
   SHARED SECTION STYLES
============================================= */
section {
  position: relative;
  /* To add an image background to any section:
     background-image: url('your-image.jpg');
     background-size: cover;
     background-position: center;
  */
  background-color: var(--black);
}

/* Section overlay — tint over any background image */
section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  pointer-events: none;
  z-index: 0;
}

section > * { position: relative; z-index: 1; }

.section-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 100px 40px;
}

/* Section header */
.section-title {
  font-family: var(--saira);
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-bright);
  line-height: 1;
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}

/* Scan lines drawn over the section title text */
.section-title::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
}

.title-underline {
  width: 80px;
  height: 5px;
  background: var(--military-green);
  margin-bottom: 32px;
}

.section-body {
  font-family: var(--saira);
  font-size: 18px;
  font-weight: 300;
  color: var(--text);
  max-width: 640px;
  line-height: 1.8;
}

ul.section-body, ol.section-body {
  padding-left: 24px;
}

ul.section-body li, ol.section-body li {
  margin-bottom: 6px;
}

/* Divider line between sections */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* =============================================
   VIDEO
============================================= */
#video {
  background-color: var(--black);
  padding: 0 0 20px;
  text-align: center;
}

#video::after { display: none; }

.video-wrapper {
  width: 100%;
  max-width: min(
    1600px,
    calc(100vw - 20px),
    calc((100dvh - 100px) * 16 / 9)
  );
  aspect-ratio: 16 / 9;
  margin: 0 auto;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.btn-read-more {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 48px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--accent);
  text-decoration: none;
  clip-path: polygon(24px 0%, 100% 0%, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0% 100%, 0% 24px);
  transition: background 0.2s, transform 0.15s;
  position: relative;
}

.btn-read-more::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: var(--accent2);
  clip-path: polygon(24px 0%, 100% 0%, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0% 100%, 0% 24px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-read-more:hover {
  transform: translateY(-3px);
}

.btn-read-more:hover::before { opacity: 1; }

/* =============================================
   GAME OVERVIEW
============================================= */
#game-overview {
  background-color: var(--dark);
}

/* =============================================
   PATREON SUPPORT
============================================= */
#cta {
  background-color: var(--black);
}

.btn-patreon {
  display: inline-block;
  margin-top: 36px;
  padding: 12px 48px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--accent);
  text-decoration: none;
  clip-path: polygon(24px 0%, 100% 0%, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0% 100%, 0% 24px);
  transition: background 0.2s, translate 0.15s;
  position: relative;
}

.btn-patreon::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: var(--accent2);
  clip-path: polygon(24px 0%, 100% 0%, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0% 100%, 0% 24px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-patreon:hover {
  translate: 0 -3px;
}

.btn-patreon:hover::before { opacity: 1; }

/* =============================================
   HIGHLIGHTS
============================================= */
#highlights {
  background-color: var(--dark);
}

#highlights .video-wrapper {
  margin-top: 36px;
}

/* =============================================
   ROADMAP
============================================= */
#roadmap {
  background-color: var(--black);
}

/* Timeline */
.timeline {
  position: relative;
  margin: 48px 0 64px;
  padding: 0;
}

/* Horizontal progress bar */
.timeline-bar-wrap {
  position: relative;
  height: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  margin-bottom: 0;
}

.timeline-bar-fill {
  height: 100%;
  /* Phase 3 of 8 = 31.25% */
  width: 31.25%;
  background: linear-gradient(to right, var(--green), var(--green) 66%, var(--accent) 90%);
}

.timeline-nodes {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: 0;
}

.timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  cursor: default;
}

.node-dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  background: var(--dark);
  margin-top: -9px;
  transition: border-color 0.2s;
}

.timeline-node.done .node-dot {
  background: var(--green);
  border-color: var(--green);
}

.timeline-node.active .node-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.node-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-align: center;
  margin-top: 8px;
  text-transform: uppercase;
  max-width: 70px;
  line-height: 1.3;
}

.timeline-node.active .node-label {
  color: var(--accent);
}

.timeline-node.done .node-label {
  color: var(--green);
}

/* Phase cards */
.phases {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 56px;
}

.phase {
  border-left: 3px solid var(--border);
  padding: 20px 24px;
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Scan lines drawn over the entire phase card */
.phase::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.phase > * { position: relative; z-index: 2; }

.phase:hover {
  border-left-color: var(--accent);
  background: var(--surface2);
}

.phase.active {
  border-left-color: var(--accent);
  background: var(--surface2);
}

.phase-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  justify-content: space-between;
}

.phase-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  flex-shrink: 0;
}

.phase.active .phase-num { color: var(--accent); }
.phase.done .phase-num { color: var(--green); }

.phase-name {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  line-height: 110%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-bright);
  flex: 1;
}

.phase-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 10px;
  flex-shrink: 0;
  align-self: flex-start;
  position: relative;
  z-index: 0;
}

.phase-status::before {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  clip-path: polygon(5px 0%, 100% 0%, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0% 100%, 0% 5px);
  z-index: -2;
}

.phase-status::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: var(--surface);
  clip-path: polygon(4px 0%, 100% 0%, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0% 100%, 0% 4px);
  z-index: -1;
}

.phase.done .phase-status { color: var(--green); border-color: var(--green); }
.phase.active .phase-status { color: var(--accent); border-color: var(--accent); }
.phase:not(.done):not(.active) .phase-status { color: var(--text-dim); border-color: var(--border); }

.phase-body {
  margin-top: 12px;
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.7;
  display: none;
}

.phase.active .phase-body,
.phase.open .phase-body {
  display: block;
}

.phase-body p { margin-bottom: 10px; }

.phase-body ul {
  list-style: none;
  padding: 0;
  margin-top: 8px;
}

.phase-body ul li {
  padding: 3px 0 3px 20px;
  position: relative;
  color: var(--text);
  font-size: 16px;
}

.phase-body ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--text-dim);
  font-size: 18px;
  top: 2px;
}

/* =============================================
   SCREENSHOTS
============================================= */
#screenshots {
  background-color: var(--dark);
}

.screenshots {
  /* font-size: 14px; */
  color: var(--text-dim);
  line-height: 1.7;
  max-width: unset;
}

.gallery {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding-bottom: 20px;
}

.gallery img {
    width: 100%;
    display: block;
    max-width: 360px;
    margin: 0 auto;

    border-radius: 8px;

    cursor: pointer;

    transition: transform 0.2s;
}

.gallery img:hover {
    transform: scale(1.03);
}

/* =============================================
   ABOUT
============================================= */
#about {
  background-color: var(--black);
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-bright);
  text-decoration: none;
  transition: color 0.2s, translate 0.2s;
  position: relative;
  z-index: 0;
}

.btn-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--border);
  clip-path: polygon(7px 0%, 100% 0%, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0% 100%, 0% 7px);
  z-index: -2;
  transition: background 0.2s;
}

.btn-link::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: var(--dark);
  clip-path: polygon(6px 0%, 100% 0%, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0% 100%, 0% 6px);
  z-index: -1;
}

.btn-link:hover::before {
  background: var(--accent);
}

.btn-link:hover {
  color: var(--accent);
  translate: 0 -3px;
}

.btn-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* =============================================
   FOOTER
============================================= */
footer {
  background: var(--black);
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

footer a
{
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
  text-transform: uppercase;
}

footer a:hover
{
    color: var(--accent);
    text-decoration: underline;
}

footer a:visited
{
    color: var(--green);
}

/* =============================================
   FADE-IN ANIMATION
============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease, translate 0.2s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 600px) {
  .section-inner { padding: 72px 24px; }
  .node-label { font-size: 8px; max-width: 50px; }
  .about-links { flex-direction: column; }
  .btn-patreon { padding: 14px 32px; font-size: 17px; }
  .phase-header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "num    status"
      "name   status";
    gap: 0px 12px;
    align-items: start;
  }
  .phase-num    { grid-area: num; }
  .phase-name   { grid-area: name; }
  .phase-status { grid-area: status; align-self: start; }
}

/* Alternate timeline labels above/below the bar to prevent overlap on narrow screens */
@media (max-width: 639px) {
  .timeline { padding-top: 44px; }
  .timeline-node { position: relative; }
  .timeline-node:nth-child(even) .node-label {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 14px);
    transform: translateX(-50%);
    margin-top: 0;
  }
}
