/* ============================================================
   barry-staples-modern.css
   Full responsive stylesheet for thebarrystaples.com
   Drop this file into your site root and add this line
   inside the <head> of every HTML page:
   <link rel="stylesheet" href="barry-staples-modern.css">
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=DM+Sans:wght@400;500&display=swap');

/* ── CSS Custom Properties (design tokens) ───────────────── */
:root {
  --bg:          #080d1a;
  --bg-surface:  #0d0f1a;
  --bg-card:     rgba(255,255,255,0.04);
  --bg-card-hover: rgba(59,130,246,0.08);
  --border:      rgba(255,255,255,0.08);
  --border-hover:rgba(59,130,246,0.45);
  --accent:      #3b82f6;
  --accent-dim:  rgba(59,130,246,0.15);
  --accent-glow: rgba(59,130,246,0.25);
  --text-1:      #f0f4ff;
  --text-2:      rgba(224,232,255,0.65);
  --text-3:      rgba(224,232,255,0.35);
  --nav-h:       64px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --font-head:   'Sora', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --transition:  0.2s ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  background-image: linear-gradient(160deg, #161008 0%, #0d0f1a 50%, #080d1a 100%);
  background-attachment: fixed;
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* subtle grain overlay for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--text-1);
}

h1 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
h4, h5 { font-size: 1rem; font-weight: 600; }

p { color: var(--text-2); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

strong { color: var(--text-1); font-weight: 600; }

/* ── Layout Wrapper ───────────────────────────────────────── */
.wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Navigation ───────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(8, 13, 26, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
}

/* Logo image inside nav */
nav .nav-logo {
  display: flex;
  align-items: center;
  margin-right: auto;          /* pushes everything else to the right */
  flex-shrink: 0;
}

nav .nav-logo img {
  height: 38px;
  width: auto;
  border-radius: 4px;
}

/* Hamburger button — hidden on desktop, shown on mobile */
nav .nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-1);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Nav link list */
nav ul.topnav {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

nav ul.topnav li a {
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  display: block;
}

nav ul.topnav li a:hover {
  background: var(--accent-dim);
  color: var(--text-1);
  opacity: 1;
}

/* ── Mobile Nav ───────────────────────────────────────────── */
@media (max-width: 640px) {
  nav {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 1rem;
    gap: 0;
  }

  /* Show hamburger button */
  nav .nav-toggle {
    display: block;
  }

  /* Hide the link list by default; shown when .open is toggled */
  nav ul.topnav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
    padding: 0.5rem 0 0.25rem;
    order: 3;                  /* forces the list below the logo+hamburger row */
  }

  nav ul.topnav.open {
    display: flex;
  }

  nav ul.topnav li {
    width: 100%;
  }

  nav ul.topnav li a {
    display: block;
    width: 100%;
    padding: 0.7rem 0.5rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  nav ul.topnav li:last-child a {
    border-bottom: none;
  }
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero, header.hero {
  position: relative;
  padding: 4.5rem 1.5rem 3.5rem;
  text-align: center;
  overflow: hidden;
  scroll-margin-top: var(--nav-h);
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero .eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 { margin-bottom: 1rem; }

.hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* ── Sections & Content ───────────────────────────────────── */
section, .content-section {
  padding: 3rem 1.5rem;
  scroll-margin-top: var(--nav-h);
  position: relative;
  z-index: 1;
}

section + section {
  border-top: 1px solid var(--border);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ── Link Cards (for /links.html) ─────────────────────────── */
.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), background var(--transition);
  margin-bottom: 0.75rem;
}

.link-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  opacity: 1;
}

.link-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  padding: 4px;
}

.link-card-text h4 {
  font-size: 0.95rem;
  color: var(--text-1);
  margin-bottom: 2px;
}

.link-card-text p {
  font-size: 0.8rem;
  color: var(--text-3);
  margin: 0;
}

/* ── Image Galleries ──────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
  margin: 1.5rem 0;
}

.gallery a {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color var(--transition), transform var(--transition);
}

.gallery a:hover {
  border-color: var(--border-hover);
  transform: scale(1.02);
  opacity: 1;
}

.gallery img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 0;
  display: block;
  transition: opacity var(--transition);
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery img { height: 110px; }
}

/* ── Video ────────────────────────────────────────────────── */
video {
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: block;
  margin: 1.5rem 0;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #2563eb; opacity: 1; }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  opacity: 1;
}

/* ── Select-O-Tron 2001 Page ──────────────────────────────── */
/* Drop-down select */
select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-surface);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  width: 100%;
  max-width: 380px;
  cursor: pointer;
  transition: border-color var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%233b82f6' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}

select:focus {
  outline: none;
  border-color: var(--accent);
}

/* SOT result box */
#result-box, .result-box {
  background: var(--bg-surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin-top: 1.5rem;
  text-align: center;
  display: none;
}

#result-box.visible, .result-box.visible {
  display: block;
  animation: fadeIn 0.4s ease;
}

#result-box h2, .result-box h2 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Error / warning messages */
.sot-error {
  color: #f87171;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

.sot-error.visible { display: block; }

/* SOT tagline styling */
.sot-tagline {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.sot-disclaimer {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 1.5rem;
  font-style: italic;
}

/* ── Bitcoin / Crypto Widget ──────────────────────────────── */
.crypto-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-2);
  text-decoration: none;
  transition: border-color var(--transition);
  margin: 0.5rem 0;
}

.crypto-banner:hover {
  border-color: #f59e0b;
  opacity: 1;
}

.crypto-banner span {
  color: #f59e0b;
  font-weight: 600;
  font-family: var(--font-head);
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-3);
  position: relative;
  z-index: 1;
}

footer a { color: var(--text-3); }
footer a:hover { color: var(--accent); opacity: 1; }

@media (max-width: 480px) {
  footer { flex-direction: column; text-align: center; }
}

/* ── Utility Classes ──────────────────────────────────────── */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-2); }
.text-faint   { color: var(--text-3); }
.text-center  { text-align: center; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.flex  { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ── Divider ──────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in  { animation: fadeIn  0.5s ease both; }
.fade-up  { animation: fadeUp  0.6s ease both; }
.delay-1  { animation-delay: 0.1s; }
.delay-2  { animation-delay: 0.2s; }
.delay-3  { animation-delay: 0.3s; }

/* ── Scrollbar (Webkit) ───────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ── Responsive Breakpoints Summary ──────────────────────────
   Desktop  : > 960px  — full layout, side-by-side content
   Tablet   : 641–960px — slightly reduced padding, nav intact
   Mobile   : ≤ 640px  — stacked layout, hamburger nav, larger tap targets
   ──────────────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 960px) {
  section, .content-section { padding: 2.5rem 1.25rem; }
  .hero { padding: 3.5rem 1.25rem 2.5rem; }
  .gallery { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* Mobile */
@media (max-width: 640px) {
  :root { --nav-h: 56px; }
  section, .content-section { padding: 2rem 1rem; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .card { padding: 1rem 1.1rem; }
  .btn { padding: 0.6rem 1.1rem; font-size: 0.85rem; }
  select { max-width: 100%; }
  video { margin: 1rem 0; }
}

/* ── Lightbox ─────────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#lightbox.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 25px 60px rgba(0,0,0,0.7);
  animation: fadeIn 0.25s ease;
  object-fit: contain;
  flex-shrink: 0;
}

/* Prev / Next arrow buttons */
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.8rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  z-index: 2001;
  line-height: 1;
}

.lb-arrow:hover {
  background: rgba(255,255,255,0.18);
}

.lb-arrow:active {
  transform: translateY(-50%) scale(0.93);
}

#lb-prev { left: 1rem; }
#lb-next { right: 1rem; }

/* Close button */
#lb-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.4rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 2001;
  line-height: 1;
}

#lb-close:hover {
  background: rgba(255,255,255,0.2);
}

/* Counter e.g. "3 / 9" */
#lb-counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-body);
  letter-spacing: 1px;
}

/* Caption */
#lb-caption {
  position: absolute;
  bottom: 2.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-body);
  white-space: nowrap;
  max-width: 80vw;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* Swipe hint on mobile */
@media (max-width: 640px) {
  .lb-arrow {
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
  }
  #lb-prev { left: 0.5rem; }
  #lb-next { right: 0.5rem; }
}

/* Make gallery thumbnails show a pointer and slight hover zoom */
.gallery a {
  cursor: zoom-in;
}

/* ── HOW TO USE ─────────────────────────────────────────────
   1. Save this file as barry-staples-modern.css in your site root
   2. Add inside <head> of each HTML page:
      <link rel="stylesheet" href="barry-staples-modern.css">
   3. Add this JS snippet before </body> for the hamburger nav:

   <script>
     const hamburger = document.querySelector('nav ul li:last-child a');
     const navList   = document.querySelector('nav ul');
     if (hamburger && navList) {
       hamburger.addEventListener('click', e => {
         e.preventDefault();
         navList.classList.toggle('open');
       });
     }
   </script>

   4. For the SOT2001 result box, give your result container
      id="result-box" and toggle class "visible" on GO click.
   ──────────────────────────────────────────────────────────── */