/* The Cue Sports Companion — custom stylesheet
   Identity: billiard-felt green + brass, warm editorial reading experience.
   Content is ALWAYS visible with CSS alone. No JS-gated visibility. */

:root {
  --felt-950: #071f18;
  --felt-900: #0a2e22;
  --felt-800: #0d3b2e;
  --felt-700: #124a39;
  --felt-600: #17614a;
  --felt-500: #1e7458;
  --brass: #c8963e;
  --brass-dark: #a9761f;
  --brass-light: #e6c179;
  --cream: #f6f2e9;
  --cream-card: #fcfaf4;
  --ink: #20241f;
  --ink-soft: #55594e;
  --line: #e4ddcb;
  --shadow: 0 10px 30px rgba(10, 46, 34, 0.10);
  --shadow-sm: 0 4px 14px rgba(10, 46, 34, 0.08);
  --maxw: 1120px;
  --read: 720px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--brass-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--felt-700); }

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: var(--felt-800);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 0.5em;
}

/* AOS safeguard (no data-aos is used, but belt-and-suspenders per playbook) */
[data-aos] { opacity: 1 !important; transform: none !important; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--brass); color: var(--felt-950);
  padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--felt-900);
  border-bottom: 3px solid var(--brass);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  color: var(--cream); text-decoration: none; font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 1.18rem; letter-spacing: .2px;
}
.brand:hover { color: #fff; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff 0 12%, var(--brass) 13% 55%, var(--brass-dark) 100%);
  box-shadow: inset 0 -2px 5px rgba(0,0,0,.35);
  flex: 0 0 auto; border: 1px solid rgba(0,0,0,.25);
}
.brand .brand-text small { display: block; font-family: "Inter", sans-serif; font-weight: 500;
  font-size: .58rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--brass-light); }

.nav-toggle {
  display: none; background: none; border: 1.5px solid rgba(230,193,121,.5); border-radius: 8px;
  color: var(--cream); width: 44px; height: 40px; font-size: 1.2rem; cursor: pointer;
}
.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  display: block; color: #e9e5d8; text-decoration: none; font-size: .93rem; font-weight: 500;
  padding: 8px 12px; border-radius: 7px; white-space: nowrap;
}
.nav-menu a:hover { background: var(--felt-700); color: #fff; }
.nav-menu a.active { color: var(--brass-light); }

/* ---------- Page hero ---------- */
.page-hero {
  position: relative; background: var(--felt-800); color: var(--cream);
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--hero-img);
  background-size: cover; background-position: center;
  opacity: .30; z-index: 0;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(7,31,24,.55) 0%, rgba(7,31,24,.78) 100%);
}
.page-hero .container { position: relative; z-index: 2; padding-top: 58px; padding-bottom: 58px; }
.page-hero .eyebrow {
  display: inline-block; font-size: .72rem; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--brass-light); font-weight: 600; margin-bottom: 14px;
  border: 1px solid rgba(230,193,121,.4); padding: 5px 12px; border-radius: 40px;
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.15rem); max-width: 15ch; margin-bottom: .35em; }
.page-hero .lead { color: #ece8db; font-size: 1.15rem; max-width: 60ch; margin: 0; }

/* Home hero — taller, centered */
.home-hero .container { padding-top: 92px; padding-bottom: 92px; text-align: center; }
.home-hero h1 { max-width: 20ch; margin-left: auto; margin-right: auto; font-size: clamp(2.3rem, 6vw, 4rem); }
.home-hero .lead { margin-left: auto; margin-right: auto; }
.home-hero .hero-cta { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: 13px 26px; border-radius: 9px; transition: transform .12s ease, background .16s ease;
}
.btn-primary { background: var(--brass); color: var(--felt-950); border: 1px solid var(--brass); }
.btn-primary:hover { background: var(--brass-light); color: var(--felt-950); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--cream); border: 1.5px solid rgba(246,242,233,.5); }
.btn-ghost:hover { background: rgba(246,242,233,.1); color: #fff; transform: translateY(-2px); }

/* ---------- Article body ---------- */
main { display: block; }
.article { padding: 52px 0 20px; }
.article .container { max-width: calc(var(--read) + 44px); }
.article-body { max-width: var(--read); margin: 0 auto; }
.article-body p { margin: 0 0 1.15em; color: var(--ink); }
.article-body .lead {
  font-size: 1.24rem; line-height: 1.6; color: var(--ink); font-weight: 400;
  border-left: 3px solid var(--brass); padding-left: 18px; margin-bottom: 1.5em;
}
.article-body h2 {
  font-size: 1.72rem; margin-top: 1.7em; padding-bottom: .28em;
  border-bottom: 1px solid var(--line);
}
.article-body h3 { font-size: 1.28rem; margin-top: 1.3em; color: var(--felt-700); }
.article-body ul, .article-body ol { margin: 0 0 1.2em; padding-left: 1.25em; }
.article-body li { margin-bottom: .5em; }
.article-body strong { color: var(--felt-800); font-weight: 650; }
.article-body em { color: var(--ink-soft); }
.article-body figure { margin: 0 0 1.6em; }
.article-body .inline-img { border-radius: 12px; box-shadow: var(--shadow-sm); width: 100%; }

/* ---------- Home sections ---------- */
.section { padding: 60px 0; }
.section-alt { background: var(--cream-card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 42px; }
.section-head h2 { font-size: 2rem; }
.section-head p { color: var(--ink-soft); margin: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 22px; }
.card {
  background: var(--cream-card); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 24px; box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brass); color: var(--ink); }
.card .card-icon {
  width: 48px; height: 48px; border-radius: 50%; margin-bottom: 16px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; position: relative;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.9) 0 7%, var(--bc, #1e7458) 13% 100%);
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.35), var(--shadow-sm); border: 1px solid rgba(0,0,0,.2);
}
.card .card-icon::before {
  content: ""; position: absolute; width: 56%; height: 56%; border-radius: 50%; background: #fbf9f3;
}
.card .card-icon span {
  position: relative; z-index: 1; font-family: "Fraunces", serif; font-weight: 700;
  font-size: 1rem; color: #17201b;
}
.card h3 { font-size: 1.24rem; margin-bottom: .35em; }
.card p { margin: 0; color: var(--ink-soft); font-size: .96rem; line-height: 1.6; }
.card .card-more { margin-top: 14px; color: var(--brass-dark); font-weight: 600; font-size: .9rem; }

.disclaimer-band {
  background: var(--felt-950); color: #cdd6cf; font-size: .92rem; line-height: 1.6;
}
.disclaimer-band .container { padding-top: 22px; padding-bottom: 22px; display: flex; gap: 14px; align-items: flex-start; }
.disclaimer-band .di { color: var(--brass); font-size: 1.1rem; flex: 0 0 auto; margin-top: 2px; }

/* ---------- Prose "next" nav ---------- */
.read-next {
  max-width: var(--read); margin: 30px auto 0; padding: 22px 24px;
  background: var(--cream-card); border: 1px solid var(--line); border-radius: 12px;
}
.read-next h2 { font-size: 1.1rem; margin: 0 0 .4em; border: 0; padding: 0; }
.read-next p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--felt-900); color: #c9d2ca; margin-top: 40px; }
.footer-top { padding: 48px 0 30px; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; }
.footer-brand .brand { color: var(--cream); margin-bottom: 12px; }
.footer-brand p { font-size: .92rem; line-height: 1.65; color: #a9b6ac; margin: 0 0 14px; max-width: 42ch; }
.footer-disclaimer { font-size: .82rem; color: #8ea294; line-height: 1.6; border-left: 2px solid var(--brass); padding-left: 12px; }
.footer-col h4 { color: var(--brass-light); font-family: "Inter", sans-serif; font-size: .78rem;
  letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #c9d2ca; text-decoration: none; font-size: .94rem; }
.footer-col a:hover { color: var(--brass-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.09); padding: 18px 0; text-align: center;
  font-size: .84rem; color: #8ea294; }

/* ---------- 404 ---------- */
.error-wrap { text-align: center; padding: 90px 0; }
.error-wrap .big { font-family: "Fraunces", serif; font-size: 5rem; color: var(--brass); line-height: 1; margin-bottom: .1em; }

/* ---------- Entrance animation (CSS-only; ends visible) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .rise { animation: rise .5s ease both; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: 66px; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--felt-900); border-bottom: 3px solid var(--brass);
    max-height: 0; overflow: hidden; transition: max-height .28s ease;
  }
  .nav-menu.open { max-height: 640px; }
  .nav-menu li { border-top: 1px solid rgba(255,255,255,.07); }
  .nav-menu a { padding: 14px 22px; }
  .footer-top { grid-template-columns: 1fr; }
  .article-body .lead { font-size: 1.12rem; }
}
