/* Insure Us Now — intake form. All rules are scoped under .iun so the
   stylesheet can be dropped into another site without theme conflicts. */

:root {
  /* Brand — sampled from assets/img/logo.png */
  --iun-purple: #A851A1;
  --iun-purple-ink: #8E3F88;
  --iun-purple-tint: #F8EEF6;
  --iun-lavender: #9B76A9;
  --iun-lavender-tint: #F5F0F8;
  --iun-cyan: #58BED7;
  --iun-teal: #7DC8CE;
  --iun-navy: #263556;

  /* Neutrals */
  --iun-bg: #FFFFFF;
  --iun-ink: #101219;
  --iun-ink-2: #2E313A;
  --iun-muted: #6B6E79;   /* AA-contrast body muted */
  --iun-soft: #858892;    /* large / decorative muted */
  --iun-hint: #B3B6BE;    /* placeholders */
  --iun-line: #E7E8EC;
  --iun-line-2: #D6D8DE;
  --iun-btn: #12141C;
  --iun-err: #B42318;
  --iun-err-tint: #FEF3F2;

  --iun-ease: cubic-bezier(.2, .7, .2, 1);
  --iun-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --iun-display: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--iun-bg); }

.iun, .iun *, .iun *::before, .iun *::after { box-sizing: border-box; }
.iun {
  --col: 720px;
  max-width: calc(var(--col) + 2 * var(--gut));
  --gut: 24px;
  margin: 0 auto;
  padding: 0 var(--gut) 48px;
  color: var(--iun-ink);
  background: var(--iun-bg);
  font: 400 16px/1.55 var(--iun-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.iun [hidden] { display: none !important; }

/* ---------- Top ---------- */
.iun-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px 0 0;
}
.iun-logo {
  display: block; width: auto; height: 46px;
  mix-blend-mode: multiply; /* artwork has an off-white canvas; blend it into the page */
}
.iun-tag {
  margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--iun-soft);
}

/* ---------- Intro ---------- */
.iun-intro { padding: clamp(56px, 10vw, 120px) 0 0; }
.iun-h1 {
  margin: 0;
  font: 700 clamp(42px, 10vw, 80px)/.98 var(--iun-display);
  letter-spacing: -.045em;
  color: var(--iun-ink);
  text-wrap: balance;
}
.iun-h1 em { font-style: normal; color: var(--iun-purple); }
.iun-lede {
  margin: 22px 0 0; max-width: 34em;
  font-size: 16px; line-height: 1.6; color: var(--iun-muted);
}

/* ---------- Form ---------- */
.iun-form { margin-top: clamp(56px, 8vw, 96px); }
.iun-sec { margin: 0 0 56px; padding: 0; border: 0; min-width: 0; }
.iun-eyebrow {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 0; margin: 0 0 28px;
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--iun-soft);
}
.iun-eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--iun-line); }

.iun-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.iun-field { margin: 0 0 30px; }

.iun label, .iun-label {
  display: block; margin: 0 0 4px;
  font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--iun-ink-2);
}
.iun .pill, .iun .check { margin: 0; }
.iun-label { margin-bottom: 12px; }
.iun-label + .iun-hint { margin: -8px 0 14px; }
.iun .req { color: var(--iun-purple); margin-left: 2px; }
.iun .opt { font-weight: 400; color: var(--iun-soft); }
.iun-hint { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--iun-muted); }
.iun-hint--split { display: flex; justify-content: space-between; gap: 16px; }
.iun-hint .count { flex: none; font-variant-numeric: tabular-nums; color: var(--iun-soft); }

/* Inputs: transparent, single hairline, accent line grows on focus */
.iun input[type=text], .iun input[type=tel], .iun input[type=email], .iun textarea {
  display: block; width: 100%; margin: 0;
  padding: 12px 0 13px;
  border: 0; border-bottom: 1px solid var(--iun-line-2); border-radius: 0;
  background:
    linear-gradient(var(--iun-navy), var(--iun-navy)) left bottom / 0 2px no-repeat,
    transparent;
  font: 400 17px/1.4 var(--iun-font); color: var(--iun-ink);
  -webkit-appearance: none; appearance: none;
  transition: border-color .2s var(--iun-ease), background-size .35s var(--iun-ease);
}
.iun textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.iun input::placeholder, .iun textarea::placeholder { color: var(--iun-hint); opacity: 1; }
.iun input:hover, .iun textarea:hover { border-bottom-color: #BFC2CA; }
.iun input:focus, .iun textarea:focus {
  outline: none; border-bottom-color: transparent; background-size: 100% 2px;
}
.iun input:focus-visible, .iun textarea:focus-visible { outline: none; }
.iun .is-bad input, .iun .is-bad textarea, .iun input.is-bad {
  border-bottom-color: var(--iun-err);
}

/* Errors: icon + text, never color alone */
.iun-err {
  display: flex; align-items: center; gap: 6px;
  margin: 8px 0 0; font-size: 13px; font-weight: 500; color: var(--iun-err);
}
.iun-err::before {
  content: "!"; flex: none; display: grid; place-items: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--iun-err); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}

/* ---------- Pills ---------- */
.iun-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; }
.iun-pills + .iun-err { margin-top: -18px; margin-bottom: 30px; }
.pill { position: relative; }
.pill input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
}
.pill span {
  display: inline-flex; align-items: center; gap: 0;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--iun-line-2); border-radius: 999px;
  background: #fff; color: var(--iun-ink-2);
  font-size: 14.5px; font-weight: 500; line-height: 1.25;
  cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: background-color .2s var(--iun-ease), border-color .2s var(--iun-ease),
              color .2s var(--iun-ease), gap .25s var(--iun-ease), padding .25s var(--iun-ease);
}
.pill span::before {
  content: ""; width: 0; height: 14px; flex: none; opacity: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4l2.9 2.9 6-6.3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4l2.9 2.9 6-6.3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: width .25s var(--iun-ease), opacity .2s var(--iun-ease);
}
.pill:hover span { background: var(--iun-lavender-tint); border-color: #C9B8D3; }
.pill input:checked + span {
  background: var(--iun-purple-tint); border-color: var(--iun-purple); color: var(--iun-ink);
  gap: 7px; padding-left: 14px;
}
.pill input:checked + span::before { width: 14px; opacity: 1; color: var(--iun-purple-ink); }
.pill input:focus-visible + span { outline: 2px solid var(--iun-navy); outline-offset: 2px; }
.is-bad .pill span { border-color: #E6A39C; }

/* ---------- Business reveal ---------- */
.iun-reveal {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows .4s var(--iun-ease), opacity .3s var(--iun-ease);
}
.iun-reveal.is-open { grid-template-rows: 1fr; opacity: 1; }
.iun-reveal-inner { overflow: hidden; min-height: 0; }
.iun-reveal.is-open .iun-reveal-inner { padding-top: 6px; }
.iun-reveal .iun-field, .iun-reveal .iun-label { padding-left: 18px; border-left: 2px solid var(--iun-teal); }
.iun-reveal .iun-pills { padding-left: 18px; border-left: 2px solid var(--iun-teal); margin-bottom: 0; padding-bottom: 6px; }
.iun-reveal .iun-field { margin-bottom: 0; padding-bottom: 26px; }
.iun-reveal .iun-label { margin-bottom: 0; padding-bottom: 12px; }
.iun-reveal .iun-pills + .iun-err { margin: 10px 0 0; padding-left: 20px; }

/* ---------- Consent ---------- */
.iun-consent { margin: 8px 0 36px; padding-top: 28px; border-top: 1px solid var(--iun-line); }
.check { position: relative; display: flex !important; gap: 14px; align-items: flex-start; cursor: pointer; }
.check input { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.check .box {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  border: 1.5px solid #B9BCC4; border-radius: 6px; background: #fff;
  display: grid; place-items: center;
  transition: background-color .2s var(--iun-ease), border-color .2s var(--iun-ease);
}
.check .box::after {
  content: ""; width: 12px; height: 12px; transform: scale(.4); opacity: 0;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4l2.9 2.9 6-6.3' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4l2.9 2.9 6-6.3' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s var(--iun-ease), opacity .2s var(--iun-ease);
}
.check:hover .box { border-color: var(--iun-lavender); }
.check input:checked + .box { background: var(--iun-purple); border-color: var(--iun-purple); }
.check input:checked + .box::after { transform: scale(1); opacity: 1; }
.check input:focus-visible + .box { outline: 2px solid var(--iun-navy); outline-offset: 2px; }
.is-bad .check .box { border-color: var(--iun-err); }
.check .txt { font-size: 13px; font-weight: 400; line-height: 1.6; color: var(--iun-muted); }
.iun-consent .iun-err { margin-left: 36px; }

/* ---------- Submit ---------- */
.iun-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.iun-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px 0 30px;
  border: 0; border-radius: 999px;
  background: var(--iun-btn); color: #fff;
  font: 500 16px/1 var(--iun-font); letter-spacing: -.005em;
  cursor: pointer;
  transition: background-color .25s var(--iun-ease), transform .15s var(--iun-ease), box-shadow .25s var(--iun-ease);
}
.iun-btn .arrow { transition: transform .3s var(--iun-ease); }
.iun-btn:hover { background: var(--iun-navy); }
.iun-btn:hover .arrow { transform: translateX(4px); }
.iun-btn:active { transform: scale(.985); }
.iun-btn:focus-visible { outline: 2px solid var(--iun-navy); outline-offset: 3px; }
.iun-btn .spin {
  display: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  animation: iun-spin .8s linear infinite;
}
.iun-btn.is-busy { cursor: progress; background: var(--iun-navy); }
.iun-btn.is-busy .spin { display: block; }
.iun-btn.is-busy .arrow { display: none; }

.iun-fail {
  align-self: stretch;
  padding: 14px 16px; border-radius: 12px;
  background: var(--iun-err-tint); color: var(--iun-err);
  font-size: 14px; line-height: 1.5;
}
.iun-fail a { color: inherit; font-weight: 600; }

.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Success ---------- */
.iun-done { padding: clamp(56px, 10vw, 120px) 0 24px; outline: none; }
.iun-check { display: block; color: var(--iun-purple); margin-bottom: 28px; }
.iun-check circle { stroke-dasharray: 189; stroke-dashoffset: 189; animation: iun-draw .7s var(--iun-ease) forwards; }
.iun-check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: iun-draw .45s .55s var(--iun-ease) forwards; }
.iun-h2 {
  margin: 0;
  font: 700 clamp(40px, 6.4vw, 68px)/1 var(--iun-display); letter-spacing: -.04em;
}
.iun-done-call { margin: 28px 0 0; font-size: 16px; color: var(--iun-ink-2); }
.iun-done-call a { color: var(--iun-ink); font-weight: 600; text-decoration-color: var(--iun-purple); text-underline-offset: 4px; }
.iun-ref { margin: 28px 0 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--iun-soft); }

/* ---------- Legal ---------- */
.iun-legal {
  margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--iun-line);
  font-size: 12px; line-height: 1.6; color: var(--iun-muted);
}
.iun-legal p { margin: 0 0 8px; max-width: 62em; }
.iun-copy { color: var(--iun-soft); margin-top: 16px !important; }
.iun-noscript { margin: 24px; font: 15px/1.5 system-ui, sans-serif; color: var(--iun-err); }

/* ---------- Motion ---------- */
.iun-intro > * { animation: iun-rise .8s var(--iun-ease) both; }
.iun-intro > .iun-lede { animation-delay: .12s; }
.iun-done:not([hidden]) > *:not(svg) { animation: iun-rise .6s .2s var(--iun-ease) both; }
@keyframes iun-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes iun-draw { to { stroke-dashoffset: 0; } }
@keyframes iun-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .iun *, .iun *::before, .iun *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
  .iun-btn .spin { animation: iun-spin 1.6s linear infinite !important; }
}

/* ---------- Embedded (inside an iframe) ---------- */
.is-embed .iun { padding-bottom: 24px; }
.is-embed .iun-intro { padding-top: 48px; }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .iun { --gut: 32px; }
}

/* ---------- Phone ---------- */
@media (max-width: 600px) {
  .iun { --gut: 20px; padding-bottom: 32px; }
  .iun-top { padding-top: 20px; }
  .iun-logo { height: 38px; }
  .iun-tag { font-size: 10px; }
  .iun-h1 { letter-spacing: -.04em; line-height: 1.02; }
  .iun-lede { font-size: 15.5px; margin-top: 18px; }
  .iun-row { grid-template-columns: 1fr; }
  .iun-sec { margin-bottom: 44px; }
  .iun-pills { gap: 8px; }
  .pill span { padding: 10px 15px; font-size: 14.5px; }
  .pill input:checked + span { padding-left: 12px; }
  .iun-hint--split { flex-direction: column; gap: 4px; }
  .iun-actions { align-items: stretch; }
  .iun-btn { width: 100%; }
  .iun-legal { margin-top: 56px; }
}
@media (max-width: 360px) {
  .iun-tag { display: none; }
}

/* ---------- Links in legal text ---------- */
.iun-legal a, .check .txt a, .iun-doc a { color: var(--iun-ink-2); text-decoration: underline; text-decoration-color: var(--iun-purple); text-underline-offset: 3px; }
.iun-legal a:hover, .check .txt a:hover, .iun-doc a:hover { color: var(--iun-purple-ink); }
.iun-legal .iun-licensing { color: var(--iun-ink-2); }
.iun-back { text-decoration: none; }
.iun-back:hover { color: var(--iun-ink); }

/* ---------- Policy page ---------- */
.iun-doc { padding: clamp(48px, 8vw, 96px) 0 0; max-width: 640px; }
.iun-doc .iun-h2 { font-size: clamp(36px, 6vw, 56px); }
.iun-doc-date { margin: 14px 0 40px; font-size: 13px; color: var(--iun-soft); }
.iun-doc h2:not(.iun-h2) { margin: 40px 0 10px; font: 600 19px/1.3 var(--iun-display); letter-spacing: -.01em; }
.iun-doc p, .iun-doc li { font-size: 15.5px; line-height: 1.65; color: var(--iun-ink-2); }
.iun-doc ul { padding-left: 20px; margin: 0 0 12px; }
.iun-doc li { margin-bottom: 8px; }
.iun-doc li::marker { color: var(--iun-purple); }
