/* Атомэкспертсервис — концепция C: чёрный фон, белые линии, один оранжевый акцент */

@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap; src: url("../fonts/manrope-c9a5f13c.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap; src: url("../fonts/manrope-81401990.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Prata"; font-weight: 400; font-display: swap; src: url("../fonts/prata-d06632dc.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Prata"; font-weight: 400; font-display: swap; src: url("../fonts/prata-c9c5f384.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-weight: 100 900; font-display: swap; src: url("../fonts/geist-mono-44e03052.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist Mono"; font-weight: 100 900; font-display: swap; src: url("../fonts/geist-mono-013b2f2f.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #060708;
  --bg-2: #0c0e0f;
  --ink: #e9ece9;
  --ink-2: #b3b9b5;
  --muted: #7c837f;
  --line: #ffffff17;
  --line-2: #ffffff2e;
  --accent: #ff6a2b;
  --serif: "Prata", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; text-wrap: pretty; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
ul, ol { margin: 0; padding: 0; list-style: none; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.eyebrow, .num, .who { font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.num { color: var(--accent); }
.lead { font-size: 17px; line-height: 1.65; color: var(--ink-2); max-width: 46ch; }

/* кнопки */
.btn { display: inline-flex; align-items: center; gap: 12px; height: 48px; padding: 0 22px; border-radius: 999px; font: 600 14px var(--sans); white-space: nowrap; transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease); }
.btn span { transition: transform .4s var(--ease); }
.btn:hover span { transform: translateX(3px); }
.btn-accent { background: var(--accent); color: #140701; }
.btn-accent:hover { background: #ff8550; }
.btn-line { border: 1px solid var(--line-2); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }

/* 3D-холст */
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; z-index: 0; opacity: 1; transition: opacity .3s; touch-action: pan-y; }
#scene.drag { cursor: grabbing; }
.no-webgl #scene { display: none; }

/* шапка */
.site-header { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 32px; padding: 18px var(--pad); transition: background .5s var(--ease), border-color .5s; border-bottom: 1px solid transparent; }
.site-header.solid { background: #060708e6; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font: 600 14px/1.1 var(--sans); letter-spacing: .03em; }
/* логотип: шестиугольная «монета» вращается вокруг вертикальной оси,
   на обеих сторонах надпись АЭКС читается правильно */
.logo { position: relative; flex: none; width: 36px; height: 41px; perspective: 260px; }
.logo-coin { position: absolute; inset: 0; transform-style: preserve-3d; animation: coin-spin 7s linear infinite; }
.brand:hover .logo-coin { animation-duration: 2.2s; }
.logo-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.logo-back { transform: rotateY(180deg); }
.logo svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 3px #7b8cffcc) drop-shadow(0 0 9px #5a6cf099); }
@keyframes coin-spin { to { transform: rotateY(360deg); } }
.brand small { display: block; margin-top: 4px; font: 500 10px var(--mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.site-nav { display: flex; gap: 28px; margin-left: auto; font-size: 14px; color: var(--ink-2); }
.site-nav a { position: relative; transition: color .3s; }
.site-nav a:hover { color: var(--ink); }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.site-nav a:hover::after { transform: scaleX(1); }
.header-cta { height: 42px; }
.menu-toggle { display: none; }

/* первый экран */
.hero { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px var(--pad) 80px; pointer-events: none; }
.hero-copy { max-width: 600px; pointer-events: auto; }
.hero h1 { font-size: clamp(54px, 7vw, 112px); line-height: .94; margin: 20px 0 28px; }
.hero-actions { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.hero-fallback { display: none; }
.no-webgl .hero-fallback { display: block; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 62%; opacity: .85; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
.readout { position: fixed; right: var(--pad); top: 110px; z-index: 2; text-align: right; font: 500 11px/1.8 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); transition: opacity .8s; pointer-events: none; }
.readout b { color: var(--ink); font-weight: 500; }
.readout.done, .no-webgl .readout { opacity: 0; }
.hint { position: absolute; left: 0; right: 0; bottom: 28px; text-align: center; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); opacity: 0; transition: opacity .8s; }
.hint.show { opacity: 1; }
.hint-touch { display: none; }
@media (pointer: coarse) { .hint-desk { display: none; } .hint-touch { display: inline; } }

/* лупа: кольцо и короткие риски */
.lens { position: fixed; left: 0; top: 0; z-index: 15; pointer-events: none; opacity: 0; }
.lens .ring { position: absolute; transform: translate(-50%, -50%); border: 1px solid var(--accent); border-radius: 50%; }
.lens .ring::before, .lens .ring::after { content: ""; position: absolute; background: var(--accent); }
.lens .ring::before { left: 50%; width: 1px; top: -9px; bottom: -9px; transform: translateX(-50%);
  -webkit-mask: linear-gradient(#000 0 6px, transparent 6px calc(100% - 6px), #000 calc(100% - 6px)); mask: linear-gradient(#000 0 6px, transparent 6px calc(100% - 6px), #000 calc(100% - 6px)); }
.lens .ring::after { top: 50%; height: 1px; left: -9px; right: -9px; transform: translateY(-50%);
  -webkit-mask: linear-gradient(90deg, #000 0 6px, transparent 6px calc(100% - 6px), #000 calc(100% - 6px)); mask: linear-gradient(90deg, #000 0 6px, transparent 6px calc(100% - 6px), #000 calc(100% - 6px)); }

/* этапы жизненного цикла */
.story { position: relative; z-index: 1; pointer-events: none; }
.stage { height: 130vh; padding: 0 var(--pad); display: flex; }
.stage[data-side="right"] { justify-content: flex-end; }
.stage-card { position: sticky; top: 0; height: 100vh; max-width: 440px; display: flex; flex-direction: column; justify-content: center; opacity: .12; transition: opacity .8s var(--ease); pointer-events: none; }
/* кликабельна только активная карточка, иначе бледные соседние перехватывают клики по 3D */
.stage.active .stage-card { opacity: 1; }
.stage.active .stage-card > * { pointer-events: auto; }
.stage-card h2 { font-size: clamp(34px, 3.8vw, 56px); line-height: 1.02; margin: 14px 0 18px; }
.stage-card > p:not(.num):not(.who) { color: var(--ink-2); margin-bottom: 20px; }
.stage-card ul { border-top: 1px solid var(--line-2); }
.stage-card li { border-bottom: 1px solid var(--line); padding: 12px 0; font-size: 15px; }
.stage-card .who { margin-top: 18px; }
.no-webgl .story { display: none; }

/* общие секции после истории */
.services, .approach, .leader, .audience, .contact, .site-footer { position: relative; z-index: 1; background: var(--bg); }
.services, .approach, .audience { padding: 140px var(--pad); }
.section-head { margin-bottom: 64px; max-width: 900px; }
.section-head h2 { font-size: clamp(42px, 5vw, 80px); line-height: 1; margin-top: 16px; }
.section-head h2 em { display: block; }
.section-head .lead { margin-top: 26px; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* услуги */
.service-list { border-top: 1px solid var(--line-2); }
.service { display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 26vw, 380px); gap: clamp(28px, 4vw, 64px); padding: 36px 0; border-bottom: 1px solid var(--line); align-items: start; }
.service > div { display: grid; grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1fr); column-gap: clamp(20px, 3vw, 48px); align-items: start; }
.service .num { padding-top: 12px; }
.service img { grid-column: 2; grid-row: 1; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: saturate(.7) contrast(1.05); border-radius: 4px; opacity: .85; transition: opacity .6s var(--ease), filter .6s var(--ease); }
.service:hover img { opacity: 1; filter: saturate(.9) contrast(1.05); }
.service h3 { font: 400 clamp(28px, 2.6vw, 42px)/1.05 var(--serif); margin: 0 0 14px; grid-column: 2; }
.service p:not(.num) { color: var(--ink-2); max-width: 46ch; grid-column: 2; }
.service ul { grid-column: 3; grid-row: 1 / span 2; padding-top: 10px; display: grid; gap: 8px; }
.service li { padding-left: 22px; position: relative; font-size: 15px; }
.service li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1px; background: var(--accent); }


/* подход */
.approach { border-top: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-2); counter-reset: s; }
.steps li { padding: 28px 28px 0 0; border-right: 1px solid var(--line); min-height: 230px; }
.steps li + li { padding-left: 28px; }
.steps li:last-child { border-right: 0; }
.steps span { font: 500 12px var(--mono); color: var(--accent); letter-spacing: .12em; }
.steps h3 { font: 400 30px/1.1 var(--serif); margin: 18px 0 12px; }
.steps p { color: var(--ink-2); font-size: 15px; }

/* руководитель */
.leader { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 110px); align-items: center; padding: 140px var(--pad); border-top: 1px solid var(--line); }
.leader figure { margin: 0; }
.leader img { width: 100%; max-height: 720px; object-fit: cover; object-position: 60% 40%; filter: grayscale(.4) contrast(1.05); border-radius: 4px; }
.leader h2 { font-size: clamp(40px, 4.6vw, 72px); line-height: 1; margin: 18px 0 26px; }
.leader h2 em { display: block; }
.sign { margin-top: 40px; padding-left: 20px; border-left: 2px solid var(--accent); color: var(--muted); font-size: 14px; }
.sign b { display: block; color: var(--ink); font-size: 19px; font-weight: 600; margin-bottom: 4px; }

/* аудитории */
.audience { border-top: 1px solid var(--line); }
.audience-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.audience-grid article { position: relative; aspect-ratio: 4 / 5.4; overflow: hidden; background: var(--bg); }
.audience-grid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; filter: saturate(.7); transition: opacity .9s var(--ease), transform 1.2s var(--ease); }
.audience-grid article:hover img { opacity: .85; transform: scale(1.04); }
.audience-grid article::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, #060708f2); }
.audience-grid div { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 26px; }
.audience-grid h3 { font: 400 26px/1.1 var(--serif); margin-bottom: 10px; }
.audience-grid p { color: var(--ink-2); font-size: 14px; }

/* контакты */
.contact { min-height: 100vh; display: flex; align-items: center; padding: 140px var(--pad); overflow: hidden; border-top: 1px solid var(--line); }
.contact > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; filter: saturate(.6); }
.contact::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #060708 15%, #060708b3 55%, #06070833); }
.contact-inner { position: relative; z-index: 1; max-width: 720px; }
.contact h2 { font-size: clamp(46px, 6vw, 96px); line-height: .98; margin: 20px 0 36px; }
.contact-list { margin: 0 0 36px; display: grid; gap: 14px; }
.contact-list div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.contact-list dt { font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.contact-list dd { margin: 0; font-size: 19px; }
.contact-list a:hover { color: var(--accent); }
.contact-pending { color: var(--muted); margin-bottom: 32px; }
.contact-pending[hidden] { display: none; }

/* подвал */
.site-footer { display: grid; grid-template-columns: 1fr 1fr auto; gap: 48px; padding: 64px var(--pad) 32px; border-top: 1px solid var(--line); }
.site-footer > p { color: var(--muted); max-width: 40ch; font-size: 14px; }
.site-footer nav { display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.site-footer nav a:hover { color: var(--accent); }
.footer-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.fps { position: fixed; right: 12px; bottom: 12px; z-index: 99; font: 500 12px var(--mono); background: #000c; color: #9f9; padding: 6px 10px; border-radius: 4px; }

/* планшеты */
@media (max-width: 1100px) {
  .site-nav { gap: 20px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(2) { border-right: 0; }
  .steps li:nth-child(3) { padding-left: 0; }
  .audience-grid { grid-template-columns: 1fr 1fr; }
}

/* телефоны */
@media (max-width: 800px) {
  body { font-size: 15px; }
  .site-header { padding: 14px 16px; gap: 12px; }
  .brand span { font-size: 12px; }
  .brand small { display: none; }
  .header-cta { display: none; }
  .menu-toggle { display: grid; place-content: center; gap: 6px; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; background: transparent; cursor: pointer; }
  .menu-toggle i { display: block; width: 16px; height: 1px; background: var(--ink); transition: transform .3s; }
  .menu-open .menu-toggle i:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-open .menu-toggle i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .site-nav { position: fixed; inset: 72px 12px auto; flex-direction: column; gap: 4px; padding: 12px; background: #0c0e0ff5; border: 1px solid var(--line-2); border-radius: 14px; font-size: 17px; opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .3s, transform .3s; }
  .site-nav a { padding: 12px 10px; }
  .site-nav a::after { display: none; }
  .menu-open .site-nav { opacity: 1; pointer-events: auto; transform: none; }
  .menu-open { background: #060708f2; }

  .hero { align-items: flex-end; padding: 0 16px 72px; }
  .hero h1 { font-size: clamp(44px, 13vw, 64px); margin: 14px 0 18px; }
  .hero .lead { font-size: 15px; }
  .hero-actions { margin-top: 24px; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .readout { top: 86px; right: 16px; }
  .hint { bottom: 14px; font-size: 10px; }
  .no-webgl .hero-fallback { position: absolute; top: 90px; transform: none; width: 100%; -webkit-mask-image: none; mask-image: none; }

  /* телефон: 3D занимает верх экрана, текст этапа — отдельный блок ниже, этапы переключаются целиком */
  .stage { display: block; height: auto; min-height: 92svh; padding: 50svh 0 2svh; }
  .stage-card { position: relative; height: auto; max-width: none; display: block; padding: 26px 16px 30px;
    background: linear-gradient(#06070800, #060708 28px); opacity: 1; }
  .stage-card > * { opacity: .3; transition: opacity .6s var(--ease); }
  .stage.active .stage-card > * { opacity: 1; }
  .stage-card h2 { font-size: 30px; margin: 10px 0 12px; }
  .stage-card > p:not(.num):not(.who) { font-size: 15px; margin-bottom: 16px; }
  .stage-card li { padding: 9px 0; font-size: 14px; }

  .services, .approach, .audience, .leader, .contact { padding: 90px 16px; }
  .section-head { margin-bottom: 40px; }
  .service { grid-template-columns: 1fr; gap: 20px; padding: 28px 0; }
  .service > div { grid-template-columns: 1fr; }
  .service > div > * { grid-column: 1 !important; grid-row: auto !important; }
  .service img { grid-column: 1; grid-row: 1; }
  .service ul { padding-top: 16px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; }
  .leader { grid-template-columns: 1fr; }
  .leader img { max-height: 520px; }
  .audience-grid { grid-template-columns: 1fr; }
  .audience-grid article { aspect-ratio: 4 / 3.6; }
  .contact-list div { grid-template-columns: 1fr; gap: 4px; }
  .site-footer { grid-template-columns: 1fr; gap: 28px; }
  .footer-meta { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-coin { animation: none; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}
