:root {
  --brand-yellow: #ffcd05;
  --brand-amber: #fcb424;
  --brand-ink: #0a0500;
  --brand-muted: #504e4a;
  --brand-soft: #f4f4f4;
  --brand-white: #ffffff;
  --line: #e5e2dc;
  --ok: #166534;
  --ok-bg: #ecfdf3;
  --err: #9f1239;
  --err-bg: #fff1f2;
  --shadow: 0 12px 36px rgba(10, 5, 0, 0.08);
  --radius: 12px;
  --font: "Poppins", system-ui, sans-serif;
  --header-h: 78px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--brand-ink);
  background: var(--brand-soft);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: #000;
}

/* —— Site header (DFHS look) —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brand-white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 16px rgba(10, 5, 0, 0.04);
}

.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-header__brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.site-header__logo {
  display: block;
  height: 46px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.site-header__nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.site-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-menu > li {
  position: relative;
}

.site-menu > li > a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--brand-ink);
  text-decoration: none;
  border-radius: 8px;
}

.site-menu > li > a:hover,
.site-menu > li:hover > a {
  background: rgba(255, 205, 5, 0.18);
}

.site-menu .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  min-width: 230px;
  margin: 0;
  padding: 0.45rem;
  list-style: none;
  background: var(--brand-white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 20;
}

.site-menu .has-sub:hover > .sub-menu,
.site-menu .has-sub:focus-within > .sub-menu {
  display: block;
}

.site-menu .sub-menu a {
  display: block;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  text-decoration: none;
  border-radius: 8px;
  color: var(--brand-muted);
}

.site-menu .sub-menu a:hover {
  background: rgba(255, 205, 5, 0.2);
  color: var(--brand-ink);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.site-header__phone {
  display: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--brand-muted);
}

.site-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--brand-yellow), var(--brand-amber));
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(252, 180, 36, 0.35);
}

.site-header__cta:hover {
  color: var(--brand-ink);
  filter: brightness(0.98);
}

.site-header__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--brand-white);
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.site-header__toggle span {
  display: block;
  height: 2px;
  background: var(--brand-ink);
  border-radius: 2px;
}

.site-main {
  flex: 1 1 auto;
}

/* —— Form page —— */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

.form-hero {
  margin-bottom: 1.25rem;
  animation: rise 0.55s ease-out both;
}

.form-hero__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-muted);
}

.form-hero__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
}

.form-hero__meta {
  color: var(--brand-muted);
  font-size: 0.95rem;
}

.form-hero__meta p {
  margin: 0.2rem 0;
}

.form-hero__intro {
  margin-top: 0.85rem;
  color: var(--brand-muted);
}

.form-hero__intro p {
  margin: 0.35rem 0 0;
}

.sheet {
  background: var(--brand-white);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  animation: rise 0.65s ease-out 0.05s both;
}

@media (min-width: 640px) {
  .sheet {
    padding: 1.75rem;
  }
}

.required-note {
  margin: 0 0 1.15rem;
  color: var(--brand-muted);
  font-size: 0.88rem;
}

.req {
  color: #c2410c;
  font-weight: 700;
}

.card-field {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.2rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-field:focus-within {
  border-color: rgba(252, 180, 36, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 205, 5, 0.28);
}

.label {
  display: block;
  margin: 0 0 0.5rem;
  font-weight: 600;
  font-size: 0.98rem;
}

.help {
  margin: -0.15rem 0 0.6rem;
  color: var(--brand-muted);
  font-size: 0.86rem;
}

.otp-panel {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
}

.otp-panel.is-verified .otp-row {
  opacity: 0.55;
}

.otp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.otp-input {
  flex: 1 1 8rem;
  min-width: 8rem;
  max-width: 12rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem 0.75rem;
  font: inherit;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.otp-input:focus {
  outline: none;
  border-color: var(--brand-amber);
  box-shadow: 0 0 0 3px rgba(252, 180, 36, 0.2);
}

.btn-otp {
  border: none;
  border-radius: 999px;
  background: var(--brand-ink);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.55rem 1rem;
  cursor: pointer;
}

.btn-otp:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-otp--ghost {
  background: transparent;
  color: var(--brand-ink);
  border: 1px solid var(--line);
}

.otp-status {
  margin: 0.55rem 0 0;
  min-height: 1.2em;
  font-size: 0.86rem;
  color: var(--brand-muted);
}

.otp-status.is-ok {
  color: var(--ok);
}

.otp-status.is-err {
  color: var(--err);
}

.otp-status.is-busy {
  color: var(--brand-muted);
}

.control input[type="text"],
.control input[type="email"],
.control input[type="tel"],
.control textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0.55rem 0;
  font: inherit;
  color: var(--brand-ink);
  outline: none;
}

.control input:focus,
.control textarea:focus {
  border-bottom-color: var(--brand-amber);
}

.control textarea {
  resize: vertical;
  min-height: 5rem;
}

.control--file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.control--file input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.control--file::before {
  content: "Add file";
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf3;
  color: var(--brand-ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.control--file:hover::before {
  border-color: var(--brand-amber);
  background: rgba(255, 205, 5, 0.2);
}

.file-name {
  color: var(--brand-muted);
  font-size: 0.88rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name.is-set {
  color: var(--brand-ink);
  font-weight: 500;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-weight: 500;
}

.check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--brand-amber);
}

.errors {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--err);
  font-size: 0.88rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.btn-submit {
  appearance: none;
  border: none;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--brand-yellow), var(--brand-amber));
  color: var(--brand-ink);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1.7rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(252, 180, 36, 0.35);
}

.btn-submit:hover {
  filter: brightness(0.98);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-clear {
  appearance: none;
  border: none;
  background: none;
  color: var(--brand-muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0;
}

.btn-clear:hover {
  color: var(--brand-ink);
  text-decoration: underline;
}

.banner {
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.banner p {
  margin: 0.35rem 0 0.75rem;
}

.banner--ok {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid #bbf7d0;
}

.banner--err {
  background: var(--err-bg);
  color: var(--err);
  border: 1px solid #fecdd3;
}

.text-link {
  font-weight: 600;
  color: var(--brand-ink);
}

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

/* —— Site footer (DFHS look) —— */
.site-footer {
  margin-top: auto;
  background: var(--brand-ink);
  color: #f5f5f5;
  padding: 2.75rem 1.25rem 1.25rem;
}

.site-footer a {
  color: #fff;
}

.site-footer__grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .site-footer__grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }

  .site-header__phone {
    display: inline;
  }
}

.site-footer__title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  color: var(--brand-yellow);
}

.site-footer__heading {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  color: var(--brand-yellow);
}

.site-footer__col p {
  margin: 0 0 0.75rem;
  color: #d7d4cf;
  font-size: 0.92rem;
}

.site-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__list li {
  margin: 0 0 0.45rem;
}

.site-footer__list a {
  color: #d7d4cf;
  text-decoration: none;
  font-size: 0.92rem;
}

.site-footer__list a:hover {
  color: var(--brand-yellow);
}

.site-footer__bottom {
  max-width: 1180px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  color: #bdb8b1;
  font-size: 0.85rem;
}

.site-footer__bottom a {
  color: var(--brand-yellow);
  text-decoration: none;
}

.site-footer__credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.75rem;
  margin-top: 0.9rem;
}

.site-footer__credit-text {
  color: #bdb8b1;
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: nowrap;
}

.site-footer__credit-link {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.site-footer__credit-link:hover {
  opacity: 0.9;
}

.site-footer__credit-logo {
  display: block;
  height: 1.75rem;
  width: auto;
  max-width: min(180px, 55vw);
}

@media (min-width: 640px) {
  .site-footer__credit-logo {
    height: 2rem;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .site-header__toggle {
    display: inline-flex;
  }

  .site-header__nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--brand-white);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1rem 1rem;
    box-shadow: var(--shadow);
    justify-content: stretch;
  }

  .site-header__nav.is-open {
    display: block;
  }

  .site-menu {
    flex-direction: column;
    align-items: stretch;
  }

  .site-menu .sub-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding-left: 0.75rem;
  }

  .site-menu .has-sub.is-open > .sub-menu {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
