/* Alkahf, an architectural property index. Local fonts and project imagery ship with the app. */
@font-face {
  font-family: Instrument;
  src: url("./assets/fonts/instrument-normal.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: DM;
  src: url("./assets/fonts/dm-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: DM;
  src: url("./assets/fonts/dm-600.ttf") format("truetype");
  font-weight: 600 800;
  font-display: swap;
}

:root {
  --enji: #9e2b3d;
  --wash: #f0e8d8;
  --architectural: var(--matsuba);
  --kogane: #d4af37;
  --matsuba: #3b5133;
  --ink: #222621;
  --muted: #4b5049;
  --kinari: #f8f4e9;
  --paper: var(--kinari);
  --rule: #c7c9bb;
  --white: #fff;
  --serif: Instrument,Georgia,serif;
  --sans: DM,Arial,sans-serif;
  --gutter: clamp(22px,4.8vw,86px);
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.5 var(--sans);
  font-synthesis: none;
}

*,*::before,*::after {
  box-sizing: border-box;
}

body,h1,h2,h3,p,dl,dd,figure,ol,ul {
  margin: 0;
}

body {
  min-width: 0;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

footer {
  margin-top: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,input,select,summary {
  font: inherit;
  color: inherit;
}

button,summary,select {
  cursor: pointer;
}

button {
  background: transparent;
  border: 0;
}

button:disabled {
  opacity: .6;
  cursor: wait;
}

a,button,input,select,summary {
  touch-action: manipulation;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

svg {
  flex-shrink: 0;
}

h1,h2,h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.028em;
  line-height: 1.03;
  text-wrap: balance;
}

h1 {
  font-size: clamp(3.9rem,6.4vw,6.6rem);
}

h2 {
  font-size: clamp(2.4rem,4vw,4rem);
}

h3 {
  font-size: clamp(1.7rem,2.4vw,2.5rem);
}

[hidden] {
  display: none!important;
}

:where(a,button,input,select,summary,[tabindex="0"]):focus-visible {
  outline: 3px solid var(--matsuba);
  outline-offset: 4px;
}

[tabindex="-1"]:focus {
  outline: 0;
}

.skip {
  position: fixed;
  top: 6px;
  left: 8px;
  z-index: 10;
  transform: translateY(-160%);
  background: var(--paper);
  padding: 12px 18px;
}

.skip:focus {
  transform: none;
}

.wrap,.head-inner,.hero-inner,.foot-inner {
  width: min(calc(100% - 2 * var(--gutter)),1440px);
  margin-inline: auto;
}

.site-head {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.head-inner,.foot-inner,.site-head nav,footer nav,.brand,.nav-portfolio,.text-link,.back,.button,.place,.line-label,.open-preview,.preview-tools,.view-switch,.detail-nav {
  display: flex;
  align-items: center;
}

.head-inner,.foot-inner {
  justify-content: space-between;
}

.head-inner {
  min-height: 72px;
}

.brand {
  gap: 10px;
  color: var(--ink);
}


.brand-type {
  display: flex;
}

.letters {
  width: 83px;
  height: auto;
}

.site-head nav,footer nav {
  gap: clamp(14px,2.6vw,42px);
}

.site-head nav a,footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .9rem;
}

.nav-portfolio {
  gap: 8px;
}

.site-head [aria-current],.account-tabs [aria-current] {
  text-decoration: underline;
  text-decoration-color: var(--matsuba);
  text-thickness: 2px;
  text-underline-offset: 7px;
}

a:hover,.reset-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

footer {
  background: var(--ink);
  color: var(--paper);
}

footer .brand {
  color: var(--paper);
}

footer :focus-visible {
  outline-color: var(--kogane);
}

.foot-inner {
  min-height: 94px;
  gap: 18px;
}

.eyebrow,.preview-layout,.collection-facts dt,.card-values small,.ref-block>span,.balance dt,.balance>div>span,.total-callout>span {
  font: 600 .72rem/1.4 var(--sans);
  letter-spacing: .115em;
  text-transform: uppercase;
}

.line-label {
  gap: 12px;
}

.line-label::before {
  content: "";
  width: 32px;
  height: 3px;
  background: var(--architectural);
}

.button {
  display: inline-flex;
  min-height: 49px;
  padding: 13px 22px;
  justify-content: center;
  gap: 23px;
  color: var(--kinari);
  background: var(--matsuba);
  border: 1px solid var(--matsuba);
  font-size: .94rem;
  font-weight: 600;
}

.button:hover {
  background: #37452e;
  text-decoration: none;
}

.full {
  width: 100%;
}

.text-link,.back,.open-preview {
  min-height: 44px;
  gap: 10px;
  width: fit-content;
  font-weight: 600;
}

.text-link,.open-preview {
  color: #405035;
}

.back {
  font-size: .86rem;
  color: var(--muted);
}

.cover {
  background: var(--wash);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr);
  align-items: center;
  gap: clamp(28px,5vw,92px);
  padding-block: clamp(34px,4.8vw,78px);
}

.hero-copy {
  min-width: 0;
}

.hero-copy h1 {
  font-size: clamp(4.4rem,7.9vw,8.5rem);
  line-height: .92;
  letter-spacing: -.042em;
  margin: 25px 0 20px;
}

.hero-deck {
  max-width: 37ch;
  font-size: clamp(1rem,1.33vw,1.18rem);
  line-height: 1.55;
  margin-bottom: 24px;
}

.collection-facts {
  display: flex;
  gap: 0;
  border-top: 1px solid #ae939b;
  padding-top: 15px;
  margin-top: clamp(25px,3.2vw,55px);
  max-width: 440px;
}

.collection-facts div {
  display: flex;
  flex-direction: column-reverse;
  flex: 1;
  align-items: start;
}

.collection-facts div+div {
  border-left: 1px solid #af949f;
  padding-left: clamp(12px,1.8vw,28px);
}

.collection-facts dd {
  font: 400 2rem/1 var(--serif);
  margin-bottom: 5px;
}

.collection-facts dt {
  font-size: .64rem;
  letter-spacing: .075em;
}

.live-preview {
  min-width: 0;
  align-self: center;
  background: var(--paper);
  border: 1px solid #918d71;
}

.preview-tools {
  justify-content: space-between;
  gap: 14px;
  padding: 0 17px;
  border-bottom: 1px solid var(--rule);
}

.view-switch {
  gap: 17px;
}

.view-switch button {
  position: relative;
  padding: 12px 2px;
  min-height: 44px;
  font-size: .83rem;
  color: var(--muted);
}

.view-switch button[aria-pressed="true"] {
  font-weight: 600;
  color: var(--ink);
}

.view-switch button[aria-pressed="true"]::after {
  position: absolute;
  content: "";
  bottom: -1px;
  inset-inline: 0;
  height: 3px;
  background: var(--architectural);
}

.open-preview {
  font-size: .78rem;
  gap: 5px;
}

.open-preview svg {
  transform: rotate(-40deg);
}

.preview-panel iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
  pointer-events: none;
}

.feature {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 7%;
  align-items: center;
  padding-block: clamp(40px,6vw,88px);
}

.feature-image img {
  aspect-ratio: 1.9;
  object-fit: cover;
}

.feature-info h2 {
  margin: 16px 0 3px;
}

.feature-info p:not(.eyebrow) {
  max-width: 49ch;
  color: var(--muted);
}

.feature-place {
  margin: 0 0 13px;
}

.feature-info .text-link {
  margin-top: 10px;
}

.catalog,.property-page,.narrow,.portfolio {
  padding-top: clamp(26px,4vw,60px);
  padding-bottom: clamp(48px,6vw,96px);
}

.collection-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.collection-intro h1,.portfolio h1 {
  margin: 13px 0 0;
}

.collection-intro>p {
  max-width: 33ch;
  color: var(--muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  padding: 20px 0;
  border-block: 1px solid var(--architectural);
  margin-top: 33px;
}

label {
  display: block;
  font-weight: 600;
}

.filter-bar label,.layout-card label {
  font-size: .82rem;
}

select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 9px 30px 9px 12px;
  background: #fff;
  border-radius: 0;
  border: 1px solid #77796d;
  font-size: 1rem;
  margin-top: 5px;
}

.count-line {
  font-size: .84rem;
  color: var(--muted);
  margin: 19px 0 8px;
}

.catalog-grid {
  border-bottom: 1px solid var(--rule);
}

.property-card {
  display: grid;
  grid-template-columns: clamp(165px,21vw,320px) minmax(0,1fr);
  gap: clamp(18px,3.4vw,52px);
  align-items: center;
  padding: 19px 0;
  border-top: 1px solid var(--rule);
}

.property-card>img {
  height: clamp(110px,12vw,183px);
  object-fit: cover;
}

.card-info {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(145px,.55fr) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.card-info h2 {
  font-size: clamp(1.9rem,3.5vw,3.8rem);
  margin: 6px 0;
}

.record-layouts,.card-values small {
  color: var(--muted);
}

.record-layouts {
  font-size: .85rem;
}

.card-values b,.card-values small {
  display: block;
}

.card-values b {
  font-size: clamp(1rem,1.6vw,1.4rem);
  font-variant-numeric: tabular-nums;
  margin-top: 5px;
}

.card-info>svg {
  color: var(--matsuba);
}

.property-card:hover {
  text-decoration: none;
}

.property-card:hover h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.property-heading {
  margin: 14px 0 28px;
}

.property-heading h1 {
  margin: 8px 0;
  font-size: clamp(3.5rem,6.3vw,6.4rem);
}

.place {
  gap: 6px;
  color: var(--muted);
  font-size: .95rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0,1.48fr) minmax(300px,.86fr);
  gap: 24px clamp(24px,3vw,48px);
  align-items: start;
}

.gallery {
  min-width: 0;
}

.gallery-frame {
  position: relative;
}

.gallery-img {
  aspect-ratio: 1.52;
  object-fit: cover;
}

.image-label {
  position: absolute;
  bottom: 13px;
  left: 13px;
  font-size: .72rem;
  color: var(--ink);
  background: var(--paper);
  padding: 4px 8px;
}

.image-expand,.icon-button,.dialog-close {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  background: var(--paper);
  border: 1px solid var(--rule);
}

.image-expand {
  position: absolute;
  top: 13px;
  right: 13px;
}

.gallery-meta {
  display: flex;
  gap: 13px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  padding: 9px 0;
  font-size: .87rem;
}

.gallery-meta>div {
  display: flex;
  gap: 5px;
}

.icon-button:hover,.dialog-close:hover,.image-expand:hover,.quiet:hover {
  background: var(--wash);
}

.layout-card {
  grid-column: 2;
  grid-row: 1/3;
  background: var(--wash);
  border-top: 3px solid var(--architectural);
  padding: clamp(18px,2.3vw,36px);
  position: sticky;
  top: 18px;
  min-width: 0;
}

.preview-layout {
  display: none;
}

.layout-card select {
  margin-bottom: 20px;
}

.ref-block>span,.ref-block strong {
  display: block;
}

.ref-block>span {
  color: var(--muted);
}

.ref-block strong {
  font: 400 clamp(1.65rem,2.5vw,2.65rem)/1.15 var(--serif);
  margin-top: 5px;
}

.spec-list {
  margin: 15px 0 21px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: .94rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}

.detail-row dt {
  color: var(--muted);
}

.detail-row dd {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.layout-card .detail-row,.receipt-side .detail-row {
  border-color: #be9da8;
}

.help,.lede,.details-below p {
  color: var(--muted);
}

.help {
  font-size: .84rem;
  line-height: 1.55;
}

.layout-card>.help {
  margin-top: 9px;
  text-align: center;
}

.details-below {
  grid-column: 1;
  min-width: 0;
}

.detail-nav {
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--architectural);
}

.detail-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: .87rem;
  font-weight: 600;
}

.details-below section {
  padding: 25px 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 16px;
}

.details-below h2,.receipt-side h2,.activity h2,.holding-list h2 {
  font-size: clamp(2rem,3.4vw,3.2rem);
  margin-bottom: 12px;
}

.details-below p {
  margin-block: 6px 14px;
}

.compare summary,.receipt-side summary {
  font-weight: 600;
  padding: 10px 0;
  min-height: 44px;
}

.compare ul,.activity ol {
  list-style: none;
  padding: 0;
}

.compare a,.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--rule);
  padding: 13px 0;
}

.compare small,.activity-item small {
  display: block;
  color: var(--muted);
  font-size: .84rem;
}

.compare strong {
  font-size: .89rem;
}

.plan-thumb {
  display: block;
  width: 100%;
  min-height: 44px;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 12px;
  margin-top: 12px;
}

.plan-thumb img {
  height: 240px;
  object-fit: contain;
}

.plan-thumb span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  padding: 12px 4px 0;
  border-top: 1px solid var(--rule);
}

.narrow {
  max-width: 1100px;
}

.flow-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: start;
  gap: clamp(28px,6vw,100px);
  margin-top: 22px;
}

.flow-form h1,.confirmed h1 {
  font-size: clamp(3.55rem,5.8vw,5.6rem);
  margin: 13px 0 22px;
}

.small-property {
  display: flex;
  align-items: center;
  gap: 16px;
}

.small-property img {
  width: 100px;
  height: 76px;
  object-fit: cover;
}

.small-property h3 {
  font-size: 1.7rem;
  margin: 3px 0;
}

.small-property span {
  font-size: .9rem;
}

.flow-form form {
  margin-top: 22px;
}

.currency-input {
  display: flex;
  align-items: center;
  gap: 13px;
  background: white;
  border: 1px solid #77796d;
  margin: 6px 0;
  padding: 10px 14px;
}

.currency-input>span {
  font-size: .9rem;
  font-weight: 600;
}

.currency-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 1.65rem;
  font-variant-numeric: tabular-nums;
}

.currency-input input:focus {
  outline: 0;
}

.currency-input:focus-within {
  outline: 3px solid var(--matsuba);
  outline-offset: 3px;
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 11px 0;
}

.presets button,.quiet {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #8b8c7b;
}

.presets button:hover {
  background: var(--wash);
}

.error {
  color: #933b26;
  font-size: .88rem;
}

.error:not(:empty) {
  margin: 12px 0;
}

.calculation {
  margin: 16px 0 20px;
}

.receipt-side {
  padding: clamp(18px,2.5vw,36px);
  background: var(--wash);
  border-top: 3px solid var(--architectural);
}

.receipt-side>.help,.receipt-side details {
  margin: 14px 0;
}

.receipt-side details {
  border-block: 1px solid #af949f;
  padding-block: 4px;
}

.receipt-side details .help {
  margin: 8px 0;
}

.receipt-side .button {
  margin-top: 10px;
}

.under-link {
  display: grid;
  place-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: .9rem;
}

.total-callout {
  border-top: 1px solid var(--architectural);
  margin-top: 24px;
  padding-top: 18px;
}

.total-callout>span,.total-callout strong,.balance strong {
  display: block;
}

.total-callout strong,.balance strong {
  font: 400 clamp(2.8rem,4.6vw,5.2rem)/1.12 var(--serif);
  letter-spacing: -.025em;
}

.total-callout p {
  margin-top: 7px;
  font-size: .94rem;
}

.confirmed {
  max-width: 620px;
  text-align: center;
  padding-block: 48px 68px;
}

.receipt-check {
  background: var(--kogane);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.receipt-confirm {
  margin: 22px 0;
  text-align: left;
  border-block: 1px solid var(--architectural);
  padding: 16px 0;
}

.receipt-confirm .small-property {
  margin-bottom: 12px;
}

.receipt-confirm .detail-row:last-child {
  border: 0;
}

.balance {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  background: var(--wash);
  border-top: 3px solid var(--architectural);
  padding: clamp(20px,3.6vw,50px);
  margin: 23px 0 28px;
}

.balance strong {
  margin-top: 6px;
}

.balance dl {
  display: flex;
  gap: clamp(18px,3vw,55px);
}

.balance dl>div {
  border-left: 1px solid #af949f;
  padding-left: 18px;
}

.balance dd {
  font: 400 2.5rem/1.15 var(--serif);
}

.account-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 20px;
}

.account-tabs a {
  padding: 12px 0;
  min-height: 44px;
  font-weight: 600;
}

.holding-link {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 100px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}

.holding-link img {
  width: clamp(100px,15vw,210px);
  height: 106px;
  object-fit: cover;
}

.holding-link h3 {
  margin: 4px 0;
}

.holding-link div>p:not(.eyebrow),.holding-link span {
  font-size: .88rem;
  color: var(--muted);
}

.activity-item>span:last-child {
  text-align: right;
}

.activity-item strong,.holding-link strong {
  font-variant-numeric: tabular-nums;
}

.reset-link {
  min-height: 44px;
  margin-top: 16px;
  padding: 0;
  color: #783e31;
  text-decoration: underline;
}

.empty {
  padding: 22px 0 34px;
}

.empty h2 {
  font-size: 2.5rem;
}

.empty p {
  max-width: 45ch;
  margin: 10px 0 16px;
  color: var(--muted);
}

dialog {
  width: min(850px,94vw);
  max-height: 92dvh;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 20px;
}

dialog::backdrop {
  background: #1d2322bf;
}

.dialog-head,.dialog-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.dialog-head {
  margin-bottom: 15px;
}

.dialog-head h2 {
  font-size: 2.1rem;
}

.reset-dialog {
  max-width: 430px;
}

.dialog-actions {
  margin-top: 20px;
}

.media-scroll {
  max-height: 65dvh;
  overflow: auto;
  background: white;
}

.media-scroll img {
  width: 100%;
  max-height: 62dvh;
  object-fit: contain;
}

.magnified .media-scroll img {
  width: 170%;
  max-width: none;
  max-height: none;
}
