/*
 * Homepage UX depth layer.
 * Adds functional interaction states without changing TK Web Studio's visual direction.
 */

:root {
  --tk-brand-orange: #ff7041;
  --tk-brand-orange-deep: #a5401f;
  --tk-brand-charcoal: #171717;
  --tk-brand-ink: #26221f;
  --tk-brand-paper: #faf7f2;
  --tk-brand-warm-paper: #f3eee7;
  --tk-brand-line: #ded5ca;
  --tk-brand-muted: #625b54;
  --tk-brand-white: #ffffff;
  --tk-depth-radius: 16px;
  --tk-depth-shadow: 0 22px 58px rgba(35, 29, 24, .09);
}

html body.home-page .home-fit__context {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 112, 65, .34);
  border-radius: 12px;
  background: rgba(255, 112, 65, .07);
}

html body.home-page .home-fit__context[hidden] {
  display: none;
}

html body.home-page .home-fit__context-label {
  display: block;
  margin-bottom: 7px;
  color: #ff9a77;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

html body.home-page .home-fit__context p {
  margin: 0;
  color: #e2d8d1;
  font-size: 14px;
  line-height: 1.65;
}

html body.home-page .home-fit__actions-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 16px;
}

html body.home-page .home-fit__reset,
html body.home-page .home-fit__help {
  min-height: 42px;
  padding: 9px 0;
  border: 0;
  color: #d9cec7;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(255, 112, 65, .56);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
}

html body.home-page .home-fit__reset:hover,
html body.home-page .home-fit__help:hover {
  color: #ffffff;
  text-decoration-color: #ff7041;
}

html body.home-page .home-fit__reset:focus-visible,
html body.home-page .home-fit__help:focus-visible,
html body.home-page .studio-check__input:focus-visible,
html body.home-page .studio-check__submit:focus-visible,
html body.home-page .studio-check__details summary:focus-visible {
  outline: 3px solid var(--tk-brand-orange);
  outline-offset: 4px;
}

html body.home-page .home-fit__quote-factors {
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 16px;
}

html body.home-page .home-fit__quote-factors summary {
  width: fit-content;
  color: #f4ece7;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

html body.home-page .home-fit__quote-factors ul {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
  padding-left: 20px;
  color: #cfc4bc;
  font-size: 13px;
  line-height: 1.55;
}

html body.home-page .home-fit__status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html body.home-page .home-fit__result.is-updated {
  animation: tk-result-in .24s ease-out both;
}

html body.home-page .studio-check {
  position: relative;
  overflow: hidden;
  padding-block: 68px;
  border-top: 1px solid var(--tk-brand-line);
  border-bottom: 1px solid var(--tk-brand-line);
  background: var(--tk-brand-paper);
}

html body.home-page .studio-check::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--tk-brand-orange);
  content: '';
}

html body.home-page .studio-check__grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}

html body.home-page .studio-check__copy h2 {
  max-width: 680px;
  margin: 9px 0 16px;
  color: var(--tk-brand-ink);
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.02;
  letter-spacing: -.04em;
}

html body.home-page .studio-check__copy > p:last-child {
  max-width: 610px;
  margin: 0;
  color: var(--tk-brand-muted);
  font-size: 15px;
  line-height: 1.7;
}

html body.home-page .studio-check__card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--tk-brand-line);
  border-radius: var(--tk-depth-radius);
  background: var(--tk-brand-white);
  box-shadow: var(--tk-depth-shadow);
}

html body.home-page .studio-check__label {
  display: block;
  margin-bottom: 10px;
  color: var(--tk-brand-ink);
  font-size: 13px;
  font-weight: 800;
}

html body.home-page .studio-check__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

html body.home-page .studio-check__input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #cfc4b9;
  border-radius: 10px;
  color: var(--tk-brand-ink);
  background: #ffffff;
  font: inherit;
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

html body.home-page .studio-check__input::placeholder {
  color: #8a8179;
}

html body.home-page .studio-check__input:hover {
  border-color: #a99d92;
}

html body.home-page .studio-check__input[aria-invalid='true'] {
  border-color: #a53d25;
  box-shadow: 0 0 0 3px rgba(165, 61, 37, .1);
}

html body.home-page .studio-check__submit {
  min-height: 50px;
  padding: 11px 19px;
  border: 1px solid var(--tk-brand-orange);
  border-radius: 10px;
  color: var(--tk-brand-charcoal);
  background: var(--tk-brand-orange);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

html body.home-page .studio-check__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(165, 64, 31, .18);
}

html body.home-page .studio-check__submit:disabled {
  opacity: .65;
  cursor: wait;
}

html body.home-page .studio-check__hint,
html body.home-page .studio-check__error {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
}

html body.home-page .studio-check__hint {
  color: #746c65;
}

html body.home-page .studio-check__error {
  color: #8f321f;
  font-weight: 700;
}

html body.home-page .studio-check__error[hidden] {
  display: none;
}

html body.home-page .studio-check__details {
  margin-top: 19px;
  padding-top: 17px;
  border-top: 1px solid #e8e0d8;
}

html body.home-page .studio-check__details summary {
  width: fit-content;
  color: var(--tk-brand-ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

html body.home-page .studio-check__details ul {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
  padding-left: 20px;
  color: var(--tk-brand-muted);
  font-size: 13px;
  line-height: 1.55;
}

@keyframes tk-result-in {
  from { opacity: .45; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  html body.home-page .studio-check__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 620px) {
  html body.home-page .studio-check {
    padding-block: 54px;
  }

  html body.home-page .studio-check__grid {
    gap: 24px;
  }

  html body.home-page .studio-check__row {
    grid-template-columns: 1fr;
  }

  html body.home-page .studio-check__submit {
    width: 100%;
  }

  html body.home-page .home-fit__actions-extra {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body.home-page .home-fit__result.is-updated {
    animation: none;
  }

  html body.home-page .studio-check__input,
  html body.home-page .studio-check__submit {
    transition: none;
  }
}
