@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  color-scheme: light;
  --paper: #f9f8f4;
  --white: #fffefa;
  --ink: #20251d;
  --deep: #283228;
  --olive: #566344;
  --muted: #5f665a;
  --line: #dedfd5;
  --soft: #efefe6;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 1rem/1.55 var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, select, input, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #84955d; outline-offset: 4px; }
p, h1, h2, h3, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { font: 400 clamp(2.8rem, 5.8vw, 5rem)/.98 var(--serif); letter-spacing: -.025em; }
h2 { font-size: clamp(2.7rem, 4.2vw, 4.1rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }
section[id], footer[id] { scroll-margin-top: 1rem; }
.wrap { width: min(100% - 6rem, 1240px); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 7vw, 6.4rem); }
.eyebrow { margin-bottom: 1rem; color: var(--olive); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.pin { display: inline-block; margin-right: .38rem; width: .54rem; height: .54rem; border: 1px solid currentColor; border-radius: 50% 50% 50% 0; transform: rotate(-45deg) translateY(-.06rem); }
.muted { color: var(--muted); font-size: .88rem; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: .5rem; left: .5rem; z-index: 10; padding: .7rem 1rem; background: var(--white); }

.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 46px; padding: .7rem 1.1rem; border: 1px solid transparent; border-radius: 3px; font-size: .9rem; font-weight: 700; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.button span, .text-link span { font-size: 1.12em; line-height: 1; }
.button-dark { color: var(--white); background: var(--deep); }
.button-dark:hover { background: var(--olive); }
.button-outline { border-color: #b6beb1; background: transparent; }
.button-outline:hover { border-color: var(--deep); background: var(--soft); }
.button-light { color: var(--deep); background: #e6e9d9; }
.button-light:hover { background: var(--white); }
.text-link { display: inline-flex; width: fit-content; gap: .6rem; align-items: center; padding-bottom: .14rem; border-bottom: 1px solid #a2ac96; font-size: .9rem; font-weight: 700; }
.text-link:hover { border-color: var(--ink); }

.topbar { background: var(--deep); color: #eef0e8; font-size: .75rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 34px; }
.topbar a:hover { text-decoration: underline; }
.header { position: relative; z-index: 2; background: var(--white); border-bottom: 1px solid var(--line); }
.nav-inner, .admin-header-inner { display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-block; flex: 0 0 auto; }
.brand img { width: 126px; height: auto; mix-blend-mode: multiply; }
.nav-links { display: flex; align-items: center; gap: clamp(1.1rem, 3vw, 2.5rem); }
.nav-links a { font-size: .88rem; font-weight: 600; }
.nav-links a:hover { color: var(--olive); text-decoration: underline; text-underline-offset: .32rem; }
.menu-button { display: none; border: 1px solid var(--line); border-radius: 3px; background: var(--white); padding: .55rem .8rem; }

.hero { display: grid; grid-template-columns: minmax(0, 45%) minmax(0, 55%); min-height: 550px; background: #f0efe7; }
.hero-copy { align-content: center; padding: 3rem clamp(1.5rem, 3.7vw, 4.5rem) 6rem max(3rem, calc((100vw - 1240px) / 2)); }
.hero-copy-inner { max-width: 520px; }
.hero h1 { font-size: clamp(3.8rem, 5.9vw, 6.1rem); line-height: .94; text-wrap: wrap; overflow-wrap: anywhere; }
.hero h1 em { display: block; color: var(--olive); font-weight: inherit; }
.hero-description { max-width: 38ch; margin: 1.35rem 0 1.45rem; color: var(--muted); font-size: clamp(1rem, 1.45vw, 1.125rem); }
.hero-photo { min-height: 100%; position: relative; isolation: isolate; overflow: hidden; background: #b5ac95; }
.hero-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 55% 55%; }
.hero-photo figcaption { position: absolute; right: 1.3rem; bottom: 4.55rem; padding: .2rem .5rem; background: #253024e6; color: var(--white); font-size: .69rem; border-radius: 2px; }
.search-overlap { position: relative; margin-top: -3.15rem; }
.search { display: grid; grid-template-columns: 1fr 1fr 1.07fr auto; align-items: end; gap: .95rem; padding: 1.2rem; border: 1px solid var(--line); background: var(--white); border-radius: 5px; box-shadow: 0 12px 35px #22291d0b; }
.search label, .form-grid label { display: flex; flex-direction: column; gap: .38rem; min-width: 0; color: var(--ink); font-size: .86rem; font-weight: 700; }
.search select, .form-grid input:not([type=checkbox], [type=radio]), .form-grid select, .form-grid textarea { display: block; width: 100%; min-height: 46px; padding: .65rem .78rem; border: 1px solid #ced2c7; border-radius: 3px; background: var(--white); color: var(--ink); font-size: .95rem; font-weight: 400; }
.search button { min-width: 165px; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1.1rem; margin-bottom: 1.6rem; }
.section-head .eyebrow { margin-bottom: .65rem; }
.section-head .text-link { flex-shrink: 0; margin-bottom: .35rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.card { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--white); }
.card-link { display: block; height: 100%; }
.card-link:focus-visible { outline-offset: -4px; }
.card-image { aspect-ratio: 1.55; position: relative; overflow: hidden; background: var(--soft); }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .24s ease; }
.card-link:hover img { transform: scale(1.035); }
.pill { position: absolute; top: .8rem; left: .8rem; padding: .25rem .65rem; border-radius: 2px; background: var(--white); font-size: .75rem; font-weight: 700; }
.photo-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: .82rem; }
.card-body { display: flex; min-height: 184px; flex-direction: column; gap: .62rem; padding: 1.1rem; }
.card-location, .property-location { color: var(--muted); font-size: .86rem; }
.specs { display: flex; flex-wrap: wrap; gap: .45rem .85rem; color: var(--muted); font-size: .85rem; }
.specs span + span::before { content: '·'; margin-right: .8rem; }
.card-price { display: flex; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .7rem; border-top: 1px solid var(--line); }
.empty-state { display: flex; align-items: center; gap: 1.1rem; padding: 1.55rem; border: 1px solid var(--line); background: var(--white); border-radius: 4px; }
.empty-state h3 { margin-bottom: .25rem; font-size: 1rem; }
.empty-state p { color: var(--muted); font-size: .9rem; }
.empty-mark { display: grid; place-items: center; flex: 0 0 54px; height: 54px; border-radius: 50%; color: var(--deep); background: var(--soft); font-size: 1.85rem; line-height: 1; }
.empty-state .button { flex: 0 0 auto; margin-left: auto; }

.services { background: var(--soft); border-block: 1px solid var(--line); }
.service-layout { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.35fr); gap: clamp(2rem, 6vw, 7rem); }
.service-heading h2 { max-width: 11ch; }
.service-heading .text-link { margin-top: 1.5rem; }
.service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4rem 2rem; }
.service-list article { border-top: 1px solid #b7bdae; padding-top: 1.15rem; }
.service-list p { margin: .6rem 0 .8rem; color: var(--muted); font-size: .92rem; }
.service-list .text-link { font-size: .8rem; }
.footer { background: var(--deep); color: var(--white); }
.footer-main { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem, 6vw, 6rem); padding-block: 4.2rem; }
.footer .eyebrow { color: #d3dbc4; }
.footer h2 { max-width: 12ch; }
.footer-intro .button { margin-top: 1.35rem; }
.footer-contact { align-self: end; display: grid; justify-items: start; gap: .65rem; overflow-wrap: anywhere; }
.footer-contact a, .footer-bottom { color: #e3e6dc; font-size: .88rem; }
.footer a:hover { text-decoration: underline; text-underline-offset: .2rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.2rem; border-top: 1px solid #ffffff32; }

.inner-hero { background: var(--soft); padding: 3rem 0; border-bottom: 1px solid var(--line); }
.inner-hero p, .message p { margin-top: .9rem; color: var(--muted); }
.breadcrumb { display: inline-block; width: fit-content; margin-bottom: 1rem; color: var(--olive); font-size: .85rem; font-weight: 700; }
.breadcrumb:hover { text-decoration: underline; }
.results { padding-top: 2rem; min-height: 450px; }
.results .search { margin-bottom: 2.3rem; }
.results h2 { font: 700 1.12rem/1.35 var(--sans); letter-spacing: 0; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem; margin-top: 1.75rem; }
.property { padding-top: 2.5rem; }
.property h1 { overflow-wrap: anywhere; }
.property-location { margin-block: .6rem 1.7rem; font-size: 1rem; }
.gallery { margin-bottom: 2.3rem; }
.gallery > a { display: block; }
.gallery > a img { width: 100%; height: min(58vw, 560px); object-fit: contain; background: var(--soft); border-radius: 4px; }
.thumbnails { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .75rem; }
.thumbnails a { border: 2px solid transparent; padding: 2px; border-radius: 3px; }
.thumbnails a[aria-current=true] { border-color: var(--olive); }
.thumbnails img { width: 100px; height: 65px; object-fit: cover; }
.property-details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 340px); gap: clamp(1.2rem, 5vw, 5rem); }
.property-details h2 { font-size: 2.55rem; margin-bottom: .9rem; }
.description { margin: 1.15rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.property-contact { display: flex; flex-direction: column; gap: .8rem; align-self: start; padding: 1.3rem; border: 1px solid var(--line); background: var(--white); border-radius: 4px; }
.property-contact strong { font-size: 1.28rem; }
.property-contact > a:last-child { font-size: .9rem; color: var(--olive); }
.message { min-height: 340px; }
.message .button { margin-top: 1.25rem; }

.admin, .admin-login { min-height: 100dvh; background: var(--soft); }
.admin-header { background: var(--white); border-bottom: 1px solid var(--line); }
.admin-header nav { display: flex; flex: 1; align-items: center; gap: 1.1rem; font-size: .9rem; font-weight: 700; }
.admin-header nav a[aria-current] { text-decoration: underline; text-underline-offset: .35rem; }
.admin-body { max-width: 1010px; padding-block: 2.5rem 5rem; }
.admin-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.admin-title h1, .login-card h1 { font-size: clamp(2.55rem, 5vw, 4.1rem); }
.admin-title p:not(.eyebrow), .login-card > p { margin-top: .55rem; color: var(--muted); }
.admin-login { display: grid; place-items: center; padding: 1.2rem; }
.login-card, .panel { background: var(--white); border: 1px solid var(--line); border-radius: 5px; padding: clamp(1.1rem, 3vw, 2.1rem); }
.login-card { width: min(100%, 465px); }
.login-card .brand { margin-bottom: 1.1rem; }
.login-card .form-grid { margin: 1.15rem 0; }
.login-card .text-link { margin-top: .75rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid textarea { resize: vertical; }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.media-field { min-width: 0; border: 1px solid var(--line); padding: 1rem; }
.media-field legend { padding-inline: .4rem; font-size: .9rem; font-weight: 700; }
.media-field p { margin-top: .45rem; }
.media-grid { display: flex; flex-wrap: wrap; gap: .75rem; }
.media-grid:not(:empty) { margin-block: .5rem 1rem; }
.media-grid img { width: 112px; height: 78px; object-fit: cover; border-radius: 3px; margin-bottom: .3rem; }
.media-grid label { flex-direction: row; align-items: center; font-weight: 400; }
.notice { margin-bottom: 1rem; padding: .7rem .9rem; border-left: 3px solid #78905a; color: #293c24; background: #e7efdb; }
.notice.error { border-color: #a6473c; color: #722b25; background: #f9e8e4; }
.subtle-button { border: none; background: transparent; color: var(--olive); padding: .3rem; font-weight: 700; font-size: .88rem; }
.subtle-button:hover { text-decoration: underline; }
.delete-form { margin-top: .9rem; }
.danger { color: #8b372c; }
.admin-table { overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.admin-table table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { padding: .7rem .85rem; border-bottom: 1px solid var(--line); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table small { display: block; color: var(--muted); }
.admin-table a { text-decoration: underline; text-underline-offset: .2rem; }
.status { display: inline-block; padding: .19rem .48rem; border-radius: 3px; background: var(--soft); font-size: .8rem; }
.status.publicado { background: #e7efdb; }

@media (max-width: 1050px) {
  .wrap { width: min(100% - 3rem, 1240px); }
  .hero { min-height: 530px; }
  .hero-copy { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 2rem); }
  .nav-inner, .admin-header-inner { min-height: 69px; gap: .65rem; }
  .brand img { width: 101px; }
  .nav-contact { display: none; }
  .js .menu-button { display: block; margin-left: auto; }
  .nav-inner { flex-wrap: wrap; }
  .nav-links { flex: 1 0 100%; flex-wrap: wrap; gap: .85rem 1.2rem; padding: .65rem 0 1rem; }
  .js .nav-links { display: none; }
  .js .nav-links.open { display: flex; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding: 2.9rem 1rem 2.55rem; }
  .hero h1 { font-size: clamp(3.25rem, 10vw, 5.2rem); max-width: 17ch; }
  .hero-description { margin: 1rem 0; }
  .hero-photo { min-height: clamp(230px, 57vw, 390px); }
  .hero-photo figcaption { right: .9rem; bottom: 2.15rem; }
  .search-overlap { margin-top: -1.5rem; }
  .search { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding: .9rem; }
  .search button { min-width: 0; gap: .5rem; padding-inline: .7rem; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .empty-state { flex-wrap: wrap; }
  .empty-state > div { flex: 1 1 180px; }
  .empty-state .button { margin-left: 0; }
  .service-layout, .footer-main, .property-details { grid-template-columns: 1fr; }
  .footer-main { padding-block: 3rem; }
  .admin-header-inner { flex-wrap: wrap; padding-block: .5rem; }
  .admin-header nav { order: 1; flex-basis: 100%; padding-block: .5rem; }
  .admin-site { margin-left: auto; }
}
@media (max-width: 470px) {
  .cards, .service-list { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; gap: .7rem; }
  .empty-mark { display: none; }
  .footer-bottom { flex-direction: column; }
  .thumbnails img { width: 68px; height: 49px; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-title { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
