/* HAIKU. Поетична галерея
   Ідея макета: сторінка це аркуш акварельного паперу. Малюнок займає весь екран і розчиняється
   в папері, текст хайку стоїть на вільному боці малюнка. Чіткі лише літери й тонкі зелені риски. */

@font-face { font-family: "Didact Gothic"; font-weight: 400; font-display: swap;
  src: url(../fonts/didact-gothic-cyrillic-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Didact Gothic"; font-weight: 400; font-display: swap;
  src: url(../fonts/didact-gothic-cyrillic-400-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Didact Gothic"; font-weight: 400; font-display: swap;
  src: url(../fonts/didact-gothic-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: "Didact Gothic"; font-weight: 400; font-display: swap;
  src: url(../fonts/didact-gothic-latin-400-normal.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+2212, U+2215; }

:root {
  /* палітра галереї */
  --ink: #101010;        /* чорний: текст, логотип */
  --graphite: #666666;   /* графіт: другорядний текст */
  --line: #D9D9D9;       /* світло-сірий: лінії */
  --green: #A3F000;      /* зелений: лише акцент */
  --paper: #ECEAE7;      /* папір: фон */
  --dot: rgba(102, 102, 102, .38);   /* неактивна крапка: графіт на папері */

  --font: "Didact Gothic", "Century Gothic", "Futura", "Avenir Next", system-ui, sans-serif;

  --gx: clamp(20px, 4.8vw, 80px);           /* бічне поле */
  --haiku-size: clamp(21px, 1.85vw, 36px);
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  color-scheme: light;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--paper) var(--paper-grain);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
[hidden] { display: none !important; }

/* ---------- шапка ---------- */

.top {
  position: absolute; z-index: 10; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(18px, 2.1vw, 34px) var(--gx);
}

.brand { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 30px); min-width: 0; }
.brand__logo { height: clamp(22px, 2.15vw, 36px); width: auto; flex: none; display: block; }
.brand__dot { fill: var(--green); }
.brand__tag {
  display: flex; align-items: center; gap: clamp(10px, 1.2vw, 20px);
  font-size: clamp(20px, 2.1vw, 34px); letter-spacing: .2em; white-space: nowrap; line-height: 1;
}
.brand__tag::before { content: ""; width: clamp(18px, 1.9vw, 32px); height: 1.5px; background: var(--ink); }

.menu { display: flex; align-items: center; gap: clamp(16px, 2.3vw, 42px); font-size: clamp(15px, 1.2vw, 20px); white-space: nowrap; }
.menu a, .menu button { position: relative; padding: 6px 0; }
.menu a::after, .menu > button::after, .lang button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 4px;
  background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.menu a:hover::after, .menu > button:hover::after, .menu a[aria-current="page"]::after,
.lang button:hover::after, .lang button[aria-pressed="true"]::after { transform: scaleX(1); }
.menu__sep { width: 1px; height: 28px; background: var(--ink); }
.lang { display: flex; gap: clamp(14px, 1.9vw, 34px); }

/* ---------- екрани ---------- */

main { position: absolute; inset: 0; }
.view { position: absolute; inset: 0; }

/* ---------- головна: слайдер ---------- */

.slider {
  height: 100%;
  display: flex;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  outline: none;
}
.slider::-webkit-scrollbar { display: none; }
.slider.is-jump { animation: jump-in .45s ease; }
.empty { margin: auto; padding: 0 var(--gx); font-size: var(--haiku-size); color: var(--graphite); text-align: center; }
@keyframes jump-in { from { opacity: .15; } to { opacity: 1; } }

.slide {
  flex: 0 0 100%; min-width: 0; height: 100%;
  position: relative; overflow: hidden;
  scroll-snap-align: start; scroll-snap-stop: always;
}

/* Малюнок: на весь екран, притиснутий до свого боку. Білий папір малюнка зливається
   з фоном сайту (multiply), краї розчиняються маскою. */
.slide__art {
  position: absolute; inset: 0;
  container-type: size;
  display: flex; align-items: center;
  background: var(--paper) var(--paper-grain);
}
.slide--text-left .slide__art { justify-content: flex-end; }
.slide--text-right .slide__art { justify-content: flex-start; }

.slide__art img {
  display: block; flex: none;
  width: min(100cqw, calc(100cqh * var(--ar)));
  height: auto; aspect-ratio: var(--ar);
  mix-blend-mode: multiply;
  -webkit-mask-image: var(--fade-x), linear-gradient(to bottom, transparent 0, rgba(0,0,0,.16) 7%, #000 17%, #000 94%, transparent 100%);
          mask-image: var(--fade-x), linear-gradient(to bottom, transparent 0, rgba(0,0,0,.16) 7%, #000 17%, #000 94%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.slide--text-left  { --fade-x: linear-gradient(to right, transparent 0, #000 16%); }
.slide--text-right { --fade-x: linear-gradient(to left,  transparent 0, #000 16%); }

.slide__text {
  position: absolute; z-index: 2; top: 50%; transform: translateY(-56%);
  max-width: 46%;
}
.slide--text-left  .slide__text { left: clamp(56px, 6.6vw, 112px); }
/* текст праворуч: тримаємось правого краю, довгі рядки ростуть ліворуч і не лізуть під стрілку */
.slide--text-right .slide__text { left: auto; right: clamp(60px, 6vw, 104px); min-width: 26%; max-width: 46%; }

.num { margin: 0; font-size: clamp(16px, 1.32vw, 25px); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.bar { display: block; height: 5px; background: var(--green); }
.bar--s { width: clamp(34px, 2.75vw, 50px); margin-top: clamp(10px, 1.2vw, 22px); }
.bar--l { width: clamp(44px, 3.7vw, 66px); margin-top: clamp(18px, 2vw, 34px); }
.haiku { margin: clamp(22px, 2.6vw, 46px) 0 0; font-size: var(--haiku-size); line-height: 1.42; }
.haiku span { display: block; white-space: nowrap; }

/* стрілки й крапки */
.arrow {
  position: absolute; z-index: 5; top: 50%; transform: translateY(-50%);
  width: clamp(40px, 3.4vw, 56px); height: clamp(56px, 5vw, 76px);
  display: grid; place-items: center;
}
.arrow svg { width: clamp(16px, 1.5vw, 26px); height: auto; fill: none; stroke: var(--green); stroke-width: 4.5; stroke-linecap: square; transition: transform .2s ease; }
.arrow--prev { left: clamp(4px, 1.4vw, 24px); }
.arrow--next { right: clamp(4px, 1.4vw, 24px); }
.arrow--prev:hover svg { transform: translateX(-4px); }
.arrow--next:hover svg { transform: translateX(4px); }
.arrow[disabled] { visibility: hidden; }

.dots {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: clamp(22px, 4.6vh, 46px);
  display: flex; justify-content: center; align-items: center; gap: clamp(12px, 1.2vw, 20px);
  font-size: 16px; color: var(--graphite); font-variant-numeric: tabular-nums;
}
.counter { padding: 4px 14px; border-radius: 999px; background: rgba(236, 234, 231, .86); color: var(--ink); letter-spacing: .04em; }
.dots button { width: 28px; height: 28px; display: grid; place-items: center; }
.dots button::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--dot); transition: background .2s ease, transform .2s ease; }
.dots button[aria-current="true"]::before { background: var(--green); }
.dots button:hover::before { transform: scale(1.15); }

/* ---------- галерея та «про автора» ---------- */

.view--page { overflow-y: auto; padding-top: clamp(72px, 7.5vw, 120px); }
.page { max-width: 1500px; margin: 0 auto; padding: clamp(20px, 3vw, 48px) var(--gx) 96px; }
.page--narrow { max-width: 900px; }
.page__title { margin: 0 0 clamp(28px, 3.4vw, 56px); font-size: clamp(26px, 2.5vw, 42px); font-weight: 400; line-height: 1.2; }
.page__title::after { content: ""; display: block; width: 50px; height: 5px; margin-top: 16px; background: var(--green); }
.page__text { max-width: 62ch; margin: 0; font-size: clamp(17px, 1.3vw, 22px); color: var(--graphite); }
.page--wallets { max-width: 980px; margin-left: auto; margin-right: auto; }
.wallets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(20px, 2.4vw, 36px); margin-top: clamp(28px, 3vw, 48px); }
.wallet { display: grid; grid-template-columns: 148px 1fr; grid-template-areas: "qr coin" "qr net" "qr addr" "qr copy"; column-gap: 22px; align-content: start; padding: 22px; border: 1px solid var(--line); min-width: 0; }
.wallet__qr { grid-area: qr; width: 148px; height: 148px; display: block; }
.wallet__coin { grid-area: coin; margin: 0; font-size: clamp(20px, 1.5vw, 25px); line-height: 1.2; }
.wallet__coin span { color: var(--graphite); font-size: .72em; letter-spacing: .08em; margin-left: 6px; }
.wallet__net { grid-area: net; margin: 6px 0 0; font-size: 14px; letter-spacing: .04em; color: var(--graphite); }
.wallet__net b { white-space: nowrap; font-weight: 400; color: var(--ink); text-transform: uppercase; letter-spacing: .08em; }
.wallet__net--wrap b { white-space: normal; }
.wallet__addr { grid-area: addr; display: block; margin: 12px 0 0; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; color: var(--ink); overflow-wrap: anywhere; word-break: break-all; user-select: all; }
.wallet__copy { grid-area: copy; justify-self: start; display: inline-block; text-decoration: none; margin-top: 14px; padding: 8px 16px; border: 1px solid var(--ink); background: none; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.wallet__copy:hover, .wallet__copy:focus-visible, .wallet__copy.is-done { background: var(--green); border-color: var(--green); }
@media (max-width: 460px) {
  .wallet { grid-template-columns: 1fr; grid-template-areas: "coin" "net" "qr" "addr" "copy"; }
  .wallet__qr { margin-top: 16px; }
}
.page__foot { margin: clamp(48px, 6vw, 96px) 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: clamp(13px, .95vw, 15px); letter-spacing: .04em; color: var(--graphite); }
.page__body { max-width: 62ch; font-size: clamp(17px, 1.3vw, 22px); line-height: 1.6; color: var(--graphite); }
.page__body p { margin: 0 0 1.1em; }
.page__body p:first-child { color: var(--ink); }
.page__body p:last-child { margin-bottom: 0; }
.page__body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.page__body a:hover, .page__body a:focus-visible { background: var(--green); text-decoration-color: transparent; }

.page__note { max-width: 62ch; margin: 28px 0 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: clamp(16px, 1.15vw, 19px); color: var(--graphite); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(28px, 3vw, 52px) clamp(20px, 2.4vw, 40px); }
.card { display: block; min-width: 0; }
.card__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper) var(--paper-grain); border-bottom: 1px solid var(--line); }
.card__img img { display: block; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transition: transform .5s ease; }
.card:hover .card__img img { transform: scale(1.03); }
.card__num { display: block; margin-top: 14px; font-size: 15px; color: var(--graphite); font-variant-numeric: tabular-nums; }
.card__line { display: block; font-size: clamp(18px, 1.4vw, 23px); line-height: 1.35; }
.card__line::after { content: ""; display: block; width: 34px; height: 4px; margin-top: 10px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.card:hover .card__line::after, .card:focus-visible .card__line::after { transform: scaleX(1); }

/* ---------- телефон і вузькі екрани ---------- */

/* вузьке вікно: підпис переходить під логотип, меншим шрифтом */
@media (max-width: 1240px) {
  .brand { flex-direction: column; align-items: flex-start; gap: 6px; }
  .brand__tag { font-size: clamp(12px, 1.5vw, 16px); letter-spacing: .2em; }
  .brand__tag::before { display: none; }
}

@media (max-width: 860px) {
  body { display: flex; flex-direction: column; }
  .top { position: relative; flex: none; flex-wrap: wrap; gap: 10px 16px; padding: 16px var(--gx) 12px; }
  .menu { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 6px 8px; font-size: clamp(13px, 3.6vw, 15px); }
  .menu__sep { display: none; }
  .lang { position: absolute; top: 14px; right: var(--gx); gap: 20px; }
  main { position: relative; inset: auto; flex: 1; min-height: 0; }
  .view--page { padding-top: 0; }

  .slide { display: flex; flex-direction: column; overflow-y: auto; }
  .slide__art { position: relative; inset: auto; flex: none; height: 46%; min-height: 220px; container-type: normal; display: block; }
  .slide__art img {
    width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover;
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 84%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 0, #000 84%, transparent 100%);
  }
  .slide--text-left .slide__art img { object-position: 100% 50%; }
  .slide--text-right .slide__art img { object-position: 22% 50%; }
  .slide__text, .slide--text-left .slide__text, .slide--text-right .slide__text {
    position: static; transform: none; min-width: 0; max-width: none; padding: 22px var(--gx) 96px;
  }
  .haiku span { white-space: normal; }
  .arrow { top: auto; bottom: 14px; transform: none; width: 48px; height: 48px; }
  .arrow svg { width: 15px; }
  .arrow--prev { left: 8px; }
  .arrow--next { right: 8px; }
  .dots { bottom: 24px; gap: 8px; left: 60px; right: 60px; }
  .dots button { width: 22px; height: 22px; }
  .dots button::before { width: 13px; height: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .slider { scroll-behavior: auto; }
  .slider.is-jump { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
