/* ==========================================================
   contact.css — Candid Health Contact page
   Supplemental CSS for the CodeIgniter contact view.
   All variables (--blue, --red, --grey-*, etc.) and base
   resets already exist in style.css.  No duplicates here.
   ========================================================== */

/* ── Shared page animation helpers ── */
@keyframes gridSlide  { 0%{transform:translate(0,0);}  100%{transform:translate(80px,80px);} }
@keyframes lineAnim   { to { transform:scaleY(1); } }
@keyframes fadeUp     { from{opacity:0;transform:translateY(20px);} to{opacity:1;transform:translateY(0);} }
@keyframes slideUp    { from{transform:translateY(110%);} to{transform:translateY(0);} }

/* ── Section label (shared class if not already in style.css) ── */
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; letter-spacing: .2em;
  text-transform: uppercase; color: var(--grey-400);
  margin-bottom: 20px;
}
.section-label::before { content:""; width:24px; height:1px; background:var(--red); flex-shrink:0; }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 4.5vw, 62px);
  letter-spacing: -.03em; line-height: 1.05;
  color: var(--black);
}

.reveal { opacity:0; transform:translateY(36px); transition:all .85s cubic-bezier(.16,1,.3,1); }
.reveal.visible { opacity:1; transform:translateY(0); }


/* ══════════════════════════════════════════════════
   FOLD 1 — HERO / FORM
   ══════════════════════════════════════════════════ */
.contact-hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  position: relative; overflow: hidden;
  align-items: center;
  padding-top: 80px;
  background: var(--white);
}

/* ── Left panel ── */
.contact-left {
  background: var(--white);
  padding: 50px 64px 40px 64px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.contact-left-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  animation: gridSlide 28s linear infinite;
}
.contact-left-line {
  position: absolute; left:0; top:0;
  width: 3px; height: 100%;
  background: linear-gradient(to bottom, transparent, var(--red) 30%, var(--blue) 70%, transparent);
  opacity: .5; transform: scaleY(0); transform-origin: top;
  animation: lineAnim 1.2s .3s cubic-bezier(.16,1,.3,1) forwards;
}
.contact-left-wash {
  position: absolute; inset: 0;
}
.contact-left-content { position: relative; z-index: 2; }

/* breadcrumb / overline */
.contact-breadcrumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--grey-400); margin-bottom: 18px;
  opacity: 0; animation: fadeUp .6s .4s ease forwards;
}
.contact-breadcrumb::before { content:""; width:24px; height:1px; background:var(--red); }
.contact-breadcrumb a { color:var(--grey-400); text-decoration:none; transition:color .3s; }
.contact-breadcrumb a:hover { color:var(--blue); }

/* heading */
.contact-h1 {
  font-family: var(--font-display); font-weight: 750;
  font-size: clamp(38px, 4.5vw, 76px);
  line-height: .95; letter-spacing: -.04em; color: var(--black);
  margin-bottom: 24px;
}
.contact-h1 .line { display: block; overflow: hidden; }
.contact-h1 .line-inner {
  display: block; transform: translateY(110%);
  animation: slideUp 1s cubic-bezier(.16,1,.3,1) forwards;
}
.contact-h1 .line:nth-child(1) .line-inner { animation-delay: .5s; }
.contact-h1 .line:nth-child(2) .line-inner { animation-delay: .65s; }
.contact-h1 .red  { color: var(--red); }

/* sub-text */
.contact-sub {
  font-size: 15px; font-weight: 300; color: var(--grey-400);
  line-height: 1.7;
  opacity: 0; animation: fadeUp .8s 1.0s ease forwards;
}

/* ── Contact detail rows ── */
.contact-details {
  margin-top: 28px; display: flex; flex-direction: column; gap: 1px;
  background: var(--grey-100);
  opacity: 0; animation: fadeUp .8s 1.2s ease forwards;
}
.contact-detail-row {
  background: var(--white); padding: 16px 20px;
  display: flex; align-items: flex-start; gap: 14px;
  border-left: 2px solid transparent;
  transition: all .3s ease; text-decoration: none;
}
.contact-detail-row:hover { background: var(--off-white); border-left-color: var(--blue); }
.detail-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--blue-subtle); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .3s;
}
.contact-detail-row:hover .detail-icon { background: var(--blue); }
.detail-icon svg { width: 16px; height: 16px; color: var(--blue); transition: color .3s; }
.contact-detail-row:hover .detail-icon svg { color: var(--white); }
.detail-text { display: flex; flex-direction: column; gap: 2px; }
.detail-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--grey-200); }
.detail-value { font-size: 14px; font-weight: 500; color: var(--black); line-height: 1.45; }
.detail-sub   { font-size: 12px; color: var(--grey-400); line-height: 1.4; margin-top: 2px; }

/* ── Social row ── */
.social-row {
  margin-top: 20px; display: flex; align-items: center; gap: 10px;
  opacity: 0; animation: fadeUp .8s 1.4s ease forwards;
}
.social-label {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--grey-200); margin-right: 4px;
}
.social-link {
  width: 38px; height: 38px;
  border: 1px solid var(--grey-100); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--grey-400); text-decoration: none;
  transition: all .3s ease;
}
.social-link:hover { background: var(--blue); border-color: var(--blue); color: var(--white); transform: translateY(-2px); }
.social-link svg { width: 16px; height: 16px; }

/* ── Right panel (form) ── */
.contact-right {
  background: var(--white);
  padding: 50px 62px 40px 62px;
  display: flex; flex-direction: column; justify-content: center;
  border-left: 1px solid var(--grey-100);
  position: relative; overflow: hidden;
}
.contact-right-wash {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 90% 20%, rgba(22,61,100,.04) 0%, transparent 65%);
}
.form-wrap { position: relative; z-index: 2; }

.form-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; letter-spacing: -.02em; color: var(--black);
  margin-bottom: 24px; line-height: 1.3;
  opacity: 0; animation: fadeUp .7s .75s ease forwards;
}

/* role selector label */
.role-selector-label {
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--grey-400); margin-bottom: 12px; display: block;
  opacity: 0; animation: fadeUp .7s .85s ease forwards;
}

/* role selector grid */
.role-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  padding-bottom: 10px; margin-bottom: 28px;
  opacity: 0; animation: fadeUp .7s .9s ease forwards;
}
.role-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid rgba(22,61,100,.08);
  transition: all .25s ease; width: 100%; text-align: left;
}
.role-option:hover { background: var(--off-white); }
.role-option.selected { background: var(--white); border-color: rgba(22,61,100,.2); }
.role-radio {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1.5px solid var(--grey-200); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s ease; background: var(--white);
}
.role-option.selected .role-radio { border-color: var(--blue); background: var(--blue); }
.role-radio-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--white); opacity: 0; transform: scale(0);
  transition: all .2s ease;
}
.role-option.selected .role-radio-dot { opacity: 1; transform: scale(1); }
.role-text { font-size: 14px; font-weight: 500; color: var(--grey-600); line-height: 1.4; transition: color .25s; }
.role-option.selected .role-text { color: var(--black); }

/* ── Form grid ── */
.form-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px;
  margin-bottom: 12px;
  opacity: 0; animation: fadeUp .7s 1.05s ease forwards;
}
.form-group        { display: flex; flex-direction: column; gap: 6px; }
.form-group.full   { grid-column: 1 / -1; }
.form-label        { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--grey-400); }
.form-label span   { color: var(--red); }

.form-input,
.form-textarea,
.form-select {
  width: 100%; padding: 12px 16px;
  background: var(--white); border: 1px solid var(--grey-100); border-radius: 0;
  font-family: var(--font-body); font-size: 14px; color: var(--black);
  transition: all .3s ease; outline: none; appearance: none; -webkit-appearance: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--grey-200); }
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22,61,100,.07);
}
.form-textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888680' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 40px;
}

/* ── Submit row ── */
.form-submit-row {
  display: flex; flex-direction: column; gap: 14px; margin-top: 8px;
  opacity: 0; animation: fadeUp .7s 1.2s ease forwards;
}
.btn-submit {
  width: 100%; padding: 15px 32px;
  background: var(--blue); color: var(--white);
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  letter-spacing: .04em; border: none;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all .3s ease; position: relative; overflow: hidden;
}
.btn-submit::before {
  content: ""; position: absolute; inset: 0;
  background: var(--red); transform: translateX(-100%);
  transition: transform .4s cubic-bezier(.16,1,.3,1);
}
.btn-submit:hover::before { transform: translateX(0); }
.btn-submit span,
.btn-submit svg   { position: relative; z-index: 1; }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(22,61,100,.2); }

.form-disclaimer {
  font-size: 12px; color: var(--grey-400); line-height: 1.65;
  padding: 14px 16px;
  background: rgba(223,44,38,.04);
  border-left: 2px solid rgba(223,44,38,.25);
}
.form-disclaimer strong { color: var(--grey-600); }

/* ── Success state ── */
.form-success {
  display: none; flex-direction: column; align-items: center;
  text-align: center; padding: 60px 40px; gap: 16px;
}
.form-success.show { display: flex; }
.success-icon {
  width: 64px; height: 64px;
  background: var(--blue-subtle);
  border: 1px solid rgba(22,61,100,.15); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.success-icon svg  { width: 28px; height: 28px; color: var(--blue); }
.success-title     { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--black); letter-spacing: -.02em; }
.success-sub       { font-size: 15px; color: var(--grey-400); line-height: 1.7; max-width: 320px; }


/* ══════════════════════════════════════════════════
   FOLD 2 — OFFICE & MAP
   ══════════════════════════════════════════════════ */
.office-section { background: var(--white); padding: 120px 56px; }
.office-inner   { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }

.office-body {
  font-size: 17px; font-weight: 300; color: var(--grey-600);
  line-height: 1.85; margin-top: 20px;
}
.office-cards {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--grey-100); margin-top: 8px;
}
.office-card {
  background: var(--white); padding: 28px 32px;
  display: flex; align-items: flex-start; gap: 18px;
  border-left: 2px solid transparent;
  transition: all .3s ease; text-decoration: none;
}
.office-card:hover { background: var(--off-white); border-left-color: var(--red); }
.office-card-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--blue-subtle); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .3s;
}
.office-card:hover .office-card-icon { background: var(--blue); }
.office-card-icon svg { width: 18px; height: 18px; color: var(--blue); transition: color .3s; }
.office-card:hover .office-card-icon svg { color: var(--white); }
.office-card-body  { flex: 1; }
.office-card-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--grey-200); margin-bottom: 6px; }
.office-card-value { font-size: 16px; font-weight: 500; color: var(--black); line-height: 1.55; }
.office-card-value a { color: var(--blue); text-decoration: none; transition: color .3s; }
.office-card-value a:hover { color: var(--red); }

/* Map */
.map-wrap {
  position: relative; overflow: hidden;
  background: var(--off-white); border: 1px solid var(--grey-100);
  height: 380px;
}
.map-wrap iframe { width: 100%; height: 100%; border: none; filter: grayscale(20%) contrast(1.02); }
.map-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 24px; pointer-events: none;
}
.map-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--grey-100);
  padding: 10px 16px;
  font-size: 13px; font-weight: 600; color: var(--black);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.map-tag::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--red); }
.map-directions {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue); text-decoration: none;
  background: var(--white); border: 1px solid var(--grey-100);
  padding: 10px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  transition: all .3s; pointer-events: all;
}
.map-directions:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }
.map-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }


/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */

/* Tablet ≤ 1024px */
@media (max-width: 1024px) {
  .contact-hero { grid-template-columns: 1fr !important; min-height: auto !important; }
  .contact-left  { padding: 100px 40px 44px 40px !important; }
  .contact-right {
    padding: 44px 40px !important;
    border-left: none !important;
    border-top: 1px solid var(--grey-100) !important;
  }
  .contact-h1 { font-size: clamp(36px, 5.5vw, 60px) !important; }
  .contact-sub { max-width: 100%; }
  .form-grid   { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .role-selector { grid-template-columns: 1fr 1fr !important; }
  .office-inner  { grid-template-columns: 1fr !important; gap: 48px !important; }
  .office-section { padding: 80px 32px !important; }
  .map-wrap  { height: 300px !important; }
  .section-title { font-size: clamp(28px, 4vw, 48px); }
}

/* Mobile ≤ 768px */
@media (max-width: 768px) {
  .contact-hero { grid-template-columns: 1fr !important; min-height: auto !important; }
  .contact-left  { padding: 88px 20px 36px 20px !important; }
  .contact-right { padding: 32px 20px 36px 20px !important; border-left: none !important; border-top: 1px solid var(--grey-100) !important; }
  .contact-h1    { font-size: clamp(28px, 8vw, 48px) !important; line-height: 1.05; }
  .contact-sub   { font-size: 14px !important; max-width: 100%; }
  .contact-details { margin-top: 20px; }
  .contact-detail-row { padding: 14px 16px; gap: 12px; }
  .detail-icon   { width: 32px; height: 32px; }
  .detail-value  { font-size: 13px; }
  .detail-label  { font-size: 10px; }
  .social-row    { margin-top: 16px; flex-wrap: wrap; }
  .form-title    { font-size: 17px !important; margin-bottom: 16px; }
  .form-grid     { grid-template-columns: 1fr !important; }
  .role-selector { grid-template-columns: 1fr !important; gap: 8px !important; }
  .role-option   { padding: 10px 12px; }
  .role-text     { font-size: 13px; }
  .form-input,
  .form-textarea,
  .form-select   { font-size: 16px; padding: 10px 14px; }
  .form-textarea { min-height: 70px; }
  .btn-submit    { padding: 14px 24px; font-size: 14px; }
  .form-disclaimer { font-size: 11px; padding: 12px 14px; }
  .office-section { padding: 56px 20px !important; }
  .office-inner   { grid-template-columns: 1fr !important; gap: 32px !important; }
  .office-body    { font-size: 15px; }
  .office-card    { padding: 22px 20px; gap: 14px; }
  .office-card-icon  { width: 34px; height: 34px; }
  .office-card-value { font-size: 14px; }
  .map-wrap   { height: 240px !important; }
  .section-title { font-size: clamp(22px, 6vw, 36px) !important; }
  .section-label { font-size: 11px !important; }
}

/* Small mobile ≤ 480px */
@media (max-width: 480px) {
  .contact-left  { padding: 80px 16px 28px 16px !important; }
  .contact-right { padding: 24px 16px 28px 16px !important; }
  .contact-h1    { font-size: clamp(24px, 7.5vw, 36px) !important; }
  .office-section { padding: 48px 16px !important; }
  .section-title  { font-size: clamp(20px, 6vw, 28px) !important; }
  .office-card    { padding: 18px 16px; }
}

/* Touch: remove stuck hovers */
@media (hover: none) {
  .contact-detail-row:hover,
  .office-card:hover { background: inherit; border-left-color: transparent; }
  .btn-submit:hover  { transform: none; box-shadow: none; }
}
