/* The contact page. Loaded only by /contact, the way /universe loads its own
 * sheet — so the form's frame and the topic guide can be specific without
 * adding weight to every other page, and without spending any of
 * styles.css's colour-in-type budget.
 *
 * The form itself is ShopSCAPE Studio's, in an iframe from
 * studio.pantipmall.com (see the comment in contact.html). Its look is set in
 * Studio; this sheet only gives it a place to stand. Every colour here is a
 * token from styles.css. */

/* ── deflection strip ─────────────────────────────────────────────────────
 * Above the fold and above the form, because the person it is written for —
 * a client whose system is down — will not scroll to find it. */
.ct-deflect {
  padding: 0.85rem var(--gutter);
  border-bottom: 1px solid var(--line-navy);
  background: var(--surface-raised);
}

.ct-deflect p {
  max-width: var(--measure-lede);
  margin: 0 auto;
  font-size: var(--text-sm);
  color: var(--text-dim);
}

.ct-deflect strong {
  color: var(--text-hi);
  font-weight: 600;
}

.ct-hero-note {
  max-width: var(--measure-body);
  margin: 1.25rem 0 0;
  font-size: var(--text-sm);
  color: var(--text-dim);
}

/* ── the form ─────────────────────────────────────────────────────────────
 * The form beside a short guide to its one question that needs a choice. The
 * guide sits second in the source, so on a phone it follows the form instead
 * of pushing it below the fold. */
.ct-form-block .story-head {
  max-width: var(--measure-lede);
}

.ct-lede {
  margin: 0.75rem 0 0;
  font-size: var(--text-base);
  color: var(--text-dim);
}

.ct-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
}

@media (min-width: 60rem) {
  .ct-form-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(16rem, 1fr);
  }
}

/* The card holds its height before the form arrives, so the page does not
 * jump when the iframe lands. The form reports its own height afterwards and
 * the embed script sizes the frame to it. */
.ct-form-card {
  min-height: 34rem;
  padding: clamp(0.5rem, 1.2vw, 0.9rem);
  border: 1px solid var(--line-navy);
  border-radius: var(--r-lg);
  background: rgb(var(--ink-rgb) / 0.02);
}

/* The one rule of the embed's own stylesheet that inline mode needs. The
 * embed injects that stylesheet as a <style>, which the page's policy admits
 * by its hash; when Studio changes the text the browser refuses the new one,
 * and this copy keeps the form in place. */
.bmsfe-inline {
  display: block;
  width: 100%;
  min-height: 520px;
  border: 0;
  background: transparent;
}

.ct-form-fallback {
  margin: 1rem;
  max-width: var(--measure-body);
  font-size: var(--text-sm);
  color: var(--text-body);
}

.ct-form-fallback[hidden] {
  display: none;
}

/* ── the topic guide ──────────────────────────────────────────────────────
 * Each topic in English with the form's own Thai label beside it: the form
 * shows its choices in whichever language it has them in. */
.ct-topics {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--line-navy);
  border-radius: var(--r-lg);
  background: var(--surface-raised);
}

@media (min-width: 60rem) {
  .ct-topics {
    position: sticky;
    top: 6rem;
  }
}

.ct-topics h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-hi);
}

.ct-topics p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-dim);
}

.ct-topic-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.ct-topic {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-navy);
}

.ct-topic dt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.6rem;
  align-items: baseline;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-hi);
}

.ct-topic dt span {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text-hint);
}

.ct-topic dd {
  margin: 0.3rem 0 0;
  font-size: var(--text-sm);
  color: var(--text-dim);
}

.ct-topics-note a {
  color: var(--text-body);
}

/* ── direct contact ─────────────────────────────────────────────────────── */
.ct-direct {
  max-width: var(--measure-lede);
  margin: 0;
}

.ct-direct-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem 1.5rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line-navy);
}

@media (min-width: 40rem) {
  .ct-direct-row {
    grid-template-columns: 9rem 1fr;
    align-items: baseline;
  }
}

.ct-direct dt {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-accent-dim);
}

.ct-direct dd {
  margin: 0;
  font-size: var(--text-base);
  color: var(--text-body);
}
