/*
 * Enrolao Hair Analyzer — Brand UI
 * Palette sampled from the Enrolao brand guide.
 */
.eha {
  --eha-cream: #f6ebd5;
  --eha-cream-soft: #fffaf1;
  --eha-brown: #3a1c11;
  --eha-brown-mid: #6d3621;
  --eha-gold: #e9a901;
  --eha-navy: #0b396a;
  --eha-pink: #a30f49;
  --eha-teal: #0da098;
  --eha-orange: #ff5c01;
  --eha-ink: #241a16;
  --eha-muted: #6c625c;
  --eha-white: #ffffff;
  --eha-border: rgba(58, 28, 17, .12);
  --eha-shadow: 0 24px 70px rgba(58, 28, 17, .14);

  position: relative;
  isolation: isolate;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid rgba(58, 28, 17, .10);
  border-radius: 34px;
  background:
    radial-gradient(circle at 7% 8%, rgba(233, 169, 1, .20), transparent 26%),
    radial-gradient(circle at 97% 3%, rgba(163, 15, 73, .13), transparent 25%),
    radial-gradient(circle at 92% 95%, rgba(13, 160, 152, .16), transparent 28%),
    var(--eha-cream);
  box-shadow: var(--eha-shadow);
  color: var(--eha-ink);
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.eha::before,
.eha::after {
  position: absolute;
  z-index: -1;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  content: "";
  filter: blur(2px);
  opacity: .16;
  pointer-events: none;
}

.eha::before {
  top: -72px;
  left: -58px;
  background: var(--eha-gold);
}

.eha::after {
  right: -62px;
  bottom: -78px;
  background: var(--eha-teal);
}

.eha,
.eha * {
  box-sizing: border-box;
}

.eha button,
.eha input,
.eha label {
  font-family: inherit !important;
}

.eha__intro {
  max-width: 760px;
  margin: 0 auto clamp(26px, 4vw, 38px);
  text-align: center;
}

.eha__eyebrow,
.eha__result-kicker {
  display: inline-flex;
  min-height: 34px;
  margin-bottom: 14px;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--eha-teal);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(13, 160, 152, .22);
}

.eha h2 {
  max-width: 780px;
  margin: 0 auto 14px;
  color: var(--eha-brown) !important;
  font-size: clamp(2.15rem, 5vw, 3.65rem) !important;
  font-weight: 800 !important;
  letter-spacing: -.045em;
  line-height: 1.03 !important;
}

.eha__intro p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--eha-muted);
  font-size: clamp(.98rem, 1.4vw, 1.08rem);
  font-weight: 400;
  line-height: 1.75;
}

.eha__form {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(58, 28, 17, .09);
  border-radius: 28px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 16px 45px rgba(58, 28, 17, .09);
  backdrop-filter: blur(6px);
}

.eha__dropzone {
  position: relative;
  display: flex;
  min-height: 255px;
  padding: clamp(26px, 5vw, 42px);
  overflow: hidden;
  border: 2px dashed rgba(13, 160, 152, .78);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(13, 160, 152, .06), rgba(233, 169, 1, .06)),
    var(--eha-cream-soft);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.eha__dropzone::after {
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(233, 169, 1, .12);
  content: "";
  pointer-events: none;
}

.eha__dropzone:hover,
.eha__dropzone:focus,
.eha__dropzone.is-dragging {
  outline: none;
  border-color: var(--eha-pink);
  background:
    linear-gradient(135deg, rgba(13, 160, 152, .09), rgba(163, 15, 73, .06)),
    #fffdf8;
  box-shadow: 0 14px 34px rgba(13, 160, 152, .16);
  transform: translateY(-3px);
}

.eha__dropzone:focus-visible {
  outline: 4px solid rgba(233, 169, 1, .35);
  outline-offset: 4px;
}

.eha__file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.eha__upload-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border: 5px solid #fff;
  border-radius: 22px;
  background: var(--eha-gold);
  color: var(--eha-brown);
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(233, 169, 1, .28);
  transform: rotate(-3deg);
}

.eha__dropzone strong {
  position: relative;
  z-index: 1;
  color: var(--eha-brown);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  font-weight: 750;
  line-height: 1.4;
}

.eha__dropzone span:last-child {
  position: relative;
  z-index: 1;
  margin-top: 9px;
  color: var(--eha-muted);
  font-size: .86rem;
  font-weight: 500;
}

.eha__preview {
  position: relative;
  overflow: hidden;
  border: 5px solid var(--eha-navy);
  border-radius: 26px;
  background: var(--eha-navy);
  box-shadow: 0 16px 38px rgba(11, 57, 106, .18);
}

.eha__preview img {
  display: block;
  width: 100%;
  max-height: 520px;
  border-radius: 20px;
  object-fit: contain;
}

.eha__remove {
  position: absolute;
  right: 16px;
  bottom: 16px;
  min-height: 44px;
  padding: 11px 18px;
  border: 2px solid rgba(255, 255, 255, .75);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--eha-navy);
  font-size: .88rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  transition: transform .18s ease, background .18s ease;
}

.eha__remove:hover {
  background: var(--eha-cream);
  transform: translateY(-2px);
}

.eha__consent {
  display: flex;
  gap: 12px;
  margin: 18px 0;
  padding: 15px 17px;
  border: 1px solid rgba(13, 160, 152, .16);
  border-radius: 16px;
  background: rgba(13, 160, 152, .07);
  color: var(--eha-ink);
  align-items: flex-start;
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.55;
}

.eha__consent input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--eha-teal);
  flex: 0 0 auto;
}

.eha__submit,
.eha__again {
  position: relative;
  display: inline-flex;
  min-height: 58px;
  padding: 15px 28px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.eha__submit {
  width: 100%;
  background: var(--eha-navy);
  color: #fff;
  box-shadow: 0 12px 26px rgba(11, 57, 106, .25);
}

.eha__submit::after {
  margin-left: 2px;
  content: "→";
  font-size: 1.2rem;
  line-height: 1;
  transition: transform .2s ease;
}

.eha__submit:hover {
  background: #082d55;
  box-shadow: 0 15px 32px rgba(11, 57, 106, .32);
  transform: translateY(-2px);
}

.eha__submit:hover::after {
  transform: translateX(4px);
}

.eha__again {
  background: var(--eha-pink);
  color: #fff;
  box-shadow: 0 10px 24px rgba(163, 15, 73, .22);
}

.eha__again:hover {
  background: #850c3c;
  box-shadow: 0 14px 28px rgba(163, 15, 73, .30);
  transform: translateY(-2px);
}

.eha__submit:focus-visible,
.eha__again:focus-visible,
.eha__remove:focus-visible {
  outline: 4px solid rgba(233, 169, 1, .40);
  outline-offset: 3px;
}

.eha__submit:disabled {
  cursor: wait;
  opacity: .76;
  transform: none;
}

.eha__submit.is-loading::after {
  display: none;
}

.eha__spinner {
  display: none;
  width: 19px;
  height: 19px;
  border: 2px solid rgba(255, 255, 255, .36);
  border-top-color: #fff;
  border-radius: 50%;
  animation: eha-spin .75s linear infinite;
}

.eha__submit.is-loading .eha__spinner {
  display: inline-block;
}

@keyframes eha-spin {
  to { transform: rotate(360deg); }
}

.eha__status {
  min-height: 0;
  margin: 14px 0 0;
  padding: 0;
  border-radius: 14px;
  text-align: center;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.5;
}

.eha__status:not(:empty) {
  min-height: 46px;
  padding: 12px 16px;
}

.eha__status[data-type="error"] {
  border: 1px solid rgba(163, 15, 73, .18);
  background: rgba(163, 15, 73, .08);
  color: var(--eha-pink);
}

.eha__status[data-type="loading"] {
  border: 1px solid rgba(11, 57, 106, .15);
  background: rgba(11, 57, 106, .07);
  color: var(--eha-navy);
}

/* Result state */
.eha__result {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 30px);
  overflow: hidden;
  border: 1px solid rgba(58, 28, 17, .10);
  border-radius: 30px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 20px 55px rgba(58, 28, 17, .12);
}

.eha__result::before {
  display: block;
  height: 8px;
  margin: calc(clamp(20px, 3vw, 30px) * -1) calc(clamp(20px, 3vw, 30px) * -1) 22px;
  background: linear-gradient(90deg, var(--eha-teal) 0 25%, var(--eha-gold) 25% 50%, var(--eha-pink) 50% 75%, var(--eha-orange) 75% 100%);
  content: "";
}

.eha__result-header {
  display: flex;
  min-height: 176px;
  margin-bottom: 22px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 20%, rgba(233, 169, 1, .22), transparent 34%),
    var(--eha-navy);
  color: #fff;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.eha__result-kicker {
  margin-bottom: 12px;
  background: var(--eha-gold);
  color: var(--eha-brown);
  box-shadow: none;
}

.eha__result h3 {
  margin: 0;
  color: var(--eha-cream) !important;
  font-size: clamp(2.5rem, 7vw, 4.8rem) !important;
  font-weight: 800 !important;
  letter-spacing: -.04em;
  line-height: .95 !important;
}

.eha__confidence {
  display: flex;
  width: 126px;
  height: 126px;
  padding: 14px;
  border: 6px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  background: var(--eha-gold);
  color: var(--eha-brown);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  flex: 0 0 auto;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .20);
}

.eha__confidence strong {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
}

.eha__confidence span {
  max-width: 80px;
  margin-top: 5px;
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.2;
}

.eha__summary {
  margin: 0 0 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--eha-cream-soft);
  color: var(--eha-brown);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.7;
}

.eha__secondary {
  margin: 0 0 18px;
  padding: 13px 16px;
  border: 1px solid rgba(163, 15, 73, .15);
  border-radius: 14px;
  background: rgba(163, 15, 73, .07);
  color: var(--eha-pink);
  font-size: .91rem;
  line-height: 1.5;
}

.eha__result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}

.eha__result-grid > div {
  min-height: 100%;
  padding: 22px;
  border: 1px solid rgba(58, 28, 17, .08);
  border-radius: 20px;
}

.eha__result-grid > div:first-child {
  background: rgba(13, 160, 152, .09);
  border-top: 5px solid var(--eha-teal);
}

.eha__result-grid > div:last-child {
  background: rgba(233, 169, 1, .10);
  border-top: 5px solid var(--eha-gold);
}

.eha__result-grid h4 {
  display: flex;
  margin: 0 0 14px;
  color: var(--eha-brown) !important;
  align-items: center;
  gap: 9px;
  font-size: 1.03rem;
  font-weight: 800;
}

.eha__result-grid > div:first-child h4::before,
.eha__result-grid > div:last-child h4::before {
  display: grid;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #fff;
  place-items: center;
  font-size: .88rem;
  line-height: 1;
}

.eha__result-grid > div:first-child h4::before {
  background: var(--eha-teal);
  content: "✓";
}

.eha__result-grid > div:last-child h4::before {
  background: var(--eha-gold);
  color: var(--eha-brown);
  content: "✦";
}

.eha__result-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.eha__result-grid li {
  position: relative;
  padding-left: 22px;
  color: #473a34;
  font-size: .91rem;
  line-height: 1.58;
}

.eha__result-grid li::before {
  position: absolute;
  top: .67em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--eha-brown-mid);
  content: "";
  transform: translateY(-50%);
}

.eha__result-grid li + li {
  margin-top: 10px;
}

.eha__photo-advice {
  margin: 0 0 22px;
  padding: 16px 18px 16px 20px;
  border-left: 5px solid var(--eha-orange);
  border-radius: 0 16px 16px 0;
  background: rgba(255, 92, 1, .07);
  color: var(--eha-brown-mid);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.6;
}

.eha__disclaimer {
  max-width: 760px;
  margin: 22px auto 0;
  color: rgba(58, 28, 17, .66);
  text-align: center;
  font-size: .76rem;
  font-weight: 500;
  line-height: 1.65;
}

[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .eha {
    padding: 24px 14px;
    border-radius: 24px;
  }

  .eha__form,
  .eha__result {
    padding: 15px;
    border-radius: 22px;
  }

  .eha__dropzone {
    min-height: 215px;
    padding: 24px 16px;
    border-radius: 20px;
  }

  .eha__preview {
    border-width: 4px;
    border-radius: 21px;
  }

  .eha__consent {
    padding: 13px;
    font-size: .82rem;
  }

  .eha__result::before {
    margin: -15px -15px 17px;
  }

  .eha__result-header {
    min-height: 0;
    padding: 20px;
    border-radius: 19px;
    align-items: flex-start;
  }

  .eha__confidence {
    width: 92px;
    height: 92px;
    border-width: 4px;
  }

  .eha__confidence strong {
    font-size: 1.42rem;
  }

  .eha__confidence span {
    max-width: 64px;
    font-size: .56rem;
  }

  .eha__result-grid {
    grid-template-columns: 1fr;
  }

  .eha__again {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .eha h2 {
    font-size: 2rem !important;
  }

  .eha__result-header {
    flex-direction: column;
  }

  .eha__confidence {
    width: auto;
    height: auto;
    padding: 10px 15px;
    border-width: 0;
    border-radius: 999px;
    align-items: baseline;
    flex-direction: row;
    gap: 6px;
  }

  .eha__confidence strong {
    font-size: 1.25rem;
  }

  .eha__confidence span {
    max-width: none;
    margin: 0;
    font-size: .66rem;
  }

  .eha__remove {
    right: 10px;
    bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eha *,
  .eha *::before,
  .eha *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
