/*
  Palácio Itaigara — institutional site, served on the root domain by the
  `landing` container (see docker-compose.yml). Plain HTML/CSS, no build
  step: this directory is bind-mounted straight into nginx.

  Colors match the resident app's own palette (frontend/src/index.css,
  :root[data-portal='resident']) so the public site and the portal a
  resident eventually logs into read as the same brand.

  Sizing is mobile-first and deliberately unchanged from the original build
  below 48rem (768px) — everything under "Desktop enhancements" at the
  bottom of this file only takes effect at or above that width: bigger type,
  a wider .wrap, and a hero that fills the first screen. A phone or a small
  tablet never sees any of it.
*/

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-dim: #64748b;

  --accent: #b02924;
  --accent-strong: #921f1c;
  --accent-tint: #fef2f2;

  --radius: 0.875rem;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.06), 0 1px 3px rgb(15 23 42 / 0.1);

  /* Only consumed above the desktop breakpoint (see the bottom of this
     file) — the fallback before index.html's script measures the real
     header height. */
  --header-h: 6rem;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    /* Someone who has asked their OS for less motion gets the plain jump
       back — smooth scrolling is a nicety, not something to override that
       setting for. */
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

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

.wrap {
  /* Widened only by the desktop media query below — irrelevant on any
     mobile viewport either way, since actual content is already narrower
     than both values there. */
  max-width: 72rem;
  margin: 0 auto;
  padding-inline: 1.5rem;
}

/* A same-page link's target should clear the sticky header, not land
   underneath it — true at every width, not just the desktop sizing below. */
section[id] {
  scroll-margin-top: var(--header-h);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffffee;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding-block: 0.875rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
  color: var(--text);
}

.site-header__brand img {
  width: 28px;
  height: 28px;
}

.site-header__brand span {
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.125rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a:not(.btn) {
  color: #334155;
  font-weight: 500;
  font-size: 0.84375rem;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.1875rem;
  white-space: nowrap;
}

.site-nav a:not(.btn):hover {
  color: var(--accent-strong);
}

/* The section currently in view (see index.html's IntersectionObserver),
   not just whichever link was last clicked. */
.site-nav a:not(.btn).is-active {
  color: var(--accent-strong);
  border-bottom-color: var(--accent);
}

.site-nav__links {
  display: contents;
}

@media (max-width: 40rem) {
  .site-nav__links {
    display: none;
  }
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--accent-strong);
  color: #ffffff;
}

.btn--outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

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

section {
  padding-block: 4.5rem;
}

.section-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  display: block;
  font-size: 0.78125rem;
  font-weight: 700;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.5rem;
}

.section-head {
  max-width: 36rem;
  margin: 0 0 2.25rem;
}

.section-head h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0;
}

.section-head p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0.5rem 0 0;
}

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

.hero {
  padding-block: 3.5rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  width: 100%;
}

@media (min-width: 56rem) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

@media (max-width: 40rem) {
  .hero h1 {
    font-size: 1.875rem;
  }
}

.hero p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
  max-width: 34rem;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.hero__image {
  width: 100%;
  height: 22rem;
  border-radius: 1.25rem;
  object-fit: cover;
  box-shadow: var(--shadow);
}

/* A placeholder stands in for a photo nobody has taken yet: a labelled box
   rather than a broken image, so the page still reads as finished. */
.placeholder-image {
  width: 100%;
  border-radius: 1.25rem;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8125rem;
  padding: 1rem;
}

/* Highlights bar ------------------------------------------------------------ */

.highlights {
  padding-block: 2rem;
}

.highlights__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 40rem) {
  .highlights__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .highlights__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.highlight {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.highlight__icon {
  flex: none;
  color: var(--accent);
}

.highlight__title {
  font-size: 0.84375rem;
  font-weight: 600;
  line-height: 1.3;
}

.highlight__subtitle {
  display: block;
  color: var(--text-dim);
  font-weight: 400;
}

/* Amenidades ----------------------------------------------------------------- */

.amenities__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 40rem) {
  .amenities__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 56rem) {
  .amenities__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.amenity {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.amenity .placeholder-image {
  height: 11.25rem;
}

.amenity__name {
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Localização ---------------------------------------------------------------- */

.location__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .location__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.location__copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.location__copy h2,
.rules__copy h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0;
}

.location__copy p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}

.location__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.location__list li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: #334155;
}

.check-icon {
  flex: none;
  color: var(--accent);
}

.location .placeholder-image {
  height: 21.25rem;
}

.location__map {
  width: 100%;
  height: 21.25rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
}

/* Sustentabilidade ------------------------------------------------------------ */

.eco__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .eco__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.eco-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  background: var(--surface);
}

.eco-card__icon {
  color: var(--accent);
}

.eco-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.eco-card__text {
  font-size: 0.84375rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0;
}

/* Regulamento ------------------------------------------------------------------ */
/* Section markup is commented out in index.html; these rules stay so it
   renders correctly the moment it's uncommented. */

.rules__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .rules__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.rules__copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rules__copy p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}

.rules__list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.5rem;
  box-shadow: var(--shadow);
}

.rules__item {
  padding: 1rem 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.rules__item:last-child {
  border-bottom: 0;
}

.rules__icon {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 0.5625rem;
  background: var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9375rem;
}

.rules__text {
  font-size: 0.875rem;
  color: #334155;
}

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

.cta {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0;
}

.cta p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}

.cta__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.75rem;
}

.site-footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer__fine,
.site-footer__credit {
  font-size: 0.75rem;
  color: #94a3b8;
}

.site-footer__credit {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35em;
}

/* Sized in em so they track the credit line's own font-size, including
   across the desktop breakpoint below. Both icons share the brand red
   rather than one taking currentColor's muted gray — a mismatch would have
   read as one being decorative and the other not. */
.credit-icon {
  width: 1em;
  height: 1em;
  color: var(--accent);
}

/* The one link in the footer that should read as plain text — a personal
   credit, not a call to action, so it takes none of the usual link styling. */
.credit-link {
  color: inherit;
  text-decoration: none;
}

.credit-link:hover {
  color: inherit;
}

/* Desktop enhancements ------------------------------------------------------------
   Everything below only applies at 48rem (768px) and up. Below that, the
   page is exactly the original mobile build — same type scale, same .wrap
   width, same hero. This is the one place all of that widens. */

@media (min-width: 48rem) {
  .wrap {
    /* Wide enough that a laptop-width window is filled edge to edge but for
       the side padding, not just the center third of it. */
    max-width: 96rem;
  }

  .site-header__brand img {
    width: 40px;
    height: 40px;
  }

  .site-header__brand span {
    font-size: 1.59375rem;
  }

  .site-nav a:not(.btn) {
    font-size: 1.434375rem;
  }

  .btn {
    padding: 1rem 1.75rem;
    border-radius: 0.75rem;
    font-size: 1.4875rem;
  }

  .eyebrow {
    font-size: 1.328125rem;
    margin-bottom: 0.625rem;
  }

  .section-head {
    max-width: 44rem;
    margin-bottom: 3rem;
  }

  .section-head h2 {
    font-size: 3.1875rem;
  }

  .section-head p {
    font-size: 1.59375rem;
    margin-top: 0.625rem;
  }

  /* Header + hero fill the first screen exactly: hero's min-height is 100%
     of the viewport minus the header's own (measured) height, so nothing
     below the fold is visible until a visitor actually scrolls. */
  .hero {
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100dvh - var(--header-h));
    display: flex;
    align-items: center;
    padding-block: 3rem;
  }

  .hero__grid {
    gap: 3rem;
  }

  .hero__copy {
    gap: 1.75rem;
  }

  .hero h1 {
    font-size: 4.25rem;
  }

  .hero p {
    font-size: 1.7rem;
  }

  .hero__actions {
    gap: 1rem;
  }

  .hero__image {
    height: clamp(18rem, 46vh, 34rem);
  }

  .placeholder-image {
    font-size: 1.38125rem;
  }

  .highlights {
    padding-block: 2.5rem;
  }

  .highlights__grid {
    gap: 1.75rem;
  }

  .highlight {
    gap: 1rem;
  }

  .highlight__icon {
    width: 34px;
    height: 34px;
  }

  .highlight__title {
    font-size: 1.434375rem;
  }

  .highlight__subtitle {
    font-size: 0.85em;
  }

  .amenities__grid {
    gap: 1.75rem;
  }

  .amenity {
    gap: 0.875rem;
  }

  .amenity .placeholder-image {
    height: 12.5rem;
  }

  .amenity__name {
    font-size: 1.59375rem;
  }

  .location__copy {
    gap: 1.25rem;
  }

  .location__copy h2,
  .rules__copy h2 {
    font-size: 3.1875rem;
  }

  .location__copy p,
  .rules__copy p {
    font-size: 1.59375rem;
  }

  .location__list {
    gap: 0.875rem;
  }

  .location__list li {
    gap: 0.75rem;
    font-size: 1.4875rem;
  }

  .check-icon {
    width: 20px;
    height: 20px;
  }

  .eco__grid {
    gap: 1.75rem;
  }

  .eco-card {
    padding: 1.75rem;
    gap: 0.875rem;
  }

  .eco-card__icon {
    width: 34px;
    height: 34px;
  }

  .eco-card__title {
    font-size: 1.59375rem;
  }

  .eco-card__text {
    font-size: 1.434375rem;
  }

  .rules__copy {
    gap: 1.25rem;
  }

  .rules__item {
    padding: 1.25rem 1.375rem;
    gap: 1rem;
  }

  .rules__icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    font-size: 1.59375rem;
  }

  .rules__text {
    font-size: 1.4875rem;
  }

  .cta {
    max-width: 48rem;
    gap: 1.25rem;
  }

  .cta h2 {
    font-size: 3.1875rem;
  }

  .cta p {
    font-size: 1.59375rem;
  }

  .cta__actions {
    gap: 1rem;
  }

  .site-footer__fine,
  .site-footer__credit {
    font-size: 1.275rem;
  }
}
