/* =====================================================
   GLOBAL BOX-SIZING RESET
   ===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =====================================================
   HERO — Premium Insurance Layout
   ===================================================== */

:root {
  /* Palette */
  --hero-bg:            #ffffff;
  --hero-border:        #efefed;

  --hero-heading:       #111111;
  --hero-highlight:     #2e7d32;
  --hero-body:          #444444;
  --hero-muted:         #888888;

  --tagline-color:      #2e7d32;
  --tagline-bg:         #edf7f0;

  --trust-bg:           #fafaf9;
  --trust-border:       #e8e8e6;

  --btn-p-bg:           #222222;
  --btn-p-hover:        #333333;
  --btn-p-text:         #ffffff;

  --btn-s-text:         #222222;
  --btn-s-border:       #cccccc;
  --btn-s-hover-bg:     #f4f4f4;

  --card-bg:            #ffffff;
  --card-border:        #e8e8e6;
  --card-shadow:        0 1px 3px rgba(0,0,0,0.05),
                        0 8px 24px rgba(0,0,0,0.07);
  --card-radius:        12px;

  --input-bg:           #f8f9fa;
  --input-border:       #dddddd;
  --input-focus-border: #2e7d32;
  --input-focus-bg:     #ffffff;
  --input-text:         #111111;
  --input-placeholder:  #aaaaaa;
  --label-color:        #444444;

  --submit-bg:          #222222;
  --submit-hover-bg:    #333333;
  --submit-text:        #ffffff;

  --disclaimer-color:   #bbbbbb;
  --link-color:         #2e7d32;

  --ease: 0.26s ease;
}

/* =====================================================
   HIDE FAKE TAGLINE / TRUST LINE
   ===================================================== */
.hero__tagline {
  display: none;
}

/* =====================================================
   SECTION WRAPPER
   ===================================================== */
.hero {
  width: 100%;
  background: var(--hero-bg);
  border-bottom: 1px solid var(--hero-border);
  padding: 68px 0 64px;
  overflow-x: hidden;
  animation: heroReveal 0.45s ease both;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   CONTAINER — overflow-safe, centered
   ===================================================== */
.hero__container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}

/* =====================================================
   LEFT COLUMN
   ===================================================== */
.hero__left {
  flex: 1 1 0;
  min-width: 0;           /* prevent flex child overflow */
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
}

/* Tagline */
.hero__tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tagline-color);
  background: var(--tagline-bg);
  padding: 4px 11px;
  border-radius: 4px;
  width: fit-content;
  margin-bottom: 18px;
}

.hero__tagline-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tagline-color);
  flex-shrink: 0;
}

/* Heading */
.hero__title {
  font-size: clamp(1.9rem, 2.8vw, 2.8rem);
  font-weight: 800;
  line-height: 1.14;
  color: var(--hero-heading);
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  max-width: 100%;
  word-wrap: break-word;
}

.hero__title-highlight {
  color: var(--hero-highlight);
}

/* Description */
.hero__description {
  font-size: 0.975rem;
  line-height: 1.8;
  color: var(--hero-body);
  max-width: 460px;
  font-weight: 400;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 26px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  border: 1.5px solid transparent;
  background: none;
  transition: background var(--ease),
              color var(--ease),
              border-color var(--ease),
              box-shadow var(--ease),
              transform 0.2s ease;
}

.hero__btn--primary {
  background: #2e7d32;
  color: #ffffff;
  border-color: #2e7d32;
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.32);
}

.hero__btn--primary:hover {
  background: #1b5e20;
  border-color: #1b5e20;
  box-shadow: 0 8px 24px rgba(46, 125, 50, 0.45);
  transform: scale(1.05);
}

.hero__btn--primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(46, 125, 50, 0.2);
}

.hero__btn--secondary {
  background: transparent;
  color: var(--btn-s-text);
  border: 1.5px solid var(--btn-s-border);
}

.hero__btn--secondary:hover {
  background: var(--btn-s-hover-bg);
  border-color: #888888;
  transform: scale(1.05);
}

.hero__btn--secondary:active {
  transform: scale(0.97);
}

.hero__btn-icon {
  font-size: 0.88rem;
  line-height: 1;
}

/* =====================================================
   TRUST STRIP  (replaces fake stat numbers)
   ===================================================== */
.hero__stats {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 12px 16px;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  border-radius: 8px;
  width: fit-content;
  max-width: 100%;
  gap: 0;
  position: relative;
}

/* Inject the trust line; hide the fake numbers */
.hero__stats::before {
  content: "Simple and reliable insurance guidance for individuals and families.";
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--hero-muted);
  line-height: 1.55;
  letter-spacing: 0.005em;
  max-width: 360px;
}

/* Completely hide original stat items */
.hero__stat,
.hero__stat-number,
.hero__stat-label,
.hero__stat-divider {
  display: none !important;
}

/* =====================================================
   RIGHT COLUMN — Form Card
   ===================================================== */
.hero__right {
  flex: 0 0 400px;
  width: 400px;
  max-width: 100%;
  min-width: 0;
}

.hero__form-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 28px 26px 24px;
  width: 100%;
}

/* Form header */
.hero__form-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f0ee;
}

.hero__form-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--hero-heading);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.hero__form-subtitle {
  font-size: 0.78rem;
  color: var(--hero-muted);
  line-height: 1.5;
}

/* Form layout */
.hero__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.hero__form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

/* Input icon wrapper */
.hero__form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.hero__form-icon {
  position: absolute;
  left: 12px;
  font-size: 0.95rem;
  pointer-events: none;
  line-height: 1;
  z-index: 1;
}

/* Labels */
.hero__form-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--label-color);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* Inputs & Select */
.hero__form-input,
.hero__form-select {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 40px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--input-text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  transition: border-color var(--ease),
              background var(--ease),
              box-shadow var(--ease);
}

.hero__form-input::placeholder {
  color: var(--input-placeholder);
  font-size: 0.83rem;
}

.hero__form-input:hover,
.hero__form-select:hover {
  border-color: #c2c2c0;
}

.hero__form-input:focus,
.hero__form-select:focus {
  border-color: var(--input-focus-border);
  background: var(--input-focus-bg);
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

/* Select — custom arrow */
.hero__form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%23888' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.hero__form-select option {
  color: var(--input-text);
  background: #ffffff;
}

/* Form footer */
.hero__form-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

/* Submit button */
.hero__form-submit {
  width: 100%;
  height: 44px;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  background: #2e7d32;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.3);
  font-family: inherit;
  transition: background var(--ease),
              box-shadow var(--ease),
              transform 0.2s ease;
}

.hero__form-submit:hover {
  background: #1b5e20;
  box-shadow: 0 8px 22px rgba(46, 125, 50, 0.42);
  transform: scale(1.04);
}

.hero__form-submit:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(46, 125, 50, 0.2);
}

/* Disclaimer */
.hero__form-disclaimer {
  font-size: 0.68rem;
  color: var(--disclaimer-color);
  text-align: center;
  line-height: 1.6;
}

.hero__form-link {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--ease);
}

.hero__form-link:hover {
  text-decoration: underline;
}

/* =====================================================
   FORM VALIDATION
   ===================================================== */
.field--error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.field-error-msg {
  display: block;
  font-size: 0.72rem;
  color: #dc2626;
  margin-top: 4px;
  font-weight: 500;
  animation: fadeInDown 0.18s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Loading spinner inside submit button */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hero__form-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none !important;
}

/* Inline form banner (replaces alert) */
.hero-form-banner {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 10px;
  animation: fadeInDown 0.2s ease;
}

.hero-form-banner--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.hero-form-banner--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

/* Response time message below form */
.hero__response-time {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.73rem;
  color: var(--hero-muted);
  margin-top: 4px;
  justify-content: center;
}

.hero__response-time::before {
  content: "⚡";
  font-size: 0.78rem;
}

/* =====================================================
   DYNAMIC FIELDS
   ===================================================== */
.hero__dynamic-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.hero__dynamic-group {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero__dynamic-group--visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .hero__container {
    gap: 36px;
    padding: 0 24px;
  }

  .hero__right {
    flex: 0 0 360px;
    width: 360px;
  }
}

@media (max-width: 860px) {
  .hero {
    padding: 48px 0 52px;
  }

  .hero__container {
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    padding: 0 20px;
  }

  .hero__left,
  .hero__right {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .hero__title {
    font-size: clamp(1.7rem, 5vw, 2.2rem);
  }

  .hero__description {
    max-width: 100%;
  }

  .hero__stats {
    width: 100%;
  }

  .hero__stats::before {
    max-width: 100%;
  }
}

@media (max-width: 540px) {
  .hero {
    padding: 36px 0 40px;
  }

  .hero__container {
    padding: 0 16px;
  }

  .hero__form-card {
    padding: 22px 16px 20px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__btn {
    justify-content: center;
    width: 100%;
  }
}
