/* ========================================
   ByteLeap — Design Tokens
   ======================================== */

:root {
  --color-ink: oklch(0.12 0.006 260);
  --color-text: oklch(0.22 0.005 260);
  --color-muted: oklch(0.50 0.005 260);
  --color-border: oklch(0.78 0.004 260);
  --color-surface: oklch(0.94 0.003 260);
  --color-bg: oklch(0.98 0.002 260);

  --font-display: 'Darker Grotesque', sans-serif;
  --font-body: 'Atkinson Hyperlegible', sans-serif;

  --text-display: clamp(3rem, 7vw + 1rem, 5.5rem);
  --text-h2: clamp(1.8rem, 3vw + 0.5rem, 2.8rem);
  --text-h3: clamp(1.3rem, 1.5vw + 0.5rem, 1.6rem);
  --text-body: 1.125rem;
  --text-small: 0.875rem;
  --text-xs: 0.75rem;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  --max-width: 64rem;
  --content-width: 48rem;
  --gutter: clamp(1.5rem, 5vw, 3rem);
}

/* ========================================
   Base
   ======================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-display); font-weight: 800; }
h2 { font-size: var(--text-h2); font-weight: 700; }
h3 { font-size: var(--text-h3); font-weight: 600; }

p { max-width: 65ch; }

a {
  color: var(--color-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: opacity 0.2s ease;
}

a:hover { opacity: 0.6; }

/* ========================================
   Header
   ======================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-md) var(--gutter);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-ink);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.logo:hover { opacity: 1; }

nav { display: flex; gap: var(--space-xl); }

nav a {
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

nav a:hover { color: var(--color-ink); opacity: 1; }

/* ========================================
   Hero
   ======================================== */

.hero { padding: var(--space-5xl) 0 var(--space-4xl); }

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero h1 { margin: 0 0 var(--space-xl); }

.hero-sub {
  font-size: clamp(1.1rem, 1.5vw + 0.5rem, 1.35rem);
  color: var(--color-muted);
  max-width: 38ch;
  margin: 0 0 var(--space-2xl);
  line-height: 1.5;
}

.cta {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-bg);
  background-color: var(--color-ink);
  padding: 0.75rem 2rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cta:hover {
  background-color: oklch(0.25 0.005 260);
  color: var(--color-bg);
  opacity: 1;
  transform: translateY(-1px);
}

/* Terminal window — early Macintosh reference */
.terminal-window {
  margin-top: var(--space-3xl);
  max-width: 26rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.terminal-title {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-left: auto;
  margin-right: auto;
}

.terminal-body {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.terminal-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--text-small);
}

.terminal-label {
  color: var(--color-muted);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.terminal-value {
  color: var(--color-ink);
  font-weight: 700;
  font-family: var(--font-body);
}

/* ========================================
   Sections — shared
   ======================================== */

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-5xl) var(--gutter);
}

.services,
.about,
.contact {
  border-top: 1px solid var(--color-border);
}

/* ========================================
   Services
   ======================================== */

.services h2 { margin: 0 0 var(--space-3xl); }

.service-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.service {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: var(--space-xl);
  row-gap: var(--space-sm);
  max-width: var(--content-width);
}

.service-num {
  grid-row: 1 / 3;
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 300;
  color: var(--color-border);
  line-height: 1;
  padding-top: 0.15em;
}

.service h3 { margin: 0; align-self: end; }

.service p {
  margin: 0;
  color: var(--color-muted);
  grid-column: 2;
}

/* ========================================
   About
   ======================================== */

.about h2 { margin: 0 0 var(--space-xl); max-width: 20ch; }

.about p {
  color: var(--color-muted);
  font-size: clamp(1rem, 1.2vw + 0.5rem, 1.2rem);
  max-width: 55ch;
}

/* ========================================
   Contact
   ======================================== */

.contact h2 { margin: 0 0 var(--space-md); }

.contact p {
  color: var(--color-muted);
  margin: 0 0 var(--space-xl);
  max-width: 45ch;
}

.contact-email {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--color-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.1em;
  transition: border-color 0.2s ease;
}

.contact-email:hover {
  border-color: var(--color-ink);
  opacity: 1;
}

/* ========================================
   Footer
   ======================================== */

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

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--gutter);
  font-size: var(--text-small);
  color: var(--color-muted);
}

/* ========================================
   Reveal animations
   ======================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

.service-list [data-reveal]:nth-child(2) { transition-delay: 0.1s; }
.service-list [data-reveal]:nth-child(3) { transition-delay: 0.2s; }

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 640px) {
  .service {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .service-num {
    grid-row: auto;
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--color-muted);
  }

  nav { gap: var(--space-lg); }
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
