@font-face { font-family: Jost; font-weight: 300 500; font-display: swap; src: url(fonts/jost-300-500-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Jost; font-weight: 300 500; font-display: swap; src: url(fonts/jost-300-500-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Jost; font-weight: 300 500; font-display: swap; src: url(fonts/jost-300-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Makam's own finishes: cashmere fronts, walnut, brushed brass, white stone */
:root {
  --cashmere: #ebe6de; --cashmere-deep: #cfc6b9; --paper: #f7f4ef; --line: #d8d0c4;
  --walnut: #3a2e25; --walnut-deep: #2a2019; --walnut-soft: #65584d; --brass: #ae8a55; --brass-deep: #8a6a3c;
  --gutter: 24px; --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--cashmere-deep) var(--cashmere); }
body { background: var(--cashmere); color: var(--walnut); font: 400 1rem/1.55 Jost, system-ui, sans-serif; }
body.docked { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
::selection { background: var(--walnut); color: var(--cashmere); }
:focus-visible { outline: 2px solid var(--brass-deep); outline-offset: 3px; }
a { color: inherit; text-decoration-color: var(--brass); text-underline-offset: .25em; text-decoration-thickness: 1px; }
img { display: block; max-width: 100%; height: auto; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--walnut); color: var(--cashmere); padding: 10px 16px; z-index: 9; }
.skip:focus { left: 8px; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; }
.word { font-weight: 500; font-size: .95rem; letter-spacing: .42em; text-decoration: none; min-height: 56px; display: inline-flex; align-items: center; }
.word[aria-current] { text-decoration: none; }
.head-wa { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; font-size: .9rem; text-decoration: none; }
.head-wa .icon { stroke: var(--brass-deep); }
.nav { grid-column: 1 / -1; display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.nav a { flex: none; min-height: 44px; display: inline-flex; align-items: center; font-size: .85rem; color: var(--walnut-soft); text-decoration: none; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--walnut); }
.nav a[aria-current] { color: var(--walnut); border-bottom-color: var(--brass); }
@media (min-width: 60rem) {
  .top .wrap { grid-template-columns: auto 1fr auto; }
  .nav { grid-column: auto; justify-content: center; margin: 0; padding: 0; gap: 32px; }
  .nav a { font-size: .9rem; }
  .head-wa { order: 3; }
}

/* type */
h1 { font-weight: 300; font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem); line-height: 1.06; letter-spacing: -.015em; text-wrap: balance; }
h2 { font-weight: 300; font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.3rem); line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
h3, .gallery h2, .steps h2 { font-weight: 500; font-size: 1.05rem; line-height: 1.3; }
.lead { color: var(--walnut-soft); max-width: 36rem; }
.page-head { padding: 40px 0 28px; }
.page-head .lead { margin-top: 12px; }
section.block { padding: 56px 0 0; }
section.block > .wrap > h2 { margin-bottom: 20px; }
.rule { height: 1px; background: var(--brass); border: 0; opacity: .7; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 24px; border-radius: 2px; background: var(--walnut); color: var(--cashmere); text-decoration: none; font-size: .95rem; letter-spacing: .02em; transition: background-color .2s; }
.btn:hover { background: var(--walnut-deep); }
.btn .icon { stroke: var(--brass); }
.btn[aria-disabled="true"] { background: var(--cashmere-deep); color: var(--walnut-soft); pointer-events: none; }
.link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }

/* home: headline and arch, then the planner; on wide screens the arch holds the right column */
.home { display: grid; grid-template-columns: 1fr minmax(140px, 40%); grid-template-areas: "h1 arch" "facts facts" "plan plan" "side side"; column-gap: 18px; padding-top: 28px; }
.home h1 { grid-area: h1; align-self: end; }
.home .arch { grid-area: arch; }
.home .facts { grid-area: facts; border-bottom: 1px solid var(--brass); padding-bottom: 22px; }
.home .planner { grid-area: plan; }
.home .side { grid-area: side; display: grid; gap: 8px; justify-items: start; padding-top: 20px; }
.arch { aspect-ratio: 2 / 3; border-radius: 999px 999px 3px 3px; overflow: hidden; outline: 1px solid var(--brass); outline-offset: 6px; margin: 7px; }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding-top: 22px; font-size: .9rem; color: var(--walnut-soft); }
.facts b { color: var(--walnut); font-weight: 500; }
@media (min-width: 60rem) {
  .home { grid-template-columns: 1fr 20rem; grid-template-areas: "h1 arch" "facts arch" "plan arch" "plan side"; grid-template-rows: auto auto auto 1fr; column-gap: 72px; padding-top: 40px; }
  .home h1 { align-self: start; }
  .home .arch { align-self: start; }
  .home .planner .sheet svg { max-height: 320px; }
}

/* planner */
.planner { padding-top: 28px; }
.planner-grid { display: grid; gap: 20px; }
@media (min-width: 60rem) { .planner-grid { grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; } .planner-grid .draw { position: sticky; top: 24px; } }
fieldset { border: 0; padding: 0; min-width: 0; }
legend, .label { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--walnut-soft); margin-bottom: 12px; padding: 0; }
.shapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shapes button { font: inherit; font-size: .85rem; white-space: nowrap; padding: 0 4px; min-height: 48px; border: 1px solid var(--line); border-radius: 2px; background: transparent; color: var(--walnut-soft); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: border-color .2s, color .2s; }
.shapes button:hover { border-color: var(--cashmere-deep); color: var(--walnut); }
.shapes button[aria-pressed="true"] { border-color: var(--walnut); color: var(--walnut); font-weight: 500; }
.shapes svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.sheet { background: var(--paper); margin-top: 14px; padding: 8px; }
.sheet svg { display: block; width: 100%; height: auto; max-height: 360px; transition: opacity .25s; }
.sheet svg.swap .pw { stroke-dasharray: 1; animation: draw .7s var(--ease) both; }
.sheet svg.swap .pb, .sheet svg.swap .pf, .sheet svg.swap .pm { animation: rise .5s .15s var(--ease) both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; } }
.pd { fill: none; stroke: var(--brass); stroke-width: .9; }
.sheet.stale svg { opacity: .35; }
.sheet .note { font-size: .78rem; color: var(--walnut-soft); text-align: right; padding: 0 6px 4px; }
.pb { fill: var(--cashmere-deep); stroke: var(--walnut); stroke-width: 1.2; }
.pm { stroke: var(--walnut); stroke-width: .8; opacity: .5; }
.pu { fill: none; stroke: var(--walnut); stroke-width: 1; stroke-dasharray: 3 4; }
.pf { fill: var(--paper); stroke: var(--walnut); stroke-width: 1; }
.pw { fill: none; stroke: var(--walnut); stroke-width: 6; stroke-linecap: square; }
.pt { fill: var(--walnut); font: 500 14px Jost, sans-serif; letter-spacing: .04em; }
.walls { display: grid; gap: 12px; }
.wall label { display: block; font-size: .9rem; margin-bottom: 6px; }
.step { display: grid; grid-template-columns: 48px 1fr 48px; border: 1px solid var(--line); background: var(--paper); }
.step button { font: inherit; font-size: 1.25rem; border: 0; background: none; color: var(--walnut); min-height: 48px; cursor: pointer; }
.step button:hover { background: var(--cashmere); }
.step input { font: inherit; font-size: 1.05rem; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: none; color: var(--walnut); min-width: 0; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.step input::-webkit-inner-spin-button { -webkit-appearance: none; }
.wall .hint { font-size: .82rem; color: var(--walnut-soft); margin-top: 4px; }
.wall .hint.err { color: #8c2f1d; }
.options { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; }
.opt:has(input:checked) { border-color: var(--walnut); }
.opt input { accent-color: var(--walnut); width: 18px; height: 18px; margin: 0; flex: none; }
.opt span { flex: 1; }
.opt small { color: var(--walnut-soft); font-size: .82rem; white-space: nowrap; }
.controls { display: grid; gap: 28px; }
.rulenote { font-size: .85rem; color: var(--walnut-soft); }

/* dock */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--paper); border-top: 1px solid var(--line); padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); }
.dock .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dock small { display: block; font-size: .78rem; color: var(--walnut-soft); }
.dock b { display: block; font-weight: 400; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.dock b.none { font-size: 1rem; color: var(--walnut-soft); }

/* work */
.works { display: grid; gap: 28px; }
.work-link { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; text-decoration: none; }
.work-link img { aspect-ratio: 3 / 4; object-fit: cover; border-radius: 999px 999px 2px 2px; }
.work-link span { display: block; color: var(--walnut-soft); font-size: .9rem; margin-top: 4px; }
@media (min-width: 60rem) { .works { grid-template-columns: repeat(3, 1fr); } .work-link { grid-template-columns: 1fr; } .work-link img { width: 100%; } }
.subnav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.subnav a { flex: none; min-height: 44px; display: inline-flex; align-items: center; color: var(--walnut-soft); text-decoration: none; border-bottom: 1px solid transparent; font-size: .95rem; }
.subnav a[aria-current] { color: var(--walnut); border-bottom-color: var(--brass); }
.gallery { display: grid; gap: 44px; padding-bottom: 24px; }
.gallery figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gallery figure:first-child img { border-radius: 999px 999px 2px 2px; outline: 1px solid var(--brass); outline-offset: 6px; }
.gallery figure:first-child { padding: 7px; }
.gallery figcaption { display: grid; gap: 4px; padding-top: 14px; }
.gallery figcaption .acts { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: .9rem; }
@media (min-width: 60rem) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 56px 40px; } }

/* process */
.steps { list-style: none; padding: 0; counter-reset: s; border-top: 1px solid var(--line); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); grid-row: span 3; font-weight: 300; font-size: 1.6rem; line-height: 1.1; color: var(--walnut-soft); }
.steps p { color: var(--walnut-soft); }
.steps .src { font-size: .8rem; letter-spacing: .02em; }

/* reviews, contacts, footer */
.quotes { display: grid; gap: 28px; }
.quotes blockquote { border-left: 0; padding: 0; }
.quotes p { font-weight: 300; font-size: 1.25rem; line-height: 1.4; }
.quotes cite { display: block; margin-top: 10px; font-style: normal; font-size: .85rem; color: var(--walnut-soft); }
@media (min-width: 60rem) { .quotes { grid-template-columns: repeat(2, 1fr); gap: 40px 56px; } }
.contact { display: grid; gap: 22px; }
.contact dt { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--walnut-soft); }
.contact dd { margin: 4px 0 0; font-size: 1.05rem; }
.cta { padding: 48px 0 8px; display: grid; gap: 16px; justify-items: start; }
.foot { margin-top: 72px; border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: .85rem; color: var(--walnut-soft); }
.foot .wrap { display: grid; gap: 14px; }
.foot p { max-width: 46rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sheet svg[data-top="board"] .pb { fill: #ddd5c9; }
.sheet svg.tall .pu { stroke-dasharray: none; }
