@font-face {
  font-family: Golos;
  src: url("assets/golos-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Golos;
  src: url("assets/golos-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF,U+2000-206F;
}
:root {
  color-scheme: light;
  --paper: #fbf3e8;
  --ink: #2b1d1b;
  --plum: #38262a;
  --brick: #80371f;
  --peach: #f2c397;
  --stage: #231918;
  --margin: clamp(20px, 5vw, 92px);
  --ease: cubic-bezier(.22,.72,.24,1);
  font-family: Golos, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { color: var(--ink); background: var(--paper); }
body { margin: 0; }
h1,h2,h3,p,figure { margin: 0; }
a { color: inherit; }
button { font: inherit; }
img { display: block; width: 100%; height: auto; }
[hidden] { display: none !important; }
::selection { color: var(--paper); background: var(--brick); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.wrap { width: min(100% - var(--margin) * 2, 1560px); margin-inline: auto; }
.skip { position: absolute; z-index: 20; left: 1rem; top: .8rem; transform: translateY(-160%); color: var(--paper); background: var(--ink); padding: .8rem; }
.skip:focus { transform: none; }
.masthead { width: 100%; padding-inline: max(var(--margin), calc((100% - 1560px) / 2)); background: var(--stage); color: var(--paper); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 72px; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; width: fit-content; min-height: 44px; font: 1.37rem/1.1 Georgia, serif; text-decoration: none; }
.masthead nav { display: flex; gap: clamp(.85rem, 3.2vw, 3.6rem); align-items: center; }
.masthead nav a, .top-book, .text-link, .work-source, .visit-links a, .footer a {
  display: inline-flex; align-items: center; min-height: 44px; text-decoration-thickness: 1px; text-underline-offset: .25em;
}
.masthead nav a { text-decoration: none; font-size: 14px; }
.masthead nav a:hover { text-decoration: underline; }
.top-book { justify-self: end; color: var(--peach); font-weight: 650; font-size: .9rem; }
.hero { background: var(--stage); color: var(--paper); overflow: clip; }
.hero-frame { min-height: clamp(580px, 48vw, 790px); display: grid; grid-template-columns: minmax(0,1fr) minmax(15rem,.31fr); align-content: center; align-items: end; gap: clamp(1rem, 2.6vw, 2.8rem) clamp(1.3rem, 4vw, 5rem); padding-block: clamp(1.55rem,4vw,4.35rem) clamp(2.4rem,5vw,4.85rem); }
.hero-heading { grid-column: 1/-1; display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.place { color: #dac2af; font-size: .88rem; margin-bottom: .35rem; white-space: nowrap; }
.hero h1 { font: 400 clamp(2.7rem,6.1vw,6.35rem)/.98 Georgia, serif; letter-spacing: -.055em; text-wrap: balance; }
.hero-note { max-width: 28ch; font-size: clamp(1rem, 1.3vw, 1.24rem); line-height: 1.53; color: #f2ded0; }
.hero-text { border-top: 1px solid #8e6e60; padding-top: 1.2rem; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; margin-top: 1.4rem; }
.action { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; max-width: 100%; padding: .65rem 1.3rem; color: #fff7ec; background: var(--brick); text-decoration: none; font-weight: 650; border-radius: .2rem .2rem 1rem .2rem; transition: background .2s, border-radius .24s var(--ease); }
.action:hover { background: #632d1e; border-bottom-right-radius: .2rem; }
.hero .action { background: var(--peach); color: var(--ink); }
.hero .action:hover { background: #ffddbb; }
.text-link { font-weight: 650; font-size: .91rem; }
.hero-picture { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: .65rem; }
.hero-front, .hero-back { position: relative; overflow: hidden; height: clamp(310px,35vw,545px); background: #593e36; }
.hero-picture a::after { content: '+'; position: absolute; bottom: .7rem; right: .7rem; display: grid; place-items: center; width: 44px; height: 44px; border-radius: .2rem .2rem .8rem .2rem; background: var(--stage); color: var(--paper); font-size: 1.4rem; line-height: 1; transition: background .2s, color .2s; }
.hero-picture a:is(:hover, :focus-visible)::after { background: var(--peach); color: var(--ink); }
.hero-front { border-radius: 0 0 1.35rem 0; }
.hero-back { align-self: end; height: calc(clamp(310px,35vw,545px) - 2.45rem); border-radius: 1.35rem 0 0 0; }
.hero-picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 49%; }
.hero-back img { object-position: center 49%; }
.hero-caption { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: .6rem; color: #f2ded0; font-size: .88rem; }
.hero-caption span { color: #dac2af; }

.work { --focus-color: #4f302a; color: var(--ink); background: color-mix(in srgb, var(--focus-color) 10%, var(--paper)); padding-block: clamp(3.2rem, 6.2vw, 6.4rem); overflow: clip; transition: background .42s var(--ease); }
.work-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.05rem; margin-bottom: clamp(1.35rem,3vw,3.05rem); }
h2 { font: 400 clamp(2.4rem,5.15vw,5.6rem)/1 Georgia, serif; letter-spacing: -.055em; text-wrap: balance; }
.portfolio { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(.5rem,1.2vw,1.1rem); transition: grid-template-columns .45s var(--ease); align-items: end; }
.portfolio[data-index="1"] { grid-template-columns: 1fr 1.6fr 1fr; }
.portfolio[data-index="2"] { grid-template-columns: 1fr 1fr 1.6fr; }
.work-case { min-width: 0; }
.work-case h3 { font-weight: 610; font-size: clamp(.84rem,1.2vw,1.06rem); margin-top: .75rem; }
.work-image { display: block; height: clamp(290px,36vw,530px); position: relative; isolation: isolate; background: #cfb8a2; border-radius: 0 0 1.2rem 0; }
.work-image img { position: absolute; inset: 0; height: 100%; border-radius: inherit; object-fit: cover; object-position: 51% 47%; }
.work-case:nth-child(2) img { object-position: 50% 40%; }
.work-case:nth-child(3) img { object-position: 50% 44%; }
.work-case.is-active .work-image { box-shadow: 0 4px 0 var(--focus-color); }
.work-image::after { content: '+'; position: absolute; z-index: 1; bottom: .65rem; right: .65rem; display: grid; place-items: center; width: 36px; height: 36px; border-radius: .15rem .15rem .65rem .15rem; background: var(--ink); color: var(--paper); font-size: 1.35rem; line-height: 1; transition: background .2s; }
.work-image:hover::after { background: var(--brick); }
.work-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.work-tabs button { color: var(--ink); background: transparent; padding: .55rem .65rem; border: 0; border-block-end: 2px solid transparent; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; gap: .46rem; transition: border-color .2s; }
.work-tabs button[aria-pressed=true], .work-tabs button:hover { border-block-end-color: var(--brick); }
.work-tabs i { height: .63rem; width: .63rem; border-radius: 50%; background: #4f302a; }
.work-tabs button:nth-child(2) i { background: #e2c6a9; }
.work-tabs button:nth-child(3) i { background: #aa5d40; }
.work-source { font-size: .91rem; margin-top: .8rem; }

.services { padding-block: clamp(3.5rem,8vw,9rem); }
.services h2 { color: var(--brick); }
.service-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(.8rem,2.3vw,2.5rem); margin-block: clamp(2rem,4vw,4.2rem) 2rem; }
.service-list article { min-width: 0; border-bottom: 1px solid #6f574f68; padding-bottom: 1.3rem; }
.service-list h3 { font-weight: 710; font-size: clamp(1.15rem, 2vw, 2rem); letter-spacing: -.045em; margin: .85rem 0 .45rem; }
.service-list p { max-width: 30ch; line-height: 1.5; }
.strand { display: block; width: min(100%, 290px); height: clamp(26px,5.3vw,73px); border-radius: 10px 95% 95% 10px / 10px 85% 85% 10px; background: repeating-linear-gradient(1deg, #0000 0px, #0000 3px, #5b2b162f 4px, #0000 5px), linear-gradient(90deg, var(--a), var(--b) 52%, var(--a)); }
.strand-light { --a:#a66a42; --b:#f9ddaf; }
.strand-warm { --a:#791e15; --b:#de845c; }
.strand-deep { --a:#411819; --b:#81504d; }

.school { overflow: clip; background: #492832; color: #fff5e8; }
.school-inner { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.12fr); align-items: center; gap: clamp(1.8rem,8vw,9rem); padding-block: clamp(3rem,6vw,6.5rem); }
.school-copy { position: relative; z-index: 2; }
.school-copy p { margin: 1.35rem 0 1.8rem; max-width: 36ch; line-height: 1.5; font-size: clamp(1.05rem,1.55vw,1.33rem); }
.action-light { color: var(--brick); background: #fff5e8; }
.action-light:hover { color: var(--brick); background: #ffddc6; }
.school-portrait { position: relative; isolation: isolate; padding: .7rem .7rem 0 0; }
.school-portrait::before { content: ''; position: absolute; inset: 0 0 .85rem .85rem; z-index: -1; border: 1px solid #d5afa7; border-radius: 17% 0 0 0; }
.school-portrait img { width: 100%; aspect-ratio: 1.23; object-fit: cover; object-position: 52% 43%; border-radius: 17% 0 0 0; }
.visit-inner { display: grid; gap: clamp(1.35rem,4vw,3.5rem); padding-block: clamp(2.7rem,6vw,6rem); }
.visit-photo img { height: clamp(245px,31vw,495px); object-fit: cover; object-position: 46% 62%; }
.visit-copy { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.7rem; }
.visit-copy h2 { grid-row: 1/4; align-self: center; }
.visit-copy h2 { color: var(--brick); }
.visit-copy address { font-size: clamp(1.07rem,1.8vw,1.6rem); line-height: 1.4; font-weight: 650; font-style: normal; }
.visit-copy p { margin-top: .5rem; line-height: 1.5; }
.visit-links { display: flex; flex-wrap: wrap; gap: .35rem 1.45rem; margin-top: .85rem; }
.visit-links a { font-weight: 660; }
.footer { border-top: 1px solid #70554c68; display: flex; gap: .35rem 1rem; justify-content: space-between; flex-wrap: wrap; align-items: center; min-height: 72px; }
.footer p { font-weight: 720; }
.footer a { font-size: .88rem; }

.viewer { color: var(--paper); background: var(--plum); border: 1px solid #d5afa7; padding: .9rem; width: min(92vw,660px); max-height: 92svh; overflow-y: auto; overflow-x: hidden; }
.viewer::backdrop { background: #1d0c12e6; }
.viewer-top { display: flex; justify-content: space-between; align-items: center; gap: .55rem; margin-bottom: .5rem; }
.viewer-top p { font-weight: 680; }
.viewer button { background: transparent; color: var(--paper); min-height: 44px; border: 0; text-decoration: underline; text-underline-offset: .22em; padding-inline: .5rem; cursor: pointer; }
.viewer-top span { font-size: 1.25em; }
.viewer img { width: 100%; height: min(67svh,690px); object-fit: contain; }
.viewer .alternate { display: block; margin-inline: auto; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-front { animation: open-front .76s var(--ease) both; }
  .hero-back { animation: open-back .95s .07s var(--ease) both; }
  .viewer[open] { animation: viewer-in .22s var(--ease) both; }
  @supports (animation-timeline: view()) {
    .school-portrait::before { animation: register linear both; animation-timeline: view(); animation-range: entry 0% cover 38%; }
    .strand { animation: read-strand linear both; animation-timeline: view(); animation-range: entry 3% cover 27%; }
  }
}
@keyframes open-front { from { clip-path: inset(0 11% 0 0); } to { clip-path: inset(0); } }
@keyframes open-back {
  from { transform: translate(-13%, 7%); clip-path: inset(0 0 0 40%); }
  to { transform: none; clip-path: inset(0); }
}
@keyframes register { from { transform: translate(-1.1rem, 1.1rem); } to { transform: none; } }
@keyframes read-strand { from { clip-path: inset(0 56% 0 0 round 5px); } to { clip-path: inset(0 0 0 0 round 5px); } }
@keyframes viewer-in { from { transform: translateY(10px); } to { transform: none; } }

@media (max-width: 960px) {
  .hero-heading { display: grid; gap: .65rem; }
  .hero h1 { font-size: clamp(2.7rem,6.8vw,4.4rem); }
  .place { margin: 0; }
}
@media (max-width: 720px) {
  .masthead { grid-template-columns: 1fr 1fr; gap: .15rem 1rem; padding-top: .9rem; }
  .masthead nav { grid-row: 2; grid-column: 1/-1; justify-content: space-between; }
  .brand { font-size: 1.12rem; }
  .top-book { grid-column: 2; grid-row: 1; }
  .hero-frame { min-height: 0; grid-template-columns: minmax(0,1fr); align-items: start; gap: 1.1rem; padding-block: 1.35rem 2.8rem; }
  .hero h1 { font-size: clamp(2.55rem,10.2vw,4.15rem); }
  .hero-heading { justify-items: start; }
  .hero-front, .hero-back { height: min(70vw,390px); }
  .hero-back { height: calc(min(70vw,390px) - 1.2rem); }
  .hero-caption { flex-wrap: wrap; column-gap: .55rem; row-gap: .2rem; font-size: .79rem; }
  .hero-text { padding-top: .95rem; }
  .hero-note { max-width: 42ch; }
  .hero-actions { margin-top: .95rem; flex-flow: row wrap; align-items: center; gap: .35rem 1.05rem; }
  .portfolio, .portfolio[data-index] { grid-template-columns: 1fr 1fr; align-items: start; gap: .7rem; }
  .work-case.is-active { grid-row: 1; grid-column: 1/-1; }
  .work-image { height: clamp(105px,32vw,185px); }
  .work-case.is-active .work-image { height: clamp(265px,80vw,460px); }
  .work-image::after { width: 32px; height: 32px; bottom: .35rem; left: .35rem; }
  .work-case h3 { margin-top: .48rem; }
  .service-list { grid-template-columns: 1fr; }
  .service-list p { max-width: 42ch; }
  .school-inner { display: flex; flex-direction: column; align-items: stretch; }
  .school-portrait { width: min(100%,520px); }
  .school-portrait img { aspect-ratio: 1.11; }
  .visit-photo img { height: clamp(200px,60vw,360px); }
  .visit-copy { display: block; }
  .visit-copy address { margin-top: 1rem; }
}
@media (max-width: 360px) {
  .hero-actions { gap: .4rem .8rem; }
  .action { min-height: 50px; padding-inline: 1rem; }
  .work-tabs { gap: .15rem; }
  .work-tabs button { padding-inline: .35rem; font-size: .88rem; }
  .brand { font-size: .97rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
