/* ==========================================================================
   Contact page — a dark forest panel with the contact cards and a message
   form (sent through Netlify Forms; see assets/js/contact.js).
   ========================================================================== */

/* The whole page is dark forest green, footer included */
.contact-page {
  background: #0d1712;
}

.contact {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-top: calc(var(--nav-h) + clamp(1.25rem, 0.75rem + 2vw, 2.5rem));
  padding-bottom: var(--section-y-sm);
  background: linear-gradient(180deg, #13211a 0%, #0d1712 100%);
}

.contact-panel {
  position: relative;
  padding-top: clamp(4.5rem, 3rem + 7vw, 9rem);
  color: var(--night-text);
}

/* sage light from the top, a warm terracotta glow in the lower corner */
.contact-glow {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 50% 0%, rgba(184, 201, 181, 0.24), transparent 70%),
    radial-gradient(40% 45% at 100% 78%, rgba(221, 161, 140, 0.26), transparent 70%),
    radial-gradient(28% 30% at 90% 72%, rgba(221, 161, 140, 0.16), transparent 70%);
}

/* the big faded word behind the heading */
.contact-word {
  position: absolute;
  top: clamp(1.25rem, 0.5rem + 2.5vw, 3rem);
  left: 50%;
  z-index: -1;
  margin: 0;
  transform: translateX(-50%);
  font-size: clamp(4.25rem, 1rem + 15vw, 15rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  color: transparent;
  background: linear-gradient(180deg, rgba(247, 244, 238, 0.13), rgba(247, 244, 238, 0) 85%);
  -webkit-background-clip: text;
  background-clip: text;
}

.contact-grid {
  display: grid;
  gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  align-items: start;
}

@media (min-width: 960px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  }
}

/* ---- Left: intro + cards ---------------------------------------------- */

.contact-title {
  color: var(--night-text);
}

.contact-lead {
  max-width: 40ch;
  margin-top: var(--s-4);
  color: var(--night-text-2);
}

.contact-cards {
  display: grid;
  gap: 12px;
  margin: clamp(1.75rem, 1.25rem + 2vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--r-lg);
  color: var(--night-text);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px var(--night-line-strong);
  transition: background-color var(--dur-sm) var(--ease-standard), transform var(--dur-md) var(--ease-emphasized), box-shadow var(--dur-md) var(--ease-standard);
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(184, 201, 181, 0.35);
  transform: translateY(-2px);
}

.contact-ico {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--night-line-strong);
}

.contact-ico svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-card-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.contact-card-title {
  font-weight: 600;
}

.contact-card-value {
  overflow-wrap: anywhere;
  font-size: var(--fs-small);
  color: var(--night-text-2);
}

.contact-go {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border-radius: 50%;
  color: var(--night-text);
  background: rgba(255, 255, 255, 0.08);
  transition: background-color var(--dur-sm) var(--ease-standard), color var(--dur-sm) var(--ease-standard);
}

.contact-go svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--dur-md) var(--ease-emphasized);
}

.contact-card:hover .contact-go,
.contact-card:focus-visible .contact-go {
  color: var(--blue);
  background: var(--paper);
}

.contact-card:hover .contact-go svg {
  transform: translate(1px, -1px);
}

/* ---- Right: the form --------------------------------------------------- */

.contact-form,
.contact-done {
  display: grid;
  gap: 16px;
  padding: clamp(1rem, 0.6rem + 1.6vw, 1.75rem);
  border-radius: var(--r-xl);
  background: rgba(11, 18, 14, 0.45);
  box-shadow: inset 0 0 0 1px var(--night-line-strong), 0 30px 60px -30px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.contact-form[hidden],
.contact-done[hidden] {
  display: none;
}

.cf-row {
  display: grid;
  gap: 16px;
}

@media (min-width: 560px) {
  .cf-row {
    grid-template-columns: 1fr 1fr;
  }
}

.cf-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.cf-field label {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--night-text);
}

.cf-opt {
  font-weight: 400;
  color: var(--night-text-3);
}

.cf-field input,
.cf-field select,
.cf-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-md);
  font: inherit;
  font-size: 1rem; /* 16px: stops phones zooming in on focus */
  color: var(--night-text);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--night-line-strong);
  transition: box-shadow var(--dur-sm) var(--ease-standard), background-color var(--dur-sm) var(--ease-standard);
}

.cf-field textarea {
  min-height: 150px;
  padding: 14px 16px;
  line-height: 1.5;
  resize: vertical;
}

.cf-field select {
  padding-right: 44px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23C5D1C2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px 16px;
}

.cf-field select:invalid {
  color: rgba(197, 209, 194, 0.7);
}

.cf-field option {
  color: var(--night-text);
  background: #13211a;
}

.cf-field ::placeholder {
  color: rgba(197, 209, 194, 0.55);
  opacity: 1;
}

.cf-field input:hover,
.cf-field select:hover,
.cf-field textarea:hover {
  background-color: rgba(255, 255, 255, 0.07);
}

.cf-field input:focus,
.cf-field select:focus,
.cf-field textarea:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--blue-soft), 0 0 0 4px rgba(184, 201, 181, 0.18);
}

.cf-field [aria-invalid="true"] {
  box-shadow: inset 0 0 0 1px #e9a387, 0 0 0 4px rgba(233, 163, 135, 0.14);
}

.cf-error {
  font-size: var(--fs-xs);
  color: #e9a387;
}

.cf-submit,
.cf-again {
  width: 100%;
  margin-top: 4px;
  color: var(--blue);
  background: var(--paper);
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.6);
}

.cf-submit:hover,
.cf-again:hover {
  background: #fff;
}

.cf-submit[disabled] {
  cursor: progress;
  opacity: 0.75;
}

.cf-submit .btn-arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cf-note {
  font-size: var(--fs-xs);
  text-align: center;
  color: var(--night-text-3);
}

.cf-note a,
.contact-done a {
  color: var(--night-text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cf-status:empty {
  display: none;
}

.cf-status {
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: var(--fs-small);
  color: var(--night-text);
  background: rgba(233, 163, 135, 0.12);
  box-shadow: inset 0 0 0 1px rgba(233, 163, 135, 0.45);
}

/* ---- Sent ---------------------------------------------------------------- */

.contact-done {
  justify-items: center;
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  text-align: center;
  color: var(--night-text-2);
}

.contact-done:focus {
  outline: none;
}

.contact-done-ico {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--blue);
  background: var(--blue-soft);
}

.contact-done-ico svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-done-title {
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--night-text);
}

.contact-done p {
  max-width: 36ch;
}

.contact-done .cf-again {
  width: auto;
}

/* ---- Footer: dark on this page only --------------------------------------- */

.contact-page .footer {
  border-top-color: var(--night-line);
  color: var(--night-text);
}

.contact-page .footer .logo-mark {
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--night-line-strong);
}

.contact-page .footer-brand p,
.contact-page .footer-col a,
.contact-page .footer-ai {
  color: var(--night-text-2);
}

.contact-page .footer-col h2,
.contact-page .footer-base {
  color: var(--night-text-3);
}

.contact-page .footer-base {
  border-top-color: var(--night-line);
}

.contact-page .footer-col a:hover,
.contact-page .footer-ai:hover,
.contact-page .footer-legal a:hover {
  color: var(--night-text);
}

/* ---- Phones -------------------------------------------------------------- */

@media (max-width: 559px) {
  .contact-card {
    gap: 12px;
    padding: 12px;
  }

  .contact-ico {
    width: 42px;
    height: 42px;
  }

  .contact-form {
    border-radius: var(--r-lg);
  }

  .contact-word {
    font-size: 15.5vw;
  }
}


@media (prefers-reduced-motion: reduce) {
  .contact-card,
  .contact-card:hover {
    transform: none;
  }
}
