/* =====================================================================
   Contact page — get in touch
   Builds on the shared theme in styles.css (variables, header, footer).
   ===================================================================== */

.contact-page {
  --ct-accent: #ff9300;
}

.ct-shell {
  margin-inline: auto;
  max-width: var(--content-width);
  padding-inline: var(--page-pad);
  width: 100%;
}

/* ---------- Main layout ---------- */
.ct-main {
  margin-inline: auto;
  max-width: var(--content-width);
  padding: clamp(1.75rem, 4vw, 3.5rem) var(--page-pad) clamp(3rem, 6vw, 5rem);
  position: relative;
  width: 100%;
}

/* Full-screen dot matrix — fixed behind everything, including the header. */
body:has(.contact-page)::before {
  background-image: radial-gradient(circle, rgba(247, 244, 238, 0.22) 1px, transparent 1.55px);
  background-position: center;
  background-size: 14px 14px;
  content: "";
  inset: 0;
  -webkit-mask-image: radial-gradient(140% 120% at 50% 0%, #000 0%, rgba(0, 0, 0, 0.6) 55%, transparent 100%);
  mask-image: radial-gradient(140% 120% at 50% 0%, #000 0%, rgba(0, 0, 0, 0.6) 55%, transparent 100%);
  opacity: 0.5;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

/* Cursor-follow glow — accent dots light up in a pool around the pointer. */
body:has(.contact-page)::after {
  background-image: radial-gradient(circle, var(--dot-accent, #ff9300) 1.45px, transparent 2px);
  background-position: center;
  background-size: 14px 14px;
  content: "";
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--dot-accent, #ff9300) 55%, transparent));
  inset: 0;
  -webkit-mask-image: radial-gradient(circle 15rem at var(--dot-x, 50%) var(--dot-y, 50%), #000 0%, rgba(0, 0, 0, 0.94) 30%, transparent 70%);
  mask-image: radial-gradient(circle 15rem at var(--dot-x, 50%) var(--dot-y, 50%), #000 0%, rgba(0, 0, 0, 0.94) 30%, transparent 70%);
  opacity: var(--dot-hover-opacity, 0);
  pointer-events: none;
  position: fixed;
  transition: opacity 220ms ease;
  z-index: -1;
}

body.dot-pointer-active {
  --dot-hover-opacity: 0.4;
}

/* Touch devices have no cursor — drift the dot glow automatically, like the home hero.
   A linear, near-circular path keeps the motion smooth instead of cornering squarely. */
@media (hover: none) {
  body:has(.contact-page) {
    animation: dotDrift 26s linear infinite;
    --dot-hover-opacity: 0.78;
    --dot-accent: #ff9300;
  }
}

@keyframes dotDrift {
  0%    { --dot-x: 78%; --dot-y: 50%; }
  12.5% { --dot-x: 70%; --dot-y: 70%; }
  25%   { --dot-x: 50%; --dot-y: 78%; }
  37.5% { --dot-x: 30%; --dot-y: 70%; }
  50%   { --dot-x: 22%; --dot-y: 50%; }
  62.5% { --dot-x: 30%; --dot-y: 30%; }
  75%   { --dot-x: 50%; --dot-y: 22%; }
  87.5% { --dot-x: 70%; --dot-y: 30%; }
  100%  { --dot-x: 78%; --dot-y: 50%; }
}

.ct-grid {
  align-items: start;
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: 0.92fr 1.08fr;
  grid-template-areas:
    "aside form"
    "faq   form";
}

.ct-aside { grid-area: aside; }
.ct-faq { grid-area: faq; }

/* ---------- Aside: intro + contact methods ---------- */
.ct-kicker {
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 600;
  gap: 0.5rem;
  letter-spacing: 0.16em;
  padding: 0.4rem 0.9rem;
  text-transform: uppercase;
}

.ct-kicker i { color: var(--ct-accent); }

.ct-aside h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
  max-width: 15ch;
}

.ct-intro {
  color: var(--muted);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  line-height: 1.6;
  margin: 0.9rem 0 0;
  max-width: 42ch;
}

/* ---------- Aside (contact methods) ---------- */
.ct-status {
  align-items: center;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 999px;
  color: #aef0c4;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 600;
  gap: 0.55rem;
  margin-top: 1.6rem;
  padding: 0.5rem 0.95rem;
}

.ct-status .dot {
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  height: 0.55rem;
  position: relative;
  width: 0.55rem;
}

.ct-status .dot::after {
  animation: ct-ping 2s ease-out infinite;
  background: #4ade80;
  border-radius: 50%;
  content: "";
  inset: 0;
  position: absolute;
}

.ct-methods {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.ct-method {
  align-items: center;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--ink);
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  position: relative;
  text-decoration: none;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), border-color 240ms ease, background 240ms ease;
}

.ct-method:hover {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateX(4px);
}

.ct-method-icon {
  align-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: 0.8rem;
  color: var(--accent);
  display: flex;
  flex: none;
  font-size: 1.15rem;
  height: 2.8rem;
  justify-content: center;
  transition: transform 240ms ease;
  width: 2.8rem;
}

.ct-method:hover .ct-method-icon {
  transform: scale(1.08) rotate(-5deg);
}

.ct-method-text {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.ct-method-text strong {
  font-size: 0.97rem;
  font-weight: 700;
}

.ct-method-text span {
  color: var(--muted);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-method-arrow {
  color: var(--muted);
  margin-left: auto;
  transition: transform 240ms ease, color 240ms ease;
}

.ct-method:hover .ct-method-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.ct-socials {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.ct-social {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  color: var(--muted);
  display: flex;
  height: 2.6rem;
  justify-content: center;
  text-decoration: none;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), color 220ms ease, border-color 220ms ease, background 220ms ease;
  width: 2.6rem;
}

.ct-social:hover {
  background: rgba(255, 147, 0, 0.14);
  border-color: rgba(255, 147, 0, 0.5);
  color: #fff;
  transform: translateY(-3px);
}

/* ---------- Form panel ---------- */
.ct-panel {
  align-self: start;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 147, 0, 0.1), transparent 55%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  grid-area: form;
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  position: sticky;
  top: 5.25rem;
}

.ct-panel h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.ct-panel-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.5rem 0 1.6rem;
}

.ct-field {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.ct-field label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ct-field label .req { color: var(--ct-accent); }

/* Dark-glass overrides for the shared contact-form hooks */
.contact-page .contact-form input,
.contact-page .contact-form textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  color: var(--ink);
  font: inherit;
  padding: 0.95rem 1.1rem;
  transition: box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
  width: 100%;
}

.contact-page .contact-form input::placeholder,
.contact-page .contact-form textarea::placeholder {
  color: rgba(247, 244, 238, 0.4);
}

.contact-page .contact-form input:focus,
.contact-page .contact-form textarea:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--ct-accent);
  box-shadow: 0 0 0 3px rgba(255, 147, 0, 0.18);
  outline: none;
}

.contact-page .contact-form textarea {
  min-height: 7rem;
  resize: vertical;
}

.ct-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.ct-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.ct-chip:hover {
  transform: translateY(-2px);
}

.ct-chip.is-active {
  background: color-mix(in srgb, var(--ct-accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--ct-accent) 60%, transparent);
  color: #fff;
}

.contact-page .contact-form-btn {
  align-items: center;
  background: var(--ct-accent);
  border: none;
  border-radius: 0.85rem;
  color: #14110b;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  gap: 0.55rem;
  justify-content: center;
  padding: 1rem 1.6rem;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease, opacity 220ms ease;
  width: 100%;
}

.contact-page .contact-form-btn:hover {
  box-shadow: 0 16px 34px -14px var(--ct-accent);
  transform: translateY(-2px);
}

.contact-page .contact-form-btn:disabled {
  cursor: default;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.contact-page .contact-form-status {
  color: #aef0c4;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 1rem 0 0;
  min-height: 1.2em;
}

.contact-page .contact-form-status.is-error {
  color: #ffb4a3;
}

.contact-page .contact-form-privacy {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.55;
  margin: 1rem 0 0;
}

.contact-page .contact-form-privacy a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
}

/* ---------- FAQ ---------- */
.ct-faq {
  border-top: 1px solid var(--line);
  padding-top: clamp(1.75rem, 3.5vw, 2.75rem);
}

.ct-faq-head {
  margin: 0 0 1.4rem;
  text-align: left;
}

.ct-faq-head h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0;
}

.ct-faq-head p {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.ct-faq-list {
  display: grid;
  gap: 0.8rem;
}

.ct-faq-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color 240ms ease, background 240ms ease;
}

.ct-faq-item[open] {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 147, 0, 0.35);
}

.ct-faq-item summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 1.02rem;
  font-weight: 600;
  gap: 1rem;
  justify-content: space-between;
  list-style: none;
  padding: 1.15rem 1.3rem;
}

.ct-faq-item summary::-webkit-details-marker { display: none; }

.ct-faq-item summary i {
  color: var(--ct-accent);
  flex: none;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ct-faq-item[open] summary i {
  transform: rotate(45deg);
}

.ct-faq-answer {
  color: var(--muted);
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ct-faq-item[open] .ct-faq-answer {
  grid-template-rows: 1fr;
}

.ct-faq-answer > div {
  overflow: hidden;
}

.ct-faq-answer p {
  line-height: 1.6;
  margin: 0;
  padding: 0 1.3rem 1.25rem;
}

/* ---------- Keyframes ---------- */
@keyframes ct-ping {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .ct-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "aside"
      "form"
      "faq";
  }
  .ct-panel {
    position: static;
    top: auto;
  }
  .ct-aside h1 { max-width: 22ch; }
}

@media (max-width: 560px) {
  .ct-socials { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-page * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
