/*
Theme Name: AquaForge
Theme URI: https://aquaforgegames.com
Author: Jordan Barton
Description: A review theme for small-team indie games. Deep-water palette, Steam-native artwork ratios, tiered verdicts instead of numeric scores.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: aquaforge
*/

:root {
  --stone: #d6d9d0;
  --paper: #e9ebe4;
  --field: #fbfbf8;
  --rule: #b3b8ac;
  --ink: #1b2321;
  --muted: #5c6a63;
  --patina: #3d6a5b;
  --rust: #9a3d2b;

  --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --step--1: 0.855rem;
  --step-0: 1.0625rem;
  --step-1: 1.29rem;
  --step-2: clamp(1.45rem, 1.2rem + 1vw, 1.777rem);
  --step-3: clamp(1.8rem, 1.4rem + 1.8vw, 2.369rem);
  --step-4: clamp(2.2rem, 1.5rem + 3vw, 3.157rem);
  --step-5: clamp(2.6rem, 1.4rem + 4.6vw, 4.2rem);

  --measure: 68ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --shelf: 1440px;
}

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

html { scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}


h1, h2, h3, h4, .ui {
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
}

a { color: var(--patina); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--patina);
  outline-offset: 3px;
  border-radius: 2px;
}

img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: var(--shelf);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--rust);
  color: var(--paper);
  padding: 0.75rem 1rem;
  font-family: var(--sans);
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: rgba(214, 217, 208, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark svg { width: 1.7rem; height: 1.7rem; flex: none; }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover, .nav .current-menu-item > a { color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step--1);
  padding: 0.5rem 0.8rem;
  border-radius: 3px;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 1rem var(--gutter) 1.5rem;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 1rem; }
}

/* ---------- Verdict marks ---------- */

.verdict {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.35rem 0.7rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: rgba(233, 235, 228, 0.94);
  white-space: nowrap;
}
.verdict::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background: currentColor;
  transform: rotate(45deg);
  flex: none;
}
.verdict--gem { color: var(--rust); }
.verdict--rough { color: var(--patina); }
.verdict--notyet { color: var(--muted); }

.verdict--lg { font-size: var(--step-0); padding: 0.5rem 0.95rem; }

/* ---------- Sounding line (how buried the game was) ---------- */

.sounding {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}
.sounding b {
  color: var(--patina);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- Featured review ---------- */

.featured { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }

.featured__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

.featured__art {
  position: relative;
  aspect-ratio: 460 / 215;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.featured__art img { width: 100%; height: 100%; object-fit: cover; }

.featured__eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--patina);
  margin-bottom: 0.9rem;
}

.featured__title {
  font-size: var(--step-5);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 0.75rem;
}
.featured__title a { color: inherit; text-decoration: none; }
.featured__title a:hover { color: var(--patina); }

.featured__dev {
  font-family: var(--sans);
  font-size: var(--step-0);
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.featured__quote {
  font-family: var(--serif);
  font-size: var(--step-2);
  line-height: 1.4;
  font-style: italic;
  color: var(--ink);
  border-left: 2px solid var(--rust);
  padding-left: 1.1rem;
  margin: 0 0 1.5rem;
  max-width: 34ch;
}

.featured__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 860px) {
  .featured__grid { grid-template-columns: 1fr; }
  .featured__quote { max-width: none; }
}

/* ---------- Section headings ---------- */

.shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.shelf-head h2 { font-size: var(--step-2); }
.shelf-head p {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
  margin: 0;
}

/* ---------- Review grid ---------- */

.shelf { padding-bottom: clamp(3rem, 7vw, 5rem); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: clamp(1.75rem, 3vw, 2.5rem) clamp(1.25rem, 2.5vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.card { display: flex; flex-direction: column; }

.card__art {
  position: relative;
  aspect-ratio: 460 / 215;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--rule);
  margin-bottom: 0.9rem;
}
.card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}
.card:hover .card__art img { transform: scale(1.03); }
.card__art .verdict {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
}

.card__title {
  font-size: var(--step-1);
  margin-bottom: 0.35rem;
}
.card__title a { color: var(--ink); text-decoration: none; }
.card:hover .card__title a { color: var(--patina); }

.card__dev {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.card__excerpt {
  font-size: var(--step--1);
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 0.8rem;
}

.card__foot {
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
}

/* ---------- Single review ---------- */

.review-hero { padding: clamp(2rem, 5vw, 3.5rem) 0 0; }

.review-hero__art {
  aspect-ratio: 460 / 215;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.review-hero__art img { width: 100%; height: 100%; object-fit: cover; }

.review-hero__title {
  font-size: var(--step-4);
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 20ch;
  margin-bottom: 0.6rem;
}

.review-hero__dev {
  font-family: var(--sans);
  color: var(--muted);
  font-size: var(--step-1);
  margin: 0 0 1.5rem;
}

.spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}
.spec > div {
  background: var(--paper);
  padding: 0.9rem 1rem;
}
.spec dt {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.spec dd {
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

.prose {
  max-width: var(--measure);
  font-size: 1.12rem;
  line-height: 1.75;
}
.prose > * + * { margin-top: 1.4em; }
.prose h2 { font-size: var(--step-2); margin-top: 2.2em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.8em; }
.prose img { margin-block: 2em; border: 1px solid var(--rule); }
.prose blockquote {
  border-left: 2px solid var(--patina);
  padding-left: 1.2rem;
  margin-left: 0;
  font-style: italic;
  color: var(--ink);
}
.prose code {
  font-size: 0.9em;
  background: var(--paper);
  padding: 0.15em 0.4em;
  border-radius: 2px;
}

.steam-out {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--step-0);
  background: var(--rust);
  color: var(--paper);
  padding: 0.75rem 1.3rem;
  border-radius: 3px;
  text-decoration: none;
  margin-top: 2.5rem;
}
.steam-out:hover { background: var(--ink); color: var(--paper); }

/* ---------- Comments ---------- */

.comments {
  max-width: var(--measure);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.comments h2 { font-size: var(--step-2); margin-bottom: 1.5rem; }

.comment-list { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.comment-list ul.children { list-style: none; margin-left: 1.5rem; padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.comment-list li { margin-bottom: 1.75rem; }

.comment__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.5rem;
}
.comment__head img { border-radius: 50%; }
.comment__author { font-family: var(--sans); font-weight: 600; font-size: var(--step-0); }
.comment__date { font-family: var(--sans); font-size: var(--step--1); color: var(--muted); }
.comment__body { font-size: var(--step-0); }
.comment__body p { margin: 0 0 0.8em; }
.comment-reply-link { font-family: var(--sans); font-size: var(--step--1); }

.comment-respond { background: var(--paper); border: 1px solid var(--rule); padding: clamp(1.25rem, 3vw, 2rem); }
.comment-respond .comment-reply-title { font-size: var(--step-1); margin-bottom: 0.5rem; }
.comment-form label { display: block; font-family: var(--sans); font-size: var(--step--1); color: var(--muted); margin-bottom: 0.3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  padding: 0.6rem 0.75rem;
  border-radius: 2px;
}
.comment-form p { margin: 0 0 1rem; }
.comment-form .form-submit { margin-bottom: 0; }
.comment-form input[type="submit"] {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--step-0);
  background: var(--patina);
  color: var(--paper);
  border: 0;
  padding: 0.7rem 1.4rem;
  border-radius: 3px;
  cursor: pointer;
}
.comment-form input[type="submit"]:hover { background: var(--ink); }
.comment-notes, .logged-in-as { font-family: var(--sans); font-size: var(--step--1); color: var(--muted); }

/* ---------- Pagination, empty states, footer ---------- */

.pagination {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: var(--step-0);
  margin-top: 3rem;
}
.pagination .page-numbers {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  text-decoration: none;
}
.pagination .current { background: var(--patina); color: var(--paper); border-color: var(--patina); }

.empty {
  border: 1px dashed var(--rule);
  padding: clamp(2rem, 5vw, 3.5rem);
  max-width: 48ch;
}
.empty h2 { font-size: var(--step-2); margin-bottom: 0.75rem; }
.empty p { color: var(--muted); margin: 0 0 1.25rem; }

.site-foot {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3rem;
  padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
}
.site-foot__inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; }
.site-foot p { margin: 0; max-width: 46ch; line-height: 1.6; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--patina); }

/* ---------- One orchestrated entrance on the featured slot ---------- */

@media (prefers-reduced-motion: no-preference) {
  .featured__art img { animation: surface 900ms cubic-bezier(0.22, 1, 0.36, 1) both; }
  .featured__inner > * { animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both; }
  .featured__inner > *:nth-child(2) { animation-delay: 60ms; }
  .featured__inner > *:nth-child(3) { animation-delay: 110ms; }
  .featured__inner > *:nth-child(4) { animation-delay: 160ms; }
  .featured__inner > *:nth-child(5) { animation-delay: 210ms; }
}

@keyframes surface {
  from { transform: scale(1.06) translateY(10px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes rise {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
