/* Black Oxen Motion — Connect
   Dark page over a live WebGL noise field (js/connect.js). The whole page
   is ink, so the base link colors flip. */

body.connect {
  background: var(--dark-bg);
  color: #FFFFFF;
}

body.connect a { color: #FFFFFF; }
body.connect a:hover { color: var(--green); }

.connect {
  position: relative;
  min-height: 100vh;
  background: var(--dark-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* the shader canvas — falls back to flat ink if WebGL is unavailable */
.connect__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.connect .nav,
.connect__main,
.connect__bar { position: relative; z-index: 2; }

.connect__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px var(--gutter);
  box-sizing: border-box;
  margin-right: 0;
  transition: margin-right .65s cubic-bezier(.72, 0, .18, 1);
}

/* the copy shoulders over when the drawer is open (desktop only) */
.connect.is-open .connect__main { margin-right: min(440px, 90vw); }

.connect__eyebrow {
  font-family: var(--display);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.24em;
  color: var(--dark-muted);
  animation: bxFadeUp .8s ease both;
}

.connect__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(46px, 6vw, 88px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 20px 0 40px;
  max-width: 14em;
  animation: bxFadeUp .8s .1s ease both;
  text-wrap: pretty;
}

.connect__email {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 48px);
  letter-spacing: -0.01em;
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  align-self: flex-start;
  padding-bottom: 6px;
  transition: all .3s;
  animation: bxFadeUp .8s .2s ease both;
}

/* needs the body.connect prefix to outrank the page-wide `a:hover` above,
   otherwise the address goes green instead of amber */
body.connect .connect__email:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.connect__info {
  display: flex;
  gap: 56px;
  margin-top: 70px;
  animation: bxFadeUp .8s .3s ease both;
  flex-wrap: wrap;
}

.connect__label {
  font-family: var(--display);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--dark-muted);
  margin-bottom: 10px;
}

.connect__value { font-size: 16.5px; }

.connect__value a:hover { color: var(--green); }

.connect__status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.connect__status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}

.connect__bar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 26px var(--gutter);
  font-family: var(--display);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--dark-muted);
}

/* ---------- project drawer ---------- */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(440px, 90vw);
  box-sizing: border-box;
  background: var(--bg);
  color: var(--ink);
  padding: 40px 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  overflow-y: auto;
  transform: translateX(calc(100% + 90px));
  transition: transform .65s cubic-bezier(.72, 0, .18, 1);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.35);
}

.connect.is-open .drawer { transform: translateX(0); }

.drawer a { color: var(--ink); }

.drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer__kicker {
  font-family: var(--display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.drawer__close {
  background: transparent;
  border: 1px solid #D8D8DA;
  color: var(--ink);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 13px;
  cursor: pointer;
  transition: all .25s;
}

.drawer__close:hover {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

.drawer h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

/* the form owns the space between the fields and the note below it */
.drawer__form {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.drawer__fields {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* honeypot — off-screen rather than display:none, which some bots skip */
.drawer__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.drawer__fields label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer__fields label > span {
  font-family: var(--display);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.drawer__fields input,
.drawer__fields textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid #D8D8DA;
  padding: 10px 0;
  font-family: var(--text);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color .3s;
}

.drawer__fields textarea {
  line-height: 1.55;
  resize: vertical;
}

.drawer__fields input:focus,
.drawer__fields textarea:focus { border-bottom-color: var(--ink); }

.drawer__send {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #FFFFFF;
  border-radius: 999px;
  padding: 15px 30px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: all .3s;
}

.drawer__send:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
}

.drawer__send[disabled] {
  opacity: 0.5;
  cursor: default;
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

.drawer__status {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
  text-wrap: pretty;
}

.drawer__status:empty { display: none; }
.drawer__status[data-state="error"] { color: var(--red); }
.drawer__status[data-state="ok"] { color: #2F8C5F; }

/* on success the form is replaced by the confirmation, so hide the chrome */
.drawer.is-sent .drawer__fields,
.drawer.is-sent .drawer__send,
.drawer.is-sent .drawer__note { display: none; }

.drawer.is-sent .drawer__status {
  font-family: var(--display);
  font-size: 17px;
  color: var(--ink);
}

.drawer__note {
  margin: auto 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- entry wipe ---------- */
.wipe {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #0E0D13;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bxWipeOut .7s cubic-bezier(.72, 0, .18, 1) .25s both;
  pointer-events: none;
}

.wipe img { width: 56px; height: 56px; filter: invert(1); }

@keyframes bxWipeOut {
  from { transform: translateY(0); }
  to   { transform: translateY(-100%); }
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .connect__main  { padding: 40px var(--gutter); }
  .connect__title { font-size: 38px; }
  .connect__email { font-size: 21px; }
  .connect__info  { gap: 28px; margin-top: 48px; }
  .connect__bar   { padding: var(--gutter); }

  .drawer { width: 100vw; padding: 28px 22px 26px; }

  /* no room to shoulder over — the drawer just covers the page */
  .connect.is-open .connect__main { margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wipe { animation: none; transform: translateY(-100%); }
}
