/*
Theme Name: The Long Game
Theme URI: https://tlg.life
Author: The Long Game
Description: A design-led editorial theme for The Long Game - a curated library of longevity references. Warm grey ground, black panels, expanded grotesque display type, numbered entries.
Version: 1.0.1
Text Domain: the-long-game
*/

/* ============ Fonts ============ */
@font-face {
  font-family: 'Archivo';
  src: url('assets/fonts/archivo-var.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('assets/fonts/archivo-var-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

/* ============ Tokens / base ============ */
:root {
  --grey: #E8E6E0;
  --grey-deep: #D8D4C9;
  --ink: #111111;
  --black: #0B0B0B;
  --paper: #FFFFFF;
  --pad: clamp(20px, 4vw, 64px);
  --maxw: 1680px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--grey);
  color: var(--ink);
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
::selection { background: var(--ink); color: var(--grey); }

.tlg-wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* ============ Intro overlay ============ */
#tlg-intro {
  position: fixed; inset: 0; z-index: 100000;
  background: var(--grey);
  display: flex; align-items: center; justify-content: center;
  transition: transform .7s cubic-bezier(.76,0,.24,1), opacity .7s ease;
}
#tlg-intro .tlg-intro-word {
  font-weight: 900; font-stretch: 125%;
  font-size: clamp(4.5rem, 20vw, 15rem);
  line-height: .9; letter-spacing: -.02em; color: var(--ink);
  display: flex; overflow: hidden;
}
#tlg-intro .tlg-intro-l { display: inline-block; opacity: 0; transform: translateY(.45em); }
body.tlg-intro-play #tlg-intro .tlg-intro-l { animation: tlgAssemble .8s cubic-bezier(.22,1,.36,1) forwards; }
body.tlg-intro-play #tlg-intro .tlg-intro-l:nth-child(1) { transform: translateX(-.3em); animation-delay: .05s; }
body.tlg-intro-play #tlg-intro .tlg-intro-l:nth-child(2) { animation-delay: .18s; }
body.tlg-intro-play #tlg-intro .tlg-intro-l:nth-child(3) { transform: translateX(.3em); animation-delay: .31s; }
@keyframes tlgAssemble {
  0% { opacity: 0; filter: blur(8px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translate(0,0); filter: blur(0); }
}
body.tlg-intro-done #tlg-intro { transform: translateY(-100%); opacity: .98; pointer-events: none; }
body.tlg-intro-off #tlg-intro { display: none; }
@media (prefers-reduced-motion: reduce) {
  #tlg-intro { display: none; }
  html { scroll-behavior: auto; }
}

/* ============ Header ============ */
.tlg-header {
  position: sticky; top: 0; z-index: 900;
  background: var(--grey);
  border-bottom: 1px solid var(--ink);
}
.tlg-header-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-top: .9rem; padding-bottom: .9rem;
}
.tlg-brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.tlg-brand-mark {
  background: var(--ink); color: var(--grey);
  font-weight: 900; font-stretch: 125%; letter-spacing: -.02em;
  font-size: 1.05rem; line-height: 1; padding: .5rem .55rem .42rem;
}
.tlg-brand-name {
  font-weight: 850; font-stretch: 112%; text-transform: uppercase;
  letter-spacing: .01em; font-size: 1.02rem; line-height: 1;
}
.tlg-brand-tag { display: block; font-weight: 560; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; margin-top: .28rem; opacity: .72; }
.tlg-nav ul { list-style: none; display: flex; gap: clamp(1rem, 2.6vw, 2.4rem); margin: 0; padding: 0; flex-wrap: wrap; justify-content: flex-end; }
.tlg-nav a {
  text-decoration: none; text-transform: uppercase; font-weight: 700;
  font-size: .8rem; letter-spacing: .09em; padding: .2rem 0;
  border-bottom: 2px solid transparent;
}
.tlg-nav a:hover, .tlg-nav .current-menu-item a, .tlg-nav .current_page_item a { border-bottom-color: var(--ink); }
body.admin-bar .tlg-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .tlg-header { top: 46px; } }
@media (max-width: 680px) {
  .tlg-header-in { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .tlg-nav ul { justify-content: flex-start; }
}

/* ============ Hero (front page) ============ */
.tlg-hero {
  position: relative; min-height: min(94vh, 980px);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; background: var(--black);
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
}
.tlg-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.82) contrast(1.02); }
.tlg-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(11,11,11,.28) 0%, rgba(11,11,11,0) 30%, rgba(11,11,11,0) 55%, rgba(11,11,11,.38) 100%);
}
.tlg-hero-top {
  position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.4rem var(--pad) 0; color: #fff;
  text-transform: uppercase; font-size: .72rem; font-weight: 700; letter-spacing: .16em;
}
.tlg-hero-main { position: relative; z-index: 2; padding: 0 var(--pad) 2.2rem; color: #fff; }
.tlg-hero-kicker { text-transform: uppercase; font-size: .78rem; font-weight: 700; letter-spacing: .18em; margin: 0 0 .6rem; }
.tlg-hero-title {
  margin: 0; font-weight: 900; font-stretch: 125%;
  font-size: clamp(5rem, 21vw, 19rem); line-height: .84; letter-spacing: -.025em; text-transform: uppercase;
}
.tlg-hero-sub {
  margin: .8rem 0 0; font-weight: 850; font-stretch: 118%;
  font-size: clamp(1.6rem, 4.6vw, 3.6rem); line-height: 1; letter-spacing: -.01em;
}
.tlg-hero-meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; text-transform: uppercase; font-size: .72rem; font-weight: 700; letter-spacing: .16em; }

/* ============ Front page content ============ */
.tlg-main { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
.tlg-intro {
  font-size: clamp(1.3rem, 2.3vw, 1.75rem); line-height: 1.42; font-weight: 560;
  max-width: 34em; letter-spacing: -.01em; margin: 0 0 2.2rem;
}
.tlg-counts {
  text-transform: uppercase; font-weight: 850; font-stretch: 110%;
  font-size: clamp(1rem, 2.1vw, 1.55rem); letter-spacing: .01em;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  padding: 1rem 0; margin: 0 0 1rem;
}
.tlg-counts strong { font-weight: 850; }

/* Section panels (block content) */
.tlg-section {
  background: var(--black); color: #fff;
  padding: clamp(1.4rem, 3.4vw, 2.6rem) clamp(1.2rem, 3vw, 2.4rem);
  margin: clamp(3rem, 7vw, 5.5rem) 0 0;
}
.tlg-section h2 {
  margin: 0; color: #fff; font-weight: 900; font-stretch: 122%;
  font-size: clamp(2rem, 5.6vw, 4.3rem); line-height: .95; letter-spacing: -.015em; text-transform: uppercase;
}

/* Entries (block content) */
.tlg-entry {
  border-top: 1px solid var(--ink);
  padding-top: 1.1rem; margin: 3rem 0 .55rem;
  font-weight: 820; font-stretch: 108%; letter-spacing: -.015em;
  font-size: clamp(1.55rem, 3vw, 2.5rem); line-height: 1.06;
  max-width: 22em; text-wrap: balance;
}
.tlg-entry .tlg-num { font-weight: 900; font-stretch: 125%; margin-right: .35em; }
.tlg-entry + p {
  text-transform: uppercase; font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; opacity: .62; margin: 0 0 .7rem;
}
.tlg-entry + p + p { font-size: 1.13rem; line-height: 1.5; max-width: 60ch; margin: 0 0 .8rem; }
.tlg-entry + p + p + p { margin: 0; }
.tlg-entry + p + p + p a {
  text-transform: uppercase; font-size: .78rem; font-weight: 800; letter-spacing: .14em;
  text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 2px;
}
.tlg-entry + p + p + p a::after { content: " \2197"; }
.tlg-entry + p + p + p a:hover { background: var(--ink); color: var(--grey); }

/* Reveal on scroll (JS only) */
html.tlg-js .tlg-reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1); }
html.tlg-js .tlg-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.tlg-js .tlg-reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Generic pages ============ */
.tlg-page-title {
  font-weight: 900; font-stretch: 124%; text-transform: uppercase;
  font-size: clamp(2.6rem, 8.5vw, 7rem); line-height: .9; letter-spacing: -.02em;
  margin: 0 0 clamp(1.5rem, 4vw, 3rem); padding-top: clamp(2rem, 5vw, 4rem);
}
.tlg-content > p { max-width: 62ch; font-size: 1.08rem; }
.tlg-content h2 { font-weight: 850; font-stretch: 112%; text-transform: uppercase; letter-spacing: -.01em; }

/* ============ Thought Leaders polaroids ============ */
.tlg-polaroid-panel {
  background: var(--black); color: #fff;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.2rem, 4vw, 3.5rem) clamp(3rem, 7vw, 5rem);
  margin-top: 2rem;
}
.tlg-polaroid-panel a { color: #fff; }
.tlg-polaroid-panel > .wp-block-columns { max-width: 1160px; margin-left: auto; margin-right: auto; }
.tlg-polaroid {
  background: var(--paper); color: var(--ink);
  padding: 1rem 1rem 2.9rem;
  box-shadow: 0 24px 45px rgba(0,0,0,.5), 0 5px 14px rgba(0,0,0,.35);
  margin: 1rem .5rem 2.4rem;
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.tlg-polaroid a { color: var(--ink); }
.tlg-polaroid .wp-block-image { margin: 0 0 1.1rem; }
.tlg-polaroid .wp-block-image img { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.tlg-polaroid h3 { margin: .4rem 0 .3rem; color: var(--ink); font-weight: 850; font-stretch: 112%; font-size: 1.5rem; letter-spacing: -.01em; }
.tlg-polaroid p { margin: .35rem 0; color: var(--ink); font-size: 1rem; line-height: 1.45; }
.tlg-tilt-l { transform: rotate(-3deg); }
.tlg-tilt-r { transform: rotate(2deg); }
.tlg-tilt-l2 { transform: rotate(-1.5deg); }
.tlg-tilt-r2 { transform: rotate(3deg); }
.tlg-polaroid:hover { transform: rotate(0deg) scale(1.02); position: relative; z-index: 3; }
.tlg-initials {
  background: var(--ink); color: #fff; aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  font-size: 5.2rem; font-weight: 900; font-stretch: 125%; line-height: 1;
  letter-spacing: -.02em; text-transform: uppercase; margin: 0 0 1.1rem; text-align: center;
}
.tlg-credit { font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; opacity: .6; }
@media (min-width: 900px) {
  .tlg-polaroid-panel .wp-block-columns:nth-of-type(1) .wp-block-column:nth-child(2) .tlg-polaroid { margin-top: 4.2rem; }
  .tlg-polaroid-panel .wp-block-columns:nth-of-type(2) .wp-block-column:nth-child(1) .tlg-polaroid { margin-top: -.6rem; }
  .tlg-polaroid-panel .wp-block-columns:nth-of-type(2) .wp-block-column:nth-child(2) .tlg-polaroid { margin-top: 3rem; }
}

/* ============ About ============ */
.tlg-about-hero { position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6rem) 1.5rem; background: var(--grey); color: var(--ink); }
.tlg-giant-letters {
  position: absolute; top: -.15em; right: -.05em;
  font-size: 34vw; font-weight: 900; font-stretch: 125%; line-height: .8; letter-spacing: -.04em;
  color: var(--grey-deep); z-index: 0; pointer-events: none; margin: 0; max-width: none;
}
.tlg-about-hero .wp-block-group__inner-container { position: relative; z-index: 1; }
.tlg-fg { position: relative; z-index: 1; }
.tlg-hero-statement {
  position: relative; z-index: 1;
  font-size: clamp(1.8rem, 4.5vw, 3.4rem); font-weight: 820; font-stretch: 106%;
  line-height: 1.14; letter-spacing: -.02em; color: var(--ink); max-width: 24ch; margin: 0 0 2.5rem;
}
.tlg-support { position: relative; z-index: 1; max-width: 520px; margin-left: auto; font-size: 1.05rem; line-height: 1.6; }
.tlg-index { position: relative; z-index: 1; margin-top: 4rem; }
.tlg-index-row { display: flex; gap: 2rem; align-items: baseline; border-top: 1px solid var(--ink); padding: .9rem 0; margin: 0; font-size: .95rem; }
.tlg-index-num { flex: 0 0 3rem; font-weight: 850; font-stretch: 118%; }
.tlg-index-row a { text-decoration: none; font-weight: 700; }
.tlg-index-row a:hover { text-decoration: underline; }
.tlg-closing { position: relative; z-index: 1; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; font-weight: 750; margin-top: 3.5rem; }
@media (max-width: 700px) {
  .tlg-giant-letters { opacity: .6; font-size: 44vw; }
  .tlg-support { margin-left: 0; max-width: 100%; }
  .tlg-hero-statement { max-width: 100%; }
}

/* ============ Footer ============ */
.tlg-footer { background: var(--black); color: #fff; margin-top: 0; }
.tlg-footer-in { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: 2rem; }
.tlg-footer-brand { font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: clamp(2.4rem, 7.5vw, 6rem); line-height: .9; letter-spacing: -.02em; margin: 0; }
.tlg-footer-tag { text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 700; margin: 1rem 0 0; opacity: .85; }
.tlg-footer-row {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.35); margin-top: 2.5rem; padding-top: 1.1rem;
  text-transform: uppercase; font-size: .72rem; font-weight: 700; letter-spacing: .14em;
}
.tlg-footer-row a { color: #fff; text-decoration: none; }
.tlg-footer-row a:hover { text-decoration: underline; }
.tlg-footer-nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; flex-wrap: wrap; }

/* Legacy hero title inside old cover markup (safety) */
.tlg-hero-title-block { font-size: clamp(4rem, 18vw, 16rem); font-weight: 900; line-height: .9; letter-spacing: -.02em; text-transform: uppercase; color: #fff; }

/* 404 */
.tlg-404-num { font-weight: 900; font-stretch: 125%; font-size: clamp(5rem, 20vw, 15rem); line-height: .85; margin: 0; }
