/* digitalite — virtual business card */
/* Visual language: a populated PCB read under low light — copper traces
   for structure, a phosphor-LED green for anything that is "live"
   (hover, focus, a travelling signal). Set type is bilingual-mono:
   Martian Mono for anything that reads like silkscreen/labeling,
   Fragment Mono for running text — so the whole page reads like a
   datasheet rather than a marketing template. */

:root {
  --bg: #0a130f;
  --surface: #12241d;
  --surface-2: #172c23;
  --line: rgba(217, 158, 61, 0.22);
  --accent: #d99e3d;
  --accent-soft: rgba(217, 158, 61, 0.14);
  --led: #5eff9e;
  --led-soft: rgba(94, 255, 158, 0.16);
  --text: #f4f1e6;
  --muted: #8fa39a;

  --font-display: "Martian Mono", ui-monospace, "SFMono-Regular", monospace;
  --font-body: "Fragment Mono", ui-monospace, "SFMono-Regular", monospace;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --header-h: 4rem;
  --max-w: 68rem;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 14% 6%, rgba(217, 158, 61, 0.12), transparent 40%),
    radial-gradient(circle at 88% 94%, rgba(94, 255, 158, 0.07), transparent 42%),
    radial-gradient(rgba(244, 241, 230, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 24px 24px;
  background-position: 0 0, 0 0, 0 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-header,
main,
.site-footer,
.skip-link {
  position: relative;
  z-index: 1;
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--led);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--led);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-sm);
}

h1 {
  font-size: clamp(1.85rem, 4.6vw, 2.9rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h2::before {
  content: "// ";
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}

h3 {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  margin-bottom: var(--space-xs);
}

p {
  margin: 0 0 var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 100;
  padding: var(--space-xs) var(--space-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.875rem;
}

.skip-link:focus {
  top: var(--space-sm);
}

.container {
  width: min(100% - 2rem, var(--max-w));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 19, 15, 0.86);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: var(--space-md);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark::after {
  content: "_";
  color: var(--led);
  margin-left: 1px;
  animation: cursor-blink 1.1s steps(1, end) infinite;
}

.wordmark:hover {
  color: var(--led);
  text-decoration: none;
}

.wordmark:hover::after {
  color: var(--led);
}

@keyframes cursor-blink {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 1.125rem;
  height: 2px;
  margin-inline: auto;
  background: var(--accent);
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: var(--led);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.site-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(10, 19, 15, 0.97);
  border-bottom: 1px solid var(--line);
  padding: var(--space-sm) 0 var(--space-md);
}

.site-nav.is-open {
  display: block;
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: min(100% - 2rem, var(--max-w));
  margin-inline: auto;
}

.site-nav a {
  position: relative;
  display: block;
  padding: 0.75rem 0;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--led);
}

@media (min-width: 640px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    position: static;
    border: none;
    padding: 0;
    background: transparent;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: var(--space-lg);
    width: auto;
    margin: 0;
  }

  .site-nav a {
    padding: 0;
    border: none;
  }

  .site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -4px;
    height: 1px;
    background: var(--led);
    transition: right 0.2s ease;
  }

  .site-nav a:hover::after,
  .site-nav a:focus-visible::after {
    right: 0;
  }
}

/* Hero */

.hero {
  position: relative;
  padding: var(--space-2xl) 0;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero-content {
  max-width: 38rem;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: rise 0.7s ease-out 0.05s forwards;
}

.status-dot {
  width: 7px;
  height: 7px;
  margin-right: 0.65em;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 0 2px var(--led-soft), 0 0 8px 1px var(--led);
  flex-shrink: 0;
  animation: dot-pulse 2.4s ease-in-out infinite;
}

#hero-heading {
  opacity: 0;
  animation: rise 0.7s ease-out 0.16s forwards;
}

.hero-sub {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  max-width: 34rem;
  opacity: 0;
  animation: rise 0.7s ease-out 0.28s forwards;
}

.hero-content .btn {
  opacity: 0;
  animation: rise 0.7s ease-out 0.4s forwards;
}

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

@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.7); }
}

.btn {
  --chamfer: 10px;
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  clip-path: polygon(
    var(--chamfer) 0, 100% 0,
    100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%,
    0 100%, 0 var(--chamfer)
  );
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--led);
  text-decoration: none;
  color: var(--bg);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

/* Sections */

.section {
  padding: var(--space-xl) 0;
}

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

.section-lead,
.section-intro {
  color: var(--muted);
  max-width: 40rem;
}

.about .section-lead {
  font-size: 1.0625rem;
  line-height: 1.85;
}

/* Services */

.service-grid {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
}

.service-card {
  background: var(--surface);
  padding: var(--space-md);
  border-left: 2px solid var(--accent);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  border-left-color: var(--led);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.service-icon {
  display: inline-flex;
  margin-bottom: var(--space-sm);
  color: var(--accent);
  transition: color 0.2s ease;
}

.service-card:hover .service-icon {
  color: var(--led);
}

.service-card h3 {
  color: var(--text);
}

.service-card p {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* Contact */

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  width: fit-content;
}

.contact-link:hover {
  color: var(--led);
  text-decoration: none;
}

.contact-icon {
  color: var(--accent);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.contact-link:hover .contact-icon {
  color: var(--led);
}

.social-links {
  display: flex;
  gap: var(--space-sm);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.social-link:hover {
  color: var(--led);
  border-color: var(--led);
  text-decoration: none;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-md) 0;
}

.site-footer p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--muted);
}
