@import url('fonts.css');

:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --ink: #202339;
  --muted: #5b6072;
  --line: #d3d7e2;
  --accent: #3043c9;
  --gutter: clamp(22px, 3.4vw, 64px);
  --body-font: 'Onest', sans-serif;
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--body-font); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
button { background: none; border: 0; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
a:hover { text-decoration: underline; text-underline-offset: 5px; }
.skip-link { position: fixed; z-index: 20; left: 16px; top: -100px; padding: 12px 20px; background: var(--ink); color: var(--surface); }
.skip-link:focus { top: 10px; }
.site-header { min-height: 104px; padding: 20px var(--gutter); display: flex; align-items: center; gap: 32px; }
.brand { font-size: 30px; font-weight: 800; letter-spacing: -.06em; line-height: 1; }
.brand:hover { text-decoration: none; }
.site-header nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-header nav a { padding: 12px 0; font-size: 14px; }
.mode-switch { display: flex; }
.mode-switch .deneb-tools__control { text-decoration: none; }
.mode-switch .deneb-tools__control[aria-current] { color: var(--bg); background: var(--ink); }
.header-contact { border-bottom: 1px solid var(--ink); }
.section-label { color: var(--muted); margin-bottom: 24px; font-size: 14px; }
h1, h2, h3 { font-weight: 500; }
h1 { font-size: clamp(48px, 5.4vw, 88px); line-height: 1.04; letter-spacing: -.065em; }
h2 { font-size: clamp(32px, 3.1vw, 49px); line-height: 1.15; letter-spacing: -.045em; max-width: 19ch; }
h3 { font-size: 26px; line-height: 1.2; letter-spacing: -.03em; }
.intro p { margin-top: 28px; max-width: 30ch; font-size: 18px; }
.intro-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 35px; }
.action { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 24px; padding: 10px 22px; border: 1px solid var(--ink); border-radius: 2px; font-size: 14px; }
.action--solid { color: white; background: var(--accent); border-color: var(--accent); }
.action:hover { text-decoration: none; box-shadow: inset 0 0 0 1px currentColor; }
.round-link { width: 56px; height: 56px; border: 1px solid var(--ink); border-radius: 50%; display: inline-grid; place-items: center; font-size: 26px; }
.round-link:hover { background: var(--surface); text-decoration: none; }
.rail-intro { padding: 18px var(--gutter) 42px; display: flex; gap: 40px; align-items: flex-end; }
.rail-intro h1 { max-width: 22ch; }
.rail-intro p { max-width: 24ch; margin-left: auto; }
.rail { outline-offset: -4px; }
.panel { padding: 42px var(--gutter); }
.project-feature { background: #e3e6f2; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.project-feature:nth-of-type(3) { background: #e6eeea; }
.project-feature:nth-of-type(4) { background: #efede6; }
.project-cover { display: block; overflow: hidden; }
.project-cover img { width: 100%; aspect-ratio: 16/9; object-fit: contain; }
.project-feature .project-cover { position: relative; aspect-ratio: 16/9; min-height: 0; flex: 0 1 auto; }
.project-feature .project-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.project-caption { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.project-caption p { color: var(--muted); font-size: 14px; margin-top: 8px; }
.project-caption a { min-height: 44px; display: inline-flex; align-items: center; border-bottom: 1px solid currentColor; white-space: nowrap; font-size: 14px; }
.project-owner { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.feature-heading { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); }
.feature-heading span:last-child { color: var(--ink); }
.text-panel { background: var(--surface); }
.text-panel > .lead, .text-panel > .content-inner > .lead { max-width: 56ch; margin-top: 24px; color: var(--muted); }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-top: 34px; }
.service-grid h3 { margin-bottom: 16px; }
.service-grid p { font-size: 15px; max-width: 44ch; }
.service-grid ul { margin-top: 22px; font-size: 13px; }
.service-grid li { padding: 9px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.service-grid li b { font-weight: 500; text-align: right; }
.approach-columns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 54px; margin-top: 30px; }
.approach-copy p + p { margin-top: 18px; }
.approach-copy p { font-size: 15px; max-width: 52ch; }
.approach-copy strong { font-weight: 600; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-content: start; }
.stat__val { font-size: 40px; line-height: 1.2; letter-spacing: -.04em; }
.stat__val sup { display: block; font-size: 13px; letter-spacing: 0; margin-top: 5px; }
.stat__label { margin-top: 12px; font-size: 11px; color: var(--muted); }
.tech-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
.tech { border-top: 1px solid var(--line); padding: 16px 0; }
.tech__name { font-size: 20px; }
.tech__cat { margin-top: 5px; font-size: 12px; color: var(--muted); }
.contact-panel { background: #e0e6fa; display: flex; flex-direction: column; justify-content: flex-start; }
.contact-panel > .content-inner { flex: 0 0 auto; margin-block: auto; }
.contact-panel h2 { font-size: clamp(40px,4.2vw,66px); }
.contact-panel .contact-sub { max-width: 42ch; margin-top: 26px; }
.contact-email { display: inline-block; margin-top: 35px; font-size: clamp(25px,3vw,40px); letter-spacing: -.045em; text-decoration: underline; text-underline-offset: 7px; }
.contact-channels { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.contact-channels a { padding: 10px 0; }
.legal { margin-top: 55px; font-size: 12px; color: var(--muted); }
.catalog-note { color: var(--muted); font-size: 13px; max-width: 65ch; margin-top: 18px; }
.catalog-list { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.catalog-list a { display: flex; gap: 20px; justify-content: space-between; align-items: center; padding: 12px 0; min-height: 54px; border-top: 1px solid var(--line); }
.catalog-list b { display: block; font-size: 15px; font-weight: 500; }
.catalog-list small { font-size: 11px; color: var(--muted); }
.catalog-list .catalog-category { font-size: 10px; color: var(--muted); white-space: nowrap; }
.reader-footer { padding: 14px var(--gutter); display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: 12px; }
.reader-footer > a { min-height: 44px; display: inline-flex; align-items: center; }
.rail-controls { display: none; align-items: center; gap: 12px; }
.rail-controls button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; font-size: 20px; }
.rail-controls button:hover { background: var(--surface); }
.rail-controls button:disabled { opacity: .35; cursor: default; }
.reading-progress { width: 110px; height: 3px; background: var(--line); display: block; overflow: hidden; }
.reading-progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(.02); background: var(--accent); }
.scroll-hint { color: var(--muted); }
.mobile-hint { display: none; }

/* A: an uninterrupted, horizontal sequence of large projects. */
.lenta .intro { display: flex; flex-direction: column; justify-content: center; }
.lenta .intro h1 { max-width: 10ch; }
.lenta .intro .section-label { margin-top: auto; }
.lenta .intro .intro-actions { margin-bottom: auto; }
.lenta .intro .intro-foot { font-size: 12px; margin-top: 50px; color: var(--muted); }

/* B: a typographic heading above a dense two-row portfolio. */
.index-gallery { --bg: #faf9f7; --ink: #30292c; --muted: #665e61; --accent: #853951; --line: #d9d1d3; }
.index-gallery h1, .index-gallery h2, .index-gallery .project-caption h3 { font-family: 'Literata', Georgia, serif; font-weight: 400; letter-spacing: -.045em; }
.index-gallery .brand { font-family: 'Literata', Georgia, serif; font-size: 32px; letter-spacing: -.065em; }
.index-gallery .rail-intro h1 { font-size: clamp(40px,4vw,64px); max-width: 23ch; }
.index-gallery .rail-intro { padding-bottom: 30px; }
.index-gallery .rail-intro p { font-size: 14px; max-width: 34ch; }
.work-wall { padding: 16px var(--gutter) 24px; }
.wall-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.wall-card { display: flex; flex-direction: column; min-width: 0; }
.wall-card .project-cover { background: #eeebea; padding: 14px; }
.wall-card:nth-child(4n+2) .project-cover { background: #e2e9e4; }
.wall-card:nth-child(4n+3) .project-cover { background: #e6e2ee; }
.wall-card:nth-child(4n+4) .project-cover { background: #e7e2db; }
.wall-card h2 { font-size: 21px; letter-spacing: -.035em; margin-top: 9px; }
.wall-card .card-meta { display: flex; gap: 10px; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 11px; }
.wall-card p { font-size: 12px; margin-top: 4px; }
.index-gallery .contact-panel { background: #efdee4; }

/* C: confident condensed type, a vertical page and a horizontal work shelf. */
.focus { --bg: #f8faf7; --ink: #173c31; --muted: #50675b; --line: #ccd7cf; --accent: #245d45; }
.focus .brand { font-family: 'Roboto Condensed', sans-serif; font-size: 36px; font-weight: 800; }
.focus h1, .focus h2, .focus h3 { font-family: 'Roboto Condensed', sans-serif; font-weight: 500; letter-spacing: -.035em; }
.focus .site-header { border-bottom: 1px solid var(--line); }
.focus-hero { padding: 38px var(--gutter) 36px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; align-items: end; }
.focus-hero h1 { font-size: clamp(56px,6.4vw,104px); line-height: .99; max-width: 14ch; }
.focus-hero p { font-size: 17px; max-width: 33ch; }
.focus-hero .intro-actions { margin-top: 22px; }
.focus .work-shelf { display: flex; gap: 28px; overflow-x: auto; padding: 0 var(--gutter) 24px; scrollbar-color: var(--muted) var(--line); scroll-snap-type: x proximity; }
.focus .shelf-card { flex: 0 0 52%; min-width: 0; scroll-snap-align: center; }
.focus .shelf-card .project-cover { background: #dfe8de; padding: 30px; }
.focus .shelf-card:nth-child(2) .project-cover { background: #e8e6d9; }
.focus .shelf-card:nth-child(3) .project-cover { background: #e1e3ee; }
.focus .shelf-card .project-caption { margin-top: 18px; }
.focus .shelf-label { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter) 20px; font-size: 13px; }
.focus .shelf-label h2 { font-family: var(--body-font); font-size: 13px; letter-spacing: 0; }
.focus .text-panel, .focus .contact-panel { margin-top: 48px; padding: 72px var(--gutter); }
.focus .content-inner { max-width: 1240px; margin: auto; }
.focus .text-panel h2 { font-size: 58px; max-width: 24ch; }
.focus .service-grid { gap: 80px; margin-top: 50px; }
.focus .service-grid h3 { font-size: 40px; }
.focus .service-grid p, .focus .approach-copy p { font-size: 17px; }
.focus .approach-columns { gap: 100px; }
.focus .catalog-list { grid-template-columns: repeat(3,1fr); }
.focus .contact-panel { background: #e1e9de; }
.focus .contact-panel h2 { max-width: 20ch; font-size: 80px; }
.focus .reader-footer .scroll-hint { display: none; }

/* Shared case overlays retain the original case text and attribution. */
.case { width: min(900px,calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); color: var(--ink); background: var(--surface); overscroll-behavior: contain; }
.case::backdrop { background: rgba(22,28,40,.6); }
.case__head { padding: 24px 32px; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.case__title { font-size: 32px; }
.case__id { font-size: 12px; color: var(--muted); }
.case__meta { font-size: 13px; margin-top: 8px; }
.case__close { flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; font-size: 28px; }
.case__body { padding: 28px 32px; }
.case__block + .case__block { margin-top: 24px; }
.case__label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.case__text { max-width: 72ch; }
.case__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.case__tag { font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 20px; }
.case__shot { margin-top: 28px; }
.case__shot img { width: 100%; }
.case__caption { font-size: 12px; margin-top: 10px; color: var(--muted); }
.case__foot { padding: 20px 32px; border-top: 1px solid var(--line); }
.case__foot a { text-decoration: underline; padding: 12px 0; display: inline-flex; gap: 16px; }
body.dialog-open { overflow: hidden; }

@media (min-width: 1100px) and (min-height: 650px) and (prefers-reduced-motion: no-preference) {
  .lenta, .index-gallery { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  .lenta .site-header, .index-gallery .site-header { flex: 0 0 104px; }
  .horizontal .rail { display: flex; overflow-x: auto; overflow-y: hidden; flex: 1 1 auto; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--muted) var(--line); }
  .horizontal .panel { flex: 0 0 min(1050px,90vw); min-height: 0; overflow-y: auto; }
  .lenta .intro { flex-basis: 42vw; min-width: 480px; }
  .lenta .project-feature { flex-basis: 66vw; }
  .lenta .catalog-panel { flex-basis: 1050px; }
  .lenta .contact-panel { flex-basis: 75vw; }
  .lenta .project-feature .project-cover { margin-block: auto; }
  .horizontal .reader-footer { flex: 0 0 80px; }
  .horizontal .rail-controls { display: flex; }
  .index-gallery .rail-intro { flex: 0 0 auto; }
  .index-gallery .rail-intro h1 { font-size: clamp(40px,3.4vw,56px); }
  .index-gallery .work-wall { flex: 0 0 auto; height: 100%; }
  .index-gallery .wall-grid { height: 100%; grid-template-rows: repeat(2,minmax(0,1fr)); grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: clamp(260px,21vw,340px); gap: 22px 26px; }
  .index-gallery .wall-card .project-cover { flex: 1; min-height: 0; position: relative; padding: 0; }
  .index-gallery .wall-card img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: contain; }
  .index-gallery .text-panel, .index-gallery .contact-panel { display: flex; flex-direction: column; justify-content: flex-start; }
  .index-gallery .panel { padding-top: 26px; padding-bottom: 26px; }
  .index-gallery .content-inner { flex: 0 0 auto; margin-block: auto; }
}

@media (max-width: 1099px), (max-height: 649px) {
  .scroll-hint { display: none; }
  .mobile-hint { display: inline; color: var(--muted); }
  .lenta .intro { padding-top: 40px; padding-bottom: 44px; }
  .lenta .intro h1 { max-width: 14ch; }
  .lenta .intro .section-label { margin-top: 0; }
  .lenta .intro .intro-foot { display: none; }
  .lenta .project-feature { padding-block: 38px; }
  .lenta .text-panel { padding-block: 60px; }
  .lenta .contact-panel { padding-block: 60px; }
  .lenta .project-cover img { max-height: 65dvh; }
}
@media (min-width: 1100px) and (min-height: 650px) and (max-height: 780px) and (prefers-reduced-motion: no-preference) {
  .lenta .intro h1 { font-size: clamp(48px,4.6vw,66px); }
  .lenta .intro .section-label { margin-bottom: 16px; }
  .lenta .intro .intro-foot { margin-top: 24px; }
  .index-gallery .wall-grid { grid-template-rows: minmax(0,1fr); grid-auto-columns: clamp(340px,32vw,440px); }
}
@media (max-width: 740px) {
  :root { --gutter: 22px; }
  .site-header { min-height: 128px; gap: 16px; flex-wrap: wrap; padding-block: 18px 12px; }
  .site-header nav { order: 3; width: 100%; gap: 24px; justify-content: space-between; margin-left: 0; }
  .site-header nav a { font-size: 12px; padding-block: 8px; min-height: 44px; display: inline-flex; align-items: center; }
  .site-header .mode-switch { margin-left: auto; }
  .site-header .brand { font-size: 28px; }
  .site-header .header-contact { display: none; }
  h1 { font-size: clamp(43px,10.4vw,64px); }
  h2 { font-size: 34px; }
  .section-label { margin-bottom: 20px; }
  .panel { padding: 36px var(--gutter); }
  .intro p { margin-top: 23px; font-size: 16px; }
  .intro-actions { margin-top: 24px; gap: 16px; }
  .lenta .intro { padding-top: 28px; }
  .project-caption { gap: 16px; }
  .project-caption h2 { font-size: 30px; }
  .project-caption h3 { font-size: 23px; }
  .project-caption p { font-size: 12px; }
  .project-caption a { font-size: 12px; white-space: normal; flex-shrink: 0; }
  .service-grid, .approach-columns { grid-template-columns: 1fr; gap: 36px; }
  .catalog-list { grid-template-columns: 1fr; }
  .catalog-list a { padding-block: 15px; }
  .catalog-list b { font-size: 17px; }
  .catalog-list small { font-size: 12px; }
  .tech-grid { grid-template-columns: repeat(2,1fr); gap: 0 18px; }
  .tech__name { font-size: 18px; }
  .legal { margin-top: 44px; }
  .reader-footer { flex-wrap: wrap; gap: 12px; padding-block: 18px; }
  .reader-footer > a { font-size: 12px; }
  .rail-intro { display: block; padding-block: 26px 30px; }
  .index-gallery .rail-intro h1 { font-size: clamp(36px,9.3vw,54px); }
  .rail-intro p { margin: 22px 0 0; max-width: none; font-size: 14px; }
  .wall-grid { grid-template-columns: 1fr; gap: 30px; }
  .wall-card .project-cover { padding: 20px; }
  .wall-card h2 { font-size: 27px; }
  .wall-card .card-meta, .wall-card p { font-size: 12px; }
  .index-gallery .text-panel, .index-gallery .contact-panel { padding-block: 56px; }
  .focus-hero { padding-top: 30px; grid-template-columns: 1fr; gap: 26px; }
  .focus-hero h1 { font-size: clamp(51px,13.5vw,90px); }
  .focus-hero p { font-size: 15px; max-width: 35ch; }
  .focus .shelf-card { flex-basis: 88%; }
  .focus .shelf-card .project-cover { padding: 16px; }
  .focus .work-shelf { gap: 18px; }
  .focus .shelf-card .project-caption { flex-wrap: wrap; }
  .focus .shelf-card .project-caption a { min-height: 44px; }
  .focus .text-panel, .focus .contact-panel { margin-top: 24px; padding-block: 48px; }
  .focus .text-panel h2 { font-size: 40px; }
  .focus .service-grid { gap: 36px; margin-top: 32px; }
  .focus .service-grid p, .focus .approach-copy p { font-size: 15px; }
  .focus .approach-columns { gap: 36px; }
  .focus .catalog-list { grid-template-columns: 1fr; }
  .focus .contact-panel h2 { font-size: 50px; }
  .case__head { padding: 20px; }
  .case__body, .case__foot { padding: 22px; }
  .case__title { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .scroll-hint { display: none; }
  .mobile-hint { display: inline; }
  .focus .work-shelf { display: grid; grid-template-columns: 1fr; overflow: visible; }
  .horizontal .panel { padding-block: 48px; }
}
@media print {
  body { background: white; }
  .site-header, .reader-footer, .intro-actions, .mode-switch, .case { display: none; }
  .rail, .wall-grid { display: block !important; overflow: visible !important; }
  .panel, .wall-card { break-inside: avoid; }
}
