/* ============================================================
   WhiteStudio.team — Contact us (page-specific styles)
   Builds on styles.css (brand tokens, nav, footer, buttons)
   ============================================================ */

/* ---------- Hero ---------- */
.contact-hero {
  padding: 64px 0 40px;
  background:
    radial-gradient(ellipse 760px 380px at 82% -8%, rgba(101, 46, 186, 0.14), transparent 60%),
    radial-gradient(ellipse 560px 300px at 12% 108%, rgba(255, 75, 147, 0.10), transparent 60%),
    var(--surface);
  position: relative;
  overflow: hidden;
}
.contact-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 72%);
  opacity: 0.32;
  pointer-events: none;
}
.contact-hero > .container { position: relative; z-index: 1; }
.contact-hero h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 16px 0 16px;
  max-width: 18ch;
}
.contact-hero h1 em {
  font-style: normal;
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.contact-hero .lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 560px;
  margin: 0;
}

/* ---------- Layout ---------- */
.contact-layout {
  padding-bottom: 96px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  align-items: start;
}

/* ---------- Form card ---------- */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.contact-card-head {
  margin-bottom: 24px;
}
.contact-card-head h2 {
  font-size: 24px;
  margin: 0 0 6px;
  font-weight: 600;
}
.contact-card-head p {
  font-size: 14.5px;
  margin: 0;
  color: var(--ink-3);
}

/* ---------- Form fields ---------- */
.cf-form { display: block; }
.cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cf-group {
  margin-bottom: 18px;
}
.cf-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-1);
  margin-bottom: 7px;
}
.cf-group label .req { color: var(--danger); margin-left: 2px; font-weight: 700; }
.cf-group .hint {
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 6px;
}
.cf-input,
.cf-textarea,
.cf-select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  font: 15px var(--bs-body-font-family);
  color: var(--ink-1);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.cf-input::placeholder, .cf-textarea::placeholder { color: #b0b6c6; }
.cf-input:focus, .cf-textarea:focus, .cf-select:focus {
  border-color: var(--brand-purple);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(101, 46, 186, 0.1);
}
.cf-textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.cf-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a93a8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Validation state */
.cf-group.invalid .cf-input,
.cf-group.invalid .cf-textarea,
.cf-group.invalid .cf-select {
  border-color: var(--danger);
  background: color-mix(in oklab, var(--danger) 5%, var(--surface));
}
.cf-group.invalid .cf-input:focus,
.cf-group.invalid .cf-textarea:focus,
.cf-group.invalid .cf-select:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.cf-error {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--danger);
  font-weight: 500;
  margin-top: 7px;
}
.cf-error svg { width: 14px; height: 14px; flex: none; }
.cf-group.invalid .cf-error { display: flex; }

/* Topic chips */
.cf-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cf-topic {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.cf-topic:hover { border-color: var(--brand-purple); color: var(--brand-purple); }
.cf-topic input { position: absolute; opacity: 0; pointer-events: none; }
.cf-topic.checked {
  background: var(--accent-soft);
  border-color: var(--brand-purple);
  color: var(--accent-ink);
  font-weight: 600;
}
.cf-topic .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-4);
  transition: background .15s ease;
}
.cf-topic.checked .dot { background: var(--brand-purple); }

/* Consent */
.cf-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  margin: 4px 0 22px;
  line-height: 1.5;
}
.cf-consent input {
  appearance: none;
  flex: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  margin-top: 1px;
  position: relative;
  transition: all .15s ease;
}
.cf-consent input:checked {
  background: var(--brand-purple);
  border-color: var(--brand-purple);
}
.cf-consent input:checked::after {
  content: "";
  position: absolute;
  left: 5px; top: 2px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.cf-consent a { font-weight: 600; }

/* Submit */
.cf-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.cf-submit .spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: cf-spin .7s linear infinite;
}
.cf-form.sending .cf-submit .spinner { display: inline-block; }
.cf-form.sending .cf-submit .label { opacity: 0.85; }
@keyframes cf-spin { to { transform: rotate(360deg); } }

.cf-foot-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-4);
  margin: 14px 0 0;
}

/* ---------- Success state (replaces the form in place) ---------- */
.contact-success {
  display: none;
  text-align: center;
  padding: 26px 8px 12px;
  animation: cf-rise .45s cubic-bezier(.34,1.4,.5,1) both;
}
.contact-card.done .cf-shell { display: none; }
.contact-card.done .contact-success { display: block; }

@keyframes cf-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cs-badge {
  width: 76px; height: 76px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 16px 40px rgba(101, 46, 186, 0.4);
  position: relative;
}
.cs-badge svg { width: 38px; height: 38px; }
.cs-badge svg path { stroke-dasharray: 28; stroke-dashoffset: 28; animation: cf-check .5s .25s ease forwards; }
@keyframes cf-check { to { stroke-dashoffset: 0; } }
.cs-badge::after {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--brand-purple);
  opacity: 0;
  animation: cf-ring .8s .15s ease-out forwards;
}
@keyframes cf-ring {
  0%   { opacity: .5; transform: scale(.9); }
  100% { opacity: 0;  transform: scale(1.35); }
}

.contact-success h2 {
  font-size: 27px;
  margin: 0 0 10px;
  font-weight: 600;
}
.contact-success > p {
  font-size: 15.5px;
  color: var(--ink-3);
  max-width: 420px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.contact-success .feat-name { color: var(--brand-purple); font-weight: 700; }

/* Summary receipt */
.cs-receipt {
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  max-width: 460px;
  margin: 0 auto 24px;
}
.cs-receipt .r-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
}
.cs-receipt .r-row:last-child { border-bottom: 0; }
.cs-receipt .r-row .k {
  color: var(--ink-4);
  font-weight: 600;
  flex: none;
}
.cs-receipt .r-row .v {
  color: var(--ink-1);
  text-align: right;
  font-weight: 500;
  word-break: break-word;
}
.cs-receipt .r-row .v.ticket {
  font-family: ui-monospace, 'SF Mono', monospace;
  color: var(--brand-purple);
}

.cs-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.cs-meta svg { width: 15px; height: 15px; color: var(--brand-purple); }

.cs-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Aside: contact channels ---------- */
.contact-aside { display: flex; flex-direction: column; gap: 18px; }

.channel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.channel-card h3 {
  font-size: 16px;
  margin: 0 0 4px;
  font-weight: 600;
}
.channel-card > p {
  font-size: 13.5px;
  color: var(--ink-3);
  margin: 0 0 18px;
}
.channel {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line-2);
  text-decoration: none;
}
.channel:first-of-type { border-top: 0; padding-top: 4px; }
.channel .c-ic {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.channel:hover .c-ic { background: var(--brand-purple); color: #fff; }
.channel .c-ic svg { width: 20px; height: 20px; }
.channel .c-body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--ink-1);
  font-weight: 600;
  line-height: 1.3;
}
.channel .c-body span {
  font-size: 13px;
  color: var(--ink-4);
  line-height: 1.45;
}
.channel:hover .c-body strong { color: var(--brand-purple); }

/* Response time / hours card */
.hours-card {
  background: var(--ink-1);
  color: #fff;
  border: 1px solid var(--ink-1);
  border-radius: var(--radius-lg);
  padding: 24px;
}
[data-theme="dark"] .hours-card { background: var(--surface-3); border-color: var(--line); }
.hours-card h3 { color: #fff; font-size: 16px; margin: 0 0 16px; font-weight: 600; }
.hours-card .h-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 13.5px;
  color: #cdd5e6;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hours-card .h-row:first-of-type { border-top: 0; }
.hours-card .h-row .v { color: #fff; font-weight: 600; }
.hours-card .h-live {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 16px;
  font-size: 12.5px;
  color: #b8f5c8;
}
.hours-card .h-live .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #28c840;
  box-shadow: 0 0 0 0 rgba(40, 200, 64, 0.6);
  animation: cf-pulse 2s infinite;
}
@keyframes cf-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(40, 200, 64, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(40, 200, 64, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 200, 64, 0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside { order: -1; }
  .contact-aside { flex-direction: row; flex-wrap: wrap; }
  .contact-aside > * { flex: 1 1 280px; }
}
@media (max-width: 575px) {
  .contact-card { padding: 22px; }
  .cf-row { grid-template-columns: 1fr; gap: 0; }
  .contact-aside { flex-direction: column; }
}
