/* Base layout and resets */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* ✅ Prevent horizontal scrolling */
  background-color: #fff;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
}

main {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
  width: 100%;
}

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

hr {
  width: 100%;
  height: 1px;
  border: none;
  margin: 0;
  background: #bfc3c8;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  background-color: #fff;
  padding: 20px clamp(16px, 5vw, 24px);
  box-sizing: border-box;
}

/* Responsive layout toggles */
.layout-0-under-450 {
  display: none;
}

@media (max-width: 450px) {
  .layout-0 {
    display: none !important;
  }
  .layout-0-under-450 {
    display: table !important;
  }
}

/* Spacing utilities */
.pt10 { padding-top: 10px; }
.py10 { padding: 10px 0; }
.py20 { padding: 20px 0; }
.px20 { padding: 0 20px; }
.p7 { padding: 7px; }
.p0 { padding: 0; }
.py31p13 { padding-top: 31px; padding-bottom: 31px; }
.spacer-24 { height: 24px; font-size: 0; line-height: 0; }

/* Text defaults */
.text-table {
  color: #000;
  font-style: normal;
  font-weight: normal;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  direction: ltr;
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
  border-collapse: collapse;
}

/* Button */
.btn {
  display: inline-block;
  width: auto;
  min-width: 120px;
  height: 50px;
  text-decoration: none;
  box-sizing: border-box;
  padding: 0;
  background: transparent;
  margin: 0 auto;
}

.btn__label {
  display: inline-block;
  background-color: #ce2d4f;
  color: #fff;
  font-size: clamp(1rem, 3vw, 1.1875rem);
  font-weight: bold;
  line-height: clamp(2.5rem, 5vw, 3.125rem);
  padding: 0 clamp(1rem, 5vw, 1.375rem);
  border-radius: 100px;
  text-align: center;
  box-sizing: border-box;
}

/* CTA Area */
.cta-area {
  margin-top: 20px;
  text-align: center;
}

/* Text helpers */
.bold { font-weight: 700; }
.ls-004neg { letter-spacing: -0.04em; }
.ls-003neg { letter-spacing: -0.03em; }
.text-center { text-align: center; }
.bg-black { background-color: transparent !important; color: inherit !important; }

/* Width helpers */
.maxw-420 { max-width: 420px; }
.maxw-480 { max-width: 480px; }
.maxw-522 { max-width: 522px; }
.maxw-560 { max-width: 560px; }
.maxw-600 { max-width: 600px; }

table[class^="maxw-"] {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

table.maxw-164 {
  text-align: center;
}

td {
  text-align: center;
}

/* Hero */
.hero-container {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 4 / 3;
  background-color: #000;
  border-radius: 20px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-sizing: border-box;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%; /* Ensures full coverage with flexibility */
  padding-top: 0;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.hero-overlay-image {
  width: clamp(30px, 20vw, 90px);
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(20px, 5vw, 60px); /* Responsive gap between image and text */
  z-index: 3;
}

.hero-overlay-text {
  color: #fff;
  font-size: clamp(1.25rem, 4vw, 1.625rem);
  font-weight: bold;
  text-align: center;
  line-height: 1.3;
  max-width: 480px;
  word-spacing: 0.05em;
  padding: 0 clamp(16px, 5vw, 24px);
  z-index: 3;
}

.chat-input-container {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box; /* ✅ Added for proper sizing */
}

#chatInput {
  width: 100%;
  min-height: 160px;
  padding: 18px 20px;
  border: 1px solid #f5f5f5;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  resize: none;
  overflow-y: hidden;
  background-color: #1a1a1a;
  color: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  outline: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#chatInput::-webkit-scrollbar {
  display: none;
}

/* Responsive divider */
.divider {
  width: min(100%, 720px); /* Never exceeds 720px, but fills smaller containers */
  height: 1px;
  background-color: #bfc3c8;
  margin-block: clamp(40px, 5vw, 40px) auto;
  margin-inline: auto;
}

/* Word count - already in previous CSS */
#wordCount {
  position: absolute;
  bottom: -25px;
  right: calc(clamp(16px, 5vw, 24px) + 15px);
  font-size: clamp(10px, 2vw, 12px); /* ✅ Add responsive font size */
  color: #000000;
  font-family: 'Open Sans', sans-serif;
}

#submitButton {
  position: absolute;
  bottom: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background-color: #ce2d4f;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

#submitButton:hover {
  background-color: #b02543; /* ✅ Added hover state */
}

/* Footer */
.container-footer {
    background-color: #000;
    width: 100%;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* ✅ vertical centering */
    align-items: center;
    padding: 0 clamp(16px, 5vw, 24px);
}

.footer-inner {
  width: 100%;
  max-width: 640px;
  padding-inline: clamp(16px, 5vw, 24px);
}

.footer-headline {
    color: #f6f5f1;
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: pre-wrap;
    line-height: 1.2;
    text-align: left;
    max-width: 640px;
    width: 90%;
}

.footer-muted {
    color: #bfc3c8;
    font-size: clamp(0.8125rem, 2vw, 0.8125rem);
    letter-spacing: -0.01em;
    white-space: inherit;
    line-height: 1.15;
    text-align: left;
    max-width: 640px;
    width: 90%;
    overflow-wrap: normal;         /* default: wrap only at spaces */
    word-break: keep-all;          /* prevents breaking inside words */
}

.footer-legal {
  color: #fff;
  font-size: clamp(0.8125rem, 2vw, 0.8125rem);
  letter-spacing: -0.01em;
  white-space: inherit;
  text-align: left;
  max-width: 640px;
  width: 90%;
  overflow-wrap: normal;
  word-break: keep-all;
}
