/* Load Local Font Myriad Pro */
@font-face {
  font-family: "MyriadPro";
  src: url("fonts/MyriadPro-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "LateSerifVariable";
  src:
    local("LateSerifVariable"), local("Late Serif Variable"),
    local("Late Serif");
  font-weight: 100 900;
  font-style: normal;
}

@font-face {
  font-family: "DMSerifDisplay";
  src: url("fonts/DMSerifDisplay-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

/* Design Tokens & Variables */
:root {
  --color-teal-bg: #4b7b7f;
  --color-teal-dark: #2f4d50;
  --color-teal-input: #6d9998;
  --color-form-bg: #b6cec8;
  --color-form-button: #4d8284;
  --color-gold: #deb468;
  --color-gold-hover: #f0cb87;
  --color-dark-grey: #3d3d35;
  --color-dark-footer: #4b4941;
  --font-sans: "MyriadPro", Arial, sans-serif;
  --font-serif:
    "LateSerifVariable", "DMSerifDisplay", Georgia, "Times New Roman", serif;
  --font-serif-italic:
    "LateSerifVariable", "DMSerifDisplay", Georgia, "Times New Roman", serif;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #1a1a1a;
  color: #ffffff;
  font-family: var(--font-sans);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

.page-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Canvas Container (Full Screen Layout for Desktop) */
.canvas-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-image: url("img/fundo.jpg");
  background-size: 100% 100%; /* Stretch background exactly to fill the container */
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
  overflow: hidden;
}

/* Hero Content Overlay (Desktop absolute layout) */
.hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Let clicks pass to inputs */
}

/* Brand Section (Logo & Headline) */
.brand-section {
  position: absolute;
  left: 31.6%;
  top: 10.1%;
  width: 28%;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

.logo-wrapper {
  width: 100%;
  max-width: 25vw;
  margin-bottom: 2%;
  text-align: center;
}

.logo {
  width: 80%;
  height: auto;
  object-fit: contain;
}

.headline {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(15px, 1.55vw, 31px);
  letter-spacing: 0.18em;
  color: #ffffff;
  text-align: center;
  line-height: 1.05;
  margin-top: 0.1%;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-left: 70px;
}

.headline .serif-italic {
  display: block;
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(34px, 3.55vw, 70px);
  letter-spacing: 0;
  text-transform: lowercase;
  color: #a8c4bd;
  margin-top: -0.05vw;
  text-shadow: none;
}

/* Gold Circle Text */
.feature-badge {
  position: absolute;
  left: 41.35%;
  top: 44.55%;
  width: 11.45%;
  min-width: 140px;
  color: #373732;
  text-align: center;
  pointer-events: none;
}

.feature-rooms {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  line-height: 0.78;
}

.feature-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(62px, 5.35vw, 114px);
  font-weight: 400;
}

.feature-join {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 2.2vw, 47px);
  line-height: 0.95;
  margin: 0 -0.32vw 0.08vw;
}

.feature-dorms {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 2.62vw, 58px);
  font-weight: 400;
  line-height: 0.86;
}

.feature-rooftop {
  margin-top: 1.05vw;
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.2vw, 26px);
  letter-spacing: 0.2em;
  line-height: 1.35;
}

.feature-rooftop span,
.feature-rooftop strong {
  display: block;
}

.feature-rooftop strong {
  font-weight: 700;
}

/* Form Container on the Right */
.form-container {
  position: absolute;
  right: 18.1%;
  top: 12%;
  width: 20.7%;
  height: 44.8%;
  pointer-events: auto;
}

.form-card {
  width: 100%;
  height: 100%;
  background: var(--color-form-bg);
  border: 0;
  padding: 1.7vw 1.55vw 2.25vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.form-title {
  font-family: var(--font-sans);
  font-size: clamp(17px, 1.55vw, 32px);
  line-height: 1.2;
  letter-spacing: 0.14em;
  color: #47767b;
  text-align: center;
  margin-bottom: 1.45vw;
  flex: 0 0 auto;
}

.form-title span {
  display: block;
  color: #ffffff;
  font-weight: 400;
}

.form-title strong {
  display: block;
  font-weight: 700;
}

#lead-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: clamp(12px, 1.1vw, 22px);
  min-height: 0;
}

.input-group {
  width: 100%;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.input-group input {
  width: 100%;
  background: var(--color-teal-input);
  border: none;
  border-radius: 0;
  min-height: clamp(34px, 2.35vw, 48px);
  padding: 0.52vw 0.72vw;
  font-family: var(--font-sans);
  font-size: clamp(12px, 0.85vw, 18px);
  color: #ffffff;
  transition: all 0.3s ease;
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.18em;
}

.input-group input:focus {
  outline: none;
  background: rgba(75, 123, 127, 0.95);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.submit-btn {
  width: 100%;
  background: var(--color-form-button);
  border: none;
  color: #ffffff;
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(22px, 1.75vw, 36px);
  text-transform: lowercase;
  min-height: clamp(36px, 2.45vw, 50px);
  padding: 0.18vw 0.7vw;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0;
  flex: 0 0 auto;
}

.submit-btn:hover {
  background: var(--color-gold);
  color: var(--color-teal-dark);
}

.submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

/* Vertical Location Tag */
.location-tag {
  position: absolute;
  right: 12.55%;
  top: 0;
  width: 1.9vw;
  height: 44.5%;
  background: var(--color-gold);
  display: flex;
  align-items: end;
  justify-content: center;
  pointer-events: none;
}

.location-tag::before {
  content: none;
}

.location-tag span {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(12px, 1vw, 20px);
  color: var(--color-dark-grey);
  letter-spacing: 0.22em;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  display: inline-block;
  margin-bottom: 30px;
}

/* Partners Section (Bottom Right of Canvas) */
.partners-section {
  position: absolute;
  right: 0;
  top: 68%;
  width: 48.5%;
  height: 15.8%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 6.6vw;
  pointer-events: auto;
}

.partners-content {
  display: flex;
  align-items: center;
  gap: 3.2vw;
}

.partners-text {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(14px, 1.65vw, 32px);
  line-height: 1.2;
  color: #4b7b7f;
}

.partners-text .bold-text {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(15px, 1.55vw, 30px);
  letter-spacing: 0.08em;
}

.partners-logos {
  display: flex;
  align-items: center;
  gap: 1.8vw;
}

.partner-logo {
  height: clamp(36px, 4.3vw, 86px);
  width: auto;
  object-fit: contain;
}

/* Footer Address Bar (Upper bar on the right bottom) */
.footer-address {
  position: absolute;
  right: 0;
  top: 84.2%;
  width: 48.5%;
  height: 7.6%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4.2vw 0 5vw;
  background: #383930;
  z-index: 2;
}

.address-text {
  font-family: var(--font-sans);
  font-size: clamp(12px, 0.98vw, 20px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.55;
  color: #ffffff;
  text-align: center;
}

.address-text .gold-text {
  color: var(--color-gold);
  font-weight: 700;
}

.address-text .white-text {
  display: block;
  font-weight: 700;
  color: #dfdfdf;
  letter-spacing: 0.19em;
  text-transform: none;
}

/* Bottom Footer Bar */
.footer-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 6.3%;
  display: flex;
  align-items: center;
  background: rgba(74, 72, 65, 0.97);
  z-index: 3;
}

.footer-inner {
  width: 100%;
  padding: 0 5.2vw;
  display: flex;
  align-items: center;
  position: relative;
}

.phone-item,
.social-item,
.credit-item {
  position: absolute;
}

.phone-item {
  left: 12.4vw;
}

.social-item {
  left: 25.1vw;
}

.credit-item {
  right: 7.8vw;
}

.contact-item {
  display: flex;
  align-items: center;
}

.contact-item a {
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6vw;
  font-family: var(--font-sans);
  font-size: clamp(12px, 0.95vw, 18px);
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--color-gold);
}

.footer-icon {
  height: clamp(14px, 1.15vw, 22px);
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.contact-item a:hover .footer-icon {
  transform: scale(1.1);
}

.social-item {
  gap: 0.55vw;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 0.2vw;
}

.social-handle {
  font-family: var(--font-sans);
  font-size: clamp(11px, 0.85vw, 16px);
  letter-spacing: 0.05em;
}

.credit-item {
  font-family: var(--font-sans);
  font-size: clamp(8px, 0.65vw, 13px);
  letter-spacing: 0.05em;
  color: #9a9a95;
}

.credit-item a {
  color: inherit;
  text-decoration: none;
}

.credit-author {
  font-weight: bold;
  color: #c4c4bf;
}

.mobile-hero-banner {
  display: none;
}

/* Mobile responsive layout helpers */
.mobile-only {
  display: none;
}

/* Form Modal */
.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lead-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lead-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(47, 77, 80, 0.78);
  backdrop-filter: blur(3px);
}

.lead-modal__dialog {
  position: relative;
  width: min(92vw, 430px);
  background: var(--color-form-bg);
  border-top: 8px solid var(--color-gold);
  box-shadow: 0 22px 60px rgba(15, 35, 37, 0.38);
  padding: 38px 34px 32px;
  text-align: center;
  color: var(--color-teal-dark);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.25s ease;
}

.lead-modal.is-open .lead-modal__dialog {
  transform: translateY(0) scale(1);
}

.lead-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--color-teal-dark);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.lead-modal__brand {
  font-family: var(--font-serif);
  font-size: clamp(42px, 4vw, 64px);
  line-height: 0.9;
  color: #ffffff;
  margin-bottom: 18px;
  text-transform: lowercase;
}

.lead-modal__title {
  margin-bottom: 12px;
  font-family: var(--font-sans);
  font-size: clamp(18px, 1.5vw, 26px);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #47767b;
}

.lead-modal__message {
  margin: 0 auto 26px;
  max-width: 330px;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  color: var(--color-teal-dark);
}

.lead-modal__button {
  min-width: 150px;
  min-height: 46px;
  border: 0;
  background: var(--color-form-button);
  color: #ffffff;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1;
  text-transform: lowercase;
  transition: all 0.3s ease;
}

.lead-modal__button:hover,
.lead-modal__button:focus {
  outline: none;
  background: var(--color-gold);
  color: var(--color-teal-dark);
}

.lead-modal.error .lead-modal__dialog {
  border-top-color: #8b3a32;
}

/* ==========================================================================
   Responsive Styling (Mobile & Tablets)
   ========================================================================== */

@media (max-width: 1024px) {
  body {
    align-items: flex-start;
    background-color: #f5f3eb;
  }

  .page-wrapper {
    align-items: flex-start;
  }

  .canvas-container {
    width: 100vw;
    height: auto;
    max-width: 100%;
    max-height: none;
    aspect-ratio: auto;
    background-image: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
  }

  /* Mobile Hero Banner showing the building */
  .mobile-hero-banner {
    display: block;
    position: relative;
    width: 100%;
    height: min(118vw, 560px);
    min-height: 430px;
    background-image: url("img/fundo-mobile.jpg");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
  }

  .mobile-hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(28, 62, 66, 0.28) 0%,
      rgba(28, 62, 66, 0.06) 30%,
      rgba(28, 62, 66, 0) 58%
    );
    pointer-events: none;
  }

  .mobile-hero-banner::after {
    content: "";
    position: absolute;
    top: 26px;
    left: 50%;
    width: min(62vw, 255px);
    aspect-ratio: 351 / 287;
    background-image: url("img/logo.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    filter: drop-shadow(0 2px 8px rgba(20, 45, 48, 0.32));
    transform: translateX(-50%);
    pointer-events: none;
  }

  .hero-content {
    position: static;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
  }

  /* Hide elements overlaying on hero on mobile, we render them in flow below */
  .brand-section,
  .form-container,
  .partners-section,
  .footer-address {
    position: static;
    width: 100%;
    height: auto;
    pointer-events: auto;
  }

  /* Replaced visual wrapper below the hero image banner */
  .brand-section {
    background-color: var(--color-teal-bg);
    padding: 28px 24px 24px;
  }

  .logo-wrapper {
    display: none;
  }

  .logo {
    width: 100%;
  }

  .headline {
    margin-left: 0;
    font-size: 22px;
    letter-spacing: 0.12em;
    line-height: 1.1;
  }

  .headline .serif-italic {
    font-size: 42px;
    margin-top: 4px;
  }

  /* Mobile Form Section */
  .form-container {
    display: flex;
    background-color: var(--color-teal-bg);
    padding: 10px 20px 28px;
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }

  .form-card {
    width: 100%;
    max-width: 370px;
    padding: 26px 24px 30px;
    background: var(--color-form-bg);
    justify-content: flex-start;
    overflow: visible;
  }

  .form-title {
    font-size: 22px;
    margin-bottom: 24px;
    color: #47767b;
    line-height: 1.15;
    letter-spacing: 0.14em;
  }

  .form-title span {
    color: #ffffff;
    font-weight: 400;
  }

  .form-title strong {
    color: #47767b;
    font-weight: 700;
  }

  .feature-badge {
    position: static;
    width: 100%;
    min-width: 0;
    padding: 30px 20px 28px;
    background-color: var(--color-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .feature-number {
    font-size: 64px;
  }

  .feature-join {
    font-size: 30px;
    margin: 0 -3px 2px;
  }

  .feature-dorms {
    font-size: 36px;
    line-height: 0.84;
  }

  .feature-rooftop {
    margin-top: 16px;
    font-size: 15px;
    letter-spacing: 0.22em;
    line-height: 1.25;
  }

  .input-group {
    margin-bottom: 0;
  }

  .input-group input {
    min-height: 52px;
    font-size: 16px;
    padding: 12px 14px;
  }

  .submit-btn {
    min-height: 54px;
    font-size: 30px;
    padding: 6px 12px;
    margin-top: 0;
    background: var(--color-form-button);
  }

  #lead-form {
    gap: 20px;
  }

  /* Remove the vertical location tag style & render horizontally */
  .location-tag {
    position: static;
    width: auto;
    height: auto;
    background: var(--color-teal-bg);
    margin-left: 0;
    padding: 8px 20px 24px;
    pointer-events: auto;
  }

  .location-tag::before {
    display: none;
  }

  .location-tag span {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    transform: none;
    font-size: 14px;
    letter-spacing: 0.18em;
    color: #27393a;
    border-bottom: 1px solid rgba(222, 180, 104, 0.95);
    padding: 0 3px 7px;
    margin-bottom: 0;
  }

  /* Mobile Partners Section */
  .partners-section {
    background-color: #ffffff;
    padding: 40px 20px;
    justify-content: center;
  }

  .partners-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 25px;
  }

  .partners-text {
    font-size: 20px;
    color: var(--color-teal-dark);
  }

  .partners-text .bold-text {
    font-size: 24px;
  }

  .partners-logos {
    gap: 30px;
  }

  .partner-logo {
    height: 60px;
  }

  /* Mobile Address Bar */
  .footer-address {
    background-color: var(--color-dark-grey);
    padding: 28px 22px;
    text-align: center;
    justify-content: center;
  }

  .address-text {
    width: 100%;
    max-width: 310px;
    font-size: 13px;
    letter-spacing: 0.11em;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .address-text .white-text {
    display: block;
    width: 100%;
    max-width: 285px;
    margin-top: 7px;
    margin-left: auto;
    margin-right: auto;
    font-size: 12px;
    letter-spacing: 0.04em;
    line-height: 1.45;
    text-transform: none;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .mobile-only {
    display: block;
  }

  /* Mobile Footer Bar */
  .footer-bar {
    position: static;
    background-color: var(--color-dark-footer);
    padding: 30px 20px;
    height: auto;
  }

  .footer-inner {
    flex-direction: column;
    gap: 25px;
    padding: 0;
    text-align: center;
  }

  .phone-item,
  .social-item,
  .credit-item {
    position: static;
  }

  .contact-item a {
    font-size: 15px;
    gap: 10px;
  }

  .footer-icon {
    height: 20px;
  }

  .social-item {
    flex-direction: column;
    gap: 12px;
  }

  .social-icons {
    gap: 20px;
  }

  .social-handle {
    font-size: 15px;
  }

  .credit-item {
    font-size: 12px;
    margin-top: 5px;
  }
}
