/* ============================================================
   Residencial Leite — Design Tokens
   Palette pulled from the brand's own gold/cream logo.
   Signature motif: the "roofline" from the house glyph in the
   logo, reused as a structural divider and image-framing device
   throughout the site instead of generic straight rules.
   ============================================================ */

:root {
  /* Color */
  --cream:        #FAF6EC;
  --cream-deep:    #F1E7D2;
  --paper:         #FFFDF8;
  --ink:           #2E2A20;
  --ink-soft:      #5C5446;
  --gold:          #B08D45;
  --gold-deep:     #8C6D2F;
  --gold-line:     #D9C18C;
  --sage:          #6E7C5E;
  --sage-deep:     #4F5C42;

  /* Type */
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max: 1120px;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--gold-deep); text-decoration: none; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.08; font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 500; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; color: var(--ink-soft); }
p.lead { font-size: 1.15rem; color: var(--ink); }

.eyebrow {
  font-family: var(--body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-block;
  margin-bottom: 0.9em;
}

/* ---------- Roofline motif ---------- */
/* A single pitched-roof glyph drawn from the logo, reused as a
   divider, a bullet, and an image-frame clip-path. */

.roofline-divider {
  width: 100%;
  height: 28px;
  margin: 0 auto;
  display: block;
}

.roof-clip {
  clip-path: polygon(0% 12%, 50% 0%, 100% 12%, 100% 100%, 0% 100%);
}

.roof-card-top {
  position: relative;
  padding-top: 22px;
}
.roof-card-top::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 30px; height: 30px;
  background: var(--gold);
  transform: translateX(-50%) rotate(45deg);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 236, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gold-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--ink);
}
.brand img { height: 42px; width: 42px; object-fit: contain; }
.brand span { line-height: 1.1; }
.brand small {
  display: block;
  font-family: var(--body);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
nav.main-nav a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--ink); }
nav.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold);
}

.nav-cta {
  background: var(--sage-deep);
  color: var(--paper) !important;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.85rem !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--ink); }

.menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 760px) {
  nav.main-nav {
    position: fixed;
    inset: 0;
    background: var(--cream);
    opacity: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1.4rem;
    padding: 5.5rem 1.5rem 2rem;
    z-index: 999;
    display: none;
    overflow-y: auto;
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { font-size: 1.1rem; width: 100%; }
  .menu-btn { display: block; position: relative; z-index: 1000; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 3.5rem 0 4rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--gap);
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-photo-frame {
  position: relative;
}
.hero-photo-frame img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  clip-path: polygon(0% 9%, 50% 0%, 100% 9%, 100% 100%, 0% 100%);
}
.hero-photo-frame .cap {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
}

.btn-row { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.6rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid var(--ink);
}
.btn-primary { background: var(--sage-deep); border-color: var(--sage-deep); color: var(--paper); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- Sections ---------- */

section { padding: 4rem 0; }
.section-alt { background: var(--cream-deep); }

.quote-block {
  background: var(--paper);
  border-left: 3px solid var(--gold);
  padding: 2rem clamp(1.2rem, 4vw, 2.6rem);
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink);
}
.quote-block cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--body);
  font-style: normal;
  font-size: 0.85rem;
  color: var(--gold-deep);
  font-weight: 600;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-top: 2.4rem;
}
@media (max-width: 760px) { .values-grid { grid-template-columns: 1fr; } }

.value-card {
  background: var(--paper);
  padding: 1.8rem 1.5rem;
  border-radius: var(--radius);
}
.value-card h3 { margin-bottom: 0.4em; }
.value-card p { margin: 0; font-size: 0.95rem; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  margin-top: 2rem;
}
@media (max-width: 700px) { .photo-grid { grid-template-columns: 1fr; } }
.photo-grid figure { margin: 0; }
.photo-grid img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}
.photo-grid figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Pricing / Services ---------- */

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-top: 2.6rem;
}
@media (max-width: 860px) { .plans-grid { grid-template-columns: 1fr; } }

.plan-card {
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 2.2rem 1.7rem 1.9rem;
  text-align: center;
  position: relative;
}
.plan-card .grau-tag {
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
}
.plan-card .price {
  font-family: var(--display);
  font-size: 2.1rem;
  color: var(--ink);
  margin: 0.5rem 0 0.2rem;
}
.plan-card .price small {
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-weight: 400;
}
.plan-card p.desc {
  font-size: 0.88rem;
  margin-top: 1rem;
}

.note-box {
  margin-top: 2.4rem;
  background: var(--cream-deep);
  border-left: 3px solid var(--sage);
  padding: 1.2rem 1.5rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  border-radius: var(--radius);
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-top: 2rem;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--gold-line);
}
.contact-list .ico {
  width: 22px; flex-shrink: 0;
  color: var(--gold-deep);
}
.contact-list strong { display: block; color: var(--ink); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }

.map-frame {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
@media (max-width: 760px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item {
  border: none;
  padding: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(46, 42, 32, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: var(--radius);
}
.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--paper);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
}
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }
@media (max-width: 600px) {
  .lightbox-nav { font-size: 1.8rem; }
}

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--ink);
  color: #E7E0D2;
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}
footer .f-brand {
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--paper);
}
footer .f-brand small {
  display: block;
  font-family: var(--body);
  font-size: 0.78rem;
  color: var(--gold-line);
  margin-top: 0.3rem;
}
footer .f-links { display: flex; gap: 2.4rem; flex-wrap: wrap; }
footer .f-links a { color: #E7E0D2; font-size: 0.9rem; }
footer .f-links a:hover { color: var(--gold-line); }
footer .copyright {
  text-align: center;
  font-size: 0.78rem;
  color: #9A9384;
  margin-top: 2.4rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  nav.main-nav { transition: none; }
}
