/* ==========================================================================
   SHAUN DAVID STUDIOS — CORE DESIGN SYSTEM (main.css)
   Theme: Obsidian Forged Crest, Brushed Compass Gold & Engraved Ivory
   Matched directly to the official Shaun David Studios octagonal emblem.
   ========================================================================== */

/* 1. Self-Hosted SIL OFL Fonts (Zero External Network Dependency) */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cinzel-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/cinzel-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/cinzel-latin-800-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
}

/* 2. Custom Properties */
:root {
  --bg-void: #050609;
  --bg-deep: #090C13;
  --bg-surface: #0E131D;
  --bg-elevated: #141B29;
  --bg-card: rgba(14, 19, 29, 0.86);
  --bg-header: rgba(6, 8, 13, 0.88);

  --text-primary: #F4EFE6;
  --text-secondary: #B9C2D3;
  --text-muted: #8591A8;

  --gold-bright: #F6E2A8;
  --gold: #D6AE58;
  --gold-deep: #9A7324;
  --gold-subtle: rgba(214, 174, 88, 0.14);
  --gold-border: rgba(214, 174, 88, 0.30);
  --gold-border-strong: rgba(246, 226, 168, 0.62);

  --ivory-border: rgba(244, 239, 230, 0.10);
  --ember: #E86A3D;
  --cyan: #56CFE1;
  --emerald: #34D399;

  --font-display: 'Cinzel', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container-max: 1240px;
  --header-height: 78px;
  --mobile-dock-height: 66px;
  --scroll-progress: 0;
  --scroll-deg: 0deg;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 3. Reset & Document Defaults */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-void);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(214, 174, 88, 0.11), transparent 70%),
    linear-gradient(rgba(244, 239, 230, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 230, 0.022) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
  color: var(--text-primary);
  overflow-x: clip;
  position: relative;
}

body.nav-open,
body.modal-open {
  overflow: hidden;
}

main {
  flex: 1 0 auto;
  position: relative;
  z-index: 2;
}

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

a, button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(214, 174, 88, 0.18);
}

a {
  color: var(--gold-bright);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: #FFFFFF;
}

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

::selection {
  background: rgba(214, 174, 88, 0.32);
  color: #FFFFFF;
}

/* Accessibility Skip Link */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--gold);
  color: var(--bg-void);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border-radius: 4px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 14px;
  color: var(--bg-void);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 4. Layout Containers & Section Rhythm */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.section {
  padding: clamp(3.25rem, 8vw, 7rem) 0;
  position: relative;
}

.section--alt {
  background: linear-gradient(180deg, rgba(14, 19, 29, 0.62) 0%, rgba(7, 9, 14, 0.85) 100%);
  border-top: 1px solid var(--ivory-border);
  border-bottom: 1px solid var(--ivory-border);
}

.section-header {
  max-width: 760px;
  margin-bottom: clamp(2rem, 5vw, 3.8rem);
}

.section-header--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* 5. Typography Matching the Engraved SDS Logo */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.18;
  letter-spacing: 0.03em;
  font-weight: 700;
  overflow-wrap: break-word;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 2.2vw, 0.76rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-bright);
  padding: 0.42rem 0.88rem;
  background: linear-gradient(90deg, rgba(214, 174, 88, 0.16), rgba(214, 174, 88, 0.04));
  border: 1px solid var(--gold-border);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  margin-bottom: 1.1rem;
}

.eyebrow__dot {
  width: 6px;
  height: 6px;
  background: var(--gold-bright);
  transform: rotate(45deg);
  box-shadow: 0 0 8px var(--gold);
  flex-shrink: 0;
}

.display-title {
  font-size: clamp(1.85rem, 6.2vw, 4.1rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #FFFFFF 0%, #F4EFE6 58%, #D8BA73 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--text-primary);
  margin-bottom: 0.95rem;
}

.page-title {
  font-size: clamp(1.72rem, 5.4vw, 3.35rem);
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  margin-bottom: 0.95rem;
}

.section-title {
  font-size: clamp(1.42rem, 4.2vw, 2.55rem);
  margin-bottom: 0.9rem;
  text-transform: uppercase;
}

.lead {
  font-size: clamp(0.98rem, 1.5vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.72;
}

p + p {
  margin-top: 1rem;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

/* 6. Header, Navigation & Bulletproof Mobile Drawer
      Note: backdrop-filter is placed on ::before so .site-header NEVER creates
      a fixed-position containing block that clips mobile drawers on iOS/Android! */
.site-header {
  position: sticky;
  top: 0;
  z-index: 400;
  height: var(--header-height);
  border-bottom: 1px solid var(--ivory-border);
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: -1;
  pointer-events: none;
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-primary);
  min-width: 0;
}

.brand-link:hover {
  color: #FFFFFF;
}

.brand-link__crest {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(214, 174, 88, 0.25));
  transition: transform 0.55s var(--ease-out-expo), filter 0.35s ease;
}

.brand-link:hover .brand-link__crest {
  transform: rotate(45deg) scale(1.05);
  filter: drop-shadow(0 0 16px rgba(246, 226, 168, 0.55));
}

.brand-link__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-link__name {
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 2.8vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-link__sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 2px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.primary-nav__list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.2rem;
}

.primary-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  border-radius: 4px;
}

.primary-nav__link::after {
  content: '';
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 4px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s var(--ease-out-expo);
}

.primary-nav__link:hover,
.primary-nav__link[aria-current="page"] {
  color: var(--text-primary);
}

.primary-nav__link:hover::after,
.primary-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.primary-nav__link[aria-current="page"]::before {
  content: '◆';
  font-size: 0.52rem;
  color: var(--gold);
}

.nav-cta {
  margin-left: 0.65rem;
}

/* Header Scroll Vernier Bar */
.scroll-vernier {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(214, 174, 88, 0.08);
  pointer-events: none;
  overflow: hidden;
}

.scroll-vernier__bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-bright));
  transform-origin: left center;
  transform: scaleX(var(--scroll-progress, 0));
  box-shadow: 0 0 12px var(--gold);
}

/* Mobile Menu Button */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  background: rgba(214, 174, 88, 0.12);
  border: 1px solid var(--gold-border-strong);
  color: var(--text-primary);
  cursor: pointer;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.nav-toggle:active {
  transform: scale(0.94);
}

.nav-toggle:hover {
  background: rgba(214, 174, 88, 0.22);
  border-color: var(--gold-bright);
}

.nav-toggle__bars {
  width: 20px;
  height: 14px;
  position: relative;
  display: block;
}

.nav-toggle__bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-bright);
  border-radius: 2px;
  transition: transform 0.28s var(--ease-out-expo), opacity 0.2s ease, top 0.28s var(--ease-out-expo);
}

.nav-toggle__bar:nth-child(1) { top: 0; }
.nav-toggle__bar:nth-child(2) { top: 6px; width: 75%; right: 0; left: auto; }
.nav-toggle__bar:nth-child(3) { top: 12px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

/* Mobile Backdrop (Always sits BELOW .site-header z-index: 400!) */
.nav-backdrop {
  display: none;
}

/* Mobile Floating Bottom Quick-Nav Dock (Hidden on Desktop, Shown on Phones) */
.mobile-dock {
  display: none !important;
}

.mobile-dock svg,
.mobile-dock__link svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

/* 7. Chamfered Buttons Matching the Octagonal Crest */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.78rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  transition: transform 0.22s var(--ease-out-expo), box-shadow 0.25s ease, background 0.25s ease, color 0.2s ease, border-color 0.25s ease;
  overflow: hidden;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 55%, #B88B32 100%);
  color: #07090E;
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(214, 174, 88, 0.26);
}

.btn--primary:hover {
  color: #050609;
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(246, 226, 168, 0.42);
  background: linear-gradient(135deg, #FFF3CC 0%, var(--gold-bright) 55%, var(--gold) 100%);
}

.btn--secondary {
  background: rgba(214, 174, 88, 0.10);
  border-color: var(--gold-border);
  color: var(--text-primary);
}

.btn--secondary:hover {
  background: rgba(214, 174, 88, 0.20);
  border-color: var(--gold-bright);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn--ghost {
  background: rgba(244, 239, 230, 0.05);
  border-color: var(--ivory-border);
  color: var(--text-secondary);
}

.btn--ghost:hover {
  background: rgba(244, 239, 230, 0.11);
  border-color: var(--gold-border);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn--sm {
  min-height: 42px;
  padding: 0.52rem 1.05rem;
  font-size: 0.8rem;
}

/* 8. Chamfered Obsidian Cards with Cursor/Touch Spotlight & Corner Reticles */
.sds-card {
  --mx: 50%;
  --my: 0%;
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  min-width: 0;
  max-width: 100%;
  background:
    radial-gradient(460px circle at var(--mx) var(--my), rgba(214, 174, 88, 0.11), transparent 45%),
    linear-gradient(180deg, rgba(20, 27, 41, 0.88) 0%, rgba(11, 15, 24, 0.94) 100%);
  border: 1px solid var(--ivory-border);
  padding: clamp(1.3rem, 3vw, 2.2rem);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
  transition: border-color 0.3s ease, box-shadow 0.35s ease, transform 0.25s var(--ease-out-expo);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  will-change: transform;
}

.sds-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 1px solid rgba(246, 226, 168, 0.18);
  opacity: 0.65;
}

.sds-card:hover,
.sds-card:active {
  border-color: var(--gold-border);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.52), 0 0 28px rgba(214, 174, 88, 0.10);
}

.sds-card--gold {
  border-color: var(--gold-border);
  background:
    radial-gradient(520px circle at var(--mx) var(--my), rgba(214, 174, 88, 0.15), transparent 50%),
    linear-gradient(165deg, rgba(25, 31, 45, 0.94) 0%, rgba(10, 13, 21, 0.98) 100%);
}

/* Responsive Grid Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.15rem, 2.5vw, 2rem);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.15rem, 2.4vw, 1.85rem);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.1rem, 2vw, 1.5rem);
}

/* Pillar Icon Medallion */
.pillar-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.15rem;
  background: rgba(214, 174, 88, 0.10);
  border: 1px solid var(--gold-border);
  color: var(--gold-bright);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

.pillar-icon svg {
  width: 24px;
  height: 24px;
}

.sds-card h3 {
  font-size: 1.16rem;
  margin-bottom: 0.6rem;
}

.sds-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Status & Platform Badges */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.32rem 0.72rem;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  background: rgba(244, 239, 230, 0.06);
  border: 1px solid var(--ivory-border);
  color: var(--text-secondary);
}

.badge--status {
  background: rgba(214, 174, 88, 0.13);
  border-color: var(--gold-border);
  color: var(--gold-bright);
}

.badge--live {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6EE7B7;
}

.badge__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* 9. Page Sub-Hero Banner */
.page-hero {
  position: relative;
  padding: clamp(2.8rem, 7vw, 5.5rem) 0 clamp(2.2rem, 5vw, 3.8rem);
  border-bottom: 1px solid var(--ivory-border);
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 25%, rgba(214, 174, 88, 0.12), transparent 52%),
    linear-gradient(180deg, rgba(13, 18, 28, 0.75) 0%, rgba(5, 6, 9, 0.95) 100%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  list-style: none;
}

.breadcrumb a {
  color: var(--gold);
}

.breadcrumb a:hover {
  color: var(--gold-bright);
}

/* 10. Key-Value Spec Ledger */
.spec-ledger {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
}

.spec-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 1rem;
  min-width: 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ivory-border);
}

.spec-row--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.32rem;
}

.spec-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.spec-value {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.spec-row--stack .spec-value {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

/* Tech Tag Chips */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin-top: 1.15rem;
}

.tag-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.62rem;
  background: rgba(244, 239, 230, 0.05);
  border: 1px solid rgba(244, 239, 230, 0.12);
  color: var(--text-secondary);
  border-radius: 3px;
}

/* Social Profile Pills */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  list-style: none;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.95rem;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(244, 239, 230, 0.05);
  border: 1px solid var(--gold-border);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}

.social-pill span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.social-pill:hover {
  background: rgba(214, 174, 88, 0.18);
  border-color: var(--gold-bright);
  transform: translateY(-2px);
}

.social-pill svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gold-bright);
}

/* Official Instagram Latest News Banner / Card */
.insta-news-box {
  margin-top: 1.25rem;
  padding: clamp(1.1rem, 2.6vw, 1.4rem);
  min-width: 0;
  max-width: 100%;
  background:
    radial-gradient(circle at 92% 15%, rgba(225, 48, 108, 0.14), transparent 55%),
    linear-gradient(145deg, rgba(214, 174, 88, 0.10) 0%, rgba(8, 11, 18, 0.88) 100%);
  border: 1px solid var(--gold-border-strong);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

.insta-news-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.85rem;
  padding: 1.1rem 1.35rem;
  background:
    radial-gradient(circle at 88% 50%, rgba(225, 48, 108, 0.13), transparent 52%),
    linear-gradient(135deg, rgba(214, 174, 88, 0.12) 0%, rgba(10, 14, 22, 0.92) 100%);
  border: 1px solid var(--gold-border-strong);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

/* Filter Bar (Games & News Pages) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 2rem;
}

.filter-btn {
  min-height: 44px;
  padding: 0.52rem 1.02rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(14, 19, 29, 0.85);
  border: 1px solid var(--ivory-border);
  cursor: pointer;
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--gold-border);
}

.filter-btn[aria-pressed="true"],
.filter-btn.is-active {
  background: linear-gradient(135deg, rgba(214, 174, 88, 0.26), rgba(214, 174, 88, 0.10));
  border-color: var(--gold-bright);
  color: #FFFFFF;
}

/* News & Devlog Timeline Entries */
.news-list {
  display: grid;
  gap: 1.4rem;
}

.news-entry {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}

.news-entry__meta {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 0.2rem;
}

.news-entry__date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--gold-bright);
  letter-spacing: 0.06em;
}

.news-entry__body h2,
.news-entry__body h3 {
  font-size: clamp(1.18rem, 2.1vw, 1.5rem);
  margin-bottom: 0.75rem;
}

.news-entry__body p {
  color: var(--text-secondary);
}

.empty-filter-state {
  padding: 2.25rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--gold-border);
  background: rgba(14, 19, 29, 0.55);
  color: var(--text-secondary);
}

/* Contact Hub */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.35rem, 3vw, 2.5rem);
  align-items: start;
}

.contact-email-box {
  margin-top: 1.35rem;
  padding: clamp(1.1rem, 2.8vw, 1.5rem);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: rgba(6, 8, 13, 0.78);
  border: 1px solid var(--gold-border);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

.contact-email-address {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.18vw, 0.96rem);
  line-height: 1.5;
  color: var(--gold-bright);
  display: inline-block;
  max-width: 100%;
  padding: 0.5rem 0.8rem;
  background: rgba(214, 174, 88, 0.08);
  border: 1px solid rgba(214, 174, 88, 0.26);
  border-radius: 4px;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin-bottom: 1.15rem;
}

/* 11. Polished Studio Footer */
.site-footer {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #07090F 0%, #040508 100%);
  border-top: 1px solid var(--gold-border);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(0, 0.88fr) minmax(0, 0.94fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 3vw, 2.6rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--ivory-border);
}

.site-footer__grid > * {
  min-width: 0;
}

.site-footer__brand {
  max-width: 360px;
}

.site-footer__lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.site-footer__lockup img {
  width: 50px;
  height: 50px;
}

.site-footer__motto {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85rem;
}

.site-footer__desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.site-footer__heading {
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 1rem;
}

.site-footer__links {
  list-style: none;
  display: grid;
  gap: 0.62rem;
  min-width: 0;
}

.site-footer__links li {
  min-width: 0;
  max-width: 100%;
}

.site-footer__links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-footer__links a span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-footer__links svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--gold-bright);
}

.site-footer__email {
  font-family: var(--font-mono);
  font-size: 0.8rem !important;
  color: var(--gold-bright) !important;
}

.site-footer__links a:hover {
  color: var(--gold-bright);
  transform: translateX(3px);
}

.site-footer__bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* 12. Responsive Breakpoints (Tablet & Mobile) */
@media (max-width: 1040px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 880px) {
  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 450;
  }

  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(330px, 86vw);
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: calc(var(--header-height) + 1.25rem) 1.25rem calc(var(--mobile-dock-height) + 2rem);
    background: linear-gradient(180deg, #0B101A 0%, #06080D 100%);
    border-left: 1px solid var(--gold-border-strong);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.85);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.34s var(--ease-out-expo), visibility 0.34s;
    z-index: 420;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .primary-nav.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .primary-nav__link {
    min-height: 48px;
    padding: 0.85rem 1rem;
    font-size: 0.98rem;
    border: 1px solid rgba(244, 239, 230, 0.08);
    background: rgba(244, 239, 230, 0.03);
  }

  .primary-nav__link::after {
    display: none;
  }

  .primary-nav__link[aria-current="page"] {
    border-color: var(--gold-bright);
    background: rgba(214, 174, 88, 0.16);
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 1.15rem;
    width: 100%;
  }

  .nav-cta .btn {
    width: 100%;
  }

  /* Backdrop sits at z-index 350, cleanly BELOW .site-header (400) & .primary-nav (420) */
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(3, 4, 8, 0.76);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    z-index: 350;
  }

  .nav-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .news-entry {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .news-entry__meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

/* Mobile One-Thumb Quick Dock + Single-Column Refinements */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--mobile-dock-height) + env(safe-area-inset-bottom, 0px));
  }

  .mobile-dock {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 320;
    min-height: var(--mobile-dock-height);
    padding: 0.35rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    background: rgba(6, 8, 14, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--gold-border);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.65);
  }

  .mobile-dock__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    min-height: 48px;
    padding: 0.25rem 0.15rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
  }

  .mobile-dock__link svg {
    width: 19px;
    height: 19px;
    transition: transform 0.2s var(--ease-out-expo);
  }

  .mobile-dock__link[aria-current="page"] {
    color: var(--gold-bright);
    background: rgba(214, 174, 88, 0.13);
  }

  .mobile-dock__link[aria-current="page"] svg {
    transform: translateY(-1px) scale(1.08);
  }

  .mobile-dock__link:active {
    background: rgba(214, 174, 88, 0.2);
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 68px;
  }

  .brand-link__crest {
    width: 38px;
    height: 38px;
  }

  .brand-link__sub {
    font-size: 0.56rem;
    letter-spacing: 0.1em;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .btn-group {
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
  }

  .spec-row {
    flex-direction: column;
    gap: 0.22rem;
  }

  .spec-value {
    text-align: left;
  }
}

@media (max-width: 390px) {
  .brand-link__sub {
    display: none;
  }

  .eyebrow {
    letter-spacing: 0.1em;
    padding: 0.38rem 0.7rem;
  }
}
