:root {
  --page-base: #f8f4ed;
  --price-surface: #203e32;
  --process-surface: #f1e3d7;
  --section-divider: #6e4d403a;
  --section-label: #6e422f;
  --editorial-image-radius: 12px;
}
:root[data-theme="dark"] {
  --page-base: #17211c;
  --price-surface: #294335;
  --process-surface: #26382e;
  --dark-panel-surface: #24352d;
  --dark-panel-outline: #526b5b;
  --dark-divider: #859788;
  --section-divider: #c4cdb457;
  --section-label: #edbd9d;
}
body { background: var(--page-base); }
#services { background: transparent; border: 0; }
#prices {
  --section-label: #f3d1b4;
  background: var(--price-surface);
}
:is(#about, #services, #portfolio, #prices, #process, #contacts, footer) {
  position: relative;
}
:is(#prices, #process, footer) { --section-divider: #b68c72a6; }
:is(#about, #services, #portfolio, #prices, #process, #contacts, footer)::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  width: min(1280px, calc(100% - 2 * clamp(18px, 4vw, 48px)));
  height: 2px;
  margin-inline: auto;
  background: linear-gradient(to right, transparent, var(--section-divider) 8% 92%, transparent);
  pointer-events: none;
}
:is(#about, #portfolio)::before { width: 100%; }
.portfolio-page #portfolio::before { content: none; }
.section .eyebrow.section-label {
  color: var(--section-label);
  font-size: clamp(.875rem, 1.3vw, 1rem);
  font-weight: 700;
  letter-spacing: .11em;
}
#prices .price-intro { font-size: 1rem; margin-top: 1.5rem; }
#prices .price-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 56px);
}
#prices .price-tags { margin-bottom: 0; }
#prices .price-action {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding-top: clamp(26px, 5vw, 70px);
}
#prices .price-guide {
  max-width: 34rem;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid #e7e8da55;
  font-size: 1rem;
}
.price-cards {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.25vw, 32px);
  margin: 0;
}
.price-cards > div {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #e7e8da55;
  padding-top: 16px;
}
.price-cards dt {
  margin-bottom: 8px;
  color: #f8f4ed;
  font: 500 clamp(1.125rem, 1.7vw, 1.5rem)/1.25 var(--heading-font);
}
.price-cards dd {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  color: #e2e7dd;
}
.price-cards img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--editorial-image-radius);
  background: #37483a;
}
@media (max-width: 780px) {
  #prices .price-layout, .price-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  #prices .price-action { padding-top: 0; }
}

:root[data-theme] {
  --header-tint: 247 239 228;
  --header-paper: rgb(var(--header-tint));
  --header-ink: #263e32;
  --header-accent: #733f2b;
}
:root[data-theme="dark"] {
  --header-tint: 21 30 25;
  --header-ink: #f1e9de;
  --header-accent: #e8b89c;
}

.header {
  isolation: isolate;
  background: transparent;
  backdrop-filter: none;
  transition: transform .38s cubic-bezier(.22, .7, .25, 1), opacity .34s ease;
}
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--header-paper) 18%,
    rgb(var(--header-tint) / .94) 46%,
    rgb(var(--header-tint) / .65) 66%,
    rgb(var(--header-tint) / .28) 83%,
    rgb(var(--header-tint) / .06) 95%,
    rgb(var(--header-tint) / 0) 100%
  );
}
body:has(> main > .hero) .header:not(.menu-open)::before { inset-block-end: -16px; }
.header.menu-open::before { background: var(--header-paper); }
.header.is-hidden { opacity: 0; pointer-events: none; }
.header:has(:focus-visible),
.header.menu-open { opacity: 1; pointer-events: auto; }

.hero {
  height: 100svh;
  min-height: calc(520px + var(--header-height));
  margin-top: calc(-1px - var(--header-height));
}
.hero-inner { padding-top: calc(48px + var(--header-height)); }

@media (max-width: 720px) {
  .hero { height: auto; min-height: 100svh; }
  .hero-inner {
    min-height: 100svh;
    padding-top: calc(48px + var(--header-height));
  }
}
@media (prefers-reduced-motion: reduce) {
  .header { transition: none; }
}

:root[data-theme="light"] {
  --page-base: #e6d1bf;

}
[data-theme] .header {
  --ink: var(--header-ink);
  border-bottom-color: transparent;
  color: var(--ink);
}
[data-theme] .header .menu-toggle,
[data-theme] .header .navphone,
[data-theme] .header nav a { color: var(--ink); }
[data-theme] .header nav a:hover,
[data-theme] .header nav a.current { color: var(--header-accent); }
[data-theme="light"] .hero::before { box-shadow: inset 0 94px 74px -78px #342015a6; }
[data-theme="light"] .portfolio-page .filters button.active {
  background: #75452f;
  border-color: #75452f;
  color: #fff8f0;
}

.portfolio-page .portfolio { padding-top: clamp(24px, 4vw, 50px); }
.portfolio-page .portfolio-back { margin-bottom: 12px; }
.portfolio-page .projects {
  max-width: min(1160px, 114svh);
  gap: clamp(16px, 2.5vw, 32px);
}
.portfolio-page .project-media { aspect-ratio: 1; max-height: none; }
.portfolio-page .project-details { padding: clamp(16px, 2vw, 24px); }
@media (min-width: 721px) {
  .portfolio-page .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#services .wrap {
  border-inline: 0;
  padding-inline: 0;
}
#process {
  background: linear-gradient(
    to bottom,
    var(--page-base),
    var(--process-surface) clamp(64px, 11vw, 144px),
    var(--process-surface) calc(100% - clamp(64px, 11vw, 144px)),
    var(--page-base)
  );
}
#process .steps {
  counter-reset: process-step;
  list-style: none;
  gap: 0;
  padding: 0;
  margin-bottom: 0;
}
#process .steps li {
  counter-increment: process-step;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 56px clamp(16px, 2.5vw, 36px) 0 0;
}
#process .steps li::before {
  content: counter(process-step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--copper);
  border-radius: 50%;
  color: var(--ink);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}
#process .steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 48px;
  right: 12px;
  border-top: 1px solid var(--line);
}
#process .steps h3 { margin: 0 0 10px; }
#process .steps p { font-size: .9375rem; margin-bottom: 0; }
.step-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--editorial-image-radius);
  margin-top: auto;
}
#process .steps p { padding-bottom: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .step-plan.is-animated .step-plan-walls path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
  }
  .step-plan.is-animated .step-plan-measures { opacity: 0; }
  .step-plan.is-visible .step-plan-walls path {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset .9s ease-out;
  }
  .step-plan.is-visible .step-plan-measures {
    opacity: 1;
    transition: opacity .4s ease .48s;
  }
}
@media (max-width: 720px) {
  #process .steps { grid-template-columns: 1fr; }
  #process .steps li { padding: 4px 0 28px 54px; }
  #process .steps li:last-child { padding-bottom: 0; }
  #process .steps li:not(:last-child)::after {
    top: 44px;
    left: 18px;
    right: auto;
    bottom: 7px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  #process .steps p { max-width: none; }
}
#contacts { background: transparent; border: 0; }

.footer-brand {
  display: inline-grid;
  align-items: center;
  width: 122px;
  height: 52px;
  overflow: hidden;
}
.footer-brand img { display: block; width: 100%; height: auto; margin-block: -5px; }
/* Use the light mark against dark navigation and footer surfaces. */
[data-theme="dark"] .header .brand img,
.footer-brand img { filter: brightness(0) invert(89%) sepia(14%) saturate(565%) hue-rotate(328deg); }

#services .service-grid { gap: clamp(18px, 2.5vw, 32px); }
#services .service-grid article { background: var(--paper); }
#services .service-grid h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); color: var(--green); }
#services .service-grid p, #services .service-grid li { font-size: 15px; }
#services .service-grid li { line-height: 1.5; }

[data-theme="dark"] :is(.about-text, #services .service-grid article, #brief) {
  background: var(--dark-panel-surface);
  box-shadow: inset 0 0 0 1px var(--dark-panel-outline);
}
[data-theme="dark"] .experience {
  background: var(--price-surface);
  box-shadow: inset 0 0 0 1px var(--dark-panel-outline);
}
[data-theme="dark"] .experience > div {
  background: var(--dark-panel-surface);
  box-shadow: inset 0 0 0 1px var(--dark-panel-outline);
}
[data-theme="dark"] :is(#prices .price-guide, .price-cards > div) {
  border-color: var(--dark-divider);
}
[data-theme="dark"] #process .steps {
  --line: var(--dark-divider);
}

:root { --gallery-surface: #eee0d2; }
:root[data-theme="dark"] { --gallery-surface: #202c24; }
#gallery[open] {
  width: calc(100% - 12px);
  height: calc(100vh - 12px);
  height: calc(100dvh - 12px);
  gap: 4px;
  padding: clamp(5px, 1vw, 12px);
  background: var(--gallery-surface);
}
#gallery #gallery-image { background: var(--gallery-surface); }

.portfolio-page { position: relative; overflow-x: clip; }
.edge-ornament {
  --branch: #8c553e;
  --leaf: #385946;
  --accent-leaf: #a66447;
  position: absolute;
  pointer-events: none;
  left: 0;
  top: clamp(24px, 6vw, 88px);
  width: clamp(18px, 2.35vw, 46px);
  height: clamp(150px, 18vw, 250px);
  overflow: hidden;
  opacity: .65;
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}
.edge-ornament-low {
  top: auto;
  bottom: clamp(22px, 7vw, 105px);
}
.edge-ornament-right {
  left: auto;
  right: 0;
  transform: scaleX(-1);
}
.edge-ornament::before,
.edge-ornament::after {
  content: "";
  position: absolute;
  border: 1.5px solid var(--branch);
  border-left: 0;
  border-radius: 50%;
}
.edge-ornament::before { inset: 1% 25% 8% -125%; transform: rotate(-15deg); }
.edge-ornament::after { inset: 12% 8% 11% -125%; transform: rotate(17deg); }
.edge-ornament-right::before { inset: 3% 12% 5% -130%; transform: rotate(14deg); }
.edge-ornament-right::after { inset: 24% 24% 0 -110%; transform: rotate(-25deg); }
.edge-ornament-portfolio { top: clamp(105px, 15vw, 205px); }
.edge-ornament-portfolio::before { inset: 0 18% 20% -115%; transform: rotate(-18deg); }
.edge-ornament-portfolio::after { inset: 4% 4% 8% -120%; transform: rotate(24deg); }
.edge-ornament i {
  position: absolute;
  width: clamp(8px, 1.2vw, 16px);
  height: clamp(4px, .55vw, 7px);
  border-radius: 100% 0 100% 0;
  background: var(--leaf);
  transform: rotate(31deg);
}
.edge-ornament i:nth-child(1) { top: 20%; left: 12%; }
.edge-ornament i:nth-child(2) { top: 38%; left: 47%; transform: rotate(-38deg); }
.edge-ornament i:nth-child(3) { top: 56%; left: 34%; background: var(--accent-leaf); }
.edge-ornament i:nth-child(4) { top: 74%; left: 18%; transform: rotate(-42deg); }
.edge-ornament-right i:nth-child(2) { top: 33%; left: 31%; }
.edge-ornament-right i:nth-child(3) { top: 64%; left: 49%; transform: rotate(-34deg); }
[data-theme="dark"] .edge-ornament {
  --branch: #c38361;
  --leaf: #8aa891;
  --accent-leaf: #c38361;
}
@media (max-width: 1150px) { .edge-ornament { max-width: 27px; } }
@media (max-width: 720px) { .edge-ornament { width: 17px; opacity: .48; } }

/* Botanical details placed in the open space of the adjoining content. */
.sprig {
  --sprig-stem: #89543e;
  --sprig-leaf: #385946;
  --sprig-accent: #a66447;
  position: relative;
  display: block;
  flex: none;
  width: clamp(48px, 6.8vw, 94px);
  aspect-ratio: 2.1;
  color: var(--sprig-stem);
  opacity: .62;
  pointer-events: none;
}
[data-theme="dark"] .sprig,
.experience .sprig,
.hero .sprig {
  --sprig-stem: #d7aa8d;
  --sprig-leaf: #adbea7;
  --sprig-accent: #d49a77;
}
.sprig::before,
.sprig::after {
  position: absolute;
  border-top: 1px solid currentColor;
  border-radius: 50%;
}
.sprig::before { content: ""; }
.sprig i {
  position: absolute;
  width: 19%;
  height: 17%;
  border-radius: 100% 0 100% 0;
  background: var(--sprig-leaf);
}
.sprig i:last-child { background: var(--sprig-accent); }

.sprig-sweep { margin-top: clamp(8px, 1.2vw, 18px); }
.sprig-sweep::before { inset: 39% 5% 14% 3%; transform: rotate(-14deg); }
.sprig-sweep i:nth-child(1) { top: 29%; left: 30%; transform: rotate(-62deg); }
.sprig-sweep i:nth-child(2) { top: 44%; left: 47%; transform: rotate(17deg); }
.sprig-sweep i:nth-child(3) { top: 25%; left: 72%; transform: rotate(-33deg); }

.about-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(10px, 2.4vw, 38px);
}
.about-facts .sprig { margin-bottom: 16px; }
.sprig-fork::before { inset: 39% 4% 10% 6%; transform: rotate(20deg); }
.sprig-fork::after { content: ""; inset: 33% 24% 17% 8%; transform: rotate(-25deg); }
.sprig-fork i:nth-child(1) { top: 11%; left: 53%; transform: rotate(-23deg); }
.sprig-fork i:nth-child(2) { top: 46%; left: 60%; transform: rotate(19deg); }
.sprig-fork i:nth-child(3) { top: 26%; left: 36%; transform: rotate(-54deg); }

.experience .experience-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sprig-cluster { width: clamp(49px, 5vw, 72px); }
.sprig-cluster::before { inset: 23% 5% 29% 4%; transform: rotate(-7deg) scaleY(-1); }
.sprig-cluster i:nth-child(1) { top: 40%; left: 28%; transform: rotate(30deg); }
.sprig-cluster i:nth-child(2) { top: 20%; left: 47%; transform: rotate(-56deg); }
.sprig-cluster i:nth-child(3) { top: 42%; left: 66%; transform: rotate(-12deg); }

.process-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: clamp(8px, 2vw, 24px);
}
.sprig-arc::before { inset: 23% 4% 7% 8%; transform: rotate(-30deg); }
.sprig-arc i:nth-child(1) { top: 56%; left: 17%; transform: rotate(-81deg); }
.sprig-arc i:nth-child(2) { top: 43%; left: 41%; transform: rotate(2deg); }
.sprig-arc i:nth-child(3) { top: 17%; left: 65%; transform: rotate(-25deg); }

.sprig-placement-hero {
  position: absolute;
  right: max(22px, calc((100vw - 1320px) / 2));
  bottom: clamp(24px, 5vw, 66px);
  width: clamp(56px, 8vw, 116px);
  transform: rotate(-18deg);
  opacity: .48;
  filter: drop-shadow(0 1px 2px #17211c);
}
@media (max-width: 720px) {
  .sprig-placement-hero { right: 15px; bottom: 16px; opacity: .40; }
}
@media (max-width: 420px) {
  .process-heading { display: flow-root; position: relative; }
  .process-heading .sprig { position: absolute; bottom: 0; right: 0; }
}

@media (max-width: 720px) and (orientation: portrait) {
  .hero-video { object-position: center; }
}

.edge-ornament-portfolio-home {
  z-index: 1;
  top: 18px;
  right: 0;
  height: clamp(100px, 12vw, 170px);
  opacity: .37;
}
.edge-ornament-price {
  --branch: #d7aa8d;
  --leaf: #adbea7;
  --accent-leaf: #d49a77;
  top: clamp(24px, 5vw, 70px);
  opacity: .38;
}

.project-media[data-gallery="special58"] img,
#gallery[data-project="special58"] #gallery-image {
  filter: sepia(.21) saturate(1.03) brightness(1.02) contrast(.97);
}
.project-media[data-gallery="special61"] img,
#gallery[data-project="special61"] #gallery-image {
  filter: url("#ostrov6-color-tone") brightness(1.05) saturate(.91);
}

/* Service emblems and inset copper corners. */
#services .service-grid {
  --service-emblem: #30493e;
  --service-emblem-line: #fff0dc;
  --service-emblem-copper: #e4ad88;
  --service-corner: #9b5f46;
}
[data-theme="dark"] #services .service-grid {
  --service-emblem: #38584a;
  --service-emblem-copper: #eab896;
  --service-corner: #cb9270;
}
[data-theme="light"] #services .service-grid article:nth-child(2),
[data-theme="light"] #services .service-grid article:nth-child(3) {
  background: #eee0d1;
}
#services .service-grid article {
  position: relative;
}
.service-card-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  margin-bottom: 14px;
}
#services .service-card-title h3 {
  margin-bottom: 0;
  overflow-wrap: break-word;
}
.service-icon {
  display: block;
  width: clamp(46px, 6vw, 72px);
  height: auto;
}
.service-icon-disc { fill: var(--service-emblem); }
.service-icon-ring {
  fill: none;
  stroke: var(--service-emblem-copper);
}
.service-icon-drawing {
  fill: none;
  stroke: var(--service-emblem-line);
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-icon-accent { stroke: var(--service-emblem-copper); }
#services .service-grid article:is(:first-child, :last-child)::after {
  content: "";
  position: absolute;
  inset-block-end: 9px;
  width: 28px;
  height: 13px;
  border-block-end: 1px solid var(--service-corner);
  pointer-events: none;
}
#services .service-grid article:first-child::after {
  inset-inline-start: 12px;
  border-inline-start: 1px solid var(--service-corner);
  border-end-start-radius: 4px;
}
#services .service-grid article:last-child::after {
  inset-inline-end: 12px;
  border-inline-end: 1px solid var(--service-corner);
  border-end-end-radius: 4px;
}
