/* ==========================================================================
   FONTS — Self-hosted WOFF2, 2 families, 3 weight files
   ========================================================================== */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/montserrat-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/montserrat-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/spacemono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  background-color: #f8f8f8;
  color: #111;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }

.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;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.max-w-3xl { max-width: 48rem; margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; margin-left: auto; margin-right: auto; }

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-shrink-0 { flex-shrink: 0; }
.ml-auto { margin-left: auto; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
.gap-3 { gap: 0.75rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.z-10 { z-index: 10; }
.z-40 { z-index: 40; }

/* Display */
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; align-items: center; }
.block { display: block; }
.hidden { display: none; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* Sizing */
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-auto { height: auto; }
.max-w-full { max-width: 100%; }

/* ==========================================================================
   SPACING
   ========================================================================== */

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-8 { padding-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }

.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-12 > * + * { margin-top: 3rem; }

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-mono { font-family: 'Space Mono', ui-monospace, monospace; }
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.break-all { word-break: break-all; }
.whitespace-nowrap { white-space: nowrap; }
.underline { text-decoration: underline; }
.list-decimal { list-style-type: decimal; }
.list-disc { list-style-type: disc; }
.list-inside { list-style-position: inside; }

/* ==========================================================================
   COLORS
   ========================================================================== */

.text-white { color: #fff; }
.text-black { color: #111; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-green-400 { color: #4ade80; }
.text-green-500 { color: #22c55e; }
.text-red-500 { color: #ef4444; }
.text-orange-500 { color: #f97316; }
.text-amber-600 { color: #d97706; }
.text-amber-700 { color: #b45309; }
.text-amber-800 { color: #92400e; }
.text-blue-700 { color: #1d4ed8; }
.text-yellow-700 { color: #a16207; }

.bg-white { background-color: #fff; }
.bg-black { background-color: #111; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-900 { background-color: #111827; }
.bg-green-500 { background-color: #22c55e; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-yellow-50 { background-color: #fefce8; }

/* Gradients */
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.from-gray-900 { --tw-gradient-stops: #111827, var(--tw-gradient-to, transparent); }
.to-black { --tw-gradient-to: #000; }

/* Opacity backgrounds */
.bg-white\/5 { background-color: rgba(255,255,255,0.05); }
.bg-white\/10 { background-color: rgba(255,255,255,0.1); }
.border-white\/10 { border-color: rgba(255,255,255,0.1); }

/* Backdrop */
.backdrop-blur { backdrop-filter: blur(8px); }

/* Sizing */
.w-4 { width: 1rem; } .h-4 { height: 1rem; }
.w-8 { width: 2rem; } .h-8 { height: 2rem; }
.w-12 { width: 3rem; } .h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.w-16 { width: 4rem; } .h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.w-32 { width: 8rem; } .h-32 { height: 8rem; }
.w-40 { width: 10rem; } .h-40 { height: 10rem; }
.h-48 { height: 12rem; }

/* Transform utilities */
.translate-x-1\/2 { transform: translateX(50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.translate-y-1\/2 { transform: translateY(50%); }
.-translate-x-1\/2 { transform: translateX(-50%); }
.transform { }

/* Misc Tailwind */
.top-0 { top: 0; } .right-0 { right: 0; } .bottom-0 { bottom: 0; } .left-0 { left: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.duration-300 { transition-duration: 300ms; }
.text-green-400 { color: #4ade80; }

/* ==========================================================================
   BORDERS & SHAPES
   ========================================================================== */

.border { border: 1px solid #e5e7eb; }
.border-2 { border: 2px solid #e5e7eb; }
.border-t { border-top: 1px solid #e5e7eb; }
.border-b-2 { border-bottom: 2px solid; }
.border-l-4 { border-left: 4px solid; }
.border-black { border-color: #111; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-gray-800 { border-color: #1f2937; }
.border-amber-500 { border-color: #f59e0b; }
.border-blue-500 { border-color: #3b82f6; }
.border-yellow-500 { border-color: #eab308; }
.border-white-10 { border-color: rgba(255,255,255,0.1); }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-r-lg { border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; }

/* ==========================================================================
   SHADOWS & EFFECTS
   ========================================================================== */

.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }

.object-cover { object-fit: cover; }

/* ==========================================================================
   TRANSITIONS
   ========================================================================== */

.transition-colors {
  transition-property: color, background-color, border-color;
  transition-duration: 200ms;
  transition-timing-function: ease;
}

.transition-shadow {
  transition-property: box-shadow;
  transition-duration: 200ms;
}

.transition-all {
  transition-property: all;
  transition-duration: 200ms;
}

/* ==========================================================================
   INTERACTIVE — hover states
   ========================================================================== */

.hover-bg-gray-100:hover { background-color: #f3f4f6; }
.hover-bg-gray-200:hover { background-color: #e5e7eb; }
.hover-bg-gray-800:hover { background-color: #1f2937; }
.hover-text-gray-700:hover { color: #374151; }
.hover-text-black:hover { color: #111; }
.hover-text-white:hover { color: #fff; }
.hover-border-black:hover { border-color: #111; }
.hover-shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }
.hover-scale:hover { transform: scale(1.05); }

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes pulse-opacity {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.pulse { animation: pulse-opacity 1.5s ease-in-out infinite; }
.animate-pulse { animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

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

.fade-in {
  opacity: 0;
  animation: fade-in 0.6s ease forwards;
}

/* ==========================================================================
   SITE COMPONENTS
   ========================================================================== */

/* Hero title */
.hero-title {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: #111;
}

/* Coding welcome text */
.coding-welcome {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 1.13rem;
  letter-spacing: 0.01em;
  line-height: 1.7;
}

/* Logo */
.logo-center {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 64px;
}

.logo-img { max-height: 30px; width: auto; }

.glow { text-shadow: 0 0 10px rgba(0,0,0,0.18); }

/* Header nav links */
.nav-link {
  color: #111;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  transition: color 200ms ease;
}
.nav-link:hover { color: #374151; }
.nav-link.active { border-bottom: 2px solid #111; }

/* Ticker */
.ticker-tape {
  width: 100%;
  overflow: hidden;
  background-color: #111;
  padding: 10px 0;
  z-index: 50;
  border-bottom: 1px solid #222;
  position: relative;
}

.ticker-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-weight: 600;
  font-size: 1.08rem;
  color: #fff;
  gap: 2.5rem;
}

@keyframes ticker-fast {
  0% { transform: translateX(100%); }
  100% { transform: translateX(0); }
}

@keyframes ticker-slow {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.ticker-fast { animation: ticker-fast 1.2s cubic-bezier(0.7,0,0.3,1) forwards; }
.ticker-slow { animation: ticker-slow 32s linear infinite; }

.ticker-rate-block {
  display: flex;
  align-items: center;
  background: rgba(30,30,30,0.85);
  border-radius: 0.5rem;
  padding: 0.35rem 1.1rem 0.35rem 0.8rem;
  margin-right: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,255,255,0.07);
  min-width: 170px;
}

.ticker-rate-block strong {
  color: #fff;
  margin-right: 0.3rem;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
}

.rate-value {
  font-family: 'Space Mono', monospace;
  font-size: 1.05rem;
  margin-right: 0.4rem;
}

.rate-change {
  font-family: 'Space Mono', monospace;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  margin-left: 0.2rem;
}

.rate-arrow { font-size: 1.05rem; margin-right: 0.1rem; }

/* Monero icon color */
.monero-orange { color: #ff6600; font-size: 1.25rem; margin-right: 0.5rem; }

/* Hero link card gradient */
.hero-card {
  background: linear-gradient(to bottom right, #111827, #000);
  border-radius: 1rem;
  padding: 2rem 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-card-circle {
  position: absolute;
  border-radius: 9999px;
  background: rgba(255,255,255,0.05);
}

/* Cards */
.card {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  padding: 1.5rem;
}

/* Icon circles */
.icon-circle {
  width: 4rem; height: 4rem;
  background: #111;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: #fff;
}

/* Step number for guide */
.step-card { position: relative; padding-left: 90px; min-height: 60px; }
.step-number {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 60px; height: 60px; background: #000; color: #fff;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.5rem; font-weight: 700;
}

/* Security step circles */
.step-circle {
  width: 2rem; height: 2rem;
  background: #111; color: #fff;
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem; font-weight: 700;
}

/* PGP key block */
.pgp-block {
  background: #1f2937;
  color: #fff;
  padding: 1rem;
  border-radius: 0.25rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.875rem;
  overflow-x: auto;
  word-break: break-all;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 0.375rem;
  font-weight: 700;
  font-size: 1rem;
  transition: background-color 200ms ease, transform 200ms ease;
  text-align: center;
}

.btn-primary { background: #111; color: #fff; }
.btn-primary:hover { background: #333; }
.btn-outline { background: #fff; color: #111; border: 2px solid #111; }
.btn-outline:hover { background: #f3f4f6; }
.btn-white { background: #fff; color: #111; }
.btn-white:hover { background: #e5e7eb; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.125rem; border-radius: 0.75rem; }

/* Copy button success state */
.btn-copied { background: #22c55e; color: #fff; }

/* FAQ items */
.faq-item { border-bottom: 1px solid #e5e7eb; }
.faq-item:last-child { border-bottom: none; }

/* Warning/info callouts */
.callout {
  padding: 1rem;
  border-left: 4px solid;
  border-radius: 0 0.5rem 0.5rem 0;
  display: flex;
  gap: 0.75rem;
}
.callout-amber { background: #fffbeb; border-color: #f59e0b; }
.callout-blue { background: #eff6ff; border-color: #3b82f6; }
.callout-yellow { background: #fefce8; border-color: #eab308; }

/* SVG icons */
.icon {
  width: 1em; height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: currentColor;
}
.icon-lg { width: 1.5em; height: 1.5em; }
.icon-xl { width: 2em; height: 2em; }

/* Footer dark variant for subpages */
.footer-dark { background: #111; color: #fff; }
.footer-dark a { color: #9ca3af; transition: color 200ms ease; }
.footer-dark a:hover { color: #fff; }

/* ==========================================================================
   CSS CONTAINMENT — skip rendering off-screen sections
   ========================================================================== */

.section-below-fold {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* ==========================================================================
   RESPONSIVE — Tailwind-compatible escaped-colon classes
   ========================================================================== */

/* Hover states with colon syntax */
.hover\:text-gray-700:hover { color: #374151; }
.hover\:text-black:hover { color: #111; }
.hover\:text-white:hover { color: #fff; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.hover\:bg-gray-800:hover { background-color: #1f2937; }
.hover\:border-black:hover { border-color: #111; }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.hover\:scale-105:hover { transform: scale(1.05); }

/* SM breakpoint */
@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:space-y-0 > * + * { margin-top: 0; }
  .sm\:space-x-4 > * + * { margin-left: 1rem; }
}

/* MD breakpoint */
@media (min-width: 768px) {
  .md\:flex-row { flex-direction: row; }
  .md\:w-1\/2 { width: 50%; }
  .md\:w-auto { width: auto; }
  .md\:mb-0 { margin-bottom: 0; }
  .md\:pr-10 { padding-right: 2.5rem; }
  .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
  .md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:text-3xl { font-size: 1.875rem; }
  .md\:text-2xl { font-size: 1.5rem; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:space-x-6 > * + * { margin-left: 1.5rem; }
  .md\:p-10 { padding: 2.5rem; }
}

/* LG breakpoint */
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Ticker responsive */
@media (max-width: 1024px) {
  .ticker-content { font-size: 0.98rem; gap: 1.2rem; }
  .ticker-rate-block { min-width: 140px; padding: 0.25rem 0.7rem; }
}

/* Mobile */
@media (max-width: 767px) {
  .container { padding-left: 0.75rem; padding-right: 0.75rem; }
  .hero-title { font-size: 1.3rem; }
  .coding-welcome { font-size: 0.95rem; }
  .ticker-content { font-size: 0.80rem; gap: 0.5rem; }
  .ticker-rate-block { min-width: 110px; padding: 0.12rem 0.3rem; font-size: 0.90rem; }
  .ticker-tape { padding: 6px 0; }
  .card { padding: 1rem; }
  .p-8 { padding: 1.2rem; }
  .p-6 { padding: 1rem; }
  .py-12, .py-16 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .mb-10, .mb-12 { margin-bottom: 1.5rem; }
  .shadow-2xl, .shadow-lg { box-shadow: 0 2px 8px rgba(0,0,0,0.10); }
  .step-card { padding-left: 70px; }
  .step-number { width: 48px; height: 48px; font-size: 1.2rem; }
}

/* Matrix background */
.matrix-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  opacity: 0.03;
  pointer-events: none;
  user-select: none;
}
