.hero-section,
.features-section,
.wearable-section,
.faq-section {
  margin-bottom: 120px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);

  width: 100%;
  justify-content: space-between;
  max-width: var(--container-max-width);
  margin-inline: auto;
}

.hero-text-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.hero-info {
  display: contents;
}

.hero-section {
  row-gap: 18px;
  align-content: center;
}

.hero-info>* {
  grid-column: 1;
  justify-self: start;
  text-align: left;
  width: 100%;
  max-width: 580px;
}

/* Centre the hero text block (title, subtitle, form, status).
   Uses ".hero-info >" so it beats the generic ".hero-info>*" left-align above. */
.hero-info>.hero-text-section {
  /* same single grid row as the image, so the box is as tall as the hero
     and its content (justify-content: center) sits in the vertical middle */
  grid-row: 1;
  align-self: stretch;
  align-items: center;
  text-align: center;
  justify-self: center;
}

.hero-text-section .cta {
  justify-content: center;
}

.hero-title {
  display: flex;
  font-size: clamp(18px, 4vw, 48px);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text-main);
  letter-spacing: -1.2px;
}

.hero-subtitle {
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-muted);
  line-height: 1.65;
}

.hero-info>.hero-image {
  container-type: inline-size;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  display: block;
  /* max-width: 480px; */
  width: clamp(380px, 440px, 480px);
  /* never wider than its grid column (otherwise it overlaps the text on tablets) */
  max-width: 100%;
  height: auto;
  object-fit: contain;

  border-radius: var(--radius-xl);
  box-shadow:
    0 16px 40px -8px rgba(15, 23, 42, 0.12),
    0 4px 12px rgba(15, 23, 42, 0.05);
}

.cta {
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.input-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  max-width: 340px;
}

.email-input {
  font-family: inherit;
  background-color: var(--color-bg-surface);
  color: var(--color-text-main);
  width: 100%;
  padding: 14px 20px;
  border: 1.5px solid var(--color-border-input);
  border-radius: var(--radius-lg);
  outline: none;
  font-size: 16px;
  /* 16px+ prevents iOS zoom-on-focus */
  font-weight: var(--font-weight-regular);
  box-shadow: var(--shadow-xs);
}

.email-input::placeholder {
  color: var(--color-text-subtle);
}

.email-input:focus,
.email-input:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

/* Native HTML5 Form Validation States */
.email-input:focus:invalid:not(:placeholder-shown) {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px var(--color-error-tint);
}

.waitlist-btn {
  font-family: inherit;
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  appearance: none;
  outline: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-lg);
  text-align: center;
  padding: 14px 28px;
  min-width: 180px;
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  box-shadow: 0 4px 14px rgba(31, 106, 255, 0.28);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.waitlist-btn:hover {
  background-color: var(--color-primary-hover);
}

.waitlist-btn:active {
  background-color: var(--color-primary-active);
}

.waitlist-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.waitlist-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

#form-status {
  margin-top: 10px;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  min-height: 20px;
}

#form-status.is-success {
  color: var(--color-success);
}

#form-status.is-error {
  color: var(--color-error-text);
}

/* ==========================================================================
   SHARED SECTION HEADINGS
   ========================================================================== */
.text-section {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.headtext {
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 900;
  line-height: 1.15;
  
  overflow-wrap: break-word;
}

.subtext {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: var(--font-weight-regular);
}

#form-status {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 70px;
  font-size: 26px;
  justify-content: center;
}

/* ==========================================================================
   RESPONSIVE (must stay last so it overrides the base rules above)
   ========================================================================== */
@media (max-width: 992px) {

  .hero-section,
  .features-section,
  .wearable-section,
  .faq-section {
    margin-bottom: 80px;
  }

  /* Features: cards stack one per row, centred, same inner layout */
  .feature-card-grid {
    flex-direction: column;
    align-items: center;
  }

  .feature-card {
    max-width: 680px;
    min-height: 340px;
  }

  .wearable-card {
    flex-direction: column;
    padding: 0;
  }

  .wearable-image,
  .wearable-text-section {
    width: 100%;
  }

  .wearable-image img {
    /* width:100% + max-width keeps it from exceeding narrow phone screens */
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
  }
}

@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 16px;
  }

  .hero-info>* {
    max-width: none;
    justify-self: center;
    text-align: center;
  }

  .hero-info>.hero-text-section {
    grid-row: auto;
  }

  .hero-title {
    font-size: clamp(32px, 6.5vw, 44px);
    letter-spacing: -1px;
    line-height: 1.4;
  }

  .hero-subtitle {
    font-size: 16px;
    max-width: 52ch;
  }

  .cta {
    margin-top: 0;
    justify-content: center;
  }

  .hero-info>.hero-image {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
    width: 100%;
    height: auto;
    max-width: 420px;
    margin-block: 8px;
  }
}

@media (max-width: 600px) {

  .hero-section,
  .features-section,
  .wearable-section,
  .faq-section {
    margin-bottom: 56px;
  }

  .hero-section {
    row-gap: 12px;
  }

  .hero-title {
    font-size: clamp(28px, 8.5vw, 36px);
    line-height: 2;
    letter-spacing: -0.6px;
  } */

  .hero-subtitle {
    font-size: 15px;
    line-height: 1.55;
  }

  .hero-info>.hero-image {
    width: 100%;
    height: auto;
    margin-block: 4px;
    border-radius: var(--radius-lg);
  }

  .cta {
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
  }

  #form-status {
    margin-top: 0;
  }

  .input-group {
    width: 100%;
    max-width: none;
  }

  .email-input,
  .waitlist-btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  .features-section {
    gap: 28px;
  }

  /* Features: smaller cards, inner layout (text left, screenshot right) unchanged */
  .feature-card-grid {
    gap: 16px;
  }

  .feature-card {
    min-height: 280px;
    padding: 14px;
    gap: 12px;
    border-radius: var(--radius-lg);
  }

  .feature-card-headtext {
    font-size: 20px;
  }

  .feature-card-subtext {
    font-size: 13px;
  }

  .features-buttons-listing {
    font-size: 14px;
    gap: 8px;
    padding: 14px 0 4px 0;
  }

  .feature-img {
    max-width: 42%;
    border-radius: 14px;
  }

  .wearable-description {
    font-size: 16px;
  }

  .wearable-list-img {
    width: 32px;
    height: 32px;
  }

  .wearable-list-item-headtext {
    font-size: 16px;
  }

  .faq-listing {
    gap: 14px;
    margin-top: 28px;
  }

  .faq-item {
    padding: 18px 18px;
    border-radius: 18px;
  }

  .faq-item-summary {
    font-size: 16px;
  }

  .faq-item-content {
    font-size: 15px;
  }
}