/* =========================================================
   Glamour Apartments — design tokens
   Palette drawn from the building itself: the deep blue of
   its azulejo tilework, the ochre of its facade paint, and
   the pale limestone tone of Portuguese pavements.
   ========================================================= */
:root {
  --ink: #221f1c;
  --stone: #6b6459;
  --stone-light: #948c7d;
  --azulejo: #2b4c6f;
  --azulejo-deep: #1c3247;
  --ochre: #c98a3e;
  --ochre-deep: #a66f2c;
  --sand: #f2ebdc;
  --sand-deep: #e3d7c0;
  --white: #fffdf9;
  --line: rgba(34, 31, 28, 0.12);
  --line-on-dark: rgba(255, 253, 249, 0.22);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1180px;
  --page-max: 1600px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  max-width: var(--page-max);
  margin: 0 auto;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; letter-spacing: 0.1px; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; font-size: 0.95rem; font-weight: 500;
  border-radius: 2px; text-decoration: none; border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--azulejo); color: var(--white); }
.btn-primary:hover { background: var(--azulejo-deep); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--sand); }
.btn-outline-light { border-color: var(--line-on-dark); color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); }
.btn-small { padding: 9px 18px; font-size: 0.85rem; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed; top: 0; left: 50%; width: min(100%, var(--page-max)); z-index: 100;
  transform: translateX(-50%);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: var(--container); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.header-logo-link {
  display: block;
  flex: 0 0 auto;
}
.header-logo {
  width: 100px;
  height: auto;
  transition: filter 0.3s ease;
}
.site-header.is-scrolled .header-logo { filter: brightness(0) saturate(100%); }

.wordmark {
  font-family: var(--font-display); font-size: 1.15rem; text-decoration: none;
  color: var(--white); transition: color 0.3s ease;
}
.site-header.is-scrolled .wordmark { color: var(--ink); }
.wordmark span { font-style: italic; font-weight: 400; opacity: 0.85; }

.main-nav { display: none; gap: 32px; }
.main-nav a {
  text-decoration: none; color: var(--white); font-size: 0.94rem;
  transition: color 0.3s ease, opacity 0.2s ease;
  opacity: 0.92;
  font-weight: bold;
}
.main-nav a:hover { opacity: 1; }
.site-header.is-scrolled .main-nav a { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 14px; }

/* language switcher */
.lang-switch { position: relative; }
.lang-current {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--line-on-dark); color: var(--white);
  padding: 7px 11px; border-radius: 2px; font-size: 0.82rem; font-family: var(--font-body);
  cursor: pointer; transition: color 0.3s ease, border-color 0.3s ease;
  font-weight: 700;
}
.site-header.is-scrolled .lang-current { color: var(--ink); border-color: var(--line); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 150px;
  background: var(--white); border: 1px solid var(--line); border-radius: 3px;
  box-shadow: 0 12px 28px rgba(34,31,28,0.12);
  display: none; flex-direction: column; padding: 6px; z-index: 10;
}
.lang-switch.is-open .lang-menu { display: flex; }
.lang-menu button {
  background: none; border: none; text-align: left; padding: 9px 12px;
  font-family: var(--font-body); font-size: 0.9rem; color: var(--ink);
  border-radius: 2px; cursor: pointer;
}
.lang-menu button:hover { background: var(--sand); }
.lang-menu button[aria-current="true"] { color: var(--azulejo); font-weight: 600; }

.menu-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 34px; height: 34px; background: none; border: none; cursor: pointer; padding: 0;
}
.menu-toggle span { display: block; height: 1.5px; background: var(--white); transition: background-color 0.3s ease; }
.site-header.is-scrolled .menu-toggle span { background: var(--ink); }

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .menu-toggle { display: none; }
}

@media (max-width: 899px) {
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); flex-direction: column; padding: 10px var(--gutter) 22px;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { color: var(--ink); padding: 10px 0; opacity: 1; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,20,18,0.18) 0%, rgba(20,20,18,0.08) 30%, rgba(16,14,12,0.62) 68%, rgba(13,11,10,0.88) 100%),
    linear-gradient(100deg, rgba(12,11,9,0.55) 0%, rgba(12,11,9,0.15) 38%, rgba(12,11,9,0) 60%);
}
.hero-content {
  position: relative; z-index: 2; color: var(--white);
  max-width: 680px; padding: 0 var(--gutter) clamp(56px, 9vw, 108px);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.hero-content.is-visible { opacity: 1; transform: translateY(0); }
.hero-kicker {
  font-size: 0.92rem; color: rgba(255,253,249,0.85); margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.12; font-weight: 500;
  max-width: 15ch;
}
.hero-subhead {
  margin-top: 22px; font-size: 1.05rem; line-height: 1.6; max-width: 46ch;
  color: rgba(255,253,249,0.9);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* =========================================================
   Intro / story
   ========================================================= */
.intro { background: var(--sand); padding: clamp(56px, 9vw, 100px) var(--gutter); }
.intro-inner {
  max-width: var(--container); margin: 0 auto;
  display: grid; gap: 40px;
}
.intro-text {
  font-family: var(--font-display); font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  line-height: 1.5; color: var(--ink); max-width: 62ch;
}
.intro-rating {
  display: flex; flex-direction: column; gap: 4px;
  padding-left: 24px; border-left: 1px solid var(--line);
}
.rating-value { font-family: var(--font-display); font-size: 2.1rem; color: var(--azulejo); }
.rating-label { font-size: 0.95rem; font-weight: 600; }
.rating-sub { font-size: 0.85rem; color: var(--stone); }

@media (min-width: 860px) {
  .intro-inner { grid-template-columns: 1.6fr 1fr; align-items: center; }
}

/* =========================================================
   Section heads (shared)
   ========================================================= */
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head--left { text-align: left; margin: 0 0 44px; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 500; }
.section-head p { margin-top: 16px; color: var(--stone); font-size: 1.02rem; line-height: 1.6; }

/* =========================================================
   Apartments — alternating editorial rows
   ========================================================= */
.apartments { padding: clamp(72px, 10vw, 120px) var(--gutter); max-width: var(--container); margin: 0 auto; }
.apartment-list { display: flex; flex-direction: column; gap: clamp(48px, 8vw, 88px); }
.apartment-row { display: grid; gap: 28px; align-items: center; }
.apartment-media { overflow: hidden; }
.apartment-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.apartment-mood { color: var(--ochre-deep); font-size: 0.92rem; font-weight: 500; margin-bottom: 10px; }
.apartment-copy h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 16px; }
.apartment-desc { color: var(--stone); font-size: 1.02rem; line-height: 1.65; max-width: 46ch; }
.apartment-specs {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 0.88rem; color: var(--stone-light); letter-spacing: 0.01em;
}

@media (min-width: 780px) {
  .apartment-row { grid-template-columns: 1.15fr 1fr; gap: 56px; }
  .apartment-row--reverse .apartment-media { order: 2; }
  .apartment-row--reverse .apartment-copy { order: 1; }
  .apartment-copy { max-width: 42ch; }
}

/* =========================================================
   Amenities
   ========================================================= */
.amenities { background: var(--sand); padding: clamp(72px, 10vw, 120px) var(--gutter); }
.amenities-inner { max-width: var(--container); margin: 0 auto; }
.amenities-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.amenity-item {
  display: flex; gap: 18px; align-items: flex-start; padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.amenity-icon {
  flex: none; width: 34px; height: 34px; color: var(--azulejo);
  display: flex; align-items: center; justify-content: center;
}
.amenity-icon svg { width: 100%; height: 100%; }
.amenity-text { display: flex; flex-direction: column; gap: 4px; }
.amenity-text strong { font-size: 1rem; font-weight: 600; }
.amenity-text span { color: var(--stone); font-size: 0.94rem; line-height: 1.5; }

@media (min-width: 780px) {
  .amenities-list { grid-template-columns: 1fr 1fr; column-gap: 56px; }
}

/* =========================================================
   Location
   ========================================================= */
.location {
  position: relative; padding: clamp(72px, 10vw, 120px) var(--gutter);
  max-width: var(--container); margin: 0 auto; overflow: hidden;
}
.location-inner { max-width: 560px; }
.location-list { display: flex; flex-direction: column; }
.location-item {
  display: flex; justify-content: space-between; gap: 20px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.location-item:first-child { border-top: 1px solid var(--line); }
.location-item strong { font-size: 1.02rem; font-weight: 600; white-space: nowrap; }
.location-item span { color: var(--stone); font-size: 0.92rem; text-align: right; }

.location-map-link { margin-top: 28px; }
.location-graphic {
  display: none; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 340px; height: 340px; color: var(--sand-deep);
}
.location-graphic svg { width: 100%; height: 100%; }

@media (min-width: 980px) {
  .location-graphic { display: block; }
}

/* =========================================================
   Philosophy
   ========================================================= */
.philosophy { background: var(--white); padding: clamp(80px, 11vw, 140px) var(--gutter); }
.philosophy-inner { max-width: 680px; margin: 0 auto; text-align: center; }
.philosophy-inner h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin-bottom: 30px; }
.philosophy-inner p {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.6; color: var(--ink);
}
.philosophy-inner p + p { margin-top: 22px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--azulejo-deep); color: var(--white); }
.footer-inner {
  max-width: var(--container); margin: 0 auto; padding: clamp(64px, 9vw, 100px) var(--gutter) 48px;
  display: grid; gap: 44px;
}
.wordmark--footer { font-size: 1.4rem; margin-bottom: 18px; color: var(--white); }
.footer-heading { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 10px; }
.footer-sub { color: rgba(255,253,249,0.75); margin-bottom: 26px; max-width: 40ch; }
.footer-contact p { padding: 10px 0; border-bottom: 1px solid var(--line-on-dark); font-size: 0.95rem; }
.footer-contact p:first-child { border-top: 1px solid var(--line-on-dark); }
.footer-contact a { text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid var(--line-on-dark);
  padding: 22px var(--gutter); text-align: center;
  font-size: 0.82rem; color: rgba(255,253,249,0.6);
}

@media (min-width: 780px) {
  .footer-inner { grid-template-columns: 1.3fr 1fr; }
}
