/* ========================================================
   ByEmpire — Main Stylesheet
   https://www.byempire.org/
   ======================================================== */

/* ── Design Tokens ── */
:root {
  --clr-primary:       #4f46e5;
  --clr-primary-dark:  #3730a3;
  --clr-primary-light: #818cf8;
  --clr-accent:        #06b6d4;

  --clr-dark:          #0f172a;
  --clr-dark-2:        #1e293b;
  --clr-bg:            #ffffff;
  --clr-bg-alt:        #f8fafc;

  --clr-text:          #1e293b;
  --clr-text-muted:    #64748b;
  --clr-text-faint:    #94a3b8;
  --clr-border:        #e2e8f0;
  --clr-border-light:  #f1f5f9;

  --clr-amber:        #f59e0b;
  --clr-amber-dark:   #b45309;
  --clr-amber-bg:     #fef3c7;
  --clr-amber-border: #fde68a;

  --clr-green:         #22c55e;
  --clr-green-bg:      #dcfce7;
  --clr-yellow-bg:     #fef9c3;
  --clr-yellow-text:   #92400e;
  --clr-indigo-bg:     #ede9fe;

  --ff-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-lg:   1.125rem;
  --fs-xl:   1.25rem;
  --fs-2xl:  1.5rem;
  --fs-3xl:  1.875rem;
  --fs-4xl:  2.25rem;

  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl:  0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-glow: 0 0 50px rgb(79 70 229 / 0.25);

  --transition: 220ms ease;

  --nav-h: 68px;
  --max-w: 1180px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-base);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--clr-text);
  background: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
@media (max-width: 640px) { .container { padding-inline: var(--sp-4); } }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: all var(--transition);
  cursor: pointer;
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--clr-primary);
  color: #fff;
  box-shadow: 0 1px 3px rgb(79 70 229 / 0.4);
}
.btn-primary:hover {
  background: var(--clr-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgb(79 70 229 / 0.4);
}

.btn-ghost-light {
  background: transparent;
  color: #cbd5e1;
  border-color: rgb(255 255 255 / 0.2);
}
.btn-ghost-light:hover {
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.35);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-border);
}
.btn-outline:hover {
  background: var(--clr-bg-alt);
  border-color: var(--clr-primary);
}

.btn-outline-amber {
  background: transparent;
  color: var(--clr-amber-dark);
  border: 1.5px solid var(--clr-amber-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-outline-amber:hover {
  background: var(--clr-amber-bg);
  border-color: var(--clr-amber);
  color: var(--clr-amber-dark);
}

.btn-nav {
  background: var(--clr-primary);
  color: #fff;
  padding: 0.5rem 1.1rem;
  font-size: var(--fs-sm);
  border-radius: var(--radius-md);
}
.btn-nav:hover { background: var(--clr-primary-dark); }

.btn--sm { padding: 0.45rem 1rem; font-size: var(--fs-xs); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge--live  { background: var(--clr-green-bg);  color: #15803d; }
.badge--free  { background: var(--clr-indigo-bg); color: var(--clr-primary-dark); }
.badge--soon  { background: var(--clr-yellow-bg); color: var(--clr-yellow-text); }

/* Pulse dot */
.badge-pulse-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.35); }
}

/* ── Section Helpers ── */
.section { padding-block: var(--sp-24); }

.section-label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--clr-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-3);
}
.section-label--light { color: var(--clr-primary-light); }

.section-header {
  text-align: center;
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: var(--sp-16);
}
.section-title {
  font-size: clamp(var(--fs-3xl), 4vw, var(--fs-4xl));
  font-weight: 800;
  color: var(--clr-dark);
  margin-bottom: var(--sp-4);
  letter-spacing: -0.02em;
}
.section-title--left { text-align: left; }
.section-subtitle {
  font-size: var(--fs-lg);
  color: var(--clr-text-muted);
  line-height: 1.7;
}

/* ========================================================
   HEADER
   ======================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.site-header--scrolled {
  border-bottom-color: var(--clr-border);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--sp-8);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.logo-icon { flex-shrink: 0; }
.logo-text {
  font-size: var(--fs-xl);
  font-weight: 400;
  color: var(--clr-text);
  letter-spacing: -0.01em;
}
.logo-text strong { font-weight: 800; color: var(--clr-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  margin-inline: auto;
}
.nav-links a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--clr-primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px; height: 18px;
}
.nav-toggle span {
  display: block;
  width: 100%; height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: all var(--transition);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .btn-nav    { display: none; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--clr-bg);
    border-bottom: 1px solid var(--clr-border);
    box-shadow: var(--shadow-lg);
    padding-block: var(--sp-4) var(--sp-6);
    margin: 0;
  }
  .nav-links--open { display: flex; }
  .nav-links a {
    padding: var(--sp-3) var(--sp-6);
    font-size: var(--fs-base);
    width: 100%;
  }
}

/* ========================================================
   HERO
   ======================================================== */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + var(--sp-20));
  padding-bottom: var(--sp-24);
  background: var(--clr-dark);
  overflow: hidden;
}

.hero-bg-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero-bg-orb--1 {
  width: 700px; height: 700px;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgb(79 70 229 / 0.30) 0%, transparent 65%);
}
.hero-bg-orb--2 {
  width: 500px; height: 500px;
  bottom: -100px; right: -100px;
  background: radial-gradient(circle, rgb(6 182 212 / 0.18) 0%, transparent 65%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.4rem 1rem;
  background: rgb(79 70 229 / 0.18);
  border: 1px solid rgb(79 70 229 / 0.35);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--clr-primary-light);
  margin-bottom: var(--sp-6);
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: var(--sp-6);
}
.gradient-text {
  background: linear-gradient(130deg, var(--clr-primary-light) 0%, var(--clr-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--fs-lg);
  color: var(--clr-text-faint);
  line-height: 1.75;
  max-width: 460px;
  margin-bottom: var(--sp-10);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* Code Window */
.code-window {
  background: var(--clr-dark-2);
  border-radius: var(--radius-xl);
  border: 1px solid rgb(255 255 255 / 0.07);
  box-shadow: var(--shadow-2xl), 0 0 60px rgb(79 70 229 / 0.15);
  overflow: hidden;
}
.code-window-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  background: var(--clr-dark);
  border-bottom: 1px solid rgb(255 255 255 / 0.05);
}
.win-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.win-dot--red    { background: #ff5f57; }
.win-dot--yellow { background: #febc2e; }
.win-dot--green  { background: #28c840; }
.win-title {
  margin-left: var(--sp-2);
  font-size: var(--fs-xs);
  color: #475569;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
}
.code-window-body { padding: var(--sp-5); }

.tool-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}
.tool-chip {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.45rem 0.6rem;
  background: rgb(255 255 255 / 0.04);
  border: 1px solid rgb(255 255 255 / 0.06);
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  color: var(--clr-text-faint);
  white-space: nowrap;
  transition: all var(--transition);
}
.tool-chip--active,
.tool-chip:hover {
  background: rgb(79 70 229 / 0.2);
  border-color: rgb(79 70 229 / 0.4);
  color: var(--clr-primary-light);
}

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle { max-width: 100%; }
  .hero-badge, .hero-actions { justify-content: center; }
  .hero-visual { max-width: 540px; margin-inline: auto; }
}
@media (max-width: 640px) {
  .tool-chip-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-bottom: var(--sp-16); }
}

/* ========================================================
   PRODUCTS
   ======================================================== */
.products-section { background: var(--clr-bg-alt); }

.products-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr 1fr;
  gap: var(--sp-6);
  align-items: start;
}

.product-card {
  background: var(--clr-bg);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--clr-border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}
.product-card-inner {
  padding: var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  height: 100%;
}

.product-card--featured {
  border-color: rgb(79 70 229 / 0.22);
  box-shadow: 0 0 0 1px rgb(79 70 229 / 0.08), var(--shadow-md);
}
.product-card--featured:hover {
  box-shadow: 0 0 0 1px rgb(79 70 229 / 0.2), var(--shadow-2xl), var(--shadow-glow);
}
/* PollsHub product card */
.product-card--poll {
  border-color: rgb(245 158 11 / 0.25);
  box-shadow: 0 0 0 1px rgb(245 158 11 / 0.08), var(--shadow-md);
}
.product-card--poll:hover {
  box-shadow: 0 0 0 1px rgb(245 158 11 / 0.25), var(--shadow-xl), 0 0 40px rgb(245 158 11 / 0.12);
}
.product-name--poll    { color: var(--clr-amber-dark); }
.product-tagline--poll {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--clr-amber);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: calc(-1 * var(--sp-3));
}
.tool-tag--poll {
  background: var(--clr-amber-bg);
  color: var(--clr-amber-dark);
}

.product-card--soon { opacity: 0.88; }

.product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
}

.product-icon-wrap {
  width: 56px; height: 56px;
  border-radius: var(--radius-xl);
  background: var(--clr-indigo-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 6px;
}
.product-icon-wrap--muted { background: var(--clr-bg-alt); }
.product-icon-wrap--poll  { background: var(--clr-amber-bg); }

.product-badges { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.product-name {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--clr-dark);
}
.product-name--muted { color: var(--clr-text-muted); }

.product-tagline {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--clr-primary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: calc(-1 * var(--sp-3));
}
.product-tagline--muted { color: var(--clr-text-faint); }

.product-body { display: flex; flex-direction: column; gap: var(--sp-2); }
.product-desc {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: 1.7;
}
.product-desc--muted { color: var(--clr-text-faint); }

/* Tool Tags */
.tools-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.tools-list-heading {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.tool-tag {
  padding: 0.28rem 0.7rem;
  background: var(--clr-indigo-bg);
  color: var(--clr-primary-dark);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  white-space: nowrap;
}

.soon-hint {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--clr-text-faint);
}

.product-footer {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--clr-border-light);
}
.product-hint {
  font-size: var(--fs-xs);
  color: var(--clr-text-faint);
  text-align: center;
}

@media (max-width: 1024px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
  .product-card--featured { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .products-grid { grid-template-columns: 1fr; }
  .product-card--featured { grid-column: auto; }
}

/* ========================================================
   ABOUT
   ======================================================== */
.about-section { background: var(--clr-bg); }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--sp-16);
  align-items: center;
}

/* Stats visual block */
.about-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
.about-stat-card {
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.about-stat-card--accent  { background: var(--clr-indigo-bg); border-color: rgb(79 70 229 / 0.2); }
.about-stat-card--accent2 { background: #ecfdf5; border-color: rgb(34 197 94 / 0.2); }

.about-stat-num {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--clr-primary);
  line-height: 1;
}
.about-stat-card--accent2 .about-stat-num { color: #16a34a; }

.about-stat-label {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  font-weight: 500;
}

.about-mini-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-4);
  background: var(--clr-dark);
  border-radius: var(--radius-xl);
}
.about-mini-tags span {
  padding: 0.2rem 0.6rem;
  background: rgb(79 70 229 / 0.25);
  color: var(--clr-primary-light);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Text side */
.about-content { display: flex; flex-direction: column; gap: var(--sp-5); }
.about-text {
  font-size: var(--fs-base);
  color: var(--clr-text-muted);
  line-height: 1.8;
}

.about-contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-primary);
  transition: color var(--transition);
}
.about-contact-link:hover { color: var(--clr-primary-dark); }

@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; }
  .about-visual { order: -1; }
}

/* ========================================================
   CONTACT
   ======================================================== */
.contact-section { background: var(--clr-bg-alt); }

.contact-card {
  position: relative;
  overflow: hidden;
  background: var(--clr-dark);
  border-radius: var(--radius-2xl);
  padding: var(--sp-16);
}
.contact-card-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 90% 10%, rgb(79 70 229 / 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 10% 90%, rgb(6 182 212 / 0.2) 0%, transparent 55%);
  pointer-events: none;
}

.contact-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.contact-title {
  font-size: clamp(var(--fs-2xl), 3.5vw, var(--fs-4xl));
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.contact-text {
  font-size: var(--fs-base);
  color: var(--clr-text-faint);
  line-height: 1.75;
}

.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--clr-primary-light);
  transition: color var(--transition);
}
.contact-email-link:hover { color: #fff; }

@media (max-width: 640px) {
  .contact-card { padding: var(--sp-10) var(--sp-6); }
}

/* ========================================================
   FOOTER
   ======================================================== */
.site-footer { background: var(--clr-dark); color: #f1f5f9; }

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-12);
  padding-block: var(--sp-16);
}

.footer-brand { max-width: 220px; display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-logo-text { color: #f1f5f9; }
.footer-logo-text strong { color: var(--clr-primary-light); }
.footer-tagline { font-size: var(--fs-sm); color: #475569; line-height: 1.6; }
.footer-email   { font-size: var(--fs-sm); color: #64748b; transition: color var(--transition); }
.footer-email:hover { color: var(--clr-primary-light); }

.footer-links { display: flex; gap: var(--sp-12); }
.footer-col h4 {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: var(--sp-4);
}
.footer-col ul  { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-col a   { font-size: var(--fs-sm); color: #64748b; transition: color var(--transition); }
.footer-col a:hover { color: #fff; }

.footer-bottom { border-top: 1px solid rgb(255 255 255 / 0.07); }
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  padding-block: var(--sp-6);
}
.footer-bottom-inner p  { font-size: var(--fs-sm); color: #475569; }
.footer-built { font-style: italic; }

@media (max-width: 768px) {
  .footer-inner     { flex-direction: column; gap: var(--sp-10); padding-bottom: var(--sp-10); }
  .footer-links     { gap: var(--sp-8); flex-wrap: wrap; }
}

/* ========================================================
   AD SIDEBAR LAYOUT
   ======================================================== */

/*
 * 3-column page body:
 *   [left ad 180px] [main content flex:1] [right ad 180px]
 * The ad unit itself is 160×250 (centred inside the 180px column).
 * On viewports < 1280px the sidebars collapse and ads disappear.
 */

.page-body {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.ad-sidebar {
  flex: 0 0 180px;
  width: 180px;
  /* Stick below the fixed header and scroll with the page, then become fixed */
  position: sticky;
  top: calc(var(--nav-h) + var(--sp-8));
  /* Limit height so sidebar doesn't exceed viewport */
  max-height: calc(100vh - var(--nav-h) - var(--sp-16));
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: var(--sp-8);
  /* Hide on narrow screens */
  visibility: visible;
}

.ad-sidebar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}

/* The physical ad slot: 160×250 */
.ad-unit {
  position: relative;
  width: 160px;
  height: 250px;
  flex-shrink: 0;
}

/* AdSense ins tag */
.ad-unit .adsbygoogle {
  display: block;
  width: 160px;
  height: 250px;
}

/* Placeholder shown while AdSense loads / not yet activated */
.ad-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  background: var(--clr-bg-alt);
  border: 1px dashed var(--clr-border);
  border-radius: var(--radius-md);
  pointer-events: none;
  /* Hide once AdSense fills the slot by default (AdSense removes dashed bg itself) */
}
/* If the ins tag has a filled iframe, hide the placeholder behind it */
.ad-unit .adsbygoogle[data-ad-status="filled"] ~ .ad-placeholder {
  display: none;
}

.ad-placeholder-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--clr-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.ad-placeholder-size {
  font-size: 10px;
  color: var(--clr-border);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* The main content stretches to fill the remaining space */
.page-body > main {
  flex: 1;
  min-width: 0; /* prevent flex overflow */
}

/* ─── Responsive breakpoints ─── */

/* Below 1280px hide sidebars entirely */
@media (max-width: 1279px) {
  .ad-sidebar {
    display: none;
  }
}

/* ========================================================
   ACCESSIBILITY / UTILITIES
   ======================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
