/* =========================================================
   THEME — Black + Gold, ultra-modern, subtle honeycomb
   =========================================================
   Color tokens, type scale, and base resets.
   ---------------------------------------------------------- */

:root {
  /* Black scale */
  --bg-0: #050505;       /* page */
  --bg-1: #0b0b0c;       /* card surface */
  --bg-2: #131316;       /* elevated surface */
  --line: rgba(212, 175, 90, 0.18);  /* gold-tinted hairline */
  --line-strong: rgba(212, 175, 90, 0.35);

  /* Text */
  --text: #ECE9E2;
  --text-dim: #A6A29B;
  --text-faint: #6c6960;

  /* Gold scale — honey */
  --gold-100: #FBE7A8;
  --gold-200: #F4D58D;
  --gold-300: #E5BE6C;
  --gold-400: #D4AF37;   /* primary */
  --gold-500: #C9A24A;
  --gold-600: #9C7B2E;
  --gold-700: #6E561F;

  /* Type */
  --font-sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Sora", "Space Grotesk", -apple-system, sans-serif;
  /* Legacy alias - some CSS still uses this. Same value as --font-display. */
  --font-serif: var(--font-display);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Layout */
  --content-w: 1180px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  touch-action: pan-y pinch-zoom;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
  /* Lock horizontal pan on body too - prevents iOS rubber-band slide.
     pan-y allows normal vertical scroll; pinch-zoom is kept for a11y.       */
  touch-action: pan-y pinch-zoom;
  overscroll-behavior-x: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold-400); color: #000; }

/* =========================================================
   HONEYCOMB BACKDROP — page-wide subtle pattern
   ---------------------------------------------------------- */
.hex-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg-0);
  background-image:
    radial-gradient(circle at 20% -10%, rgba(212, 175, 90, 0.08), transparent 50%),
    radial-gradient(circle at 110% 30%, rgba(212, 175, 90, 0.05), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 96' width='84' height='96'><g fill='none' stroke='%23D4AF37' stroke-opacity='0.06' stroke-width='1'><polygon points='42,2 80,24 80,72 42,94 4,72 4,24'/><polygon points='0,48 42,24 42,72'/></g></svg>");
  background-size: auto, auto, 84px 96px;
  animation: hex-drift 60s linear infinite;
}

@keyframes hex-drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 0 0, 0 0, 84px 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .hex-backdrop { animation: none; }
  html { scroll-behavior: auto; }
}

/* All real content sits above the backdrop */
.site-nav,
.hero,
.section,
.site-foot { position: relative; z-index: 1; }

/* =========================================================
   NAV
   ---------------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(5,5,5,0.7), rgba(5,5,5,0.25));
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease), padding .35s var(--ease);
}
.site-nav.scrolled {
  background: rgba(5,5,5,0.85);
  border-bottom-color: var(--line);
  padding: 12px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.brand-mark {
  width: 26px; height: 28px;
  fill: none;
  stroke: var(--gold-400);
  stroke-width: 2;
  transition: transform .5s var(--ease), stroke .3s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(60deg); stroke: var(--gold-200); }
.brand-text { font-size: 14px; }

/* Desktop nav links - body-level element, positioned to overlay the right side
   of the .site-nav row. This is because main.js moves .nav-links out of
   .site-nav to escape iOS Safari's backdrop-filter stacking context. */
.nav-links {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 51;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px var(--gutter);
  transition: padding .35s var(--ease);
}
.site-nav.scrolled ~ .nav-links {
  padding: 12px var(--gutter);
}
.nav-links a {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  padding: 6px 0;
  transition: color .25s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 0;
  background: var(--gold-400);
  transition: width .35s var(--ease);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-200);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Tagline shown only on mobile - top right of site-nav */
.site-tagline {
  display: none;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-300);
  text-align: right;
  line-height: 1.35;
  max-width: 140px;
  font-weight: 500;
}

/* Hamburger toggle button (mobile only - hidden on desktop by default) */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-right: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold-300);
  border-radius: 1px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

/* Close button inside the slide-out (mobile only) */
.nav-close {
  display: none;
  background: transparent;
  border: none;
  color: var(--gold-300);
  font-size: 32px;
  line-height: 1;
  padding: 4px 12px;
  cursor: pointer;
  align-self: flex-end;
}

/* Backdrop overlay when mobile menu is open */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 49;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 640px) {
  .nav-toggle    { display: flex; }
  .nav-close     { display: block; }
  .site-tagline  { display: block; }

  /* Mobile site-nav layout: hamburger + brand on left, tagline on right */
  .site-nav {
    justify-content: flex-start;
    gap: 10px;
  }
  .brand { margin-right: auto; }

  /* Slide-out menu - overrides the desktop fixed-top-right positioning above */
  .nav-links {
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: min(82vw, 320px);
    background: linear-gradient(180deg, rgba(15,12,8,0.98), rgba(8,7,5,0.98));
    border-right: 1px solid var(--gold-700);
    box-shadow: 12px 0 40px -8px rgba(0,0,0,0.6);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    padding: 80px 28px 28px;
    transform: translateX(-105%);
    transition: transform .35s var(--ease);
    z-index: 60;
    overflow-y: auto;
  }
  .nav-links.is-open {
    transform: translateX(0);
  }
  .nav-links a {
    font-size: 15px;
    letter-spacing: .14em;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-of-type {
    border-bottom: none;
  }
  .nav-links a::after { display: none; }

  .nav-close {
    position: absolute;
    top: 18px;
    right: 14px;
  }

  .brand-text { display: none; }
}

/* =========================================================
   HERO
   ---------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px var(--gutter) 80px;
  position: relative;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .85;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-w);
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin: 0 0 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 4.5vw, 60px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
}
.hero-title .line { display: block; }
.hero-title .gold {
  background: linear-gradient(120deg, var(--gold-200) 0%, var(--gold-400) 45%, var(--gold-600) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}

.hero-sub {
  max-width: 620px;
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--text-dim);
  margin: 0 0 40px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: transform .3s var(--ease), background .3s var(--ease),
              color .3s var(--ease), border-color .3s var(--ease),
              box-shadow .3s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: #0a0a0a;
  box-shadow: 0 6px 24px -10px rgba(212,175,90,0.6);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px rgba(212,175,90,0.75);
}
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--gold-400);
  color: var(--gold-200);
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.btn-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.contact-cta {
  display: flex;
  justify-content: center;
  margin: 40px 0 32px;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  z-index: 1;
}
.scroll-cue span {
  display: block;
  width: 2px; height: 6px;
  background: var(--gold-300);
  border-radius: 2px;
  margin: 6px auto 0;
  animation: scroll-cue 2s var(--ease) infinite;
}
@keyframes scroll-cue {
  0%   { transform: translateY(0); opacity: 1; }
  60%  { transform: translateY(14px); opacity: 0; }
  61%  { transform: translateY(0); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* =========================================================
   GENERIC SECTIONS
   ---------------------------------------------------------- */
.section {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 120px var(--gutter);
}
.section-head { margin-bottom: 56px; max-width: 720px; }
.section-eyebrow {
  font-size: 12px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin: 0 0 18px;
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}
.section-lede {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 15px;
}
.section-lede code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg-1);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--gold-200);
  border: 1px solid var(--line);
  font-size: 12.5px;
}

/* =========================================================
   ABOUT
   ---------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-copy .lede {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.4;
  color: var(--text);
  margin-top: 0;
}
.about-copy p { color: var(--text-dim); }
.brand-link {
  color: var(--gold-300);
  font-weight: 600;
  text-decoration: none;
  background-image: linear-gradient(120deg, var(--gold-200), var(--gold-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: filter .3s var(--ease);
}
.brand-link:hover { filter: brightness(1.15); }
.meta-list {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  border-top: 1px solid var(--line);
}
.meta-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.meta-list li span {
  color: var(--gold-400);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 11px;
}
.about-hex svg { width: 100%; height: auto; max-width: 360px; margin-left: auto; }
.about-logo {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin-left: auto;
}

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-hex {
    order: 1;
    max-width: 180px;
    margin: 0 auto;
  }
  .about-hex .about-logo,
  .about-hex svg {
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
  /* Trim the About section's bottom padding on mobile so the logo isn't floating
     in a tall empty band before the next section. */
  .about { padding-bottom: 48px; }
}

/* =========================================================
   PORTFOLIO — HEX GRID
   ---------------------------------------------------------- */
.hex-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 24px;
  margin-top: 8px;
}
/* Offset every other row to honeycomb */
.hex-grid .hex-card:nth-child(4n+3),
.hex-grid .hex-card:nth-child(4n+4) {
  transform: translateY(48px);
}

.hex-card { position: relative; }
.hex-shape {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.1547; /* perfect hexagon ratio */
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background:
    linear-gradient(160deg, rgba(212,175,90,0.08), rgba(212,175,90,0) 60%),
    var(--bg-1);
  transition: transform .5s var(--ease), background .5s var(--ease);
  cursor: default;
}
.hex-shape::before {
  /* Gold border via stacked clip-path */
  content: "";
  position: absolute;
  inset: 1px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--bg-1);
  z-index: 1;
}
.hex-shape { background-color: var(--gold-400); }
.hex-shape:hover {
  transform: translateY(-4px) scale(1.02);
  background-color: var(--gold-200);
}
.hex-shape:hover .hex-inner h3 { color: var(--gold-200); }
.hex-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 14% 18%;
}
.hex-tag {
  font-size: 10.5px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin: 0 0 10px;
}
.hex-inner h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(18px, 1.6vw, 22px);
  margin: 0 0 8px;
  letter-spacing: -.01em;
  transition: color .3s var(--ease);
}
.hex-inner p {
  color: var(--text-dim);
  font-size: 12.5px;
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .hex-grid { grid-template-columns: repeat(3, 1fr); }
  .hex-grid .hex-card:nth-child(4n+3),
  .hex-grid .hex-card:nth-child(4n+4) { transform: none; }
  .hex-grid .hex-card:nth-child(2n) { transform: translateY(40px); }
}
@media (max-width: 640px) {
  .hex-grid { grid-template-columns: repeat(2, 1fr); }
  .hex-grid .hex-card:nth-child(2n) { transform: translateY(34px); }
}

/* ----- Flippable hex tiles ----- */
/* Default (desktop): the JS-injected back face is hidden, the front shows
   tag + heading + description like before. */
.hex-flipper {
  position: relative;
  width: 100%;
}
.hex-back { display: none; }

/* Below 1200px: front shows only tag + heading. Tap flips to show the description
   on the back face. (Same behavior previously gated at 640px.) */
@media (max-width: 1200px) {
  .hex-grid { perspective: 1200px; }
  .hex-flipper {
    aspect-ratio: 1 / 1.1547;
    transform-style: preserve-3d;
    transition: transform .6s var(--ease);
  }
  .hex-face {
    position: absolute;
    inset: 0;
    aspect-ratio: unset;
    -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
  }
  .hex-back {
    display: block;
    transform: rotateY(180deg);
  }
  .hex-card.is-flipped .hex-flipper {
    transform: rotateY(180deg);
  }
  .hex-front .hex-desc { display: none; }
  .hex-card { cursor: pointer; }
  /* Give the back-face description more room since it's the only thing there */
  .hex-back .hex-inner { padding: 10% 14%; }
  .hex-back .hex-inner p {
    font-size: 12px;
    line-height: 1.55;
  }
  /* Subtle hint that the tile is tappable */
  .hex-card:not(.is-flipped) .hex-front .hex-inner::after {
    content: "Tap";
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--gold-400);
    opacity: 0.55;
  }
}

/* =========================================================
   JOURNAL / BLOG
   ---------------------------------------------------------- */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  text-align: left;
  cursor: pointer;
  transition: transform .35s var(--ease), border-color .35s var(--ease),
              background .35s var(--ease), box-shadow .35s var(--ease);
  overflow: hidden;
}
.post-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 36px; height: 40px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 44'><polygon points='20,2 38,12 38,32 20,42 2,32 2,12' fill='none' stroke='%23D4AF37' stroke-width='1.5'/></svg>") no-repeat;
  background-size: contain;
  opacity: .35;
  transform: translate(-12px, -12px);
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--bg-2);
  box-shadow: 0 18px 50px -28px rgba(212,175,90,0.4);
}
.post-card:hover::before { opacity: .9; transform: translate(-8px, -8px) rotate(20deg); }

.post-card .post-date {
  color: var(--gold-400);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.post-card h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 10px;
  color: var(--text);
}
.post-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
}
.post-card .read-more {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.loading,
.empty {
  color: var(--text-faint);
  font-size: 14px;
  padding: 12px 0;
}

/* Homepage 3-post preview - three columns on desktop, stacked on smaller screens */
.post-carousel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .post-carousel {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
.journal-cta {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

/* Journal / archive pages */
.journal-archive {
  padding-top: 96px;
}
.journal-archive .section-head {
  margin-bottom: 40px;
}

/* Client-side search box (appears above .post-list on archive pages only) */
.post-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 28px;
}
.post-search-input {
  width: 100%;
  padding: 12px 18px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: .02em;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.post-search-input:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(212,175,90,0.15);
}
.post-search-input::placeholder {
  color: var(--text-faint);
}
.post-search-status {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: .04em;
  padding-left: 4px;
  min-height: 14px;
}

/* Case study cards - visually distinct from journal cards */
.post-card--case {
  border-color: var(--gold-500);
  background: linear-gradient(170deg, rgba(212,175,90,0.06), transparent 60%), var(--bg-1);
  position: relative;
}
.post-card--case:hover {
  border-color: var(--gold-300);
  box-shadow: 0 12px 36px -12px rgba(212,175,90,0.35);
}
.post-card--case .card-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: #0a0a0a;
  font-weight: 600;
  margin-bottom: 14px;
}
.post-card--case .read-more {
  color: var(--gold-200);
}

/* Journal pagination */
.pager {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.pager-btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 10px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: .03em;
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.pager-btn:hover:not(:disabled) {
  border-color: var(--gold-400);
  color: var(--gold-200);
}
.pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pager-status {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Single post reader */
.post-reader {
  max-width: 760px;
  margin: 0 auto;
}
.post-back {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease);
  margin-bottom: 36px;
}
.post-back:hover { color: var(--gold-200); border-color: var(--gold-400); }

.post-header { border-bottom: 1px solid var(--line); padding-bottom: 28px; margin-bottom: 36px; }
.post-header .post-eyebrow,
.post-header .post-date {
  color: var(--gold-400);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.post-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -.015em;
  margin: 0 0 16px;
}
.post-excerpt {
  color: var(--text-dim);
  font-size: 17px;
  margin: 0;
}

.post-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}
.post-body p { margin: 0 0 1.2em; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text);
  margin: 1.8em 0 .6em;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.post-body h2 { font-size: 32px; }
.post-body h3 { font-size: 24px; }
.post-body h4 { font-size: 19px; }
.post-body a {
  color: var(--gold-300);
  text-decoration: underline;
  text-decoration-color: rgba(212,175,90,0.35);
  text-underline-offset: 4px;
  transition: color .25s var(--ease);
}
.post-body a:hover { color: var(--gold-100); }
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 28px 0;
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.post-body img:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

/* =========================================================
   IMAGE LIGHTBOX
   ---------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 96px;
  background: rgba(5, 5, 5, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
  cursor: zoom-out;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-img {
  max-width: min(92vw, 1600px);
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
  cursor: default;
  transform: scale(0.96);
  opacity: 0;
  transition: transform .4s var(--ease), opacity .25s var(--ease);
}
.lightbox.is-open .lightbox-img {
  transform: scale(1);
  opacity: 1;
}
.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--line-strong);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.lightbox-close:hover {
  border-color: var(--gold-400);
  color: var(--gold-200);
  background: rgba(0,0,0,0.75);
}
.lightbox-caption {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80vw;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  font-style: italic;
  margin: 0;
}
@media (max-width: 640px) {
  .lightbox { padding: 48px 12px 80px; }
  .lightbox-img { max-height: 72vh; }
  .lightbox-caption { font-size: 12px; }
}
.post-body blockquote {
  border-left: 2px solid var(--gold-400);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  color: var(--text-dim);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
}
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg-1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  border: 1px solid var(--line);
}
.post-body pre {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
}
.post-body pre code { background: none; border: none; padding: 0; }
.post-body ul, .post-body ol { padding-left: 22px; }
.post-body li { margin: .4em 0; }
.post-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}
.post-body figure { margin: 28px 0; }
.post-body figcaption {
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  margin-top: 10px;
}

/* =========================================================
   CONTACT FORM
   ---------------------------------------------------------- */
.contact-form {
  max-width: 760px;
  margin: 0 0 48px;
  display: grid;
  gap: 18px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

.field { display: grid; gap: 8px; }
.field-label {
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.field-optional {
  color: var(--text-faint);
  letter-spacing: .12em;
}
.field input,
.field textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  width: 100%;
  outline: none;
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
  resize: vertical;
}
.field textarea { min-height: 160px; line-height: 1.55; }
.field input:focus,
.field textarea:focus {
  border-color: var(--gold-400);
  background: var(--bg-2);
  box-shadow: 0 0 0 3px rgba(212, 175, 90, 0.15);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }

/* Honeypot — visually hidden, off-screen, ignored by AT users */
.hp-field {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Turnstile widget spacing */
.cf-turnstile { min-height: 0; }
.cf-turnstile:not(:empty) { margin-top: 4px; }

.form-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.form-status {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
}
.form-status.is-success { color: var(--gold-200); }
.form-status.is-error   { color: #ff8b8b; }

.contact-form.is-loading button { opacity: .55; pointer-events: none; }

.contact-divider {
  text-align: center;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  margin: 0 0 24px;
  position: relative;
}
.contact-divider::before,
.contact-divider::after {
  content: "";
  display: inline-block;
  width: 80px;
  height: 1px;
  background: var(--line);
  vertical-align: middle;
  margin: 0 14px;
}

/* =========================================================
   CONTACT — SOCIAL ICON ROW
   ---------------------------------------------------------- */
.social-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 8px 0 12px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: transform .35s var(--ease),
              background .35s var(--ease),
              border-color .35s var(--ease),
              color .35s var(--ease),
              box-shadow .35s var(--ease);
}
.social-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.social-link:hover {
  transform: translateY(-3px);
  background: var(--bg-2);
  border-color: var(--gold-400);
  color: var(--gold-200);
  box-shadow: 0 12px 30px -16px rgba(212, 175, 90, 0.45);
}
@media (max-width: 640px) {
  .social-link { width: 50px; height: 50px; }
  .social-link svg { width: 20px; height: 20px; }
}

/* Keep .contact-grid available for legacy use, but unused after social-row swap. */

/* =========================================================
   FOOTER
   ---------------------------------------------------------- */
.site-foot {
  text-align: center;
  padding: 48px var(--gutter) 36px;
  color: var(--text-faint);
  font-size: 12.5px;
  letter-spacing: .04em;
  border-top: 1px solid var(--line);
}

/* =========================================================
   REVEAL ON SCROLL
   ---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
