/* ==========================================================
   Contact page styles (contact.html)
   EDIT THESE FIRST
   ========================================================== */
:root {
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.78);          /* paragraph color */
  --accent: #00ffb9;                               /* your brand green */
  --base-dark: #0e1216;
  --font: "Nunito Sans", "Avenir Next", Avenir, system-ui, -apple-system, "Segoe UI", sans-serif;

  --headline-size: clamp(1.9rem, 3.3vw, 3rem);     /* big heading */
  --body-size: clamp(1rem, 1.2vw, 1.15rem);        /* intro text */
  --form-width: 32rem;                             /* how wide the form gets */

  --green-glow: rgba(0, 255, 185, 0.16);
  --grey-glow: rgba(150, 160, 170, 0.14);
  --drift-speed: 32s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(160deg, #141a1f 0%, var(--base-dark) 55%, #0a0d10 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Animated background (same as the other pages) ---------- */
.bg {
  position: fixed;
  inset: -30%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 38% at 24% 32%, var(--green-glow), transparent 70%),
    radial-gradient(42% 42% at 76% 66%, var(--grey-glow), transparent 70%),
    radial-gradient(30% 30% at 62% 18%, rgba(0, 255, 185, 0.09), transparent 70%);
  animation: drift var(--drift-speed) ease-in-out infinite alternate;
  will-change: transform;
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(34% 34% at 70% 30%, var(--grey-glow), transparent 70%),
    radial-gradient(36% 36% at 30% 74%, rgba(0, 255, 185, 0.11), transparent 70%);
  animation: drift-back calc(var(--drift-speed) * 1.4) ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from { transform: translate3d(-4%, 3%, 0) rotate(0deg) scale(1); }
  to   { transform: translate3d(4%, -3%, 0) rotate(10deg) scale(1.12); }
}
@keyframes drift-back {
  from { transform: translate3d(3%, -2%, 0) rotate(0deg) scale(1.05); }
  to   { transform: translate3d(-3%, 4%, 0) rotate(-8deg) scale(1); }
}



/* ---------- Layout ---------- */
main {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5.5rem 1.6rem 3rem;
}
.contact { width: min(var(--form-width), 100%); }

h1 {
  font-size: var(--headline-size);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.005em;
}
h1 .hello {
  display: block;
  color: var(--accent);
  font-style: italic;
  text-shadow: 0 0 28px rgba(0, 255, 185, 0.35);
}
.intro {
  margin-top: 0.7rem;
  font-size: var(--body-size);
  font-weight: 500;
  line-height: 1.7;
  color: var(--text-soft);
  text-wrap: pretty;
}

.rule {                                          /* same gliding green line as the About page */
  width: clamp(7rem, 11vw, 9.5rem);
  height: 2px;
  margin: clamp(1.4rem, 3.4vh, 2.1rem) 0 clamp(1.5rem, 3.6vh, 2.2rem);
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(0, 255, 185, 0) 0%, var(--accent) 50%, rgba(0, 255, 185, 0) 100%) -150% 0 / 60% 100% no-repeat,
    rgba(0, 255, 185, 0.14);
  box-shadow: 0 0 14px rgba(0, 255, 185, 0.4);
}
@keyframes sweep {
  from { background-position: -150% 0, 0 0; }
  to   { background-position: 250% 0, 0 0; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
h1 .hello, .intro, .form-wrap { animation: rise 0.9s cubic-bezier(0.22, 0.8, 0.2, 1) both; }
h1 .hello  { animation-delay: 0.1s; }
.intro     { animation-delay: 0.22s; }
.form-wrap { animation-delay: 0.5s; }
.rule {
  animation:
    rise 0.9s cubic-bezier(0.22, 0.8, 0.2, 1) 0.36s both,
    sweep 3.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) 1.2s infinite;
}

/* ---------- Form fields: just a line; a green line slides across it when you click in ---------- */
.field { position: relative; margin-bottom: 1.35rem; }
.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 1.5rem 0 0.55rem;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  caret-color: var(--accent);
}
.field textarea { min-height: 8.5rem; resize: none; }
.field label {
  position: absolute;
  left: 0;
  top: 1.45rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.2, 1), color 0.3s ease;
}
.field input:focus + label,
.field textarea:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.15rem) scale(0.76);
}
.field input:focus + label,
.field textarea:focus + label { color: var(--accent); }

.field::after {                                  /* the green line */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0, 255, 185, 0.7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s cubic-bezier(0.22, 0.8, 0.2, 1);
}
.field:focus-within::after { transform: scaleX(1); }
.field input:-webkit-autofill,
.field textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 100px #10151a inset;
  caret-color: var(--accent);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }   /* hidden spam trap: people never see it */

/* ---------- Send button: the grey box with the glowing corner frames, same as the homepage buttons ---------- */
.actions { display: flex; align-items: center; gap: 1.4rem; margin-top: 2rem; flex-wrap: wrap; }
.send {
  --frame-thickness: 2.5px;
  --frame-long: 41%;
  --frame-short: 64%;
  --frame-out-x: 0.9em;
  --frame-out-y: 0.35em;
  position: relative;
  display: inline-block;
  padding: calc(0.62em - 1px) 2.6em;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  opacity: 0.92;
  transition: color 0.5s ease, opacity 0.5s ease, text-shadow 0.5s ease,
              border-color 0.9s ease 0.2s, background-color 0.9s ease 0.2s;
}
.send::before, .send::after {
  content: "";
  position: absolute;
  width: var(--frame-long);
  height: var(--frame-short);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 3px var(--accent)) drop-shadow(0 0 9px rgba(0, 255, 185, 0.6));
  transition: transform 0.6s cubic-bezier(0.22, 0.8, 0.2, 1), opacity 0.45s ease 0.25s;
}
.send::before { top: -1px; left: -1px; border-top: var(--frame-thickness) solid var(--accent); border-left: var(--frame-thickness) solid var(--accent); }
.send::after  { bottom: -1px; right: -1px; border-bottom: var(--frame-thickness) solid var(--accent); border-right: var(--frame-thickness) solid var(--accent); }
.send:hover, .send:focus-visible {
  color: var(--accent);
  opacity: 1;
  text-shadow: 0 0 0.6em rgba(0, 255, 185, 0.45);
  border-color: transparent;
  background-color: transparent;
  outline: none;
  transition: color 0.3s ease, opacity 0.3s ease, text-shadow 0.3s ease, border-color 0.5s ease, background-color 0.5s ease;
}
.send:hover::before, .send:hover::after, .send:focus-visible::before, .send:focus-visible::after {
  opacity: 1;
  transition: transform 0.6s cubic-bezier(0.22, 0.8, 0.2, 1), opacity 0.15s ease 0s;
}
.send:hover::before, .send:focus-visible::before { transform: translate(calc(var(--frame-out-x) * -1), calc(var(--frame-out-y) * -1)); }
.send:hover::after, .send:focus-visible::after { transform: translate(var(--frame-out-x), var(--frame-out-y)); }
.send[disabled] { cursor: progress; opacity: 0.7; }
.send[disabled] .send-text { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

.status { min-height: 1.4em; font-size: 0.95rem; font-weight: 500; line-height: 1.5; color: #ffa9a9; }
.status a { color: inherit; text-underline-offset: 3px; }

/* ---------- "Message sent" ---------- */
.form-wrap { position: relative; }
.sent { display: none; }
.is-sent form { display: none; }
.is-done .intro { display: none; }
.is-sent .sent { display: block; animation: rise 0.8s cubic-bezier(0.22, 0.8, 0.2, 1) both; }
.sent h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  font-style: italic;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(0, 255, 185, 0.35);
}
.sent p { margin-top: 0.6rem; font-size: var(--body-size); font-weight: 500; line-height: 1.7; color: var(--text-soft); }
.again {
  margin-top: 1.6rem;
  padding: 0.3rem 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  background: none;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.again:hover, .again:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }

/* ---------- Social icons: top right, lined up with the logo (phones: they live in the hamburger menu, see site-header.css) ---------- */
main .social {
  --social-color: rgba(255, 255, 255, 0.62);
  --social-icon-size: 1.3rem;
  position: fixed;
  top: calc(var(--header-top) - 0.04rem);
  right: calc(var(--header-x) - 0.4rem);
  left: auto;
  bottom: auto;
  transform: none;
  z-index: 4;
  gap: 0.25rem 0.9rem;
}

@media (max-width: 860px) {
  main { position: static; z-index: auto; align-items: flex-start; padding: 5.5rem 1.6rem 3rem; }   /* static so the social icons can sit above the open menu */
}

@media (prefers-reduced-motion: reduce) {
  .bg, .bg::after, h1 .hello, .intro, .form-wrap, .rule { animation: none; }
  .rule { background-position: 50% 0, 0 0; }
  .field label, .field::after, .send, .send::before, .send::after { transition: none; }
}
