/* ═══════════════════════════════════════════════════════════════
   SANDSCRIPT — MASTER STYLESHEET
   Stars and Sand | US Patent Strategies for the World
   ═══════════════════════════════════════════════════════════════ */

/* ─── TOKENS & THEMING ────────────────────────────────────────── */
:root {
  --brand-navy:    #0F1E3A;
  --brand-navy2:   #162B54;
  --brand-gold:    #D4AF37;
  --brand-gold-dk: #8B6914;
  --brand-cyan:    #00CED1;
  --brand-white:   #FFFFFF;
  --bg-base:       #F8F8F6;
  --bg-alt:        #EFEFEA;
  --bg-card:       #E5E5DF;
  --text-main:     #1A1714;
  --text-muted:    #7C7670;
  --border-subtle: rgba(26,23,20,.1);
}
:root[data-theme="dark"] {
  --bg-base:       #0B1528;
  --bg-alt:        #101C33;
  --bg-card:       #162645;
  --text-main:     #F8F8F6;
  --text-muted:    #A8B2C1;
  --border-subtle: rgba(255,255,255,.08);
}

/* ─── RESET & GLOBALS ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-alt);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: rgba(0,206,209,.22); }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--brand-cyan); }
em { font-style: italic; color: var(--brand-gold); }
img { max-width: 100%; height: auto; display: block; }

/* ─── TYPOGRAPHY ──────────────────────────────────────────────── */
.pg-h1,
.art-h,
.single-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}
.pg-lead,
.art-body,
.sub-strip p,
.single-content p,
.single-content li {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300;
  line-height: 1.88;
}
.eyebrow,
.nav-cta,
.sub-submit,
.sub-input,
.f-btn,
.art-tag,
.art-meta,
.art-read,
.foot-brand-tag,
.foot-col h4,
.foot-copy,
.foot-em,
.sub-strip h3,
.single-meta,
.single-back {
  font-family: 'DM Mono', monospace;
}

/* ─── SHARED BUTTONS ──────────────────────────────────────────── */
.nav-cta,
.sub-submit {
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  background: var(--brand-gold);
  color: var(--brand-navy) !important;
  font-weight: 600;
  padding: 14px 32px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand-gold);
  transition: all .2s;
  height: 52px;
  white-space: nowrap;
}
.nav-cta:hover,
.sub-submit:hover {
  background: var(--brand-navy) !important;
  color: var(--brand-cyan) !important;
  border-color: var(--brand-cyan) !important;
  box-shadow: 0 0 15px rgba(0,206,209,0.3);
  transform: translateY(-1px);
}

/* ─── NAV ─────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.8rem;
  background: rgba(248,248,246,.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  transition: height .25s ease, background .25s;
}
[data-theme="dark"] #nav { background: rgba(11,21,40,.94); }
#nav.scrolled { height: 54px; }

.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand-img {
  height: 36px; width: 36px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 0 8px rgba(212,175,55,0.3);
}
.nav-brand-text { display: flex; flex-direction: column; line-height: 1; }
.nav-brand-name {
  font-size: 14px; font-weight: 700;
  color: var(--text-main);
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .2s;
}
.nav-brand-sub {
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  color: var(--brand-gold);
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-top: 4px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  list-style: none;
}
.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color .18s;
  position: relative;
  font-weight: 600;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--brand-cyan);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .24s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-main); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); transform-origin: left; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--text-main); transition: all .28s; }

#mob-menu {
  display: none;
  position: fixed; inset: 0;
  z-index: 190;
  background: var(--bg-base);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
#mob-menu.open { display: flex; }
#mob-menu a {
  font-size: 2.1rem; font-weight: 400;
  color: var(--text-main);
  transition: color .18s;
  min-height: 54px;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
}
#mob-menu a:hover { color: var(--brand-cyan); }

#theme-toggle {
  color: var(--text-muted);
  padding: 8px; border-radius: 4px;
  transition: color 0.2s;
  display: flex; align-items: center; justify-content: center;
}
#theme-toggle:hover { color: var(--brand-cyan); }
#theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .sun-icon  { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
:root:not([data-theme="dark"]) .sun-icon  { display: none; }
:root:not([data-theme="dark"]) .moon-icon { display: block; }

/* ─── HERO ────────────────────────────────────────────────────── */
.circuit-bg { position: relative; }
.circuit-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(0,206,209,0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(212,175,55,0.04) 0%, transparent 40%),
    linear-gradient(rgba(0,206,209,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,206,209,0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.pg-hero {
  background: var(--brand-navy);
  padding: 10rem 2.8rem 5rem;
  position: relative;
  overflow: hidden;
}
.pg-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-cyan), transparent);
}
.pg-hero-in { max-width: 1920px; position: relative; z-index: 1; }
.pg-h1 {
  font-size: clamp(2.3rem, 4.8vw, 4.2rem);
  color: var(--brand-white);
  line-height: 1.07;
  margin: .9rem 0 1.4rem;
}
.pg-lead {
  font-size: .98rem;
  color: rgba(255,255,255,.6);
  max-width: 500px;
}
.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
}
.eyebrow {
  font-size: 9px;
  color: var(--brand-gold);
  letter-spacing: .26em;
  text-transform: uppercase;
  margin-bottom: .8rem;
  font-weight: 600;
}
.border-cyan { border-bottom: 2px solid var(--brand-cyan); }

/* ─── ARTICLE INDEX ───────────────────────────────────────────── */
.arts-body {
  background: var(--bg-base);
  padding: 3.5rem 2.8rem 5rem;
}
.filter-strip {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2.5rem;
}
.f-btn {
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 6px 13px;
  transition: all .18s;
  cursor: pointer;
}
.f-btn:hover,
.f-btn.active {
  background: var(--brand-navy);
  color: var(--brand-cyan);
  border-color: var(--brand-navy);
}
.arts-full {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
}
.af-card {
  background: var(--bg-alt);
  padding: 2rem;
  transition: background .2s;
  position: relative;
  overflow: hidden;
}
.af-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--brand-cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s ease;
}
.af-card:hover { background: var(--bg-card); }
.af-card:hover::after { transform: scaleX(1); }

.art-tag {
  font-size: 8.5px;
  color: var(--brand-gold);
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: .85rem;
}
.art-h {
  font-size: 1.15rem;
  color: var(--text-main);
  line-height: 1.32;
  margin-bottom: .65rem;
}
.art-h a { color: inherit; transition: color .18s; }
.art-h a:hover { color: var(--brand-gold); }
.art-body {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: .85rem;
}
/* Strip WordPress's auto-injected <p> tags from excerpts */
.art-body p { margin: 0; }

.art-meta {
  font-size: 8.5px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .06em;
  margin-bottom: .6rem;
}
.art-dot {
  width: 4px; height: 4px;
  background: var(--text-muted);
  border-radius: 0;
}
.art-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: .5rem;
  font-size: 8.5px;
  color: var(--brand-gold);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color .18s, gap .18s;
}
.art-read::after { content: '→'; font-family: 'Inter', sans-serif; font-size: 12px; }
.art-read:hover { gap: 10px; color: var(--brand-cyan); }

/* ─── PAGINATION ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem 0 0;
  margin-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
}
.pagination a,
.pagination span {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color .18s;
}
.pagination a:hover { color: var(--brand-gold); }

/* ─── SUBSCRIBE STRIP ─────────────────────────────────────────── */
.sub-strip {
  margin-top: 3.5rem;
  padding: 2.8rem;
  background: var(--brand-navy);
  border: 1px solid var(--brand-cyan);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}
.sub-strip h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-white);
  margin-bottom: .3rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sub-strip p { font-size: .95rem; color: rgba(255,255,255,.6); }
.sub-row {
  display: flex;
  border: 1px solid var(--brand-gold);
  background: var(--bg-base);
}
.sub-input {
  flex: 1;
  font-size: .85rem;
  font-weight: 500;
  border: none; outline: none;
  padding: 0 1.2rem;
  background: transparent;
  color: var(--text-main);
  height: 52px;
}
.sub-input::placeholder { color: var(--text-muted); }

/* ─── SINGLE POST ─────────────────────────────────────────────── */
.single-hero {
  background: var(--brand-navy);
  padding: 9rem 2.8rem 4rem;
  position: relative;
  overflow: hidden;
}
.single-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-cyan), transparent);
}
.single-hero-in {
  max-width: 820px;
  position: relative;
  z-index: 1;
}
.single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: 1.8rem;
}
.single-meta .meta-cat  { color: var(--brand-gold); }
.single-meta .meta-sep  { color: rgba(255,255,255,.2); }
.single-meta .meta-date { color: var(--brand-cyan); }
.single-meta .meta-time { color: rgba(255,255,255,.6); }

.single-title {
  font-size: clamp(1.8rem, 3.8vw, 3.2rem);
  color: var(--brand-white);
  line-height: 1.1;
  margin-bottom: 1.6rem;
}
.single-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  transition: color .18s;
  margin-bottom: 2.5rem;
}
.single-back:hover { color: var(--brand-cyan); }
.single-back::before { content: '←'; font-size: 12px; }

.single-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 4rem 2.8rem 6rem;
}

/* Article content typography */
.single-content {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.08rem;
  font-weight: 300;
  line-height: 1.88;
  color: var(--text-main);
}
.single-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--text-main);
  margin: 2.8rem 0 1rem;
  line-height: 1.22;
}
.single-content h3 {
  font-family: 'DM Mono', monospace;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-gold-dk);
  margin: 2.2rem 0 .8rem;
}
.single-content p { margin-bottom: 1.55rem; }
.single-content strong { font-weight: 600; color: var(--text-main); }
.single-content em { font-style: italic; color: var(--brand-gold); }
.single-content a { color: var(--brand-gold-dk); border-bottom: 1px solid rgba(139,105,20,.3); transition: color .18s, border-color .18s; }
.single-content a:hover { color: var(--brand-gold); border-color: var(--brand-gold); }
.single-content blockquote {
  margin: 2.2rem 0;
  padding: 1.4rem 1.8rem;
  border-left: 3px solid var(--brand-gold);
  background: var(--bg-alt);
  font-style: italic;
  color: var(--text-muted);
}
.single-content blockquote p { margin: 0; }
.single-content ul,
.single-content ol {
  padding-left: 1.6rem;
  margin-bottom: 1.55rem;
}
.single-content li { margin-bottom: .45rem; }
.single-content hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 3rem 0;
}
/* Separator line used in Sandscript articles */
.single-content hr + p > em:only-child {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: .78rem;
  color: var(--text-muted);
  font-style: normal;
  letter-spacing: .12em;
}

/* Post footer callout */
.single-callout {
  background: var(--brand-navy);
  padding: 2.4rem 2.8rem;
  margin-top: 3.5rem;
  position: relative;
  overflow: hidden;
}
.single-callout::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,206,209,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.single-callout-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: var(--brand-gold);
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: .8rem;
}
.single-callout p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: .95rem;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255,255,255,.65);
  margin: 0;
}
.single-callout strong { color: var(--brand-white); font-weight: 400; }

.single-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2.8rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-alt);
}
.single-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color .18s;
}
.single-nav a:hover { color: var(--brand-gold); }

/* ─── FOOTER ──────────────────────────────────────────────────── */
footer {
  background: var(--brand-navy);
  padding: 4.5rem 2.8rem 2.2rem;
  border-top: 1px solid rgba(212,175,55,0.25);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: 2rem;
  max-width: 1920px;
}
.foot-brand-name {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--brand-white);
  margin-bottom: .3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.foot-brand-tag {
  font-size: 8px; color: var(--brand-gold);
  font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; margin-bottom: .5rem;
}
.foot-brand-desc {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: .82rem; font-weight: 300;
  color: rgba(255,255,255,.5);
  line-height: 1.78; max-width: 255px;
  margin-bottom: 1rem;
}
.foot-col h4 {
  font-size: 8.5px; letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand-cyan);
  margin-bottom: 1.1rem; font-weight: 600;
}
.foot-col ul { list-style: none; }
.foot-col li { margin-bottom: .55rem; }
.foot-col a {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: .83rem; font-weight: 300;
  color: rgba(255,255,255,.6);
  transition: color .18s;
}
.foot-col a:hover { color: var(--brand-white); }
.foot-bottom {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: .8rem;
}
.foot-copy {
  font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4); font-weight: 500;
}
.foot-em {
  font-weight: 400; font-size: .88rem;
  color: rgba(212,175,55,.6); font-style: italic;
}

.foot-social { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: .4rem; }
.foot-icon { height: 24px; width: auto; display: block; opacity: .7; transition: opacity .18s; }
.foot-social a:hover .foot-icon { opacity: 1; }

.disclaimer {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  padding: 1.4rem 1.8rem; margin-bottom: 2rem;
}
.disclaimer-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px; color: var(--brand-gold);
  letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: .6rem;
}
.disclaimer-text {
  font-family: 'DM Mono', monospace;
  font-size: 10px; color: rgba(255,255,255,.4);
  line-height: 1.75; letter-spacing: .02em;
}

/* ─── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1080px) {
  #nav { padding: 0 1.4rem; }
  .nav-links, .nav-cta, #theme-toggle { display: none; }
  .hamburger { display: flex; }
  .pg-hero, .arts-body, .single-hero,
  .single-body, .single-nav, footer { padding-left: 1.4rem; padding-right: 1.4rem; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .about-cols { grid-template-columns: 1fr; gap: 3rem; }
  .arts-full { grid-template-columns: 1fr 1fr; }
  .single-callout { padding: 2rem 1.4rem; }
}
@media (max-width: 580px) {
  .arts-full { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .about-cols { grid-template-columns: 1fr; }
  .single-title { font-size: 1.7rem; }
}
  