/* Denis Bambizov — portfolio. Business style: ink, paper, one strong blue. */
:root {
  --ink: #0b0f17;
  --ink-2: #1a2130;
  --text: #121620;
  --text-2: #4c5466;
  --text-3: #8a91a1;
  --paper: #f5f4f0;
  --white: #ffffff;
  --line: rgba(18, 22, 32, .1);
  --line-dark: rgba(255, 255, 255, .12);
  --on-ink: #eef1f7;
  --on-ink-2: rgba(238, 241, 247, .66);
  --accent: #2f5bff;
  --accent-2: #6d8bff;
  --accent-ink: #ffffff;
  --f-sans: "Onest", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--white); color: var(--text); font: 400 17px/1.6 var(--f-sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
::selection { background: var(--accent); color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 500 12.5px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.eyebrow--light { color: var(--accent-2); }
.h2 { margin: 0 0 18px; font-weight: 600; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.06; letter-spacing: -.03em; }
.h2 em, .hero__title em, .contact__title em { font-style: normal; color: var(--accent); }
.section--ink .h2 em, .hero__title em, .contact__title em { color: var(--accent-2); }
.head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.head__sub { margin: 0; max-width: 60ch; font-size: 18px; color: var(--text-2); }
.section--ink .head__sub { color: var(--on-ink-2); }

/* ---------- buttons ---------- */
.btn { --h: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--h); padding: 0 22px; border-radius: 12px; font-size: 15.5px; font-weight: 600; white-space: nowrap; transition: transform .35s var(--ease), background .25s, box-shadow .35s var(--ease), border-color .25s; }
.btn--sm { --h: 42px; padding: 0 16px; font-size: 14.5px; border-radius: 10px; }
.btn--lg { --h: 56px; padding: 0 26px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 14px 30px -14px rgba(47, 91, 255, .75); }
.btn--accent:hover { transform: translateY(-2px); background: #2249e6; }
.btn--ghost { border: 1px solid var(--line-dark); color: var(--on-ink); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, .4); }
.btn--line { border: 1px solid var(--line); background: var(--white); }
.btn--line:hover { border-color: var(--text); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 16px var(--gutter); color: var(--on-ink); transition: background .3s, padding .3s, box-shadow .3s, color .3s; }
.nav.is-scrolled { padding-block: 10px; background: rgba(255, 255, 255, .92); color: var(--text); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
html.lite .nav.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: .14em; white-space: nowrap; }
.mark__logo { width: 30px; height: 30px; flex: none; border-radius: 9px; box-shadow: 0 6px 16px -8px rgba(47, 91, 255, .8); }
.nav__links { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.nav__links a { opacity: .78; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }
.nav__right { display: flex; align-items: center; gap: 10px; }
.lang { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 8px 0 12px; border: 1px solid var(--line-dark); border-radius: 10px; }
.nav.is-scrolled .lang { border-color: var(--line); }
.lang select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; padding: 0 4px; font-size: 14px; font-weight: 600; cursor: pointer; }
.lang select option { color: var(--text); }
.nav__burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line-dark); border-radius: 10px; place-items: center; }
.nav.is-scrolled .nav__burger { border-color: var(--line); }
.nav__burger span { display: block; width: 18px; height: 1.6px; margin: 2.5px auto; background: currentColor; transition: transform .3s; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: var(--on-ink); padding: clamp(120px, 15vh, 170px) 0 clamp(70px, 9vw, 110px); }
.hero__glow { position: absolute; inset: 0; background: radial-gradient(60% 70% at 78% 40%, rgba(47, 91, 255, .32), transparent 70%), radial-gradient(40% 50% at 10% 100%, rgba(109, 139, 255, .14), transparent 70%); pointer-events: none; }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.hero__copy { position: relative; z-index: 2; }
.hero__title { margin: 0 0 22px; font-weight: 700; font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; letter-spacing: -.035em; }
.hero__sub { margin: 0 0 32px; max-width: 54ch; font-size: clamp(16.5px, 1.4vw, 19px); color: var(--on-ink-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 18px 34px; margin: 44px 0 0; padding-top: 26px; border-top: 1px solid var(--line-dark); }
.stats div { min-width: 0; }
.stats dt { font-weight: 700; font-size: 26px; letter-spacing: -.02em; line-height: 1.1; }
.stats dd { margin: 4px 0 0; font-size: 13.5px; color: var(--on-ink-2); max-width: 15ch; }

/* tilted wall of work: transform-only animation, paused for weak devices / reduced motion */
.wall { position: relative; height: 620px; margin-right: calc(-1 * var(--gutter)); perspective: 1400px; -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent); }
.wall__tilt { position: absolute; inset: -10% -30% -10% 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; transform: rotateX(18deg) rotateY(-22deg) rotateZ(8deg); transform-origin: 30% 50%; }
.wall__col { overflow: hidden; }
.wall__track { display: grid; gap: 16px; animation: wall-up 60s linear infinite; will-change: transform; }
.wall__col--down .wall__track { animation-name: wall-down; animation-duration: 70s; }
.wall img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 10px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .7); }
@keyframes wall-up { to { transform: translateY(-50%); } }
@keyframes wall-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }
html.lite .wall__track { animation: none; }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: var(--on-ink); }

/* work grid */
.works { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 18px; }
.work { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.work:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: var(--radius); }
.work__media { position: relative; padding: 12px 12px 0; border-radius: var(--radius); background: var(--paper); overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.work:hover .work__media { transform: translateY(-4px); box-shadow: 0 30px 50px -30px rgba(18, 22, 32, .35); }
.work__media .browser { margin: 0; }
.work__phone { position: absolute; right: 10px; bottom: -30px; width: 25%; }
.work__body { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.work__body h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.work__body p { margin: 2px 0 0; font-size: 14.5px; color: var(--text-2); }
.work__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; font: 500 11.5px/1.5 var(--f-mono); color: var(--text-2); }
.work__go { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; transition: background .25s, color .25s, border-color .25s; }
.work:hover .work__go { background: var(--accent); border-color: var(--accent); color: #fff; }
.work--featured { grid-column: span 2; grid-row: span 2; }
.work--featured .work__media { flex: 1; display: flex; flex-direction: column; }
.work--featured .browser { flex: 1; display: flex; flex-direction: column; }
.work--featured .browser img { flex: 1; min-height: 0; aspect-ratio: auto; object-fit: cover; object-position: left top; }
.work--featured .work__phone { width: 20%; bottom: -60px; }

/* frames */
.browser { position: relative; margin: 0; overflow: hidden; border-radius: 10px 10px 0 0; background: #fff; box-shadow: 0 1px 0 var(--line), 0 18px 40px -26px rgba(18, 22, 32, .45); }
.browser__bar { display: flex; gap: 6px; padding: 9px 12px; background: #eceae4; }
.browser__bar i { width: 8px; height: 8px; border-radius: 50%; background: #c9c5bb; }
.browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.phone { margin: 0; padding: 6px; border-radius: 26px; background: #0b0f17; box-shadow: 0 24px 40px -22px rgba(0, 0, 0, .6); }
.phone img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 21px; }

/* booking flow */
.flow { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; margin: 0; padding: 0; }
.flow .phone { margin-bottom: 18px; }
.flow__n { display: block; margin-bottom: 6px; font: 500 12.5px var(--f-mono); color: var(--accent-2); }
.flow h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.flow p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--on-ink-2); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: clamp(40px, 5vw, 60px) 0 0; padding: 0; }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line-dark); border-radius: 999px; font-size: 14.5px; }
.chips .ico { color: var(--accent-2); }

/* services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.svc { padding: clamp(24px, 3vw, 36px); background: var(--white); }
.svc__ico { width: 38px; height: 38px; margin-bottom: 18px; color: var(--accent); }
.svc h3 { margin: 0 0 8px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.svc p { margin: 0; font-size: 15.5px; color: var(--text-2); }

/* process */
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin: 0; padding: 0; counter-reset: s; }
.steps li { position: relative; padding: 22px 20px 24px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.steps__n { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 16px; border-radius: 10px; background: var(--ink); color: #fff; font: 500 14px var(--f-mono); }
.steps li:first-child .steps__n { background: var(--accent); }
.steps h3 { margin: 0 0 6px; font-size: 17.5px; font-weight: 600; }
.steps p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }

/* pricing */
.pricing { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: stretch; }
.price { display: flex; flex-direction: column; padding: clamp(26px, 3.4vw, 42px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
.price:first-child { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.price__label { margin: 0; font: 500 12.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.price:first-child .price__label { color: var(--accent-2); }
.price__amount { margin: 12px 0 6px; line-height: 1; }
.price__amount small { font-size: 18px; color: var(--on-ink-2); }
.price__amount b { font-size: clamp(54px, 6vw, 76px); font-weight: 700; letter-spacing: -.04em; }
.price__note { margin: 0 0 22px; font-size: 14.5px; color: var(--on-ink-2); }
.price--addons .price__note { margin: auto 0 0; color: var(--text-2); }
.ticks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-size: 15.5px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 6px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center/14px no-repeat; }
.price .btn { margin-top: auto; }
.addons { list-style: none; margin: 18px 0 24px; padding: 0; display: grid; gap: 4px; }
.addons li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 500; }
.addons .ico { color: var(--accent); }

/* faq */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 18px; font-weight: 600; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; flex: none; font-weight: 400; font-size: 24px; line-height: 1; color: var(--accent); transition: transform .3s var(--ease); }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa p { margin: -4px 0 20px; max-width: 62ch; color: var(--text-2); }

/* contact */
.contact { position: relative; overflow: hidden; background: var(--ink); color: var(--on-ink); padding: clamp(90px, 12vw, 150px) 0; text-align: center; }
.contact::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 70% at 50% 0%, rgba(47, 91, 255, .35), transparent 70%); }
.contact__inner { position: relative; }
.contact .eyebrow { justify-content: center; }
.contact__title { margin: 0 0 16px; font-weight: 700; font-size: clamp(38px, 6vw, 80px); line-height: 1.02; letter-spacing: -.035em; }
.contact__sub { margin: 0 auto 32px; max-width: 52ch; font-size: 18px; color: var(--on-ink-2); }
.contact__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact__where { margin: 26px 0 0; font-size: 14.5px; color: var(--on-ink-2); }

.foot { background: var(--ink); color: var(--on-ink-2); border-top: 1px solid var(--line-dark); font-size: 14px; }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); }
.mark--light { color: var(--on-ink); }

/* lightbox */
.lightbox { width: min(1200px, 100vw - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px; background: var(--paper); color: var(--text); overflow: auto; }
.lightbox::backdrop { background: rgba(11, 15, 23, .82); }
.lightbox__x { position: sticky; top: 12px; float: right; z-index: 2; margin: 12px 12px 0 0; width: 44px; height: 44px; border-radius: 50%; background: var(--white); font-size: 26px; line-height: 1; box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .3); }
.lightbox__stage { display: grid; grid-template-columns: 1fr 230px; gap: 24px; align-items: end; padding: 28px 28px 0; }
.lightbox__stage .browser img { aspect-ratio: auto; }
.lightbox__cap { margin: 0; padding: 18px 28px 26px; font-weight: 600; }
.lightbox__cap span { display: block; font-weight: 400; font-size: 14.5px; color: var(--text-2); }

/* reveal */
html.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* chinese */
html[lang^="zh"] .hero__title, html[lang^="zh"] .h2, html[lang^="zh"] .contact__title { letter-spacing: 0; line-height: 1.2; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav__links { gap: 18px; font-size: 14.5px; }
  .flow { grid-template-columns: repeat(5, minmax(200px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .flow::-webkit-scrollbar { display: none; }
  .flow li { scroll-snap-align: start; }
  .steps { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .nav__links { position: fixed; inset: 0 0 auto; z-index: -1; flex-direction: column; gap: 0; margin: 0; padding: 76px var(--gutter) 20px; background: #fff; color: var(--text); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .3); transform: translateY(-110%); transition: transform .4s var(--ease); }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; opacity: 1; }
  .nav.is-open .nav__links { transform: none; }
  .nav.is-open { color: var(--text); }
  .nav__burger { display: grid; }
  .nav__right { margin-left: auto; }
  .hero__grid { grid-template-columns: 1fr; }
  .wall { height: 320px; margin: 10px calc(-1 * var(--gutter)) 0; }
  .wall__tilt { inset: -20% -10% -20% -10%; }
  .works { grid-template-columns: repeat(2, 1fr); }
  .work--featured { grid-row: auto; }
  .work--featured .browser img { aspect-ratio: 16 / 10; flex: none; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .pricing, .faq { grid-template-columns: 1fr; }
  .lightbox__stage { grid-template-columns: 1fr; }
  .lightbox__stage .phone--lb { width: min(260px, 70%); margin: 0 auto; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__cta { display: none; }
  .mark { font-size: 13.5px; letter-spacing: .1em; }
  .hero { padding-top: 104px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .works { grid-template-columns: 1fr; gap: 26px; }
  .work--featured { grid-column: auto; }
  .work--featured .work__phone, .work__phone { width: 26%; }
  .services { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(5, 72%); }
  .head__sub, .contact__sub { font-size: 16.5px; }
  .contact__btns .btn { flex: 1 1 100%; }
  .lightbox { width: 100vw; max-height: 100dvh; border-radius: 0; }
  .lightbox__stage { padding: 16px 16px 0; }
  .lightbox__cap { padding: 14px 16px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wall__track { animation: none; }
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- print / PDF ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  .nav, .wall, .hero__cta, .contact__btns, .lightbox, .work__go { display: none !important; }
  body { font-size: 11pt; }
  .hero, .section--ink, .contact, .foot, .price:first-child { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hero { padding: 18mm 0 12mm; }
  .hero__grid { grid-template-columns: 1fr; }
  html.js [data-reveal] { opacity: 1; transform: none; }
  .section { padding: 12mm 0; break-inside: avoid; }
  .works { grid-template-columns: repeat(4, 1fr); gap: 6mm 5mm; }
  .work--featured { grid-column: auto; }
  .flow { grid-template-columns: repeat(5, 1fr); overflow: visible; margin: 0; padding: 0; }
  .work, .svc, .steps li, .price, .flow li { break-inside: avoid; }
}
