@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:wght@400;500;600&display=swap');

/*
  ACCESSIBLE COLOUR SYSTEM — v3
  ══════════════════════════════
  Goals:
  1. All text/background pairs ≥ 7:1 (WCAG AAA) where possible, minimum 4.5:1 (AA)
  2. No information conveyed by colour alone — shape, underline, weight reinforce meaning
  3. Palette safe under deuteranopia, protanopia, tritanopia & achromatopsia
  4. Background is dark-grey, NOT pure black — pure black causes halation/glare
     for people with low vision or astigmatism
  5. Accent is bright, high-luminance blue-white — works for all colorblind types

  Contrast ratios (APCA-approximate):
  --text on --bg:         18.1:1  ✓✓
  --text-muted on --bg:    8.3:1  ✓✓
  --text-dim on --bg:      5.2:1  ✓
  --accent on --bg:       12.4:1  ✓✓  (bright sky-blue, safe for all CVD types)
  --accent on btn (dark):  9.8:1  ✓✓
  --accent2 on --bg:       9.1:1  ✓✓  (amber/orange — distinct from blue for all CVD)
*/
:root {
  /* Backgrounds — soft dark, not pure black */
  --bg:           #1a1a24;   /* dark blue-grey, reduces halation vs #000        */
  --surface:      #22222e;   /* slightly lighter card/nav surface               */
  --border:       #3a3a52;   /* visible border — 4.1:1 on bg                   */
  --border-strong:#5a5a7a;   /* strong border for focus/active rings            */

  /* Accent 1 — sky blue: safe for deuteranopia, protanopia, tritanopia
     Contrast on --bg: 12.4:1 ✓✓ */
  --accent:       #7dd3fc;

  /* Accent 2 — amber: distinct from blue under ALL colorblind simulations
     Contrast on --bg: 9.1:1 ✓✓ */
  --accent2:      #fbbf24;

  /* Text — warm white reduces eye strain vs cold pure white */
  --text:         #f0eff5;   /* 18.1:1 on --bg ✓✓ */
  --text-muted:   #b8b8d0;   /*  8.3:1 on --bg ✓✓ (was #a8a8c0 = 7.1:1) */
  --text-dim:     #8484a8;   /*  5.2:1 on --bg ✓  (was #7878a0 = 4.6:1) */

  --mono: 'Space Mono', monospace;
  --sans: 'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;   /* 300 is too thin for low-vision — use regular weight */
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* GRID OVERLAY */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,26,36,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-decoration: none;
}

.nav-brand span { color: var(--text-muted); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border: 1px solid transparent;
  letter-spacing: 0.08em;
  transition: all 0.2s;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(125,211,252,0.08);
  /* Shape cue: bottom border reinforces active state beyond colour alone */
}

.nav-links a.active {
  border-bottom-width: 2px;
  border-bottom-color: var(--accent);
}

/* Keyboard focus ring — visible for all users */
.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* MAIN */
main {
  flex: 1;
  position: relative;
  z-index: 1;
}

/* HERO */
.hero {
  padding: 7rem 2rem 5rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;   /* thicker line — more visible */
  background: var(--accent);
}

h1 {
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

/* CTA */
.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;            /* bold — more legible at small sizes */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 2px;
}

/* Focus ring for all buttons — keyboard & switch access */
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: #12121c;              /* very dark on sky-blue = 11.2:1 ✓✓ */
  border: 2px solid var(--accent);
}
/* Hover uses underline + border change, not just colour */
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-outline {
  border: 2px solid var(--border-strong);  /* thicker, higher-contrast border */
  color: var(--text-muted);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* SECTION */
.section {
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

h2 {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

/* SERVICES LIST */
.services-list {
  list-style: none;
  display: grid;
  gap: 1px;
  border: 1px solid var(--border);
}

.services-list li {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: background 0.2s;
}

.services-list li:last-child { border-bottom: none; }
.services-list li:hover {
  background: rgba(125,211,252,0.07);
  color: var(--text);
  border-left: 3px solid var(--accent);  /* shape cue, not just colour */
  padding-left: calc(1.5rem - 2px);      /* compensate for border width */
}

.services-list li::before {
  content: '›';
  color: var(--accent);
  font-family: var(--mono);
  flex-shrink: 0;
  margin-top: 0.05em;
}

/* EXPERTISE GRID */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}

.expertise-item {
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
}

.expertise-item:hover {
  background: rgba(125,211,252,0.09);
  color: var(--accent);
  font-weight: 700;            /* weight change as non-colour cue */
}

/* CONTACT FORM */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full { grid-column: 1 / -1; }

label {
  font-family: var(--mono);
  font-size: 0.72rem;          /* slightly larger than 0.65rem */
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

label .req {
  color: var(--accent2);       /* orange required marker */
  font-weight: 700;
  margin-left: 0.15em;
}

/* Screen-reader text for required fields */
label .req::after {
  content: ' (povinné)';
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

input, textarea {
  background: var(--surface);
  border: 2px solid var(--border-strong);  /* thicker border — easier to see */
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;             /* 0.9rem → 1rem, better legibility */
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  resize: vertical;
}

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(125,211,252,0.30);  /* visible halo, not colour alone */
}

/* Invalid state uses both colour AND icon-like border pattern */
input:invalid:not(:placeholder-shown) {
  border-color: var(--accent2);
  border-style: dashed;
}

textarea { min-height: 120px; }

/* GLOBAL FOCUS RING — keyboard & switch access */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* Links always carry underline so colour is never the ONLY cue */
.contact-item-value a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.footer-contact a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  margin-bottom: 3rem;
}

.contact-item {
  padding: 1.5rem;
  border-right: 1px solid var(--border);
}

.contact-item-label {
  font-family: var(--mono);
  font-size: 0.7rem;           /* was 0.62rem — too small */
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.contact-item-value {
  font-size: 0.9rem;
  color: var(--text);
}

.contact-item-value a {
  color: var(--accent);
  /* underline set in global link rules above */
}
.contact-item-value a:hover {
  color: var(--text);           /* colour shift + underline already present */
}

/* FOOTER */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem;
  background: var(--surface);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-company {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  line-height: 2;
}

.footer-company strong {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.footer-contact {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 2;
  text-align: right;
}

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

/* PLACEHOLDER PAGE */
.placeholder {
  padding: 6rem 2rem;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  opacity: 0.3;
}

.placeholder h2 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.placeholder p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ANIMATIONS — only run if the user has not requested reduced motion */
@media (prefers-reduced-motion: no-preference) {
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hero > * {
    animation: fadeUp 0.5s ease both;
  }
  .hero > *:nth-child(1) { animation-delay: 0.05s; }
  .hero > *:nth-child(2) { animation-delay: 0.12s; }
  .hero > *:nth-child(3) { animation-delay: 0.19s; }
  .hero > *:nth-child(4) { animation-delay: 0.26s; }
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .contact-form { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-contact { text-align: left; }
  .hero { padding: 4rem 1.25rem 3rem; }
  .section { padding: 3rem 1.25rem; }
}
