/* Warm light wood — mobile first, RTL, logical properties throughout. */
@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ivory: #f6f3ed;
  --cream: #ece5da;
  --charcoal: #242321;
  --walnut: #6f4525;
  --walnut-dark: #54331b;
  --bark: #2f231a;
  --olive: #77745e;
  --gray: #a49d91;
  --text-soft: #5c5850;
  --line: rgba(36, 35, 33, 0.14);
  --error: #8f2d1f;

  --font: Vazirmatn, "Segoe UI", Tahoma, system-ui, sans-serif;
  --gutter: clamp(1.125rem, 4vw, 3.5rem);
  --section: clamp(3.75rem, 9vw, 8rem);
  --gap: clamp(0.75rem, 2vw, 1.75rem);
  --radius: 1.1rem;
  --pill: 999px;
  --shadow: 0 10px 30px rgba(67, 45, 26, 0.09);
  --max: 90rem;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.9;
  overflow-wrap: break-word;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; background: var(--cream); }
img.is-broken { min-height: 8rem; color: transparent; }
a { color: inherit; text-underline-offset: 0.3em; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.45; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6.5vw, 4.25rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.125rem; font-weight: 500; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--walnut); outline-offset: 3px; }
[hidden] { display: none !important; }

.icon { width: 1.35em; height: 1.35em; flex: none; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.section { padding-block: var(--section); }
.section--cream { background: var(--cream); }
.section--rings { background: var(--ivory) url("../images/rings.svg") center / cover no-repeat; }
.title { display: flex; align-items: center; justify-content: center; gap: 0.9rem; text-align: center; margin-block-end: clamp(1.5rem, 4vw, 2.75rem); }
.title::before, .title::after { content: ""; flex: 0 1 4.5rem; min-width: 1.5rem; height: 7px; background: radial-gradient(circle, var(--walnut) 0 3px, transparent 3.5px) var(--end) center / 7px 7px no-repeat, linear-gradient(var(--walnut), var(--walnut)) center / 100% 1px no-repeat; }
.title::before { --end: left; }
.title::after { --end: right; }
.more { display: flex; justify-content: center; margin-block-start: 2.5rem; }
.section--tight { padding-block-start: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-block-end: clamp(1.75rem, 4vw, 3rem); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100; background: var(--charcoal); color: var(--ivory); padding: 0.6rem 1rem; }
.skip-link:focus { top: 1rem; }

/* Buttons and links */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0.6rem 1.75rem;
  border: 1px solid var(--walnut); border-radius: var(--pill);
  background: var(--walnut); color: #fff;
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.button:hover { background: var(--walnut-dark); border-color: var(--walnut-dark); }
.button--ghost { background: transparent; color: var(--charcoal); border-color: var(--line); }
.button--ghost:hover { background: var(--charcoal); color: var(--ivory); border-color: var(--charcoal); }
.buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.text-link { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; color: var(--walnut); font-weight: 500; text-decoration: none; }
.text-link .icon { transition: transform 0.3s var(--ease); }
.text-link:hover .icon { transform: translateX(-0.3rem); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; padding-block-start: env(safe-area-inset-top); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; min-height: 2.75rem; font-size: 1.2rem; font-weight: 700; text-decoration: none; }
.brand img { height: 2.5rem; width: auto; background: none; object-fit: contain; }
.brand-mark { width: 1.75rem; height: 1.75rem; color: var(--walnut); }
.nav-toggle { display: none; }
.js .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.9rem; height: 2.9rem; border: 0; background: none; color: inherit; font-size: 1.15rem; cursor: pointer; }
.nav-toggle .icon-close, .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.site-nav ul { display: flex; gap: 0.25rem; }
.site-nav a { display: flex; align-items: center; min-height: 2.75rem; padding-inline: 0.7rem; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--walnut); }
.site-nav a[aria-current="page"] { font-weight: 700; }
html:not(.js) .site-header .wrap { flex-wrap: wrap; }
@media (max-width: 47.99rem) {
  .js .site-nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: #fff; box-shadow: var(--shadow); border-radius: 0 0 var(--radius) var(--radius); border-block-end: 1px solid var(--line); padding: 0.5rem var(--gutter) 1.25rem; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { min-height: 3.25rem; font-size: 1.15rem; border-block-end: 1px solid var(--line); }
}
@media (min-width: 48rem) {
  .js .nav-toggle { display: none; }
  .site-nav ul { gap: 1.25rem; }
}

/* Hero: centred headline over the room photo, dots on the furniture, a floating project card */
.hero { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: min(calc(100svh - 4.25rem), 54rem); background: var(--cream); }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: clamp(1.75rem, 5vw, 3.5rem) var(--gutter) 1rem; text-align: center; pointer-events: none; }
.hero-copy .button { pointer-events: auto; margin-block-start: 0.5rem; }
.hero h1 { font-size: clamp(2.1rem, 8vw, 4.5rem); line-height: 1.4; }
.hero-subtitle { max-width: 28rem; font-size: clamp(1rem, 2vw, 1.25rem); }
.hero-stage { position: relative; flex: 1; min-height: 24rem; overflow: hidden; container-type: inline-size; }
.hero-stage::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 1; height: 5rem; background: linear-gradient(var(--cream), transparent); pointer-events: none; }
/* Covers the stage like object-fit, while the dots stay on the same spot of the photo. */
.hero-scene { position: absolute; left: 50%; top: 50%; translate: -50% -50%; height: max(100%, 100cqw / var(--r)); aspect-ratio: var(--r); }
.hero-scene > img { width: 100%; height: 100%; object-fit: cover; }
.hero-dot { position: absolute; z-index: 2; width: 2.75rem; height: 2.75rem; translate: -50% -50%; padding: 0; border: 0; background: radial-gradient(circle, #fff 0 5px, rgba(111, 69, 37, 0.6) 6px 14px, transparent 15px); cursor: pointer; }
.hero-pop { position: fixed; inset: auto 0 calc(1rem + env(safe-area-inset-bottom)); width: min(24rem, calc(100% - 2rem)); margin-inline: auto; padding: 0.6rem; border: 0; border-radius: 1.5rem; background: #fff; color: var(--charcoal); box-shadow: 0 18px 50px rgba(47, 35, 26, 0.3); }
.mini { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; }
.mini-media { flex: 0 0 36%; max-width: 9rem; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius); background: var(--ivory); color: var(--gray); }
.mini-media img { width: 100%; height: 100%; object-fit: cover; }
.mini-media svg { width: 3rem; height: 3rem; }
.mini-body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; min-width: 0; line-height: 1.7; }
.mini-body strong { font-size: 1.1rem; }
.mini-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 0.9rem; }
.hero-feature { position: relative; z-index: 3; margin: -4.5rem var(--gutter) 1rem; padding: 0.75rem; border-radius: 1.75rem; background: rgba(120, 98, 76, 0.88); backdrop-filter: blur(14px); color: #fff; box-shadow: var(--shadow); }
.hero-feature .button { min-height: 2.75rem; margin-block-start: 0.35rem; }
@media (min-width: 48rem) { .hero-feature { position: absolute; margin: 0; inset-inline-start: var(--gutter); bottom: 1.5rem; width: 27rem; } }
.hero--plain { min-height: 0; justify-content: center; background: var(--cream) url("../images/rings.svg") center / cover no-repeat; }
.hero--plain .hero-copy { padding-block: clamp(4rem, 14vw, 9rem); }
.hero--plain .hero-feature { position: relative; margin: 0 auto 1.5rem; inset: auto; width: min(27rem, calc(100% - 2 * var(--gutter))); }

/* Project cards: an editorial grid instead of identical tiles */
.project-grid { display: grid; gap: clamp(2.25rem, 5vw, 4.5rem) var(--gap); grid-template-columns: minmax(0, 1fr); }
.card a { display: block; height: 100%; padding: 0.55rem 0.55rem 0.9rem; border-radius: 1.5rem; background: #fff; box-shadow: var(--shadow); text-decoration: none; }
.card-media { overflow: hidden; border-radius: var(--radius); background: var(--cream); aspect-ratio: 4 / 3; }
.card--portrait .card-media { aspect-ratio: 4 / 5; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.card-media--empty { display: grid; place-items: center; color: var(--gray); }
.card-media--empty svg { width: 3rem; height: 3rem; }
.card h2, .card h3 { margin: 0.85rem 0.5rem 0; font-size: 1.2rem; }
.card-category { margin-inline: 0.5rem; color: var(--text-soft); font-size: 0.95rem; }
@media (hover: hover) {
  .card a:hover .card-media img, .tile a:hover img { transform: scale(1.035); }
  .card a:hover h2, .card a:hover h3 { color: var(--walnut); }
}
.card a:active .card-media { opacity: 0.85; }
@media (min-width: 40rem) {
  .project-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .card { grid-column: span 6; }
  .card a { height: auto; }
}
@media (min-width: 64rem) {
  .card:nth-child(6n + 1) { grid-column: span 7; }
  .card:nth-child(6n + 2) { grid-column: span 5; margin-block-start: 6rem; }
  .card:nth-child(6n + 3), .card:nth-child(6n + 4), .card:nth-child(6n + 5) { grid-column: span 4; }
  .card:nth-child(6n + 6) { grid-column: 3 / span 8; }
  .card:nth-child(6n + 6):not(.card--portrait) .card-media { aspect-ratio: 16 / 10; }
  .card:only-child { grid-column: 1 / -1; }
}

/* Category tiles: swipeable on phones */
.tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; padding-block-end: 0.75rem; overscroll-behavior-x: contain; }
.tile { scroll-snap-align: start; }
.tile a { display: block; text-decoration: none; }
.tile-media { aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius); background: var(--cream); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.tile h3 { margin-block-start: 0.7rem; }
@media (min-width: 40rem) { .tiles { grid-auto-columns: 38%; } }
@media (min-width: 64rem) { .tiles { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); overflow: visible; } }

/* About and craft */
.about { display: flex; flex-direction: column; align-items: center; text-align: center; }
.about .title { align-self: stretch; margin-block-end: 1rem; }
.prose { color: var(--text-soft); max-width: 40rem; white-space: pre-line; }
.about-image { width: 100%; max-width: 42rem; margin-block-start: 2rem; border-radius: 1.5rem; background: none; }
.craft-list { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; padding: 0.25rem 0.25rem 1.5rem; }
.craft-list li { scroll-snap-align: start; padding: 1.5rem; border-radius: 1.5rem; background: #fff; box-shadow: var(--shadow); }
.craft-icon { display: grid; place-items: center; width: 3.75rem; height: 3.75rem; margin-block-end: 1rem; border-radius: 50%; background: var(--ivory); color: var(--walnut); font-size: 1.3rem; }
.craft-list p { color: var(--text-soft); margin-block-start: 0.4rem; }
.craft-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-block-end: 2.5rem; border-radius: var(--radius); }
.dots { display: flex; justify-content: center; }
.dots button { width: 2rem; height: 2rem; padding: 0; border: 0; background: radial-gradient(circle, var(--cream) 0 5px, transparent 5.5px); filter: brightness(0.92); cursor: pointer; }
.dots button[aria-current="true"] { background: radial-gradient(circle, var(--walnut) 0 5px, transparent 5.5px); filter: none; }
@media (min-width: 48rem) { .craft-list { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; } .dots { display: none; } }

/* Justified gallery: each item keeps its own proportion */
.gallery { display: flex; flex-wrap: wrap; gap: clamp(0.4rem, 1vw, 0.9rem); --row: 9rem; }
.gallery::after { content: ""; flex-grow: 1000000; }
.gallery li { flex: calc(var(--r) * 100) 1 calc(var(--r) * var(--row)); min-width: 0; }
.gallery a { display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: var(--r); cursor: zoom-in; }
.gallery--links a { cursor: pointer; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }
.gallery a:hover img { opacity: 0.88; }
@media (min-width: 48rem) { .gallery { --row: 17rem; } }

/* Contact call-to-action and footer */
.dark { background: var(--bark); color: var(--ivory); }
.dark :focus-visible { outline-color: var(--cream); }
.dark .button { background: var(--ivory); border-color: var(--ivory); color: var(--charcoal); }
.dark .button:hover { background: var(--cream); }
.dark .button--ghost { background: transparent; color: var(--ivory); border-color: rgba(245, 242, 236, 0.35); }
.dark .button--ghost:hover { background: var(--ivory); color: var(--charcoal); }
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 2rem; }
.site-footer { background: var(--bark); color: var(--cream); border-block-start: 1px solid rgba(245, 242, 236, 0.14); padding-block: 3.5rem calc(2rem + env(safe-area-inset-bottom)); }
.footer-grid { display: grid; gap: 2rem; }
.site-footer a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .brand img { height: 2.75rem; }
.footer-muted { color: #c9c3b6; }
.socials { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.site-footer .socials a, .socials--light a { justify-content: center; width: 2.9rem; height: 2.9rem; border: 1px solid currentColor; border-radius: 50%; font-size: 1.1rem; }
.footer-bottom { margin-block-start: 2.5rem; color: #b7b1a5; font-size: 0.9rem; }
@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: 2fr 1fr 1.5fr; }
  .cta { flex-direction: row; justify-content: space-between; align-items: center; }
}
.whatsapp-float { position: fixed; z-index: 30; inset-inline-end: max(1rem, env(safe-area-inset-left)); bottom: calc(1rem + env(safe-area-inset-bottom)); display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: #1f6b48; color: #fff; font-size: 1.4rem; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
@media (min-width: 64rem) { .whatsapp-float { display: none; } }

/* Portfolio listing */
.page-head { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); }
.filters { display: flex; gap: 0.5rem; overflow-x: auto; padding-block: 0.25rem 0.75rem; margin-block-end: 2rem; scrollbar-width: none; }
.filters a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 1.15rem; border: 1px solid var(--line); border-radius: var(--pill); background: #fff; text-decoration: none; white-space: nowrap; transition: background-color 0.2s, color 0.2s; }
.filters a:hover { border-color: var(--charcoal); }
.filters a[aria-current="true"] { background: var(--walnut); border-color: var(--walnut); color: var(--ivory); }
.results { transition: opacity 0.25s; min-height: 20rem; }
.results[aria-busy="true"] { opacity: 0.4; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; padding-block: clamp(3rem, 10vw, 7rem); text-align: center; }
.empty svg { width: 4.5rem; height: 4.5rem; color: var(--gray); }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-block-start: 4rem; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 2.9rem; height: 2.9rem; padding-inline: 0.5rem; border-radius: var(--radius); text-decoration: none; }
.pagination a { border: 1px solid var(--line); }
.pagination a:hover { border-color: var(--charcoal); }
.pagination [aria-current="page"] { background: var(--charcoal); color: var(--ivory); }

/* Project detail */
.project-head { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 3vw, 2.5rem); }
.project-head a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--walnut); text-decoration: none; font-weight: 500; }
.draft-notice { background: var(--walnut); color: #fff; text-align: center; padding: 0.5rem; }
.lead-media { margin: 0 auto; max-width: var(--max); }
.lead-media img { width: 100%; max-height: 85svh; object-fit: contain; background: var(--cream); }
.lead-media a { display: block; cursor: zoom-in; }
.intro { display: grid; gap: 2.5rem; padding-block: clamp(2.5rem, 6vw, 5rem); }
.intro-lead { font-size: clamp(1.15rem, 2.4vw, 1.6rem); line-height: 2; font-weight: 300; white-space: pre-line; }
.intro .prose { margin-block-start: 1.25rem; }
.facts { align-self: start; border-block-start: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.75rem; border-block-end: 1px solid var(--line); }
.facts dt { color: var(--text-soft); }
.facts dd { margin: 0; text-align: end; }
@media (min-width: 56rem) { .intro--facts { grid-template-columns: 2fr 1fr; gap: 5rem; } }
.block { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.block > h2 { margin-block-end: 1.75rem; }
.spec-grid { display: grid; gap: 3rem; }
.spec-grid h2 { margin-block-end: 1.25rem; font-size: 1.5rem; }
.spec-grid ul li { padding-block: 0.75rem; border-block-end: 1px solid var(--line); }
.spec-grid .facts div:last-child, .spec-grid ul li:last-child { border-block-end: 0; }
@media (min-width: 56rem) { .spec-grid { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 5rem; } }

.panorama-preview { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 48rem) { .panorama-preview { aspect-ratio: 21 / 9; } }
.panorama-actions { margin-block-start: 1rem; }
html:not(.js) .panorama-actions { display: none; }

.videos { display: grid; gap: 2.5rem; }
.videos video { width: 100%; max-height: 80svh; aspect-ratio: 16 / 9; background: var(--charcoal); border-radius: var(--radius); }
.videos h3 { margin-block-start: 0.75rem; }
.videos p { color: var(--text-soft); }
@media (min-width: 56rem) { .videos--many { grid-template-columns: 1fr 1fr; } }

.pager { display: flex; justify-content: space-between; gap: 1rem; border-block: 1px solid var(--line); padding-block: 1.25rem; }
.pager a { display: flex; align-items: center; gap: 0.75rem; min-height: 3rem; max-width: 48%; text-decoration: none; }
.pager a:hover { color: var(--walnut); }
.pager .next { margin-inline-start: auto; text-align: end; }

/* Panorama viewer dialog */
.pano { width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: #151413; color: var(--ivory); }
.pano[open] { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.pano::backdrop { background: #151413; }
.pano-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: calc(0.5rem + env(safe-area-inset-top)) 0.75rem 0.5rem; }
.pano-bar h2 { font-size: 1.05rem; font-weight: 500; }
.pano-button { display: inline-grid; place-items: center; flex: none; width: 2.9rem; height: 2.9rem; border: 1px solid rgba(245, 242, 236, 0.3); border-radius: var(--radius); background: transparent; color: inherit; font-size: 1.1rem; cursor: pointer; }
.pano-button:hover, .pano-button[aria-pressed="true"] { background: var(--ivory); color: var(--charcoal); }
.pano-button:focus-visible, .pano-scenes button:focus-visible { outline-color: var(--cream); }
.pano-stage { position: relative; flex: 1; min-height: 0; direction: ltr; }
.pano-view { position: absolute; inset: 0; }
.pano-status { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1rem; padding: 1.5rem; text-align: center; direction: rtl; background: #151413; z-index: 5; }
.spinner { width: 2.5rem; height: 2.5rem; border: 2px solid rgba(245, 242, 236, 0.25); border-block-start-color: var(--ivory); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pano-foot { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom)); }
.pano-hint { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.9rem; color: var(--cream); text-align: center; }
.pano-controls { display: flex; justify-content: center; gap: 0.5rem; direction: ltr; }
.pano-scenes { display: flex; gap: 0.5rem; overflow-x: auto; }
.pano-scenes button { flex: none; min-height: 2.75rem; padding-inline: 1rem; border: 1px solid rgba(245, 242, 236, 0.3); border-radius: var(--radius); background: none; color: inherit; font: inherit; cursor: pointer; }
.pano-scenes button[aria-pressed="true"] { background: var(--ivory); color: var(--charcoal); }
.pano .pnlm-container { font-family: var(--font); background: #151413; }
.pano .pnlm-load-box, .pano .pnlm-load-button { display: none !important; }

/* PhotoSwipe: always LTR internally, controls visible on touch as well */
.pswp { direction: ltr; --pswp-bg: #151413; }
.pswp--touch .pswp__button--arrow { visibility: visible; }
.pswp__error-msg { direction: rtl; }

/* Contact page and form */
.contact-layout { display: grid; gap: 3.5rem; padding-block-end: var(--section); }
@media (min-width: 56rem) { .contact-layout { grid-template-columns: 3fr 2fr; gap: 6rem; } }
.form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 500; }
.field input, .field textarea { width: 100%; min-height: 3.25rem; padding: 0.7rem 0.9rem; border: 1px solid var(--gray); border-radius: 0.8rem; background: #fff; color: inherit; font: inherit; }
.field input[dir="ltr"] { text-align: right; }
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--error); }
.errorlist { color: var(--error); font-size: 0.95rem; }
.notice { padding: 0.9rem 1.1rem; border: 1px solid currentColor; border-radius: var(--radius); margin-block-end: 1.5rem; }
.notice--success { color: #2c5a38; }
.notice--error { color: var(--error); }
.hp { position: absolute !important; inset-inline-start: -200vw; width: 1px; height: 1px; overflow: hidden; }
.contact-list { display: grid; gap: 0.5rem; align-content: start; }
.contact-list a, .contact-list p { display: flex; align-items: center; gap: 0.75rem; min-height: 3rem; text-decoration: none; }
.contact-list a:hover { color: var(--walnut); }
.ltr { direction: ltr; unicode-bidi: isolate; }

.error-page { min-height: 60svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.5rem; padding-block: var(--section); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js .reveal { opacity: 0; transform: translateY(1.25rem); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .spinner { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
}
[id] { scroll-margin-top: 5rem; }
