:root {
  --review-ink: #151515;
  --review-paper: #fffdf8;
  --review-wash: #f0eee8;
  --review-orange: #e6531d;
  --review-line: rgba(21, 21, 21, .14);
}

main:has(.contact-page) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(230, 83, 29, .08), transparent 28%),
    radial-gradient(circle at 88% 42%, rgba(189, 151, 91, .08), transparent 30%),
    #f5f5f7;
}

main:has(.contact-page):before,
main:has(.contact-page):after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

main:has(.contact-page):before {
  top: 70px;
  left: -18vw;
  width: 72vw;
  aspect-ratio: 1;
  border: 1px solid rgba(230, 83, 29, .16);
  border-radius: 50%;
  box-shadow:
    0 0 0 7vw rgba(230, 83, 29, .025),
    0 0 0 14vw rgba(230, 83, 29, .018),
    0 0 0 21vw rgba(230, 83, 29, .012);
  animation: review-orbit 19s ease-in-out infinite alternate;
}

main:has(.contact-page):after {
  top: 260px;
  right: -12vw;
  width: min(46vw, 720px);
  height: 900px;
  opacity: .42;
  background-image:
    linear-gradient(rgba(21, 21, 21, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 21, 21, .07) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 72%, transparent);
  transform: rotate(8deg);
  animation: review-grid-drift 24s ease-in-out infinite alternate;
}

.contact-page {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100% - 48px, 1080px);
  min-width: 0;
  margin-inline: auto;
  padding-top: clamp(110px, 13vw, 160px);
}

.contact-intro {
  position: static;
  width: min(100%, 900px);
  margin: 0 auto clamp(42px, 6vw, 72px);
  text-align: center;
}

/* Essential context stays readable even if a reveal observer is delayed. */
.js .contact-intro [data-reveal] {
  opacity: 1;
  transform: none;
}

.contact-intro h1 {
  max-width: 900px;
  margin-inline: auto;
  font-size: clamp(3.6rem, 9vw, 7.5rem);
}

.contact-intro>p:last-child {
  margin-inline: auto;
}

.contact-intro:after {
  content: "A focused first step.\A About 4 minutes.";
  display: block;
  width: fit-content;
  margin: 30px auto 0;
  padding: 12px 16px;
  border: 1px solid var(--review-line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .04em;
  line-height: 1.35;
  white-space: pre;
}

.contact-form[data-guided="true"] {
  position: relative;
  overflow: hidden;
  width: min(100%, 900px);
  min-width: 0;
  min-height: 680px;
  margin-inline: auto;
  padding: clamp(28px, 4vw, 58px);
  border: 1px solid rgba(21, 21, 21, .08);
  border-radius: 34px;
  background: var(--review-paper);
  box-shadow: 0 32px 90px rgba(37, 34, 27, .11);
}

.contact-form[data-guided="true"]:before {
  content: "";
  position: absolute;
  top: -120px;
  right: -100px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(230, 83, 29, .14);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(230, 83, 29, .035), 0 0 0 76px rgba(230, 83, 29, .025);
  pointer-events: none;
}

.review-progress {
  position: relative;
  z-index: 2;
  margin-bottom: clamp(44px, 7vw, 76px);
}

.review-progress>div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.review-progress i {
  display: block;
  overflow: hidden;
  height: 3px;
  border-radius: 99px;
  background: rgba(21, 21, 21, .1);
}

.review-progress b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--review-orange);
  transform: scaleX(.1);
  transform-origin: left;
  transition: transform .48s cubic-bezier(.22, 1, .36, 1);
}

.contact-form[data-guided="true"] .guide-step {
  display: none;
}

.contact-form[data-guided="true"] .guide-step.is-active {
  display: block;
  animation: review-enter .46s cubic-bezier(.22, 1, .36, 1) both;
}

.contact-form[data-guided="true"] .guide-world.is-active {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chapter-heading {
  position: relative;
  max-width: 650px;
  margin-bottom: 42px;
}

.chapter-heading>span {
  display: block;
  margin-bottom: 13px;
  color: var(--review-orange);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.chapter-heading h2 {
  margin: 0 0 13px;
  color: var(--review-ink);
  font-size: clamp(2.25rem, 4.2vw, 4rem);
  letter-spacing: -.055em;
  line-height: .98;
}

.chapter-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: .96rem;
}

.contact-form[data-guided="true"] .guide-world>legend {
  grid-column: 1 / -1;
  max-width: 600px;
  margin-bottom: 34px;
  color: var(--review-ink);
  font-size: clamp(2.25rem, 4.2vw, 4rem);
  font-weight: 650;
  letter-spacing: -.055em;
  line-height: .98;
}

.contact-form[data-guided="true"] .guide-world>legend:before {
  content: "Choose your path";
  display: block;
  margin-bottom: 14px;
  color: var(--review-orange);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.guide-world .choice {
  position: relative;
  display: grid;
  min-height: 108px;
  margin: 0;
  padding: 23px 58px 21px 64px;
  border: 1px solid var(--review-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .55);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.guide-world .choice:before {
  content: attr(data-number);
  position: absolute;
  top: 26px;
  left: 22px;
  color: #9a968d;
  font-size: .66rem;
  font-weight: 700;
}

.guide-world .choice:after {
  content: "↗";
  position: absolute;
  top: 50%;
  right: 23px;
  color: #a09c94;
  font-size: 1rem;
  transform: translateY(-50%);
  transition: transform .2s ease, color .2s ease;
}

.guide-world .choice:hover {
  border-color: rgba(21, 21, 21, .35);
  transform: translateY(-2px);
}

.guide-world .choice:has(input:checked) {
  border-color: var(--review-orange);
  background: rgba(230, 83, 29, .065);
}

.guide-world .choice:has(input:checked):after {
  color: var(--review-orange);
  transform: translate(3px, -50%);
}

.guide-world .choice>span {
  margin: 0 0 5px !important;
  color: var(--review-ink) !important;
  font-size: 1.07rem;
  font-weight: 700;
}

.guide-world .choice small {
  max-width: 460px;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.35;
}

.contact-form[data-guided="true"] .choice input[type="radio"],
.contact-form[data-guided="true"] .choice input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.contact-form[data-guided="true"] .world-chapter>label,
.contact-form[data-guided="true"] .guide-shared>label,
.contact-form[data-guided="true"] .guide-closing>label {
  position: relative;
  display: block;
  margin-bottom: 28px;
  padding: 18px 20px 8px;
  border: 1px solid var(--review-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .55);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.contact-form[data-guided="true"] .world-chapter>label:focus-within,
.contact-form[data-guided="true"] .guide-shared>label:focus-within,
.contact-form[data-guided="true"] .guide-closing>label:focus-within {
  border-color: var(--review-orange);
  box-shadow: 0 0 0 4px rgba(230, 83, 29, .08);
  transform: translateY(-1px);
}

.contact-form[data-guided="true"] label>span,
.contact-form[data-guided="true"] legend {
  color: #77736c;
  font-size: .7rem;
  letter-spacing: .015em;
}

.contact-form[data-guided="true"] input:not([type="radio"]):not([type="checkbox"]),
.contact-form[data-guided="true"] textarea,
.contact-form[data-guided="true"] select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 7px 0 9px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--review-ink);
  font-size: clamp(1.05rem, 1.65vw, 1.4rem);
}

.contact-form[data-guided="true"] fieldset:not(.guide-world) {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.contact-form[data-guided="true"] fieldset:not(.guide-world)>legend {
  width: 100%;
  margin-bottom: 3px;
}

.contact-form[data-guided="true"] fieldset:not(.guide-world) .choice {
  position: relative;
  display: block;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--review-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.contact-form[data-guided="true"] fieldset:not(.guide-world) .choice:hover {
  border-color: rgba(21, 21, 21, .4);
  transform: translateY(-1px);
}

.contact-form[data-guided="true"] fieldset:not(.guide-world) .choice:has(input:checked) {
  border-color: var(--review-ink);
  background: var(--review-ink);
}

.contact-form[data-guided="true"] fieldset:not(.guide-world) .choice:has(input:checked)>span {
  color: #fff !important;
}

.contact-form[data-guided="true"] .field-needs-attention {
  border-color: #ba2f24 !important;
  animation: review-nudge .28s ease both;
}

.guide-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--review-line);
}

.guide-controls.is-final {
  justify-content: flex-start;
}

.guide-back,
.guide-next {
  min-height: 48px;
  padding: 0 21px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}

.guide-back {
  background: transparent;
  color: var(--muted);
}

.guide-next {
  margin-left: auto;
  background: var(--review-ink);
  color: #fff;
  transition: background .2s ease, transform .2s ease;
}

.guide-next span {
  display: inline-block;
  margin-left: 12px;
  transition: transform .2s ease;
}

.guide-next:hover {
  background: var(--review-orange);
  transform: translateY(-1px);
}

.guide-next:hover span {
  transform: translate(2px, -2px);
}

.guide-closing>.button[type="submit"] {
  min-height: 52px;
  background: var(--review-orange);
}

.guide-closing>.button[type="submit"]:hover {
  background: #c94215;
}

.guide-closing .form-note {
  margin-top: 32px;
}

@keyframes review-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes review-nudge {
  0%, 100% { transform: translateX(0); }
  40% { transform: translateX(4px); }
  70% { transform: translateX(-3px); }
}

@keyframes review-orbit {
  0% { transform: translate3d(-3%, -2%, 0) rotate(-4deg) scale(.96); opacity: .62; }
  55% { transform: translate3d(18%, 8%, 0) rotate(5deg) scale(1.06); opacity: 1; }
  100% { transform: translate3d(32%, 26%, 0) rotate(12deg) scale(.9); opacity: .7; }
}

@keyframes review-grid-drift {
  0% { transform: translate3d(0, -3%, 0) rotate(8deg); opacity: .26; }
  100% { transform: translate3d(-18%, 12%, 0) rotate(-3deg); opacity: .56; }
}

@media (max-width: 980px) {
  .contact-page { width: min(100% - 36px, 900px); }
  .contact-intro:after { margin-top: 24px; }
}

@media (min-width: 821px) and (max-height: 700px) {
  .contact-page { padding-top: 84px; }
  .contact-intro { margin-bottom: 30px; }
  .contact-intro h1 { font-size: clamp(3.5rem, 8vw, 5.7rem); }
  .contact-intro>p:last-child { margin-bottom: 0; }
  .contact-intro:after { margin-top: 18px; padding-block: 9px; }
}

@media (max-width: 820px) {
  .contact-page { padding-top: 88px; }
  .contact-intro { margin-bottom: 34px; }
  .contact-intro h1 { font-size: clamp(3.25rem, 13vw, 5.5rem); }
}

@media (max-width: 560px) {
  .contact-page { width: calc(100% - 24px); padding-top: 76px; }
  .contact-form[data-guided="true"] { min-height: 620px; padding: 26px 20px; }
  .review-progress { margin-bottom: 42px; }
  .chapter-heading { margin-bottom: 32px; }
  .guide-world .choice { min-height: 98px; padding: 20px 46px 18px 52px; }
  .guide-world .choice:before { top: 23px; left: 17px; }
  .guide-world .choice:after { right: 17px; }
  .contact-form[data-guided="true"] .guide-world.is-active { grid-template-columns: 1fr; }
  .contact-form[data-guided="true"] fieldset:not(.guide-world) .choice { width: 100%; border-radius: 14px; }
  main:has(.contact-page):before { left: -70vw; width: 150vw; }
  main:has(.contact-page):after { right: -48vw; width: 120vw; opacity: .28; }
}

@media (prefers-reduced-motion: reduce) {
  main:has(.contact-page):before,
  main:has(.contact-page):after { animation: none; }
  .contact-form[data-guided="true"] .guide-step.is-active { animation: none; }
  .review-progress b, .guide-world .choice, .guide-next { transition: none; }
}
