/* =========================================================
   Лена Ткаченко — графический дизайнер
   Hand-crafted static landing, Cloudflare Pages.
   Design tokens at :root; everything below uses them.
   ========================================================= */

:root {
  /* Палитра: монохром + один акцент */
  --bg: #FAFAFA;
  --fg: #0A0A0A;
  --fg-muted: #6B6B6B;
  --line: #E5E5E5;
  --surface: #F2F2F2;
  --accent: #FF3B30;
  --accent-ink: #FAFAFA;

  /* Типографика */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Сетка / ритм */
  --container: 1280px;
  --gap: clamp(16px, 2.4vw, 32px);
  --section-y: clamp(72px, 12vw, 160px);
  --radius: 18px;
  --radius-sm: 10px;

  /* Анимации */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: .6s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Скрываем визуально, оставляем для скринридеров */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--fg); color: var(--bg);
  padding: 12px 16px; border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  letter-spacing: -.02em;
  font-size: 20px;
}
.logo__mark { line-height: 1; }
.logo__dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-7px);
}
.nav {
  display: flex;
  gap: clamp(16px, 2vw, 32px);
  margin-left: auto;
  font-weight: 500;
  font-size: 15px;
}
.nav a {
  position: relative;
  padding: 6px 0;
  color: var(--fg);
  transition: color .2s var(--ease);
}
.nav a:hover { color: var(--accent); }
.site-header__cta { margin-left: 8px; }

.burger {
  display: none;
  width: 44px; height: 44px;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  position: relative;
}
.burger span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid:hover { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn--ghost:hover { background: var(--fg); color: var(--bg); }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 18px 28px; font-size: 16px; }
.btn__arrow { transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.section-head {
  margin-bottom: clamp(40px, 6vw, 72px);
  max-width: 720px;
}
.section-head__title {
  margin-top: 16px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: .95;
  font-size: clamp(40px, 7vw, 96px);
}
.section-head__lead {
  margin-top: 20px;
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--fg-muted);
  max-width: 56ch;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: var(--section-y);
}
.hero .eyebrow { margin-bottom: 24px; }
.hero__title {
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: .92;
  font-size: clamp(44px, 9vw, 140px);
  max-width: 14ch;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
}
.hero__actions {
  margin-top: clamp(32px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero__stats {
  margin-top: clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  border-top: 1px solid var(--line);
  padding-top: clamp(24px, 3vw, 36px);
}
.hero__stats li {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero__stats strong {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
}
.hero__stats span {
  color: var(--fg-muted);
  font-size: 14px;
}

/* ---------- Works ---------- */
.works {
  padding-block: var(--section-y);
  background: var(--bg);
}
.works__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.work {
  grid-column: span 6;
}
.work--tall { grid-column: span 6; }

.work__link {
  display: block;
  outline-offset: 6px;
}
.work__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--ph, var(--surface));
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
  transition: transform .5s var(--ease);
}
.work--tall .work__media { aspect-ratio: 3 / 4; }
.work__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease), opacity .4s;
}
.work__media img.is-missing { opacity: 0; }
.work__num {
  position: absolute;
  inset-block-start: 20px;
  inset-inline-start: 24px;
  font-weight: 800;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--ph-fg, var(--fg));
  mix-blend-mode: normal;
  pointer-events: none;
  transition: opacity .3s;
}
.work__media:has(img:not(.is-missing)) .work__num { opacity: 0; }
.work__link:hover .work__media { transform: translateY(-4px); }
.work__link:hover .work__media img { transform: scale(1.03); }

.work__title {
  font-size: clamp(20px, 1.6vw, 24px);
  font-weight: 600;
  letter-spacing: -.01em;
}
.work__meta {
  margin-top: 4px;
  color: var(--fg-muted);
  font-size: 14px;
}

.works__more {
  margin-top: clamp(40px, 5vw, 64px);
  display: flex;
  justify-content: center;
}

/* ---------- Services ---------- */
.services {
  padding-block: var(--section-y);
  background: var(--fg);
  color: var(--bg);
}
.services .eyebrow { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.services .section-head__title { color: var(--bg); }
.services__list {
  border-top: 1px solid color-mix(in srgb, var(--bg) 15%, transparent);
}
.service {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(24px, 3.5vw, 40px) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 15%, transparent);
  transition: padding-inline .4s var(--ease), background .3s var(--ease);
}
.service:hover {
  padding-inline: clamp(8px, 1.5vw, 24px);
  background: color-mix(in srgb, var(--bg) 4%, transparent);
}
.service__num {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .14em;
  color: color-mix(in srgb, var(--bg) 50%, transparent);
}
.service__body h3 {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.service__body p {
  margin-top: 10px;
  max-width: 58ch;
  color: color-mix(in srgb, var(--bg) 70%, transparent);
  font-size: clamp(15px, 1.1vw, 17px);
}
.service__arrow {
  font-size: clamp(28px, 3vw, 40px);
  color: var(--accent);
  transition: transform .3s var(--ease);
}
.service:hover .service__arrow { transform: translate(6px, -6px); }

/* ---------- About ---------- */
.about {
  padding-block: var(--section-y);
}
.about__grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.about__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--fg);
  border-radius: var(--radius);
  overflow: hidden;
}
.about__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .4s;
}
.about__media img.is-missing { opacity: 0; }
.about__media-label {
  position: absolute;
  inset-block-end: 16px;
  inset-inline-start: 20px;
  color: color-mix(in srgb, var(--bg) 40%, transparent);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  pointer-events: none;
}
.about__media:has(img:not(.is-missing)) .about__media-label { display: none; }

.about__text .section-head__title {
  margin-top: 16px;
  font-size: clamp(36px, 5vw, 64px);
}
.about__text p {
  margin-top: 20px;
  max-width: 56ch;
  font-size: clamp(16px, 1.2vw, 19px);
}
.about__list {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
.about__list li {
  position: relative;
  padding-left: 22px;
  font-weight: 500;
}
.about__list li::before {
  content: "";
  position: absolute;
  left: 0; top: .65em;
  width: 10px; height: 2px;
  background: var(--accent);
}

/* ---------- Contact ---------- */
.contact {
  padding-block: var(--section-y);
  background: var(--surface);
}
.contact__grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact__intro .section-head__title {
  margin-top: 16px;
  font-size: clamp(36px, 5vw, 72px);
}
.contact__lead {
  margin-top: 20px;
  color: var(--fg-muted);
  max-width: 40ch;
  font-size: clamp(15px, 1.1vw, 17px);
}
.socials {
  margin-top: clamp(28px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-weight: 500;
  font-size: 14px;
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.socials a:hover {
  border-color: var(--fg);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ---------- Form ---------- */
.form {
  display: grid;
  gap: 18px;
  background: var(--bg);
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.form__honeypot {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
.field {
  display: grid;
  gap: 8px;
}
.field__label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--fg-muted);
}
.field__label em {
  font-style: normal;
  color: color-mix(in srgb, var(--fg-muted) 80%, transparent);
}
.field__input {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field__input:hover { border-color: color-mix(in srgb, var(--fg) 40%, var(--line)); }
.field__input:focus {
  outline: none;
  border-color: var(--fg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.field__input--area {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}
.form__submit {
  justify-self: start;
  margin-top: 6px;
}
.form__submit[disabled] { opacity: .55; cursor: not-allowed; }
.form__status {
  min-height: 22px;
  font-size: 14px;
  color: var(--fg-muted);
}
.form__status.is-ok { color: #1B7A2E; }
.form__status.is-error { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(28px, 3vw, 48px);
  font-size: 14px;
  color: var(--fg-muted);
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer__up:hover { color: var(--accent); }

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Focus ring ---------- */
a:focus-visible, button:focus-visible, .field__input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}
.field__input:focus-visible { outline: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about__grid,
  .contact__grid { grid-template-columns: 1fr; }
  .service { grid-template-columns: 56px 1fr auto; }
  .works__grid > .work,
  .works__grid > .work--tall { grid-column: span 6; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .site-header__cta { display: none; }
  .burger { display: inline-block; }

  .nav.is-open {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
  }
  .nav.is-open a {
    padding: 14px clamp(20px, 4vw, 56px);
    border-top: 1px solid var(--line);
    font-size: 17px;
  }

  .works__grid > .work,
  .works__grid > .work--tall { grid-column: span 12; }
  .work__media { aspect-ratio: 4 / 3; }

  .hero__stats { grid-template-columns: 1fr; gap: 16px; }
  .hero__stats li { flex-direction: row; align-items: baseline; gap: 12px; }

  .about__list { grid-template-columns: 1fr; }
  .service { grid-template-columns: 1fr; }
  .service__num { font-size: 13px; }
  .service__arrow { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
