/* bitfroth homepage — design tokens borrowed from Curated (curated.bitfroth.com) */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: 40 14% 98%;
  --foreground: 24 12% 10%;
  --card: 0 0% 100%;
  --border: 32 10% 88%;
  --muted: 36 12% 93%;
  --muted-foreground: 28 7% 42%;
  --primary: 25 95% 42%;
  --accent: 28 90% 94%;
  --accent-foreground: 25 90% 32%;
  --live: 152 55% 36%;
  --radius: 0.75rem;
  color-scheme: light;
}

[data-theme="dark"] {
  --background: 24 10% 6%;
  --foreground: 40 12% 90%;
  --card: 26 9% 9%;
  --border: 28 7% 16%;
  --muted: 26 6% 14%;
  --muted-foreground: 30 6% 58%;
  --primary: 32 95% 60%;
  --accent: 28 24% 14%;
  --accent-foreground: 32 90% 68%;
  --live: 152 60% 55%;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "Geist", -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: hsl(var(--primary) / 0.18);
}

:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
  border-radius: 2px;
}

.site {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

.mono {
  font-family: "Geist Mono", ui-monospace, monospace;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  background: hsl(var(--primary));
}

.brand-name {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid transparent;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 150ms ease;
}

.site-nav a:hover {
  color: hsl(var(--foreground));
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-block: 4.5rem 3.5rem;
}

/* Dot-grid texture, same as Curated's hero — grounds the title on the page. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
    circle,
    hsl(var(--foreground) / 0.11) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 70% 80% at 20% 0%, black, transparent);
  -webkit-mask-image: radial-gradient(
    ellipse 70% 80% at 20% 0%,
    black,
    transparent
  );
}

.hero > * {
  position: relative;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: hsl(var(--muted-foreground));
}

.hero h1 {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1.875rem, 5.5vw, 2.625rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 32rem;
  font-size: 1.0625rem;
  color: hsl(var(--muted-foreground));
}

/* ---------- sections ---------- */

.section {
  padding-block: 2rem;
  scroll-margin-top: 4.5rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-label {
  margin: 0;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: hsl(var(--muted-foreground));
}

.section-meta {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
}

/* ---------- project cards ---------- */

.card-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.25rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}

a.card:hover {
  border-color: hsl(var(--primary) / 0.55);
  transform: translateY(-1px);
}

.card-soon {
  border-style: dashed;
  background: transparent;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-name {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-desc {
  margin: 0;
  flex: 1;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.card-tag {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-url {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arrow {
  display: inline-block;
  transition: transform 150ms ease;
}

a.card:hover .arrow,
.link-row:hover .arrow {
  transform: translate(2px, -2px);
  color: hsl(var(--primary));
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid;
  border-radius: 999px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.badge-live {
  color: hsl(var(--live));
  border-color: hsl(var(--live) / 0.4);
}

.badge-live .dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 999px;
  background: hsl(var(--live));
}

.badge-soon {
  color: hsl(var(--muted-foreground));
  border-color: hsl(var(--border));
}

/* ---------- contact rows ---------- */

.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid hsl(var(--border));
}

.link-list li {
  border-bottom: 1px solid hsl(var(--border));
}

.link-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.875rem 0.25rem;
  color: inherit;
  text-decoration: none;
}

.link-label {
  min-width: 6rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: color 150ms ease;
}

.link-row:hover .link-label {
  color: hsl(var(--primary));
}

.link-handle {
  flex: 1;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  border-top: 1px solid hsl(var(--border));
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem 2.5rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

/* ---------- noscript ---------- */

.noscript-list {
  margin: 0;
  padding-left: 1.25rem;
}

.noscript-list a {
  color: hsl(var(--primary));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .card,
  .arrow,
  .site-nav a,
  .link-label {
    transition: none;
  }
}
