/* ============================================================
   CONTACT US — contact.css
   Tokens, reset and typography come from components/base.css
   (single source of truth): this file never redeclares :root.
   Same visual language as the rest of the site: dark hero, light
   working section, white cards with a warm shadow, one orange accent.
   ============================================================ */

/* ============================================================
   SHARED — eyebrows, links, buttons, tags
   ============================================================ */
.ct-page { background: var(--surface); color: var(--text-primary); }

address { font-style: normal; }

.ct-eyebrow {
  margin-bottom: 14px;
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--primary-on-light);
}
.ct-eyebrow--on-dark { color: var(--primary-on-dark); }

.ct-btn-primary,
.ct-btn-dark,
.ct-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 var(--sp-3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.ct-btn-primary:active,
.ct-btn-dark:active,
.ct-btn-ghost:active { transform: scale(0.98); }

.ct-btn-primary {
  background: var(--primary-solid);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 24px rgba(209, 64, 0, 0.22);
}
.ct-btn-primary:hover { background: var(--primary-solid-hover); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 12px 32px rgba(209, 64, 0, 0.3); }
.ct-btn-primary svg { transition: transform var(--transition); }
@media (hover: hover) and (pointer: fine) { .ct-btn-primary:hover svg { transform: translate(2px, -2px); } }

/* Secondary solid: dark, so the orange stays the page's single primary action */
.ct-btn-dark { background: var(--text-primary); color: var(--surface); }
.ct-btn-dark:hover { background: #000; }

.ct-btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}
.ct-btn-ghost:hover { border-color: var(--text-primary); background: rgba(33, 26, 20, 0.04); }

/* Text link with an arrow — the site's "read more" pattern */
.ct-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  color: var(--primary-on-light);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--transition), gap var(--transition);
}
.ct-link::after,
.ct-help-cta::after {
  content: '';
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--transition);
}
.ct-link:hover { text-decoration-color: currentColor; gap: 11px; }

.ct-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  color: var(--text-primary);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ============================================================
   S1 — HERO (dark, compact, key facts on the right)
   ============================================================ */
.ct-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + var(--sp-7)) 0 calc(var(--sp-7) + 64px);
  background: var(--dark-bg);
  color: var(--text-on-dark);
}

.ct-hero-bg { position: absolute; inset: 0; pointer-events: none; }

.ct-hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 30% 40%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 90% at 30% 40%, #000 20%, transparent 75%);
}

.ct-hero-glow {
  position: absolute;
  top: -30%;
  right: -10%;
  width: 60%;
  height: 120%;
  background: radial-gradient(ellipse at center, rgba(255, 90, 31, 0.18) 0%, rgba(255, 90, 31, 0) 65%);
}

.ct-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr);
  align-items: end;
  gap: var(--sp-5) var(--sp-7);
}

.ct-hero-title {
  font-size: clamp(44px, 6vw, 80px);
  font-weight: var(--fw-book);
  letter-spacing: var(--tr-display);
  line-height: 1.02;
  color: var(--text-on-dark);
  text-wrap: balance;
}

.ct-hero-sub {
  max-width: 46ch;
  margin-top: var(--sp-3);
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-muted-on-dark);
  text-wrap: pretty;
}

/* ── Key facts ── */
.ct-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--dark-border-hover);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.ct-fact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px var(--sp-3);
}
.ct-fact:nth-child(odd) { border-right: 1px solid var(--dark-border-hover); }
.ct-fact:nth-child(-n+2) { border-bottom: 1px solid var(--dark-border-hover); }

.ct-fact dt {
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--text-muted-on-dark);
}

.ct-fact dd {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  line-height: 1.35;
  color: var(--text-on-dark);
  overflow-wrap: anywhere;
}

.ct-fact-link {
  /* 44px hit area without moving the line (padding offset by margin) */
  display: inline-block;
  padding-block: 14px;
  margin-block: -14px;
  color: var(--primary-on-dark);
  text-decoration: underline;
  text-decoration-color: rgba(255, 169, 138, 0.4);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--transition);
}
.ct-fact-link:hover { text-decoration-color: currentColor; }

/* ============================================================
   S2 — CONTACT HUB
   The cards start over the hero's bottom edge (negative margin).
   ============================================================ */
.ct-hub {
  position: relative;
  margin-top: -64px;
  padding-bottom: var(--sp-7);
}

.ct-hub-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
}

/* ── Form card ── */
.ct-form-card {
  padding: var(--sp-5);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  /* Warm-tinted shadow: same hue as the page */
  box-shadow: 0 1px 2px rgba(33, 26, 20, 0.04), 0 16px 48px rgba(33, 26, 20, 0.08);
  scroll-margin-top: calc(var(--nav-height) + var(--sp-3));
}

.ct-form-header { margin-bottom: var(--sp-4); }

.ct-form-title {
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: var(--fw-strong);
  letter-spacing: var(--tr-h2);
  line-height: 1.15;
}

.ct-form-subtitle {
  max-width: 54ch;
  margin-top: 8px;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--text-secondary);
}

.ct-form-fields { display: flex; flex-direction: column; gap: 20px; }
.ct-form-fields[hidden] { display: none; }

.ct-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.ct-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.ct-label {
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}

.ct-input,
.ct-select,
.ct-textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--fs-body);      /* 16px: iOS doesn't zoom */
  line-height: 1.5;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ct-input:hover,
.ct-select:hover,
.ct-textarea:hover { border-color: rgba(33, 26, 20, 0.32); }

.ct-input:focus,
.ct-select:focus,
.ct-textarea:focus {
  outline: none;
  border-color: var(--primary-solid);
  box-shadow: 0 0 0 3px rgba(209, 64, 0, 0.16);
}

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

.ct-select-wrap { position: relative; }
.ct-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}
.ct-select:invalid { color: var(--text-secondary); }
.ct-select option { color: var(--text-primary); }
.ct-select-arrow {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

/* Error state: border + written message (colour never carries the meaning alone) */
.ct-input.is-invalid,
.ct-select.is-invalid,
.ct-textarea.is-invalid { border-color: #B3261E; }
.ct-input.is-invalid:focus,
.ct-select.is-invalid:focus,
.ct-textarea.is-invalid:focus { box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.16); }

.ct-error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  color: #B3261E;                 /* 6.1:1 on white */
}
.ct-error::before {
  content: '!';
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #B3261E;
  color: #fff;
  font-size: 11px;
  font-weight: var(--fw-bold);
  line-height: 1;
}
.ct-error[hidden] { display: none; }

.ct-hint {
  font-size: var(--fs-meta);
  line-height: 1.5;
  color: var(--text-secondary);
}

.ct-form-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px var(--sp-3);
  padding-top: 4px;
}

.ct-form-note {
  font-size: var(--fs-meta);
  line-height: 1.5;
  color: var(--text-secondary);
}
.ct-form-note a {
  color: var(--primary-on-light);
  font-weight: var(--fw-bold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Success state ── */
.ct-form-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: var(--sp-3) 0 0;
}
.ct-form-success[hidden] { display: none; }
.ct-form-success:focus { outline: none; }

.ct-success-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--mint-solid);
  color: #fff;
}

.ct-success-title {
  font-size: 24px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--tr-h3);
}

.ct-success-body {
  max-width: 54ch;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text-secondary);
}
.ct-success-body a { color: var(--primary-on-light); font-weight: var(--fw-bold); text-decoration: underline; text-underline-offset: 3px; }

.ct-success-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

.ct-success-note { font-size: var(--fs-meta); color: var(--text-secondary); }

/* ── Channels: one panel, rows separated by hairlines ── */
.ct-channels {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 2px rgba(33, 26, 20, 0.04), 0 16px 48px rgba(33, 26, 20, 0.08);
}

.ct-channel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: var(--sp-4);
}
.ct-channel + .ct-channel { border-top: 1px solid var(--border); }
.ct-channel--featured { background: var(--surface); }

.ct-channel-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.ct-channel-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--border);
  color: var(--primary-on-light);
  flex-shrink: 0;
}

.ct-channel-title {
  font-size: 19px;
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}

.ct-channel-text {
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.ct-channel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px var(--sp-3);
  margin-top: 4px;
}

.ct-email {
  /* 44px hit area without moving the line (padding offset by margin) */
  display: inline-block;
  padding-block: 8px;
  margin-block: -8px;
  font-size: var(--fs-lead);
  font-weight: var(--fw-bold);
  color: var(--primary-on-light);
  text-decoration: underline;
  text-decoration-color: rgba(189, 50, 0, 0.3);
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
  transition: text-decoration-color var(--transition);
}
.ct-email:hover { text-decoration-color: currentColor; }

.ct-address {
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--text-primary);
}

.ct-social {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.ct-social-label {
  margin-right: 4px;
  font-size: var(--fs-meta);
  color: var(--text-secondary);
}

.ct-social-link {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: border-color var(--transition), background var(--transition);
}
.ct-social-link:hover { border-color: var(--border-strong); background: var(--surface); }

/* ============================================================
   S3 — SELF-HELP
   ============================================================ */
.ct-help {
  padding: var(--sp-7) 0 var(--sp-8);
  background: var(--surface-subtle);
}

.ct-help-head { margin-bottom: var(--sp-4); }

.ct-help-title {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: var(--fw-strong);
  letter-spacing: var(--tr-h2);
  line-height: 1.12;
  text-wrap: balance;
}

.ct-help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
}

.ct-help-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  height: 100%;
  padding: var(--sp-4);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 2px rgba(33, 26, 20, 0.04), 0 12px 32px rgba(33, 26, 20, 0.05);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
@media (hover: hover) and (pointer: fine) {
  .ct-help-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: 0 1px 2px rgba(33, 26, 20, 0.04), 0 24px 56px rgba(33, 26, 20, 0.1);
  }
}

.ct-help-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary-on-light);
}

.ct-help-name {
  font-size: 19px;
  font-weight: var(--fw-bold);
  line-height: 1.3;
  color: var(--text-primary);
}

.ct-help-text {
  flex: 1;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--text-secondary);
}

.ct-help-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  color: var(--primary-on-light);
}
@media (hover: hover) and (pointer: fine) { .ct-help-card:hover .ct-help-cta::after { transform: translateX(3px); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .ct-hero-inner,
  .ct-hub-inner { grid-template-columns: minmax(0, 1fr); }
  .ct-hub-inner { max-width: 720px; }
  .ct-help-grid { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
}

@media (max-width: 560px) {
  .ct-hero { padding-top: calc(var(--nav-height) + var(--sp-5)); }
  .ct-facts { grid-template-columns: minmax(0, 1fr); }
  .ct-fact:nth-child(odd) { border-right: 0; }
  .ct-fact:not(:last-child) { border-bottom: 1px solid var(--dark-border-hover); }
  .ct-form-card { padding: var(--sp-3); }
  .ct-form-row { grid-template-columns: minmax(0, 1fr); }
  .ct-form-footer .ct-btn-primary,
  .ct-success-actions > * { width: 100%; }
  .ct-channel { padding: var(--sp-3); }
  .ct-help-card { padding: var(--sp-3); }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .ct-help-card,
  .ct-link,
  .ct-btn-primary svg,
  .ct-help-cta::after { transition: none; }
  @media (hover: hover) and (pointer: fine) { .ct-help-card:hover { transform: none; } }
}
