:root {
  --petrol: #173d3b;
  --petrol-deep: #0e2c2b;
  --ivory: #f4efe6;
  --paper: #fbf8f2;
  --terracotta: #b9875b;
  --ink: #1c2523;
  --muted: #626963;
  --line: rgba(23, 61, 59, .18);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.6; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.skip { position: fixed; left: 16px; top: -100px; z-index: 100; background: white; padding: 10px 16px; }
.skip:focus { top: 16px; }

.site-header { height: 94px; padding: 14px clamp(22px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; background: rgba(251,248,242,.96); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; transition: .25s; }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 8px 30px rgba(14,44,43,.06); }
.brand img { width: 238px; height: 66px; object-fit: contain; object-position: left; }
nav { display: flex; align-items: center; gap: clamp(18px, 2.8vw, 42px); }
nav a { text-decoration: none; font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
nav a:not(.nav-cta):hover { color: var(--terracotta); }
.nav-cta { border: 1px solid var(--petrol); padding: 12px 18px; }
.nav-cta:hover { background: var(--petrol); color: white; }
.menu-toggle { display: none; border: 0; background: none; font: 600 .9rem var(--sans); color: var(--petrol); }

.hero { min-height: calc(100vh - 94px); position: relative; isolation: isolate; display: grid; align-items: center; padding: clamp(50px, 9vw, 110px) clamp(24px, 7vw, 108px); background: url("assets/hero-lisboa.png") center/cover no-repeat; overflow: hidden; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(244,239,230,.98) 0%, rgba(244,239,230,.92) 37%, rgba(244,239,230,.2) 61%, transparent 100%); }
.hero-copy { max-width: 760px; }
.eyebrow, .section-number { color: var(--terracotta); font-size: .72rem; text-transform: uppercase; letter-spacing: .22em; font-weight: 700; }
h1, h2, h3, blockquote { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(3rem, 6.1vw, 6.4rem); line-height: .98; margin: 26px 0; letter-spacing: -.035em; color: var(--petrol); }
h1 em { font-weight: 400; color: var(--terracotta); }
.hero-intro { max-width: 610px; font-size: clamp(1rem, 1.4vw, 1.2rem); }
.hero-actions { display: flex; gap: 28px; align-items: center; margin-top: 38px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border: 0; text-decoration: none; font: 700 .82rem var(--sans); letter-spacing: .035em; cursor: pointer; }
.primary { background: var(--petrol); color: white; }
.primary:hover { background: var(--terracotta); }
.text-button { padding: 0; color: var(--petrol); }
.text-button span { margin-left: 10px; transition: transform .2s; }
.text-button:hover span { transform: translateX(5px); }
.hero-note { position: absolute; right: 5vw; bottom: 45px; display: flex; align-items: flex-start; gap: 14px; color: white; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.hero-note span { border-top: 1px solid currentColor; padding-top: 5px; font-size: .68rem; }
.hero-note p { margin: 0; font: italic 1.05rem/1.35 var(--serif); }

.section { padding: clamp(80px, 10vw, 150px) clamp(24px, 8vw, 130px); }
.manifesto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9vw; margin-top: 50px; }
.manifesto h2, .section-heading h2, .areas h2, .valuation h2 { color: var(--petrol); font-size: clamp(2.6rem, 5vw, 5.5rem); line-height: 1.03; letter-spacing: -.035em; margin: 0; }
.manifesto .lead { font: 1.5rem/1.5 var(--serif); color: var(--petrol); margin-top: 0; }
.manifesto p:not(.lead) { color: var(--muted); }
.inline-link { display: inline-block; margin-top: 18px; color: var(--petrol); font-weight: 700; text-underline-offset: 6px; }
.inline-link span { margin-left: 8px; color: var(--terracotta); }

.properties { background: #fff; }
.properties-head { display: flex; align-items: end; justify-content: space-between; gap: 55px; }
.properties-head h2 { color: var(--petrol); font-size: clamp(2.6rem, 5vw, 5.5rem); line-height: 1.03; letter-spacing: -.035em; margin: 35px 0 0; font-family: var(--serif); font-weight: 400; }
.property-filters { min-width: min(100%, 480px); display: grid; grid-template-columns: 1.4fr .8fr; gap: 14px; }
.property-filters label { display: grid; gap: 6px; color: var(--petrol); font-size: .7rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 700; }
.property-filters input, .property-filters select { border: 1px solid var(--line); padding: 12px; background: var(--paper); font: 1rem var(--sans); color: var(--ink); }
.properties-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 62px; }
.property-card { background: var(--paper); border: 1px solid var(--line); cursor: pointer; transition: transform .25s, box-shadow .25s; overflow: hidden; }
.property-card:hover { transform: translateY(-5px); box-shadow: 0 20px 45px rgba(14,44,43,.1); }
.property-card-image { position: relative; aspect-ratio: 1.36; overflow: hidden; background: var(--ivory); }
.property-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.property-card:hover img { transform: scale(1.035); }
.property-image-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--terracotta); font: 4rem var(--serif); }
.property-badge { position: absolute; left: 14px; top: 14px; padding: 6px 10px; background: var(--petrol); color: white; text-transform: uppercase; letter-spacing: .12em; font-size: .65rem; font-weight: 700; }
.property-card-body { padding: 23px; }
.property-card-body .location { color: var(--terracotta); text-transform: uppercase; letter-spacing: .12em; font-size: .67rem; font-weight: 700; }
.property-card h3 { margin: 9px 0 18px; color: var(--petrol); font: 400 1.5rem/1.2 var(--serif); }
.property-price { color: var(--petrol); font: 400 1.25rem var(--serif); }
.property-meta { display: flex; gap: 16px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.properties-loading, .properties-empty { grid-column: 1/-1; text-align: center; padding: 65px 20px; border: 1px dashed var(--line); color: var(--muted); }
.property-dialog { width: min(980px, calc(100% - 24px)); max-height: 92vh; border: 0; padding: 0; background: var(--paper); box-shadow: 0 30px 100px rgba(14,44,43,.3); }
.property-dialog::backdrop { background: rgba(14,44,43,.76); }
.property-close { position: fixed; z-index: 2; right: max(calc((100vw - 980px)/2 + 18px), 28px); top: 6vh; border: 0; width: 42px; height: 42px; border-radius: 50%; background: white; color: var(--petrol); font-size: 1.8rem; cursor: pointer; }
.detail-gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 4px; background: var(--ivory); }
.detail-gallery img { width: 100%; height: 230px; object-fit: cover; }
.detail-gallery img:first-child { height: 464px; grid-row: span 2; }
.detail-content { padding: clamp(28px, 5vw, 58px); }
.detail-content h2 { margin: 10px 0 15px; color: var(--petrol); font: 400 clamp(2rem, 4vw, 3.7rem)/1 var(--serif); }
.detail-price { color: var(--terracotta); font: 400 1.7rem var(--serif); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 14px 24px; padding: 22px 0; margin: 25px 0; border-block: 1px solid var(--line); color: var(--petrol); }
.detail-description { white-space: pre-line; color: var(--muted); }
.detail-features { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; margin: 25px 0; }
.detail-features li { border: 1px solid var(--line); padding: 7px 11px; font-size: .8rem; }
.detail-contact { display: inline-flex; margin-top: 14px; }

.image-story { padding-top: 0; display: grid; grid-template-columns: 1.45fr .65fr; gap: clamp(30px, 7vw, 100px); align-items: end; }
.image-wrap { position: relative; }
.image-wrap::before { content: ""; position: absolute; width: 38%; height: 52%; background: var(--terracotta); left: -22px; bottom: -22px; z-index: -1; }
.image-wrap img { aspect-ratio: 1.45; width: 100%; object-fit: cover; }
blockquote { font-size: clamp(1.7rem, 2.7vw, 3rem); line-height: 1.25; color: var(--petrol); margin: 0 0 15px; }
blockquote span { display: block; color: var(--terracotta); font-size: 4rem; line-height: .6; margin-bottom: 20px; }

.services { background: var(--ivory); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; }
.service-list { margin-top: 85px; border-top: 1px solid var(--line); }
.service-list article { display: grid; grid-template-columns: 90px minmax(200px, .75fr) 1fr; gap: 34px; padding: 36px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.service-list article > span { color: var(--terracotta); font: italic 1.4rem var(--serif); }
.service-list h3 { color: var(--petrol); font-size: clamp(1.55rem, 2.4vw, 2.5rem); margin: 0; }
.service-list p { color: var(--muted); margin: 0; max-width: 570px; }

.areas { background: var(--petrol); color: white; display: grid; grid-template-columns: 1fr 1fr; gap: 10vw; }
.areas h2 { color: white; margin-top: 38px; }
.areas-copy > p { max-width: 540px; color: rgba(255,255,255,.72); margin-top: 30px; }
.section-number.light { color: #d4a679; }
.area-list { display: flex; flex-wrap: wrap; gap: 12px; align-content: center; }
.area-list span { border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 10px 18px; font: 1.08rem var(--serif); transition: .2s; }
.area-list span:hover { color: var(--petrol); background: var(--ivory); border-color: var(--ivory); }

.valuation { display: grid; grid-template-columns: .8fr 1.1fr; gap: 9vw; }
.valuation h2 { margin-top: 38px; }
.valuation > div > p { max-width: 520px; color: var(--muted); }
.valuation .legal-note { font-size: .78rem; border-left: 2px solid var(--terracotta); padding-left: 14px; margin-top: 28px; }
.valuation-form { background: white; border: 1px solid var(--line); padding: clamp(25px, 4vw, 55px); box-shadow: 0 25px 70px rgba(14,44,43,.08); }
.valuation-form label { display: grid; gap: 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--petrol); margin-bottom: 24px; }
.valuation-form input, .valuation-form select, .valuation-form textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 11px 2px; color: var(--ink); font: 1rem var(--sans); outline: none; resize: vertical; }
.valuation-form input:focus, .valuation-form select:focus, .valuation-form textarea:focus { border-color: var(--terracotta); }
.form-row { display: grid; grid-template-columns: 1fr .7fr; gap: 25px; }
.form-status { margin: 16px 0 0; color: var(--petrol); font-size: .88rem; }

footer { padding: 55px clamp(24px, 8vw, 130px) 28px; background: #e9e2d7; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; align-items: center; }
footer > img { width: 250px; }
footer p { margin: 4px 0; font-size: .82rem; color: var(--muted); }
.footer-links { display: flex; justify-content: flex-end; gap: 20px; font-size: .82rem; }
.copyright { grid-column: 1/-1; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 12px; }

.reveal { opacity: 0; transform: translateY(16px); animation: reveal .8s ease .15s forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .site-header { height: 78px; }
  .brand img { width: 190px; height: 52px; }
  .menu-toggle { display: block; }
  nav { display: none; position: absolute; top: 78px; left: 0; right: 0; background: var(--paper); padding: 22px; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  nav.open { display: flex; }
  .nav-cta { text-align: center; }
  .hero { min-height: calc(100svh - 78px); background-position: 61% center; padding-top: 80px; align-items: start; }
  .hero-shade { background: linear-gradient(90deg, rgba(244,239,230,.97), rgba(244,239,230,.82) 65%, rgba(244,239,230,.3)); }
  .hero-copy { max-width: 610px; }
  .hero-note { display: none; }
  .manifesto-grid, .image-story, .areas, .valuation { grid-template-columns: 1fr; }
  .properties-head { display: block; }
  .property-filters { margin-top: 35px; }
  .properties-grid { grid-template-columns: 1fr 1fr; }
  .section-heading { display: block; }
  .section-heading h2 { margin-top: 38px; }
  .service-list { margin-top: 50px; }
  .service-list article { grid-template-columns: 55px 1fr; }
  .service-list p { grid-column: 2; }
  .area-list { margin-top: 35px; }
  footer { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 540px) {
  h1 { font-size: 2.8rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 12px; }
  .button { width: 100%; }
  .text-button { justify-content: flex-start; }
  .service-list article { grid-template-columns: 1fr; gap: 10px; }
  .service-list p { grid-column: 1; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .property-filters, .properties-grid { grid-template-columns: 1fr; }
  .detail-gallery { display: block; }
  .detail-gallery img, .detail-gallery img:first-child { height: 250px; }
  .detail-gallery img:not(:first-child) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
