/* ==========================================================================
   Contact page
   Chat-style hero, live "letter" preview beside a three-step form,
   honest send states, data-driven contact channels, FAQ, self-serve links.
   ========================================================================== */

/* ---------- 1. Hero ---------- */
.contact-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
}
.chat-stage { position: relative; width: 100%; max-width: 540px; aspect-ratio: 1 / 1.02; margin-inline: auto; }
.chat-stage__photo {
  position: absolute;
  right: 0;
  top: 0;
  width: 70%;
  height: 90%;
  margin: 0;
  overflow: hidden;
  border-radius: 999px 999px 36px 36px;
  border: 5px solid rgba(255, 255, 255, 0.14);
  background: var(--night-3);
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.75);
}
.chat-stage__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.chat-stage__ring {
  position: absolute;
  right: -16px;
  top: 20px;
  width: 70%;
  height: 90%;
  border-radius: 999px 999px 36px 36px;
  border: 2px solid rgba(224, 181, 116, 0.5);
  pointer-events: none;
}
.px { position: absolute; z-index: 1; display: block; border-radius: 4px; animation: px-bob 5s var(--ease-in-out) infinite alternate; }
.px--gold { right: 74%; top: 10%; width: 18px; height: 18px; background: #c99a57; }
.px--green { right: 69%; top: 18%; width: 11px; height: 11px; background: var(--green-bright); animation-delay: -1.6s; }
.px--teal { right: -4%; bottom: 20%; width: 14px; height: 14px; background: var(--teal-bright); animation-delay: -3s; }
@keyframes px-bob { from { translate: 0 0; rotate: 0deg; } to { translate: 0 -14px; rotate: 18deg; } }

.mail-chip {
  position: absolute;
  left: 2%;
  top: 26%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 20px 44px -18px rgba(0, 0, 0, 0.6);
  animation: chat-float 6s var(--ease-in-out) infinite alternate-reverse;
}
.mail-chip__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--grad-brand); color: #fff; }
.mail-chip__icon svg { width: 18px; height: 18px; }
.mail-chip strong { display: block; font-size: var(--fs-sm); font-weight: 650; }
.mail-chip small { display: block; color: var(--muted); font-size: 11px; }
@keyframes chat-float { from { translate: 0 0; } to { translate: 0 -12px; } }

.ask-card {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  width: min(330px, 72%);
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  animation: chat-float 7s var(--ease-in-out) infinite alternate;
}
.ask-card__head { display: flex; align-items: center; gap: 10px; }
.ask-card__logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--paper); }
.ask-card__logo img { width: 22px; height: auto; }
.ask-card__head strong { display: block; font-size: var(--fs-sm); font-weight: 700; }
.ask-card__head small { display: block; color: var(--muted); font-size: 11px; }
.ask-card__bubble {
  position: relative;
  min-height: 3.6em;
  margin: 14px 0 0 18px;
  padding: 12px 14px;
  border-radius: 18px 18px 4px 18px;
  background: var(--grad-brand);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.45;
}
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: #e0b574; animation: caret-blink 0.9s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
.ask-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ask-card__tags span { padding: 4px 10px; border-radius: var(--r-pill); background: var(--paper); color: var(--muted); font-size: 11px; font-weight: 600; transition: background-color var(--t-base), color var(--t-base); }
.ask-card__tags span.is-on { background: var(--accent-50); color: var(--accent-text); }

/* ---------- 2. Write to us ---------- */
.write { position: relative; }
.write__grid { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(1.5rem, 1rem + 2vw, 2.5rem); align-items: start; }

/* Letter preview */
.letter-wrap { position: sticky; top: calc(var(--header-h) + 1rem); }
.letter {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg, rgba(11, 77, 140, 0.9) 0 14px, #fff 14px 22px, rgba(165, 125, 69, 0.9) 22px 36px, #fff 36px 44px) top / 100% 6px no-repeat,
    var(--surface);
  box-shadow: var(--shadow-3);
}
.letter__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1.5px dashed var(--line-strong); }
.letter__label { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.letter__to { margin-top: 2px; font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.03em; }
.letter__stamp {
  display: grid;
  place-items: center;
  flex: none;
  width: 64px;
  height: 72px;
  border-radius: 6px;
  background: var(--paper);
  outline: 2px dashed var(--accent);
  outline-offset: -6px;
  rotate: 6deg;
  transition: rotate var(--t-slow) var(--ease-out), background-color var(--t-slow);
}
.letter__stamp img { width: 30px; height: auto; }
.letter.is-ready .letter__stamp { rotate: -4deg; background: var(--accent-50); }
.letter__rows { display: grid; gap: 10px; padding: 16px 0; border-bottom: 1.5px dashed var(--line-strong); }
.letter__rows > div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 10px; align-items: baseline; }
.letter__rows dt { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.letter__rows dd { min-width: 0; margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
[data-preview].is-empty { color: #9aa4b3; font-weight: 500; font-style: italic; }
.letter__body {
  min-height: 6.5em;
  padding: 16px 0;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
  background: repeating-linear-gradient(to bottom, transparent 0 calc(1.6em - 1px), rgba(11, 77, 140, 0.08) calc(1.6em - 1px) 1.6em) 0 16px / 100% calc(100% - 16px) no-repeat;
}
.letter__check { padding-top: 14px; border-top: 1.5px dashed var(--line-strong); }
.letter__check-title { color: var(--ink); font-size: var(--fs-sm); font-weight: 700; }
.ready { display: grid; gap: 8px; margin-top: 10px; }
.ready li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--fs-sm); transition: color var(--t-base); }
.ready__box { position: relative; flex: none; width: 20px; height: 20px; border: 2px solid var(--line-strong); border-radius: 6px; transition: background-color var(--t-base), border-color var(--t-base); }
.ready__box::after { content: ""; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform var(--t-base) var(--ease-out); }
.ready li.is-ok { color: var(--ink); }
.ready li.is-ok .ready__box { border-color: var(--green); background: var(--green); }
.ready li.is-ok .ready__box::after { transform: rotate(45deg) scale(1); }
.letter__meter { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.meter { flex: 1; height: 8px; overflow: hidden; border-radius: 6px; background: var(--paper); }
.meter i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0b4d8c, #2a93ae, #3fb062); transform-origin: left; transform: scaleX(0); transition: transform var(--t-slow) var(--ease-out); }
.letter-note { display: flex; gap: 10px; margin-top: 16px; padding: 0 6px; color: var(--muted); font-size: var(--fs-xs); line-height: 1.55; }
.letter-note svg { flex: none; width: 18px; height: 18px; color: var(--brand); }
.letter-note b { color: var(--ink); }

/* Form card */
.cform {
  position: relative;
  padding: clamp(1.25rem, 0.8rem + 2vw, 2.25rem);
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.from-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 14px 6px 8px; border-radius: var(--r-pill); background: var(--accent-50); color: var(--accent-text); font-size: var(--fs-xs); font-weight: 600; }
.from-pill::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4.5 4.5L19 7'/%3E%3C/svg%3E") center / 11px no-repeat; }
.cstep { min-width: 0; margin: 0; padding: 0; border: 0; }
.cstep + .cstep { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.cstep > :not(legend) { clear: both; }
.cform [hidden] { display: none !important; }
.cstep__legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 0; color: var(--ink); font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.02em; }
.cstep__num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--brand-50); color: var(--brand); font-size: var(--fs-sm); transition: background-color var(--t-slow), color var(--t-slow); }
.cstep.is-done .cstep__num { background: var(--green); color: #fff; }

/* Topic cards */
.topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.topic {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 44px 12px 12px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--t-base), background-color var(--t-base), box-shadow var(--t-base), transform var(--t-base) var(--ease-out);
}
.topic:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.topic--wide { grid-column: 1 / -1; }
.topic input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.topic__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; color: #fff; }
.topic__icon svg { width: 22px; height: 22px; }
.topic__icon--blue { background: var(--grad-brand); }
.topic__icon--gold { background: linear-gradient(135deg, #b8894a, #74552a); }
.topic__icon--teal { background: linear-gradient(135deg, #2a93ae, #176a80); }
.topic__icon--green { background: linear-gradient(135deg, #1d8a40, #12702f); }
.topic__icon--ink { background: linear-gradient(135deg, #3b4659, #0f1b2d); }
.topic__text b { display: block; color: var(--ink); font-size: var(--fs-sm); font-weight: 700; }
.topic__text small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.topic__tick { position: absolute; right: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border: 2px solid var(--line-strong); border-radius: 50%; transition: border-color var(--t-base), background-color var(--t-base); }
.topic__tick::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform var(--t-base) var(--ease-out); }
.topic:has(input:checked) { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(11, 77, 140, 0.1); }
.topic:has(input:checked) .topic__tick { border-color: var(--brand); background: var(--brand); }
.topic:has(input:checked) .topic__tick::after { transform: scale(1); }
.topic:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.topics.is-invalid .topic { border-color: rgba(192, 48, 45, 0.45); }
#topic-error { margin-top: 10px; }

/* Business name reveal */
.field--reveal:not([hidden]) { animation: field-in var(--t-slow) var(--ease-out); }
@keyframes field-in { from { opacity: 0; transform: translateY(-8px); } }

/* Question starters */
.starters { margin-bottom: 16px; }
.starters[hidden] { display: none; }
.starters__label { margin-bottom: 8px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.starters__list { display: flex; flex-wrap: wrap; gap: 8px; }
.starter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 14px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.starter::before { content: "+"; color: var(--accent-text); font-size: 15px; line-height: 1; }
.starter:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.starter.is-used { border-style: solid; border-color: var(--green); background: #eef8f1; color: var(--green); }
.starter.is-used::before { content: "✓"; color: var(--green); font-size: 12px; }

/* Submit */
.cform__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 26px; }
.cform__note { flex: 1 1 14rem; color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.cform__note:empty { display: none; }
.send-btn { gap: 10px; min-width: 210px; }
.send-btn__plane { position: relative; display: inline-grid; width: 20px; height: 20px; }
.send-btn__plane svg { width: 20px; height: 20px; }
.send-btn[aria-busy="true"] { cursor: progress; opacity: 0.85; }
.send-btn[aria-busy="true"] .send-btn__plane svg { animation: plane-wiggle 0.8s var(--ease-in-out) infinite alternate; }
@keyframes plane-wiggle { to { transform: translate(3px, -3px) rotate(-8deg); } }

/* Status panel */
.form-status { margin-top: 22px; padding: 20px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--paper); }
.form-status:focus-visible { box-shadow: var(--focus-ring); }
.form-status__head { display: flex; align-items: flex-start; gap: 14px; }
.form-status__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; color: #fff; }
.form-status__icon svg { width: 22px; height: 22px; }
.form-status h3 { font-size: var(--fs-md); font-weight: 700; letter-spacing: -0.01em; }
.form-status p { margin-top: 4px; color: var(--ink-2); font-size: var(--fs-sm); }
.form-status__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.form-status__ways { display: grid; gap: 6px; margin-top: 12px; font-size: var(--fs-sm); }
.form-status__ways a { font-weight: 600; }
.form-status__copied { align-self: center; color: var(--green); font-size: var(--fs-xs); font-weight: 600; }
.form-status--info { border-color: rgba(165, 125, 69, 0.45); background: var(--accent-50); }
.form-status--info .form-status__icon { background: linear-gradient(135deg, #b8894a, #74552a); }
.form-status--error { border-color: rgba(192, 48, 45, 0.4); background: var(--danger-50); }
.form-status--error .form-status__icon { background: var(--danger); }
.form-status--ok { border-color: rgba(18, 112, 47, 0.35); background: #eef8f1; }
.form-status--ok .form-status__icon { background: var(--green); }

.fly-plane { position: fixed; z-index: 90; width: 34px; height: 34px; color: var(--brand); pointer-events: none; }

/* ---------- 3. Other ways ---------- */
.reach { position: relative; isolation: isolate; overflow: hidden; background: var(--grad-night); color: var(--on-night); }
.reach__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.reach__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.reach__photo { position: relative; margin: 0; overflow: hidden; aspect-ratio: 4 / 4.6; border-radius: 36px 36px 200px 36px; border: 5px solid rgba(255, 255, 255, 0.12); background: var(--night-3); box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.8); }
.reach__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.reach .sec-head { margin-bottom: var(--s-6); }
.reach .sec-head h2 { color: #fff; }
.channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.channels:empty { display: none; }
.channel {
  display: flex;
  gap: 14px;
  min-width: 0;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color var(--t-base), background-color var(--t-base), transform var(--t-base) var(--ease-out);
}
.channel:hover { border-color: rgba(224, 181, 116, 0.5); background: rgba(255, 255, 255, 0.14); transform: translateY(-3px); }
.channel__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, 0.12); color: #ecca92; }
.channel__icon svg { width: 22px; height: 22px; }
.channel h3 { color: var(--on-night-muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.channel p, .channel a { display: block; margin-top: 4px; color: #fff; font-size: var(--fs-base); font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }
.channel a { text-decoration: underline; text-decoration-color: rgba(224, 181, 116, 0.6); text-underline-offset: 4px; }
.channel a:hover { color: #ecca92; }
.channel .channel__sub { margin-top: 6px; color: #ecca92; font-size: var(--fs-sm); }
.channels-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  border: 1.5px dashed rgba(255, 255, 255, 0.25);
  color: var(--on-night-muted);
  font-size: var(--fs-md);
}
.channels-empty::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, #e0b574, #5ec4de); animation: px-bob 3s var(--ease-in-out) infinite alternate; }
.channels-empty[hidden] { display: none; }

/* ---------- 5. Self-serve ---------- */
.selfserve__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.selfserve__lead { display: flex; align-items: center; gap: clamp(1.25rem, 0.8rem + 2vw, 2rem); }
.selfserve__photo { flex: none; width: clamp(120px, 9rem + 4vw, 210px); aspect-ratio: 1; margin: 0; overflow: hidden; border-radius: 50%; border: 6px solid #fff; background: var(--brand-50); box-shadow: var(--shadow-3); }
.selfserve__photo img { width: 100%; height: 100%; object-fit: cover; }
.selfserve__lead h2 { margin-top: var(--s-3); font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.selfserve__lead p:not(.kicker) { margin-top: var(--s-3); color: var(--muted); font-size: var(--fs-md); }
.self-links { display: grid; gap: 12px; }
.self-link {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 84px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base) var(--ease-out);
}
.self-link:hover { border-color: var(--brand-100); box-shadow: var(--shadow-2); transform: translateX(6px); }
.self-link b { display: block; font-size: var(--fs-base); font-weight: 700; }
.self-link small { display: block; color: var(--muted); font-size: var(--fs-sm); }
.self-link__icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 15px; color: #fff; }
.self-link__icon svg { width: 22px; height: 22px; }
.self-link__icon--teal { background: linear-gradient(135deg, #2a93ae, #176a80); }
.self-link__icon--blue { background: var(--grad-brand); }
.self-link__icon--gold { background: linear-gradient(135deg, #b8894a, #74552a); }
.self-link__arrow { flex: none; width: 20px; height: 20px; margin-left: auto; color: var(--brand); transition: transform var(--t-base) var(--ease-out); }
.self-link:hover .self-link__arrow { transform: translateX(4px); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .contact-hero__layout { grid-template-columns: minmax(0, 1fr); }
  .chat-stage { max-width: 460px; margin-top: var(--s-4); }
  .write__grid { grid-template-columns: minmax(0, 1fr); }
  .letter-wrap { position: static; order: 2; }
  .reach__grid { grid-template-columns: minmax(0, 1fr); }
  .reach__photo { max-width: 420px; aspect-ratio: 4 / 3.4; }
  .selfserve__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .chat-stage { max-width: 360px; }
  .ask-card { width: 84%; padding: 14px; }
  .mail-chip { top: 4%; left: 0; }
  .px--gold, .px--green { display: none; }
  .topics { grid-template-columns: minmax(0, 1fr); }
  .topic--wide { grid-column: auto; }
  .channels { grid-template-columns: minmax(0, 1fr); }
  .letter { padding: 20px; }
  .letter__rows > div { grid-template-columns: 4.6rem minmax(0, 1fr); }
  .send-btn { flex: 1 1 100%; }
  .selfserve__lead { flex-direction: column; align-items: flex-start; }
  .form-status__actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .px, .mail-chip, .ask-card, .caret, .channels-empty::before { animation: none !important; }
}

/* No-JS: the form can't send without the script, so it's hidden with a note */
html:not(.js) .cform { display: none; }
.noscript-note { padding: 20px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); }
