/* ==========================================================================
   liskovenko.es — single entry stylesheet
   Tokens in :root, mobile-first, system fonts, light/dark, reduced-motion.
   ========================================================================== */

:root {
  /* type scale (fluid) */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.95rem + 0.25vw, 1.13rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.35rem + 1.2vw, 2.4rem);
  --step-3:  clamp(2rem, 1.5rem + 2.4vw, 3.5rem);

  /* spacing */
  --space-xs: 0.5rem;
  --space-s:  1rem;
  --space-m:  1.75rem;
  --space-l:  3rem;
  --space-xl: 5rem;

  --measure: 42rem;      /* max line length */
  --radius: 6px;

  /* light palette */
  --bg:        #fbfbf9;
  --surface:   #f2f2ee;
  --fg:        #1a1a18;
  --fg-muted:  #55554e;
  --accent:    #7a4b1e;
  --accent-fg: #ffffff;
  --border:    #dcdcd4;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
          "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #16160f;
    --surface:   #20201a;
    --fg:        #eceae0;
    --fg-muted:  #a6a498;
    --accent:    #d9a066;
    --accent-fg: #16160f;
    --border:    #33332a;
  }
}

/* ---- base ---------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; font-weight: 650; margin: 0 0 var(--space-s); }
h1 { font-size: var(--step-3); letter-spacing: -0.02em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 var(--space-s); max-width: var(--measure); }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

/* ---- layout -------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 60rem;
  margin-inline: auto;
  padding-inline: var(--space-s);
}

.skip-link {
  position: absolute;
  left: var(--space-xs);
  top: -4rem;
  z-index: 10;
  padding: var(--space-xs) var(--space-s);
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--radius);
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--space-xs); }

.site-header {
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-s);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-m);
  align-items: baseline;
  justify-content: space-between;
}
.site-nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: var(--step--1);
}
.site-nav { display: flex; gap: var(--space-s); align-items: baseline; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--fg); font-weight: 600; }
.site-nav .lang {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.5em;
  letter-spacing: 0.03em;
}
.brand {
  font-weight: 650;
  font-size: var(--step-1);
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--accent); }

main { padding-block: var(--space-l) var(--space-xl); }

.hero-mesh {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: var(--space-m);
}

.hero { margin-bottom: var(--space-l); }
.hero .lede {
  font-size: var(--step-1);
  color: var(--fg-muted);
  max-width: var(--measure);
}

section + section { margin-top: var(--space-l); }

.contact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-m);
}
.contact .mail {
  display: inline-block;
  font-size: var(--step-1);
  font-weight: 600;
  word-break: break-word;
}
.note { color: var(--fg-muted); }
.contact .note { margin-bottom: 0; }
.areas + .note { margin-top: var(--space-m); }

/* work areas grid */
.areas {
  list-style: none;
  margin: var(--space-m) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-s);
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) {
  .areas { grid-template-columns: repeat(2, 1fr); }
}
.area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-m);
}
.area h2 { font-size: var(--step-1); margin-bottom: var(--space-xs); }
.area p { color: var(--fg-muted); margin: 0; max-width: none; }

/* legal/document pages */
.doc { max-width: var(--measure); }
.doc h2 { margin-top: var(--space-l); }
.doc dl { margin: 0 0 var(--space-m); }
.doc dt { font-weight: 600; margin-top: var(--space-s); }
.doc dd { margin: 0; color: var(--fg-muted); }
.doc .updated { color: var(--fg-muted); font-size: var(--step--1); }

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

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-m);
  font-size: var(--step--1);
  color: var(--fg-muted);
}
.site-footer p { max-width: none; margin: 0 0 var(--space-xs); }
.site-footer nav a { margin-right: var(--space-s); }
.site-footer .legal-id { line-height: 1.5; }

/* ---- motion -------------------------------------------------------------- */

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