/* Design tokens */
:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --border: #e5e7eb;
  --text: #0b1220;
  --text-muted: #4b5563;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --cta: #f97316;
  --cta-hover: #ea580c;

  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;

  --container: 1120px;
  --header-height: 72px;
  --text-on-accent: #ffffff;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, figure { margin: 0; }
/* List semantics are stripped by Safari+VoiceOver when list-style is none.
   Add role="list" on <ul> where semantics matter (nav, social, etc). */
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Base typography */
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}


/* Accessibility helpers */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-2);
  background: var(--accent);
  color: var(--text-on-accent);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  z-index: 100;
}
.skip-link:focus-visible { top: var(--space-2); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Layout container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-header__brand { display: inline-flex; align-items: center; }
.site-nav {
  display: flex;
  gap: var(--space-3);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a { color: var(--text-muted); transition: color 0.15s ease; }
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--text); }

@media (max-width: 560px) {
  .site-nav { gap: var(--space-2); font-size: 0.9rem; }
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  padding: var(--space-8) 0;
  background: linear-gradient(rgba(11, 18, 32, 0.7), rgba(11, 18, 32, 0.85)),
              url("/assets/hero-bg.jpg") center / cover no-repeat;
  color: var(--text-on-accent);
}
.hero__inner { max-width: 720px; }
.hero h1 { color: var(--text-on-accent); }
.hero__lead {
  margin-top: var(--space-3);
  font-size: 1.25rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}
.hero .contact__email {
  color: var(--cta);
  margin-top: var(--space-4);
}
.hero .contact__email:hover,
.hero .contact__email:focus-visible { color: var(--cta-hover); }

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn--primary {
  background: var(--cta);
  color: var(--text-on-accent);
  margin-top: var(--space-4);
}
.btn--primary:hover { background: var(--cta-hover); }
.btn--primary:active { transform: translateY(1px); }

/* Services */
.services { padding: var(--space-12) 0; background: var(--surface); }
.services h2 { margin-bottom: var(--space-3); }
.services__lead {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.5;
  margin-bottom: var(--space-6);
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.card h3 { margin-bottom: var(--space-1); }
.card p { color: var(--text-muted); }

@media (max-width: 900px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .services__grid { grid-template-columns: 1fr; }
}

/* Technologies */
.tech { padding: var(--space-12) 0; }
.tech h2 { margin-bottom: var(--space-6); text-align: center; }
.tech__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-6);
}
.tech__row img {
  width: 56px;
  height: 56px;
  filter: grayscale(1) opacity(0.55);
  transition: filter 0.2s ease;
}
.tech__row img:hover { filter: grayscale(0) opacity(1); }

/* About */
.about { padding: var(--space-12) 0; background: var(--surface); }
.about__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-6);
  align-items: start;
}
.about__grid p + p { margin-top: var(--space-2); }
.about__facts dl { display: grid; gap: var(--space-2); }
.about__facts .fact {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
.about__facts dt { color: var(--text-muted); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }
.about__facts dd { margin: 0; font-weight: 500; }

@media (max-width: 720px) {
  .about__grid { grid-template-columns: 1fr; }
}

/* Contact */
.contact { padding: var(--space-12) 0; }
.contact__inner { text-align: center; max-width: 640px; margin: 0 auto; }
.contact__inner h2 { margin-bottom: var(--space-3); }
.contact__lead { margin: 0 auto var(--space-6); color: var(--text-muted); }
.contact__email {
  display: inline-block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-2);
}
.contact__email:hover,
.contact__email:focus-visible { color: var(--accent-hover); }

/* Footer */
.site-footer {
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.site-footer__text { margin: 0 auto; color: var(--text-muted); font-size: 0.875rem; }
.site-footer a { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--border); }
.site-footer a:hover,
.site-footer a:focus-visible { color: var(--text); }
