/* Talk to us -- round 122o, to the founder's mock: one white card that
   overlaps the hero, three category cards, the account strip, a form the
   category shapes, the device line, then the mailbox and the quick
   answers. Everything derives from main.css tokens; the mock's hex values
   are mapped to the nearest token (its var(--accent) IS --accent), so the page
   changes colour with the rest of the site. */

.contact-section {
  max-width: 900px;
  margin: 0 auto;
  /* The card climbs into the hero. .landing-section brings its own top
     padding, which would push it back out; the negative margin is the
     mock's -58px measured against that padding. */
  padding-top: 0;
  border-bottom: none;
}

.contact-main {
  position: relative;
  z-index: 5;
}

.contact-card {
  position: relative;
  margin-top: -58px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 34px;
  box-shadow: 0 24px 70px rgba(var(--shadow-ink), 0.10), 0 4px 12px rgba(var(--shadow-ink), 0.04);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* --- Section title --- */
.contact-section-title h2 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.02em;
}
.contact-section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* --- Category cards --- */
.contact-topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.contact-topic {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 18px;
  min-height: 108px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  transition: transform var(--duration-quick) var(--ease-warm),
              border-color var(--duration-quick) var(--ease-warm),
              box-shadow var(--duration-quick) var(--ease-warm);
}
.contact-topic:hover {
  transform: translateY(-2px);
  border-color: var(--accent-bright);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.08);
}
.contact-topic:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.contact-topic.is-active {
  border-color: var(--accent);
  background: var(--accent-bg-soft);
  box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.10);
}
/* The mock's selected dot, drawn by CSS so the markup stays a plain
   radio and nothing has to insert or remove an element. */
.contact-topic.is-active::after {
  content: "";
  position: absolute;
  top: 13px;
  right: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.contact-topic-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 7px;
  border-radius: 10px;
  background: var(--accent-bg-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* The mock tints the second and third icons; the site's own pop and sun
   tokens are the nearest pair, at the same soft-tile treatment. */
.contact-topic--bug .contact-topic-icon { background: rgba(236, 72, 153, 0.10); color: var(--pop); }
.contact-topic--idea .contact-topic-icon { background: rgba(251, 191, 36, 0.16); color: #B45309; }

.contact-topic strong {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
}
.contact-topic-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-topic-text > span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* --- Account strip --- */
.contact-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.contact-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-bg-soft);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 800;
}
.contact-account-copy {
  flex: 1;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: anywhere;
}
.contact-account-copy strong { color: var(--ink); }

/* Text-styled buttons ("Switch account", "View details"): a link's look
   on a button's semantics, at a 44pt target. */
.contact-link-btn {
  background: none;
  border: 0;
  padding: 0 4px;
  min-height: 44px;
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.contact-link-btn:hover { text-decoration: underline; }
.contact-link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* --- Fields --- */
.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.contact-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.contact-optional {
  color: var(--muted);
  font-weight: 500;
}
.contact-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 560px) {
  .contact-field-row { grid-template-columns: 1fr; }
}
.contact-input,
.contact-select,
.contact-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  transition: border-color var(--duration-quick), box-shadow var(--duration-quick);
}
.contact-input,
.contact-select {
  min-height: 46px;
  padding: 0 14px;
}
.contact-select-wrap {
  position: relative;
}
.contact-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  cursor: pointer;
}
.contact-select-chevron {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
}
.contact-textarea {
  min-height: 126px;
  resize: vertical;
  padding: 14px;
  line-height: 1.5;
}
.contact-textarea--short { min-height: 90px; }
.contact-input:focus-visible,
.contact-select:focus-visible,
.contact-textarea:focus-visible {
  outline: none;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.10);
}
.contact-input::placeholder,
.contact-textarea::placeholder { color: var(--muted); opacity: 0.8; }
.contact-count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
}
.contact-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Device line --- */
.contact-device {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-radius: 11px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.contact-device-icon { color: var(--muted); display: flex; }
.contact-device-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.contact-device-copy strong { font-size: 12px; }
.contact-device-copy span { font-size: 11.5px; color: var(--muted); }
.contact-device-detail {
  margin: -8px 0 0;
  padding: 0 15px;
  font-size: 11.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* --- Send row --- */
.contact-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 4px;
}
.contact-send {
  border: 0;
  padding: 13px 23px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.contact-send:disabled { opacity: 0.6; cursor: wait; }
.contact-note {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}
.contact-status {
  font-size: 13px;
  color: var(--muted);
  min-height: 1.2em;
}
.contact-status:empty { display: none; }
.contact-status.is-error { color: var(--danger); }
.contact-status.is-ok { color: var(--success); }

.contact-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0 0;
}

/* --- The mailbox --- */
.contact-direct {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.contact-direct-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}
.contact-direct-copy strong { font-size: 13px; }
.contact-direct-copy > span { font-size: 11.5px; color: var(--muted); }
.contact-direct a {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-direct a:hover { text-decoration: underline; }
.contact-copy {
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.contact-copy:hover { border-color: var(--accent-bright); }

/* --- Quick answers --- */
.contact-quick {
  margin-top: 4px;
}
.contact-quick-label {
  /* An <h2> since round 122j -- reset what the user agent gives a heading
     so the tag change is invisible. */
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.contact-quick a {
  display: block;
  position: relative;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--duration-quick), background var(--duration-quick);
}
.contact-quick a:hover {
  border-color: var(--accent-bright);
  background: var(--accent-bg-soft);
}
.contact-quick a strong {
  display: block;
  font-size: 12.5px;
  margin-bottom: 4px;
}
.contact-quick a > span:last-child {
  font-size: 11px;
  color: var(--muted);
}

/* --- Phones --- */
@media (max-width: 700px) {
  /* The hero's sub line sits where the card climbs to at this width, so
     the hero grows by what the card takes back. */
  .contact-hero { padding-bottom: 130px; }
  .contact-card {
    margin-top: -70px;
    padding: 22px 16px;
    border-radius: 18px;
  }
  /* One card per row, laid out as a row itself -- icon beside the text
     -- so three stacked cards are three lines tall, not a screen. */
  .contact-topics { grid-template-columns: 1fr; }
  .contact-topic {
    min-height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 40px 14px 14px;
  }
  .contact-topic-icon { margin-bottom: 0; flex-shrink: 0; }
  .contact-topic.is-active::after { top: 50%; transform: translateY(-50%); }
  .contact-account { flex-wrap: wrap; }
  .contact-account-copy { flex: 1 1 200px; }
  .contact-account .contact-link-btn { padding-left: 46px; min-height: 36px; }
  .contact-quick-links { grid-template-columns: 1fr; }
  .contact-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact-send { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-topic { transition: none; }
  .contact-topic:hover { transform: none; }
}
