/* ===================================================================
   CONTACT PAGE — scoped under .contact-page
   Tokens inherited in spirit from base.css (navy #242c5a / red #e5212d,
   Roboto + Space Grotesk) but namespaced locally so this file can never
   bleed into or be overridden by page.css / hub.css rules.
=================================================================== */

.contact-page {
  --cp-navy: #242c5a;
  --cp-navy-deep: #171c3e;
  --cp-red: #e5212d;
  --cp-ink: #23283a;
  --cp-ink-soft: #5b6072;
  --cp-line: #e2e3ec;
  --cp-paper: #ffffff;
  --cp-bg: #f7f7fb;
  --cp-radius: 3px;
  color: var(--cp-ink);
}

.contact-page * { box-sizing: border-box; }

/* ---------- Intro band ---------- */
.contact-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(36,44,90,0.93) 0%, rgba(23,28,62,0.93) 100%), url('https://www.ketencilaw.com/gardenya.jpeg') center center / cover no-repeat;
  padding: 52px 0 60px;
}

.contact-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.contact-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 22px;
}

.contact-crumb a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}

.contact-crumb a:hover { color: #fff; }

.contact-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 46px);
  line-height: 1.12;
  color: #fff;
  margin: 0 0 16px;
  max-width: 14ch;
}

.contact-hero h1 em {
  font-style: normal;
  color: var(--cp-red);
}

.contact-hero p {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,0.72);
  max-width: 56ch;
  margin: 0;
}

/* ---------- Layout ---------- */
.contact-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 70px;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.contact-rail {
  padding-top: 6px;
}

.contact-panel {
  background: var(--cp-paper);
  border: 1px solid var(--cp-line);
  border-radius: 6px;
  padding: 44px 44px 40px;
  box-shadow: 0 30px 70px -36px rgba(23, 28, 62, 0.22);
}

/* ---------- Rail: direct channels ---------- */
.contact-block { margin-bottom: 0; }

.contact-block-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cp-ink-soft);
  margin: 0 0 20px;
}

.contact-channel {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--cp-line);
  text-decoration: none;
  color: var(--cp-ink);
}

.contact-channel:first-of-type { border-top: none; padding-top: 0; }

.contact-channel svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--cp-red);
}

.contact-channel-label {
  display: block;
  font-size: 11.5px;
  color: var(--cp-ink-soft);
  margin-bottom: 3px;
}

.contact-channel-value {
  display: block;
  font-size: 15.5px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.contact-channel:hover .contact-channel-value { color: var(--cp-red); }

.contact-rail-divider {
  height: 1px;
  background: var(--cp-line);
  margin: 36px 0;
}

/* ---------- Rail: corrections note ---------- */
.contact-correction {
  border-left: 3px solid var(--cp-red);
  padding: 4px 0 4px 20px;
}

.contact-correction h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--cp-navy);
}

.contact-correction p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--cp-ink-soft);
  margin: 0;
}

/* ---------- Form panel ---------- */
.contact-panel h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 21px;
  font-weight: 500;
  color: var(--cp-navy);
  margin: 0 0 6px;
}

.contact-panel-sub {
  font-size: 14px;
  color: var(--cp-ink-soft);
  margin: 0 0 28px;
}

.cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.cf-group {
  margin-bottom: 20px;
  position: relative;
}

.cf-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--cp-ink);
  margin-bottom: 7px;
}

.cf-group .cf-optional {
  font-weight: 400;
  color: var(--cp-ink-soft);
}

.cf-group input,
.cf-group select,
.cf-group textarea {
  width: 100%;
  border: 1px solid var(--cp-line);
  border-radius: var(--cp-radius);
  background: var(--cp-paper);
  padding: 13px 14px;
  font-family: 'Roboto', sans-serif;
  font-size: 14.5px;
  color: var(--cp-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cf-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b6072' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.cf-group textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

.cf-group input::placeholder,
.cf-group textarea::placeholder { color: #a6a9b8; }

.cf-group input:focus,
.cf-group select:focus,
.cf-group textarea:focus {
  outline: none;
  border-color: var(--cp-navy);
  box-shadow: 0 0 0 3px rgba(36, 44, 90, 0.1);
}

.cf-group.cf-error input,
.cf-group.cf-error select,
.cf-group.cf-error textarea {
  border-color: var(--cp-red);
}

.cf-group.cf-error:focus-within {
  box-shadow: 0 0 0 3px rgba(229, 33, 45, 0.1);
}

.cf-errmsg {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--cp-red);
  margin-top: 7px;
}

.cf-group.cf-error .cf-errmsg { display: flex; }

.cf-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--cp-red);
  color: #fff;
  border: none;
  border-radius: var(--cp-radius);
  padding: 14px 30px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.cf-submit:hover { background: #c81c27; }
.cf-submit:active { transform: translateY(1px); }

.cf-submit:disabled {
  background: #b9bccb;
  cursor: not-allowed;
}

.cf-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: cf-spin 0.7s linear infinite;
}

.cf-submit.cf-loading .cf-spinner { display: inline-block; }
.cf-submit.cf-loading .cf-submit-label { display: none; }

@keyframes cf-spin { to { transform: rotate(360deg); } }

.cf-privacy {
  font-size: 12.5px;
  color: var(--cp-ink-soft);
  margin-top: 16px;
  line-height: 1.6;
}

.cf-privacy a { color: var(--cp-ink-soft); text-decoration: underline; }
.cf-privacy a:hover { color: var(--cp-red); }

/* ---------- Success / failure states ---------- */
.cf-status {
  display: none;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 24px;
  border-radius: var(--cp-radius);
  margin-bottom: 24px;
}

.cf-status.cf-status-active { display: flex; }

.cf-status svg { flex-shrink: 0; margin-top: 2px; }

.cf-status-success {
  background: #f0f6f1;
  border: 1px solid #cfe3d2;
}

.cf-status-success svg { color: #2f8a3f; }
.cf-status-success strong { color: #1f5c2b; }

.cf-status-failure {
  background: #fbeeee;
  border: 1px solid #f1c9c9;
}

.cf-status-failure svg { color: var(--cp-red); }
.cf-status-failure strong { color: #9c1c25; }

.cf-status strong {
  display: block;
  font-size: 14.5px;
  margin-bottom: 3px;
}

.cf-status p {
  font-size: 13.5px;
  color: var(--cp-ink-soft);
  margin: 0;
  line-height: 1.55;
}

.contact-form.cf-hidden { display: none; }

/* ---------- Office / directions section ---------- */
.contact-office {
  background: var(--cp-bg);
  padding: 70px 0 80px;
}

.contact-office-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.contact-office-head { max-width: 62ch; margin-bottom: 36px; }

.contact-office-head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(24px, 3vw, 30px);
  color: var(--cp-navy);
  margin: 6px 0 12px;
}

.contact-office-head p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--cp-ink-soft);
  margin: 0;
}

.office-media {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0;
  margin-bottom: 28px;
  border-radius: var(--cp-radius);
  overflow: hidden;
  border: 1px solid var(--cp-line);
}

.office-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 260px;
}

.office-address-card {
  background: var(--cp-navy);
  color: #fff;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.office-address-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 12px;
}

.office-address-card p {
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(255,255,255,0.78);
  margin: 0 0 18px;
}

.office-address-link {
  display: block;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.16);
}

.office-address-link:first-of-type { border-top: none; }
.office-address-link:hover { color: #ff8f95; }

.office-map {
  border-radius: var(--cp-radius);
  overflow: hidden;
  border: 1px solid var(--cp-line);
  margin-bottom: 40px;
  line-height: 0;
}

.office-map iframe {
  width: 100%;
  height: 380px;
  border: 0;
  display: block;
}

.office-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--cp-line);
  border: 1px solid var(--cp-line);
  border-radius: var(--cp-radius);
  overflow: hidden;
}

.office-fact {
  background: var(--cp-paper);
  padding: 24px;
}

.office-fact h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--cp-navy);
  margin: 0 0 8px;
}

.office-fact p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--cp-ink-soft);
  margin: 0;
}

.office-fact a { color: var(--cp-ink-soft); text-decoration: underline; }
.office-fact a:hover { color: var(--cp-red); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 44px;
  }
  .contact-panel { padding: 32px 26px; }
  .contact-hero { padding: 40px 0 46px; }
  .office-media { grid-template-columns: 1fr; }
  .office-media img { min-height: 220px; }
  .office-facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .cf-row { grid-template-columns: 1fr; gap: 0; }
  .contact-hero-inner, .contact-wrap, .contact-office-inner { padding-left: 16px; padding-right: 16px; }
  .contact-panel { padding: 26px 20px; }
  .office-facts { grid-template-columns: 1fr; }
  .office-map iframe { height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  .cf-spinner { animation: none; }
  .cf-submit, .contact-channel-value, .contact-index-num, .contact-index-body strong { transition: none; }
}
