/* ==========================================================================
   Alveris Systems — site styles
   Zero dependencies. System font stack. Light + dark.
   ========================================================================== */

:root {
  --bg:        #fbfbfa;
  --surface:   #ffffff;
  --fg:        #14161a;
  --muted:     #5c6270;
  --line:      #e4e6ea;
  --line-soft: #eef0f3;
  --accent:    #17324d;
  --accent-hi: #2a5f8f;
  --ring:      rgba(23, 50, 77, .28);

  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1000px;

  --step--1: clamp(.8125rem, .79rem + .11vw, .875rem);
  --step-0:  clamp(1rem, .97rem + .15vw, 1.0625rem);
  --step-1:  clamp(1.125rem, 1.07rem + .28vw, 1.3125rem);
  --step-2:  clamp(1.375rem, 1.26rem + .56vw, 1.75rem);
  --step-3:  clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --step-4:  clamp(2.25rem, 1.65rem + 2.6vw, 3.75rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0d0f12;
    --surface:   #14171c;
    --fg:        #e9ebee;
    --muted:     #98a0ac;
    --line:      #232830;
    --line-soft: #1a1e24;
    --accent:    #9dc4e8;
    --accent-hi: #c2dcf3;
    --ring:      rgba(157, 196, 232, .32);
  }
}

/* ---------- reset ---------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", "PingFang SC",
               "Microsoft YaHei", sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--fg);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -.015em;
  font-size: var(--step-0);
}

.brand-mark { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: var(--step--1);
  color: var(--muted);
}

.nav a {
  transition: color .18s ease;
}
.nav a:hover { color: var(--fg); }

.nav-cta {
  color: var(--fg);
  font-weight: 550;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  transition: border-color .18s ease, transform .18s ease;
}
.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

@media (max-width: 620px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(64px, 11vw, 132px) clamp(56px, 8vw, 96px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 72%);
  opacity: .8;
  pointer-events: none;
}

.hero .wrap { position: relative; }

.eyebrow {
  font-size: var(--step--1);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 650;
  max-width: 17ch;
}

.hero h1 .thin {
  color: var(--muted);
  font-weight: 400;
}

.lede {
  margin-top: 26px;
  max-width: 56ch;
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--muted);
}

.lede.small {
  font-size: var(--step-0);
  margin-top: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: -.005em;
  transition: transform .18s ease, background-color .18s ease,
              border-color .18s ease, color .18s ease, box-shadow .18s ease;
  will-change: transform;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hi);
  border-color: var(--accent-hi);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px var(--ring);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--fg);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
  .btn-primary { color: #0d0f12; }
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 34px;
  font-size: var(--step--1);
  color: var(--muted);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34a853;
  box-shadow: 0 0 0 3px rgba(52, 168, 83, .16);
  flex: none;
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line-soft);
}

.section-alt {
  background: linear-gradient(180deg, transparent, var(--surface) 40%, transparent);
}

.section-title {
  font-size: var(--step--1);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 34px;
}

/* ---------- cards ---------- */

.grid-3 {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -28px var(--ring);
}

.card-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--accent);
  margin-bottom: 20px;
}

.card h3 {
  font-size: var(--step-1);
  font-weight: 620;
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.7;
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  padding: 24px 0;
  border-top: 1px solid var(--line-soft);
}

.steps li:first-child { border-top: 0; padding-top: 0; }
.steps li:last-child { padding-bottom: 0; }

.step-num {
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: .06em;
  padding-top: 3px;
}

.steps h3 {
  font-size: var(--step-1);
  font-weight: 620;
  margin-bottom: 8px;
}

.steps p {
  color: var(--muted);
  font-size: var(--step--1);
  max-width: 58ch;
}

/* ---------- contact ---------- */

.contact {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

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

.contact .section-title { margin-bottom: 12px; }

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

@media (max-width: 720px) {
  .contact-actions { align-items: stretch; }
}

.mailto {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--step-1);
  font-weight: 560;
  letter-spacing: -.015em;
  padding: 14px 22px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
  word-break: break-all;
}

.mailto:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.mailto svg { flex: none; opacity: .6; transition: opacity .2s ease, transform .2s ease; }
.mailto:hover svg { opacity: 1; transform: translate(2px, -2px); }

.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 30px;
  font-size: var(--step--1);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
}

.footer-links { display: inline-flex; gap: 10px; align-items: center; }
.footer-links a { transition: color .18s ease; }
.footer-links a:hover { color: var(--fg); }

/* ---------- hero layout + art ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}

.hero-copy { min-width: 0; }

.hero-art {
  position: relative;
  min-width: 0;
}

.hero-art picture { display: block; }

.hero-art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

/* On dark backgrounds the light artwork is inverted so it reads as line-work */
@media (prefers-color-scheme: dark) {
  .hero-art img {
    filter: invert(1) hue-rotate(180deg);
    opacity: .5;
    mix-blend-mode: screen;
  }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}

/* ---------- reveal on scroll ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .6s cubic-bezier(.22,.61,.36,1),
                transform .6s cubic-bezier(.22,.61,.36,1);
  }
  .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

/* ---------- print ---------- */

@media print {
  .site-header, .hero-actions, .availability, .site-footer { display: none; }
  body { background: #fff; color: #000; }
  .card { border-color: #ccc; }
}
