/* ═══════════════════════════════════════
   CONTACT PAGE
   A colour hero behind the nav, then the form as a small Google Sheet
   (one field a row, js/contact.js runs its formula bar) beside the ways
   to reach us, then links for everything else.
   ═══════════════════════════════════════ */

/* ── Hero ─────────────────────────────── */
.ct-hero {
  padding: calc(var(--nav-height) + clamp(4rem, 8vw, 6.5rem)) 0 clamp(12rem, 15vw, 14rem);
  background: linear-gradient(115deg, #F5A93C, #F2B233, #3FB985, #5B78E6, #3FB985, #F2B233, #F5A93C);
  background-size: 300% 300%;
  animation: ct-hero-flow 18s ease-in-out infinite;
  color: #fff;
  text-align: center;
}

@keyframes ct-hero-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-hero { animation: none; }
}

.ct-hero__title {
  max-width: 15em;
  margin: 0 auto;
  color: #fff;
  font-size: clamp(2.4rem, 5.2vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: 0 1px 2px rgba(15, 18, 30, 0.14), 0 2px 24px rgba(15, 18, 30, 0.18);
}

.ct-hero__lead {
  max-width: 40rem;
  margin: 1.25rem auto 0;
  color: #fff;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 500;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(15, 18, 30, 0.2), 0 1px 16px rgba(15, 18, 30, 0.2);
}

/* ── Sheet and details, rising into the hero ── */
.ct-main { position: relative; z-index: 2; margin-top: -9rem; }

.ct-main__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: var(--space-xl);
}

/* ── The sheet ────────────────────────── */
.ct-sheet {
  overflow: hidden;
  border: 1px solid #dadce0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 30px 70px -30px rgba(32, 33, 36, 0.45);
  color: #202124;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.ct-sheet__top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e1e3e1;
  font-size: 15px;
}

.ct-sheet__fx {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid #e1e3e1;
  font-size: 13px;
}

.ct-sheet__ref { flex: none; width: 28px; color: #444746; }
.ct-sheet__fxsign { flex: none; padding-left: 0.6rem; border-left: 1px solid #e1e3e1; color: #9aa0a6; font-style: italic; }
.ct-sheet__fxval { min-width: 0; min-height: 1.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ct-sheet__letters,
.ct-row {
  display: grid;
  grid-template-columns: 40px 132px minmax(0, 1fr);
}

.ct-sheet__letters span {
  padding: 0.25rem 0;
  border-right: 1px solid #e1e3e1;
  border-bottom: 1px solid #e1e3e1;
  background: #f8f9fa;
  color: #5f6368;
  font-size: 11px;
  text-align: center;
}

.ct-sheet:focus-within .ct-sheet__col-b { background: #d3e3fd; color: #0b57d0; font-weight: 700; }

.ct-row { border-bottom: 1px solid #e1e3e1; }

.ct-row__num {
  display: grid;
  place-items: center;
  border-right: 1px solid #e1e3e1;
  background: #f8f9fa;
  color: #5f6368;
  font-size: 11px;
}

.ct-row:focus-within .ct-row__num { background: #d3e3fd; color: #0b57d0; font-weight: 700; }

.ct-row__label {
  display: flex;
  align-items: center;
  padding: 0.95rem 0.9rem;
  border-right: 1px solid rgba(32, 33, 36, 0.12);
  color: #202124;
  font-size: 14px;
  font-weight: 700;
}

.ct-row--tall .ct-row__label { align-items: flex-start; }

.ct-row__label.g1 { background: #ff9900; }
.ct-row__label.g2 { background: #f1c232; }
.ct-row__label.g3 { background: #6aa84f; }
.ct-row__label.g4 { background: #6d9eeb; }

/* The active cell: Google's blue box and corner handle */
.ct-row__cell { position: relative; min-width: 0; }

.ct-row__cell:focus-within { box-shadow: inset 0 0 0 2px #1a73e8; }

.ct-row__cell:focus-within::after {
  content: '';
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border: 1px solid #fff;
  background: #1a73e8;
}

.ct-row__cell input,
.ct-row__cell select,
.ct-row__cell textarea {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 56px;
  padding: 0.95rem 1rem;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #202124;
  font: 15px/1.45 Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.ct-row__cell ::placeholder { color: #80868b; opacity: 1; }

.ct-row__cell textarea { min-height: 190px; resize: vertical; }

.ct-row__cell select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235f6368' d='M1 1l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 1rem center;
}

/* Off-screen rather than display:none, which bots skip */
.ct-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ct-row--send { border-bottom: 0; }

.ct-send {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 1rem;
}

.ct-send .btn { flex: none; font-family: var(--font-family); }
.ct-send .btn:disabled { opacity: 0.65; cursor: wait; }

.ct-send__hint { margin: 0; color: #5f6368; font-size: 13px; line-height: 1.4; }

.ct-error {
  margin: 0;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e1e3e1;
  background: #fce8e6;
  color: #a50e0e;
  font-size: 14px;
  line-height: 1.5;
}

.ct-error a { color: inherit; font-weight: 700; text-decoration: underline; }

.ct-sheet__form[hidden],
.ct-sheet__done[hidden],
.ct-error[hidden] { display: none; }

/* Sent: the same sheet, with the outcome in it */
.ct-sheet__done { outline: none; }

.ct-row--done .ct-row__label { padding-block: 1.25rem; }

.ct-row__text {
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 0.95rem 1rem;
  font-size: 15px;
  line-height: 1.45;
}

.ct-pill { padding: 0.25rem 0.8rem; border-radius: 4px; background: #ceead6; font-weight: 700; }

.ct-row--blank { min-height: 56px; }
.ct-row--blank > span:nth-child(2) { border-right: 1px solid #e1e3e1; }

/* ── Ways to reach us ─────────────────── */
.ct-side { display: grid; grid-auto-rows: 1fr; gap: var(--space-md); }

.ct-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 1.375rem 1.375rem;
  border: 1px solid var(--color-light-gray);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-md);
}

.ct-card--green { --ct-edge: #3FB985; }
.ct-card--amber { --ct-edge: #F5A93C; }

.ct-card__label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0 0 0.6rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.ct-card__label svg { flex: none; color: var(--ct-edge, var(--color-blue)); }

.ct-card address,
.ct-card p {
  margin: 0;
  color: var(--color-text);
  font-style: normal;
  line-height: 1.5;
}

.ct-card a {
  color: var(--color-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.ct-card__email { font-size: var(--font-size-lg); }
.ct-card__more { margin-top: 0.5rem; }

/* ── Everything else ──────────────────── */
.ct-more { padding: var(--space-4xl) 0; }

.ct-more__title {
  margin: 0 0 var(--space-xl);
  color: var(--color-text);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  text-align: center;
}

.ct-more__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
}

.ct-tile {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding: 1.25rem 1.375rem;
  border: 1px solid var(--color-light-gray);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  color: var(--color-text);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.ct-tile:hover { transform: translateY(-2px); border-color: var(--color-blue); box-shadow: var(--shadow-md); }

.ct-tile strong { font-weight: 600; }
.ct-tile strong::after { content: ' →'; color: var(--color-blue); }
.ct-tile span { color: var(--color-text-secondary); font-size: var(--font-size-sm); line-height: 1.5; }

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

/* ── Smaller screens ──────────────────── */
@media (max-width: 960px) {
  .ct-main__grid { grid-template-columns: minmax(0, 1fr); }
  .ct-side { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .ct-card { justify-content: flex-start; }
  .ct-card--amber { grid-column: 1 / -1; }
  .ct-more__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .ct-sheet__letters,
  .ct-row { grid-template-columns: 28px 84px minmax(0, 1fr); }
  .ct-row__label { padding: 0.95rem 0.6rem; font-size: 13px; }
  .ct-row__cell input,
  .ct-row__cell select,
  .ct-row__cell textarea { padding-inline: 0.7rem; font-size: 16px; }
  .ct-row__cell select { padding-right: 2rem; background-position: right 0.7rem center; }
  .ct-row--send .ct-row__num { display: none; }
  .ct-send { grid-column: 1 / -1; flex-direction: column; align-items: stretch; text-align: center; }
  .ct-side,
  .ct-more__grid { grid-template-columns: minmax(0, 1fr); }
  .ct-more { padding: var(--space-2xl) 0 var(--space-3xl); }
}
