/* ============================================================
   How to Fish — Game Guide Theme
   Low-Poly Fishing Adventure × Awkward Comedy × Calm Ocean
   Per "How to Fish UI.md" spec (2026-08-27)
   ============================================================ */

:root {
  /* UI spec tokens */
  --ocean: #5E91B5;
  --ocean-light: #83B3D1;
  --ocean-deep: #376784;

  --sky: #B9D5E5;
  --sky-light: #D7E8F0;

  --navy: #263B51;
  --navy-deep: #182B3C;

  --cream: #FFF0C9;
  --cream-light: #FFF7E2;

  --orange: #F06F36;
  --orange-dark: #D9572E;

  --purple: #49385E;
  --purple-light: #69557B;

  --sand: #C69A69;
  --sand-light: #E2C49A;

  --surface: #EFF5F4;
  --surface-blue: #DDECF1;

  --text: #273B49;
  --text-secondary: #607785;

  --border: #A1BBC8;
  --border-dark: #5E8297;

  /* Rarity (subdued, per spec §16) */
  --rarity-common: #7895A3;
  --rarity-uncommon: #5B9277;
  --rarity-rare: #536F9C;
  --rarity-vrare: #6D557E;
  --rarity-legendary: #D48A43;

  /* Legacy aliases — base.njk inline styles depend on these */
  --ink: var(--navy);
  --ink-soft: var(--text-secondary);
  --ink-faint: #7E97A5;
  --paper-edge: var(--border);
  --font-head: 'Germania One', 'Nunito Sans', sans-serif;
  --font-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;

  --bg-card: #EDF4F6;
  --border-color: #9BBAC9;
  --border-organic: #9BBAC9;
  --shadow-soft: 0 4px 0 rgba(38,59,81,.12);
  --shadow-lift: 0 6px 0 rgba(38,59,81,.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background:
    linear-gradient(180deg, #C5DDE9 0%, #E6EEF0 40%, #D6E6ED 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Low-poly background facets (very subtle) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255,255,255,.06) 0%, transparent 30%),
    linear-gradient(240deg, rgba(40,80,110,.04) 0%, transparent 40%),
    linear-gradient(15deg, transparent 60%, rgba(255,255,255,.05) 100%);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: .02em;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; margin: 2.4rem 0 1rem; }
h3 { font-size: 1.3rem; margin: 1.8rem 0 .7rem; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 800; }

a { color: #397DA4; text-decoration: none; }
a:hover { color: var(--orange); }

img { max-width: 100%; height: auto; border-radius: 6px; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--ocean-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-card {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--cream);
  font-family: var(--font-head);
  font-size: 1.45rem;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--cream); }
.brand em { font-style: normal; color: var(--orange); font-size: .8em; }
.brand-mark { font-size: 1.2rem; line-height: 1; }

.menu-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 7px;
  color: var(--cream);
  font-size: 1.2rem;
  padding: .35rem .7rem;
  cursor: pointer;
  margin-left: auto;
}

.header-nav {
  display: flex;
  gap: .2rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.header-nav a {
  color: #C9DCE8;
  font-size: .92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .45rem .65rem;
  border-bottom: 3px solid transparent;
}
.header-nav a:hover { color: var(--cream); }
.header-nav a.active {
  color: var(--cream);
  border-bottom-color: var(--orange);
}

.search-toggle {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  color: var(--cream);
  font-size: 1.15rem;
  padding: .3rem .65rem;
  cursor: pointer;
  line-height: 1;
}
.search-toggle:hover { background: rgba(255,255,255,.18); }

/* ---------- Search panel ---------- */
.search-panel {
  display: none;
  background: var(--sky-light);
  border-bottom: 3px solid var(--ocean-light);
  padding: 1.1rem 1.2rem;
}
.search-panel.open { display: block; }
.search-panel input {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border-dark);
  color: var(--navy);
  font-size: 1.15rem;
  font-family: var(--font-body);
  padding: .6rem 0;
  outline: none;
  width: 100%;
}
.search-panel input:focus { border-bottom-color: var(--cream); }
.search-panel a { display: block; padding: .55rem .2rem; border-bottom: 1px solid var(--border); color: var(--navy); font-size: .95rem; }
.search-panel a:hover { color: var(--orange); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: .78rem;
  color: var(--text-secondary);
  padding: 1rem 0 .2rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.breadcrumb a { color: var(--ocean-deep); }
.breadcrumb a:hover { color: var(--orange); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
  color: var(--cream);
  padding: 5rem 1.2rem;
  margin: 0 auto 2.5rem;
  max-width: 1200px;
  background-size: cover;
  background-position: center 35%;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(25,48,67,.92), rgba(25,48,67,.55), rgba(25,48,67,.08));
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--orange);
  border: 2px solid var(--navy-deep);
  border-radius: 5px;
  padding: .2rem .6rem;
  margin-bottom: .9rem;
}
.hero h1 {
  color: var(--cream);
  font-size: 3.4rem;
  margin: 0 0 .5rem;
  max-width: 640px;
}
.hero-tagline {
  color: #D8E8F2;
  font-size: 1.06rem;
  max-width: 560px;
  margin: 0 0 1.4rem;
}
.hero-ctas { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-btn {
  display: inline-block;
  background: #315F7B;
  border: 2px solid #203E52;
  border-radius: 7px;
  color: var(--cream);
  font-weight: 800;
  font-size: .95rem;
  padding: .65rem 1.3rem;
  box-shadow: 0 3px 0 #203E52;
  transition: transform .12s, box-shadow .12s;
}
.hero-btn:hover {
  color: var(--cream);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #203E52;
}
.hero-btn--orange {
  background: var(--orange);
  border-color: #A33D16;
  box-shadow: 0 3px 0 #A33D16;
}
.hero-btn--orange:hover { box-shadow: 0 4px 0 #A33D16; }
.hero-note { margin-top: 1rem; font-size: .8rem; color: #BFD3E0; }

/* Wave transition under hero */
.wave-divider {
  display: block;
  width: 100%;
  height: 44px;
  margin: -2.2rem auto 0;
  max-width: 1200px;
  fill: var(--sky-light);
}

/* ---------- Section headings ---------- */
.section-title {
  text-align: center;
  font-size: 2.1rem;
  margin: 2.6rem 0 1.4rem;
  position: relative;
}
.section-title .fish-mark { color: var(--ocean); margin-right: .4rem; }
.section-sub {
  text-align: center;
  color: var(--text-secondary);
  max-width: 640px;
  margin: -0.8rem auto 1.8rem;
  font-size: .95rem;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
  margin: 1.4rem 0;
}
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-soft);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--ocean-deep);
  box-shadow: var(--shadow-lift);
}
.card h3 {
  font-size: 1.25rem;
  margin: .4rem 0 .5rem;
}
.card p { font-size: .92rem; color: var(--text-secondary); margin: 0 0 .7rem; }
.card-link {
  display: inline-block;
  font-weight: 800;
  font-size: .85rem;
  color: var(--ocean-deep);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.card-link:hover { color: var(--orange); }
.card-icon {
  font-size: 1.9rem;
  display: block;
  transition: transform .15s;
}
.card:hover .card-icon { transform: rotate(-2deg); }

/* Category card with count badge */
.cat-count {
  display: inline-block;
  background: var(--cream);
  border: 2px solid var(--border-dark);
  color: var(--navy);
  font-size: .68rem;
  font-weight: 800;
  border-radius: 5px;
  padding: .1rem .45rem;
  margin-left: .4rem;
  vertical-align: middle;
}

/* Screenshot-heavy guide cards */
.guide-card { padding: 0; overflow: hidden; }
.guide-card img {
  border-radius: 7px 7px 0 0;
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.guide-card .guide-body { padding: .9rem 1.1rem 1.1rem; }
.guide-label {
  display: inline-block;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  background: var(--orange);
  color: var(--cream);
  border-radius: 4px;
  padding: .15rem .5rem;
  margin-bottom: .4rem;
}

/* ---------- Fish cards ---------- */
.fish-card {
  background: var(--surface);
  border: 2px solid #A7C0C9;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  transition: transform .15s, border-color .15s;
}
.fish-card:hover { transform: rotate(-2deg) scale(1.02); border-color: var(--ocean-deep); }
.fish-card .fish-thumb {
  background: var(--surface-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  padding: .5rem;
}
.fish-card .fish-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.fish-card .fish-body { padding: .7rem .9rem .9rem; }
.fish-card h3 { font-size: 1.02rem; margin: 0 0 .3rem; }
.fish-meta { font-size: .78rem; color: var(--text-secondary); line-height: 1.55; }
.fish-value { font-weight: 800; color: var(--navy); font-size: .85rem; }
.fish-value em { color: var(--orange-dark); font-style: normal; }

/* Rarity */
.rarity {
  display: inline-block;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: .12rem .42rem;
  border: 1px solid transparent;
}
.rarity--common    { color: var(--rarity-common); border-color: var(--rarity-common); }
.rarity--endangered{ color: var(--rarity-uncommon); border-color: var(--rarity-uncommon); }
.rarity--miniboss  { color: var(--rarity-rare); border-color: var(--rarity-rare); }
.rarity--boss      { color: var(--rarity-vrare); border-color: var(--rarity-vrare); }
.rarity--finalboss { color: var(--rarity-legendary); border-color: var(--rarity-legendary); }

/* ---------- Location / postcard cards ---------- */
.loc-card { padding: 0; overflow: hidden; position: relative; }
.loc-card img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 7px 7px 0 0; }
.loc-card .loc-body { padding: .9rem 1.1rem 1.1rem; }
.loc-tag {
  position: absolute;
  top: 10px;
  right: 12px;
  transform: rotate(-1deg);
  background: var(--orange);
  color: var(--cream);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  border-radius: 5px;
  padding: .2rem .55rem;
  border: 2px solid var(--navy-deep);
}

/* ---------- Content layout (article + sidebar) ---------- */
.content-wrapper {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding: 1.6rem 0 2.5rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.nav-section {
  background: var(--sky-light);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: .9rem 1rem;
}
.nav-section h3 {
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 2px solid var(--border);
  padding-bottom: .45rem;
  margin: 0 0 .55rem;
}
.nav-section ul { list-style: none; margin: 0; padding: 0; }
.nav-section li { margin: .3rem 0; }
.nav-section a {
  color: var(--ocean-deep);
  font-size: .85rem;
  font-weight: 600;
}
.nav-section a:hover { color: var(--orange); }

.main-content {
  background: #F2F6F4;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 1.8rem 2.2rem;
  min-width: 0;
}
.main-content h1 { margin-top: .2rem; }
.main-content h2 { border-bottom: 3px solid var(--ocean-light); padding-bottom: .3rem; }
.main-content h3 { color: var(--ocean-deep); }
.main-content p, .main-content li { font-size: 1rem; }
.main-content ul, .main-content ol { padding-left: 1.3rem; }
.main-content li { margin: .35rem 0; }

/* Anchor links on headings */
.anchor-link {
  font-size: .8em;
  color: var(--border-dark);
  margin-left: .35rem;
  text-decoration: none;
  opacity: 0;
  transition: opacity .15s;
}
h2:hover .anchor-link, h3:hover .anchor-link { opacity: 1; }
.anchor-link:hover { color: var(--orange); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; margin: 1.4rem 0; padding: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 1rem 1.1rem 1rem 4.4rem;
  margin: .8rem 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: .8rem;
  top: .9rem;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font-head);
  font-size: 1.15rem;
  clip-path: polygon(8% 0, 100% 12%, 92% 100%, 0 88%);
}

/* ---------- Callouts ---------- */
.tip-box, .warning-box, .info-box, .good-box {
  border-radius: 8px;
  padding: .9rem 1.1rem;
  margin: 1.3rem 0;
  border: 2px solid;
  font-size: .95rem;
}
.tip-box {
  background: var(--cream);
  border-color: #D8B879;
  color: var(--navy);
}
.tip-box strong { color: var(--orange-dark); }
.warning-box {
  background: #FDE9DD;
  border-color: #E57A43;
  color: #5C2E12;
}
.warning-box strong { color: #C14E1B; }
.info-box {
  background: var(--surface-blue);
  border-color: var(--ocean-light);
  color: var(--navy);
}
.info-box strong { color: var(--ocean-deep); }
.good-box {
  background: #EFEAF4;
  border-color: var(--purple-light);
  color: #2E2439;
}
.good-box strong { color: var(--purple); }

.callout-label {
  display: block;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: .3rem;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1.3rem 0; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: .92rem;
}
th {
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font-head);
  font-weight: 400;
  letter-spacing: .05em;
  padding: .6rem .8rem;
  text-align: left;
  font-size: .9rem;
}
td {
  padding: .55rem .8rem;
  border-top: 1px solid var(--border);
  color: var(--text);
}
tbody tr:nth-child(even) { background: #E7F0F3; }
td strong { color: var(--navy); }

/* ---------- Buttons ---------- */
.btn--secondary {
  display: inline-block;
  background: transparent;
  border: 2px solid var(--ocean-deep);
  border-radius: 7px;
  color: var(--ocean-deep);
  font-weight: 800;
  font-size: .9rem;
  padding: .55rem 1.1rem;
  transition: background .15s, color .15s;
}
.btn--secondary:hover { background: var(--ocean-deep); color: var(--cream); }

/* ---------- Game info bar ---------- */
.game-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.6rem;
  background: var(--navy);
  border: 2px solid var(--ocean-light);
  border-radius: 10px;
  color: var(--cream);
  padding: .9rem 1.3rem;
  margin: 1.4rem 0;
  font-size: .85rem;
  box-shadow: var(--shadow-soft);
}
.game-info-bar span { color: var(--sky); }
.game-info-bar strong { color: var(--cream); }

/* ---------- Related guides ---------- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .9rem;
  margin: 1.2rem 0;
}
.related-grid .card { padding: .9rem 1rem; }
.related-grid .card h3 { font-size: 1rem; margin-top: .2rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  margin-top: 3rem;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -26px;
  left: 0;
  right: 0;
  height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26 L0 10 Q 100 0 200 12 T 400 10 T 600 12 T 800 10 T 1000 12 T 1200 10 L 1200 26 Z' fill='%23263B51'/%3E%3C/svg%3E") no-repeat center top / 100% 100%;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.6rem 1.2rem 1.4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}
.footer-col strong {
  display: block;
  color: var(--cream);
  font-family: var(--font-head);
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .6rem;
  font-size: .95rem;
}
.footer-col a {
  display: block;
  color: #A8C4D6;
  font-size: .85rem;
  padding: .18rem 0;
}
.footer-col a:hover { color: var(--orange); }
.footer-copy {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.2rem 1.6rem;
  color: #7E9BB0;
  font-size: .78rem;
  text-align: center;
}

/* ---------- Ad placeholders ---------- */
.ad-slot { display: none; }
.ad-container { display: none; }

/* ---------- Hidden helper ---------- */
.hidden { display: none !important; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 4rem 1rem 5rem; }
.notfound h1 { font-size: 2.8rem; color: var(--navy); }
.notfound .fish-big { font-size: 4rem; display: block; margin-bottom: .8rem; }

/* ---------- Utility ---------- */
.page-intro { font-size: 1.06rem; color: var(--text); }
.last-updated {
  font-size: .75rem;
  color: var(--text-secondary);
  margin: .6rem 0 0;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.img-caption { font-size: .78rem; color: var(--text-secondary); text-align: center; margin: .4rem 0 1.2rem; }
.feedback-note { font-size: .82rem; color: var(--text-secondary); }

/* Fish DB filter controls */
.db-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin: 1.2rem 0 1.6rem;
  background: var(--sky-light);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: .9rem 1.1rem;
}
.db-controls select, .db-controls input {
  font-family: var(--font-body);
  font-size: .88rem;
  color: var(--navy);
  background: var(--surface);
  border: 2px solid var(--border-dark);
  border-radius: 7px;
  padding: .45rem .7rem;
  outline: none;
}
.db-controls select:focus, .db-controls input:focus { border-color: var(--ocean); }
.db-result-count { font-size: .8rem; color: var(--text-secondary); margin: 0 0 1rem; }
.fish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}
.fish-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .fish-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .nav-section { flex: 1 1 240px; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.3rem; }
  .hero { padding: 3.4rem 1rem; }
  .menu-toggle { display: block; }
  .header-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: .5rem 0 1rem;
  }
  .header-nav.open { display: flex; }
  .header-nav a { padding: .55rem .3rem; border-bottom: 2px solid rgba(255,255,255,.12); }
  .main-content { padding: 1.2rem 1.1rem; }
  .card-grid--3 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  /* Mobile sidebar rule: keep only On This Page, hide Related */
  .sidebar .nav-section:not(:first-child) { display: none; }
  .section-title { font-size: 1.7rem; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; }
  .hero-btn { text-align: center; }
}
