:root {
  color-scheme: light;
  --ink: #192c39;
  --text: #34424a;
  --muted: #56646c;
  --navy: #183641;
  --navy-dark: #12242f;
  --pale: #edf1f1;
  --sand: #f8f7f3;
  --warm-white: #fff;
  --line: #dce2e2;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--sand); color: var(--text); font: 1rem/1.55 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button[disabled] { opacity: .57; cursor: wait; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #9a6538; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--ink); }
.shell { width: min(1200px, calc(100% - 112px)); margin-inline: auto; }
.skip-link { position: absolute; inset: 8px auto auto 8px; z-index: 3; padding: 8px 14px; background: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
[data-icon] { display: inline-flex; flex: 0 0 auto; vertical-align: middle; }
[data-icon] svg { width: 1.125rem; height: 1.125rem; }
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; color: var(--ink); }
.brand strong { display: block; font: 400 1.65rem/1 var(--serif); }
.brand small { display: block; color: var(--muted); font-size: .75rem; margin-top: 4px; }
.main-nav { display: flex; align-items: center; gap: 26px; font-size: .92rem; }
.nav-catalog { font-weight: 700; }
.nav-catalog:hover, .contact-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 45px; padding: 10px 18px; border: 1px solid transparent; border-radius: 8px; font-size: .9rem; font-weight: 700; line-height: 1.35; }
.button-primary { color: #fff; border-color: var(--navy); background: var(--navy); }
.button-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.button-outline { color: var(--ink); border-color: #c3d0d6; background: transparent; }
.button-outline:hover { background: var(--pale); }
.button-small { min-height: 40px; padding: 8px 13px; }
.hero { background: var(--navy-dark); }
.hero-inner { display: grid; grid-template-columns: .84fr 1.16fr; align-items: center; gap: clamp(30px, 5vw, 76px); padding-block: 42px 57px; }
.hero-copy { padding-block: 8px; }
.eyebrow { margin-bottom: 14px; color: #e1c4a0; font-size: .78rem; font-weight: 700; letter-spacing: .15em; }
.hero h1 { max-width: 500px; color: #fbf8f2; font: 400 clamp(3.25rem, 5.9vw, 5.4rem)/.98 var(--serif); letter-spacing: -.027em; text-wrap: balance; }
.hero-registration { margin: 17px 0 7px; color: #d3dce0; font-size: .82rem; font-weight: 700; letter-spacing: .06em; }
.hero-whatsapp { display: flex; width: fit-content; align-items: center; gap: 7px; color: #fbf8f2; font-size: .98rem; font-weight: 700; text-underline-offset: 3px; }
.hero-whatsapp:hover { text-decoration: underline; }
.hero-whatsapp [data-icon] { color: #e1c4a0; }
.hero-button { margin-top: 24px; min-height: 46px; border-color: #e1c4a0; color: #1b2c37; background: #e1c4a0; }
.hero-button:hover { background: #f0d7b7; border-color: #f0d7b7; }
.hero-art { overflow: hidden; border: 1px solid #63717a; border-radius: 5px; background: #fff; }
.hero-art img { width: 100%; height: auto; aspect-ratio: 664 / 390; object-fit: contain; }
.properties { min-height: 400px; padding: 0 0 58px; background: var(--sand); scroll-margin-top: 42px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 12px; }
.section-heading h2, .admin-heading h1 { font: 400 clamp(2.25rem, 4vw, 3.45rem)/1.05 var(--serif); letter-spacing: -.02em; }
#catalog-title { scroll-margin-top: 20px; }
.section-heading p, .admin-heading p { color: var(--muted); margin-top: 6px; }
.catalog-filters { position: relative; top: -27px; display: grid; grid-template-columns: 1.28fr 1.18fr 1fr 1fr auto; align-items: end; gap: 8px 16px; margin-bottom: 3px; padding: 16px 19px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 6px 20px #1428310b; }
.filter-field { display: grid; gap: 5px; min-width: 0; color: var(--ink); font-size: .89rem; font-weight: 700; }
.filter-actions { display: flex; align-items: center; gap: 3px; }
.filter-actions .button { min-height: 43px; }
.button-text { padding-inline: 10px; background: transparent; color: var(--muted); }
.button-text:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.catalog-filters .form-error { margin: 2px 0 0; grid-column: 1 / -1; font-size: .86rem; }
.money-field, .select-field { display: flex; position: relative; align-items: center; min-width: 0; }
.money-field > span, .select-field > span { position: absolute; color: var(--muted); pointer-events: none; }
.money-field > span { left: 11px; font-weight: 600; }
.select-field > span { right: 11px; }
.money-field input, .select-field select { width: 100%; min-height: 43px; border: 1px solid #cfdadd; border-radius: 5px; background: #fff; color: var(--ink); font-size: .89rem; font-weight: 500; }
.money-field input { padding: 7px 9px 7px 35px; }
.select-field select { appearance: none; padding: 7px 34px 7px 11px; }
.catalog-sort select { min-height: 39px; }
.listing-source { display: inline-block; margin-top: 10px; color: var(--navy); text-underline-offset: 3px; }
.property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.property-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff; border: 1px solid #d7e0e3; border-radius: 7px; cursor: pointer; }
.property-card:hover, .property-card:focus-within { border-color: #869ba5; }
.card-media { position: relative; background: #e0e2df; }
.card-media img, .card-media .illustration { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; display: block; }
.card-media .status { position: absolute; top: 12px; left: 12px; }
.status { display: inline-flex; align-items: center; gap: 6px; align-self: start; width: fit-content; padding: 4px 10px; border-radius: 30px; background: #146c3d; color: #fff; font-size: .84rem; font-weight: 700; }
.status::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
.status.rented { background: #b72835; }
.status.soon, .status.availability-pending { background: #f5a54f; color: #512600; }
.card-content { display: flex; flex-direction: column; flex: 1; padding: 15px 16px 16px; }
.location { display: flex; gap: 5px; align-items: start; color: var(--muted); font-size: .89rem; }
.location svg { width: 1rem; height: 1rem; margin-top: 2px; color: #4a606b; }
.card-content h3 { margin-top: 6px; font: 400 1.57rem/1.05 var(--serif); overflow-wrap: anywhere; }
.features { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 13px; margin-block: 13px 14px; color: var(--muted); font-size: .84rem; }
.features span { display: inline-flex; align-items: center; gap: 5px; }
.features svg { width: 1.03rem; height: 1.03rem; color: #4a606b; }
.card-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid #e5e9eb; }
.price { color: var(--navy); font-size: 1.17rem; font-weight: 700; letter-spacing: -.025em; }
.price small { color: var(--muted); font-size: .78rem; font-weight: 500; letter-spacing: 0; }
.card-bottom .button { min-height: 34px; padding: 6px 9px; }
.empty { grid-column: 1 / -1; padding: 22px; border: 1px dashed #bdcbd0; border-radius: 10px; color: var(--muted); }
.site-footer { border-top: 1px solid #28414f; background: var(--navy-dark); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px 30px; align-items: center; padding-block: 24px; }
.footer-inner .brand, .footer-inner .brand small { color: #f1f2ee; }
.footer-inner .brand strong { font-size: 1.42rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px 23px; font-style: normal; font-size: .9rem; color: #f1f2ee; }
.contact-links a { display: inline-flex; gap: 7px; align-items: center; }
.contact-links [data-icon] { color: #e1c4a0; }
.admin-section { min-height: 63vh; padding-block: 42px 58px; }
.admin-heading { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: end; justify-content: space-between; margin-bottom: 23px; }
.admin-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.login-panel { max-width: 590px; margin: 30px auto; border: 1px solid var(--line); border-radius: 7px; padding: clamp(22px, 4vw, 36px); background: var(--warm-white); }
.login-panel .admin-heading { margin-bottom: 16px; }
.login-panel .admin-actions { margin-top: 18px; }
.admin-list { display: grid; gap: 10px; }
.admin-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto auto; align-items: center; gap: 12px 17px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--warm-white); }
.admin-thumb { overflow: hidden; border-radius: 6px; background: #eee4d1; }
.admin-thumb img, .admin-thumb svg { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.admin-row h2 { font-size: 1.08rem; overflow-wrap: anywhere; }
.admin-row .location { display: block; }
.admin-row .status { margin-top: 5px; }
.admin-availability { min-width: 155px; }
.dialog { overflow: auto; width: min(680px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; border: 1px solid var(--line); border-radius: 15px; color: var(--text); background: var(--warm-white); box-shadow: 0 20px 65px #24362d45; }
.dialog::backdrop { background: #172a22ad; }
.dialog-body { padding: clamp(17px, 3.5vw, 27px); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.dialog-heading h2 { margin: 0; font: 400 clamp(1.82rem, 4vw, 2.4rem)/1.1 var(--serif); overflow-wrap: anywhere; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid #d2dadd; border-radius: 8px; color: var(--ink); background: #fff; }
.icon-button:hover { background: var(--pale); }
.details-dialog { width: min(1120px, calc(100% - 28px)); }
.details-layout { position: relative; display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(285px, 1fr); }
.details-layout > [data-close] { position: absolute; z-index: 1; top: 14px; right: 14px; }
.property-gallery { min-width: 0; padding: clamp(12px, 2vw, 22px); background: #f2f4f4; }
.gallery-stage { position: relative; }
.dialog-media { height: clamp(265px, 62dvh, 610px); overflow: hidden; border-radius: 9px; background: #1b2931; }
.dialog-media img, .dialog-media svg.illustration { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; box-shadow: 0 2px 10px #12242f45; }
.gallery-arrow[data-gallery="-1"] { left: clamp(8px, 1.4vw, 15px); }
.gallery-arrow[data-gallery="1"] { right: clamp(8px, 1.4vw, 15px); }
.gallery-counter { margin-top: 8px; color: var(--muted); text-align: center; font-size: .76rem; line-height: 1.35; }
.gallery-thumbnails { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(60px, 8vw, 88px); gap: 7px; margin-top: 5px; overflow-x: auto; padding: 5px; }
.gallery-thumbnail { min-width: 0; padding: 2px; background: #fff; border: 2px solid transparent; border-radius: 7px; }
.gallery-thumbnail:hover { background: var(--pale); }
.gallery-thumbnail[aria-pressed="true"] { border-color: var(--navy); }
.gallery-thumbnail img, .gallery-thumbnail .illustration { display: block; width: 100%; height: auto; max-height: 70px; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 3px; background: var(--pale); }
.details-panel { display: flex; flex-direction: column; min-width: 0; padding: clamp(18px, 2.35vw, 28px); border-left: 1px solid var(--line); }
.details-panel .dialog-heading { padding-right: 34px; margin-bottom: 9px; }
.details-panel .location { margin-bottom: 14px; }
.details-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.details-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 17px 0 0; }
.detail-fact {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 76px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f6f6;
}
.detail-fact dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.detail-fact dt svg { flex: none; width: 17px; height: 17px; color: var(--navy); }
.detail-fact dd { margin: 0; color: var(--ink); font-size: 1.05rem; font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; }
.details-notes { margin-top: 16px; }
.details-notes h3 { margin: 0 0 4px; font-size: .92rem; }
.details-description { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-contact { margin-top: auto; padding-top: 20px; }
.detail-contact .button { width: 100%; }
@media (max-width: 720px) {
  .details-layout { grid-template-columns: minmax(0, 1fr); }
  .details-layout > [data-close] { top: 9px; right: 12px; }
  .property-gallery { padding-top: 56px; }
  .dialog-media { height: clamp(185px, 46dvh, 365px); }
  .details-panel { border-top: 1px solid var(--line); border-left: 0; }
  .details-panel .dialog-heading { padding-right: 0; }
}
.editor-dialog { width: min(745px, calc(100% - 28px)); }
.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; }
.form-field { display: grid; align-content: start; gap: 5px; grid-column: span 3; min-width: 0; font-size: .9rem; font-weight: 700; }
.form-field.wide { grid-column: 1 / -1; }
.form-field.compact { grid-column: span 2; }
.form-field input, .form-field textarea { width: 100%; min-height: 41px; padding: 8px 10px; border: 1px solid #c9d6db; border-radius: 7px; background: #fff; font-weight: 500; }
.form-field textarea { min-height: 83px; resize: vertical; }
.form-field input[type="file"] { padding: 8px; }
.field-help { color: var(--muted); font-size: .85rem; font-weight: 500; }
.photo-previews { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 5px; }
.photo-preview { position: relative; }
.photo-preview img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #ede8da; }
.photo-preview button { position: absolute; top: 3px; right: 3px; width: 31px; height: 31px; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.form-error { margin-top: 8px; color: #96361c; font-weight: 700; }
.notice { position: fixed; right: 16px; bottom: 16px; z-index: 10; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 8px; background: var(--navy-dark); color: #fff; box-shadow: 0 4px 16px #23362940; }
@media (max-width: 1040px) {
  .shell { width: calc(100% - 64px); }
  .hero-inner { gap: 34px; }
}
@media (max-width: 820px) {
  .shell { width: calc(100% - 48px); }
  .hero-inner { gap: 23px; padding-block: 36px 53px; }
  .hero h1 { font-size: clamp(3rem, 6.4vw, 4.6rem); }
  .catalog-filters { gap: 9px 12px; padding: 13px; }
  .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 660px) {
  .shell { width: calc(100% - 34px); }
  .header-inner { min-height: 65px; gap: 6px; }
  .brand { gap: 8px; }
  .site-header .brand img { width: 36px; height: 36px; }
  .brand strong { font-size: 1.39rem; }
  .brand small { font-size: .72rem; }
  .main-nav { gap: 8px; }
  .nav-catalog { display: none; }
  .main-nav .button { min-height: 36px; padding-inline: 9px; gap: 4px; font-size: .79rem; }
  .main-nav .button svg { width: .9rem; height: .9rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 19px; padding-block: 23px 42px; }
  .hero h1 { font-size: clamp(2.8rem, 9vw, 4.6rem); }
  .hero-copy { padding-block: 0; }
  .hero-button { margin-top: 17px; }
  .hero-art img { max-height: 240px; }
  .properties { padding-bottom: 38px; }
  .catalog-filters { top: -23px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { grid-column: 1 / -1; }
  .filter-actions .button-primary { padding-inline: 15px; }
  .section-heading { flex-wrap: wrap; }
  .property-grid { gap: 12px; }
  .footer-inner { align-items: start; flex-direction: column; }
  .admin-row { grid-template-columns: 66px minmax(0, 1fr) auto; gap: 7px 9px; }
  .admin-row .admin-availability { grid-column: 2; grid-row: 2; min-width: 0; }
  .admin-row > .button { grid-column: 3; grid-row: 1 / 3; }
  .form-field.compact { grid-column: span 3; }
  .photo-previews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 485px) {
  .property-grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
