/* -----------------------------------------
   Self-hosted Fonts
----------------------------------------- */

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

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

/* -----------------------------------------
   CSS Custom Properties (Dark Default)
----------------------------------------- */

:root {
  --color-bg: #000000;
  --color-text: #e0e0e0;
  --color-text-muted: #666666;
  --color-text-faint: #444444;
  --color-accent: #00ff41;
  --color-accent-glow: rgba(0, 255, 65, 0.10);
  --color-accent-dim: rgba(0, 255, 65, 0.15);
  --color-focus: #00ff41;
  --color-link: #00ff41;
  --color-link-hover: #33ff66;
  --color-grid: rgba(0, 255, 65, 0.04);

  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Oxanium', system-ui, -apple-system, BlinkMacSystemFont,
                  'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --max-width-tagline: 520px;
}

/* -----------------------------------------
   Light Mode Override
----------------------------------------- */

@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #f0f3f8;
    --color-text: #1a1f2e;
    --color-text-muted: #5a6578;
    --color-text-faint: #8892a4;
    --color-accent: #00aa2e;
    --color-accent-glow: rgba(0, 170, 46, 0.08);
    --color-accent-dim: rgba(0, 170, 46, 0.12);
    --color-focus: #00aa2e;
    --color-link: #00aa2e;
    --color-link-hover: #00cc36;
    --color-grid: rgba(0, 0, 0, 0.035);
    --color-card-bg: rgba(0, 0, 0, 0.04);
    --color-card-border: rgba(0, 0, 0, 0.08);
    --color-card-hover: rgba(0, 0, 0, 0.07);
  }

  .product-card {
    background: var(--color-card-bg);
    border-color: var(--color-card-border);
  }

  a.product-card:hover {
    background: var(--color-card-hover);
  }
}

/* -----------------------------------------
   Focus Styles (Accessibility)
----------------------------------------- */

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

a:focus-visible {
  border-radius: 2px;
}

/* -----------------------------------------
   Base Layout
----------------------------------------- */

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

html, body {
  height: 100%;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  background-image: radial-gradient(circle, var(--color-grid) 1px, transparent 1px);
  background-size: 28px 28px;
  font-family: var(--font-body);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -----------------------------------------
   Main Content (Centered)
----------------------------------------- */

main.centered {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.main-inner {
  text-align: center;
}

/* -----------------------------------------
   Byte Mark (Binary Visualization)
----------------------------------------- */

.byte-mark {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 2.625rem;
}

.bit {
  width: 9px;
  height: 42px;
  border-radius: 4px;
  background: var(--color-accent);
}

.bit.off {
  background: #ffffff;
  animation: blinkGreen 2s step-end infinite;
}

@keyframes blinkGreen {
  0%, 49.9% { background: #ffffff; }
  50%, 100% { background: var(--color-accent); }
}

/* -----------------------------------------
   Typography
----------------------------------------- */

h1 {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 1.25rem 0;
  line-height: 1.1;
}

h1 .zero {
  color: var(--color-accent);
}

h1 .inc {
  color: var(--color-text);
}

.tagline {
  max-width: var(--max-width-tagline);
  margin: 0 auto;
  line-height: 1.6;
  font-size: 1.575rem;
  color: var(--color-text-muted);
}

.products {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  margin-top: 3rem;
}

.product-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  text-align: left;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 380px;
}

a.product-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-accent);
}

.product-card-soon {
  opacity: 0.5;
}

.product-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent);
}

.product-desc {
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

.product-domain {
  font-weight: 400;
  color: var(--color-text-muted);
}


/* -----------------------------------------
   404 Page
----------------------------------------- */

.error-code {
  font-family: var(--font-heading);
  font-size: 7.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem 0;
  line-height: 1;
  color: var(--color-accent);
}

.error-message {
  max-width: 400px;
  margin: 0 auto 1.5rem auto;
  line-height: 1.6;
  font-size: 1.575rem;
  color: var(--color-text-muted);
}

.home-link {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.home-link:hover {
  color: var(--color-link-hover);
}

/* -----------------------------------------
   Footer
----------------------------------------- */

footer {
  text-align: center;
  font-size: 1.275rem;
  color: var(--color-text-faint);
  padding: 24px 0;
}

footer .contact-email {
  margin-bottom: 0.4rem;
}

footer .contact-email a {
  color: var(--color-link);
  text-decoration: none;
  font-weight: 500;
}

footer .contact-email a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

footer .copyright {
  color: var(--color-text-faint);
  font-size: 1.2rem;
  margin-top: 0.4rem;
}

/* -----------------------------------------
   Skip Link (Accessibility)
----------------------------------------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #000000;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

/* -----------------------------------------
   Responsive
----------------------------------------- */

@media (max-width: 600px) {
  h1 {
    font-size: 3.6rem;
  }

  .tagline {
    font-size: 1.425rem;
  }

  .byte-mark {
    gap: 6px;
    margin-bottom: 2.25rem;
  }

  .bit {
    width: 7px;
    height: 33px;
  }

  .error-code {
    font-size: 5.25rem;
  }
}

