@import url("https://fonts.googleapis.com/css2?family=Xanh+Mono:ital@0;1&display=swap");

@font-face {
  font-family: 'PP Neue Montreal';
  src: url('https://cdn.jsdelivr.net/gh/melodysz/baubles@main/fonts/ppneuemontreal-thin.woff2') format('woff2');
  font-weight: 300; font-style: normal;
}
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('https://cdn.jsdelivr.net/gh/melodysz/baubles@main/fonts/ppneuemontreal-book.woff2') format('woff2');
  font-weight: 400; font-style: normal;
}
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('https://cdn.jsdelivr.net/gh/melodysz/baubles@main/fonts/ppneuemontreal-medium.woff2') format('woff2');
  font-weight: 500; font-style: normal;
}
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('https://cdn.jsdelivr.net/gh/melodysz/baubles@main/fonts/ppneuemontreal-bold.woff2') format('woff2');
  font-weight: 700; font-style: normal;
}
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('https://cdn.jsdelivr.net/gh/melodysz/baubles@main/fonts/ppneuemontreal-semibold.woff2') format('woff2');
  font-weight: 600; font-style: normal;
}
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('https://cdn.jsdelivr.net/gh/melodysz/baubles@main/fonts/ppneuemontreal-italic.woff2') format('woff2');
  font-weight: 300; font-style: italic;
}
@font-face {
  font-family: 'HafferXH';
  src: url('https://cdn.jsdelivr.net/gh/melodysz/baubles@main/fonts/HafferXHMono-TRIAL-Light.woff2') format('woff2');
  font-weight: 300; font-style: normal;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: default !important;
}

a, button, [role="button"], .interactable {
  cursor: pointer !important;
}

:root {
  --bg: #ffffff;
  --nav-color: #1D1D1F;
  --text: #1D1D1F;
  --card-bg: #F5F5F7;
}

html, body {
  background: #ffffff !important;
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ================================
   CURSOR — BLOB STYLE
   ================================ */

.cursor-dot {
  width: 14px;
  height: 14px;
  background-color: #83E7FF;
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10001;
  mix-blend-mode: normal;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease,
              width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-radius 0.5s ease;
  will-change: transform;
}

.cursor-dot.active { opacity: 1; }

.cursor-dot.is-blob {
  width: var(--blob-w, 80px);
  height: var(--blob-h, 40px);
  border-radius: 999px;
  opacity: 0.7;   /* multiply: the page colour, see-through; dark text stays crisp under it */
  mix-blend-mode: multiply;
}

/* ================================
   ENTRY OVERLAY
   ================================ */

#page-entry-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #ffffff;
  pointer-events: all;
}

/* ================================
   EXIT RIPPLE
   ================================ */

#exit-ripple-container {
  position: fixed;
  inset: 0;
  z-index: 99998;
  pointer-events: none;
  overflow: hidden;
}

.ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150vmax;
  height: 150vmax;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  will-change: transform, opacity;
  animation: rippleExpand 1.3s ease-out forwards;
}

.ripple-brown { background-color: var(--nav-color); }
.ripple-cream  { background-color: #ffffff; }

@keyframes rippleExpand {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ================================
   NEW PILL NAV
   ================================ */

.nav-pill-wrap {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1320px, calc(100vw - 80px));
  padding: 20px 0 30px 0;
  margin-top: -20px;
  pointer-events: auto;
  transition: opacity 0.4s ease;
}

.nav-pill {
  position: relative;
  height: 52px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0 0.5px 0 rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  overflow: visible;
  width: 52px;
  transition: width 0.55s cubic-bezier(0.32, 0, 0.08, 1), background-color 0.35s ease;
  cursor: pointer;
  white-space: nowrap;
  pointer-events: none;
}

.nav-pill.expanded { width: 100%; }

.nav-asterisk {
  font-family: 'Xanh Mono', monospace;
  font-style: italic;
  font-size: 36px;
  line-height: 0;
  color: #181812;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  user-select: none;
  text-decoration: none;
  padding-top: 2px;
  pointer-events: auto;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  padding-right: 20px;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease 0.5s, transform 0.3s ease 0.5s;
  pointer-events: none;
  min-width: 0;
}

.nav-pill.expanded .nav-content {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.nav-wordmark {
  color: #181812;
  display: flex;
  align-items: baseline;
  flex-shrink: 0;
  user-select: none;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nav-pill.expanded .nav-wordmark {
  opacity: 1;
  transition: opacity 0.25s ease 0.45s;
}

.nav-wordmark:hover { opacity: 0.65; }

.wm-melody {
  font-family: 'PP Neue Montreal', sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: #181812;
}

.wm-zhang {
  font-family: 'Xanh Mono', monospace;
  font-style: italic;
  font-weight: 300;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: #181812;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.nav-link-item {
  font-family: 'PP Neue Montreal', sans-serif;
  font-weight: 500;
  font-size: 18px;
  color: #181812;
  text-decoration: none;
  letter-spacing: 0.01em;
  position: relative;
  padding: 6px 16px;
  border-radius: 999px;
  background: transparent;
  z-index: 1;
  opacity: 0;
  transform: translateX(-10px);
  transition: color 0.25s ease, opacity 0.3s ease, transform 0.3s ease;
  overflow: hidden;
  cursor: pointer !important;
  min-width: 80px;
  text-align: center;
}

.nav-pill.expanded .nav-link-item:nth-child(1) {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease 0.55s, transform 0.3s ease 0.55s, color 0.25s ease;
}

.nav-pill.expanded .nav-link-item:nth-child(2) {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease 0.68s, transform 0.3s ease 0.68s, color 0.25s ease;
}

.nav-pill.expanded .nav-link-item:nth-child(3) {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease 0.81s, transform 0.3s ease 0.81s, color 0.25s ease;
}

.nav-asterisk img { display: block; }

/* Work dropdown bubble */
.nav-work-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.work-bubble {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  top: 0;
  left: 0;
}

.bubble-dot {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0 0.5px 0 rgba(255, 255, 255, 0.45), 0px 2px 2px rgba(0, 0, 0, 0.18);
  position: absolute;
  opacity: 0;
}

.bubble-dot-sm  { width: 11px; height: 11px; left: 33px; top: -25px; z-index: 2; }
.bubble-dot-md  { width: 16px; height: 16px; left: 10px; top: -16px; z-index: 2; }
.bubble-dot-lg  { width: 22px; height: 22px; left: -2px; top: 10px;  z-index: 2; }

.bubble-menu {
  position: absolute;
  top: 7px;   /* tucked up so it overlaps the large thought bubble */
  left: 0px;
  background: rgba(255, 255, 255, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.25), inset 0 0.5px 0 rgba(255, 255, 255, 0.45), 0px 2px 2px rgba(0, 0, 0, 0.18);
  border-radius: 40px;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  white-space: nowrap;
  opacity: 0;
  transform-origin: top left;
  z-index: 0;
}

.bubble-item {
  font-family: 'PP Neue Montreal', sans-serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.01em;
  color: #181812;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 12px;
  line-height: 1.5;
  transition: opacity 0.2s ease;
  cursor: pointer !important;
}

.bubble-num {
  font-family: 'HafferXH', monospace;
  font-weight: 100;
  font-size: 18px;
  letter-spacing: -0.03em;
  color: #181812;
  min-width: 20px;
}

.bubble-dots-wrap {
  position: fixed;
  pointer-events: none;
  z-index: 10002;
  top: 0;
  left: 0;
}


/* ================================
   CONTACT PAGE
   ================================ */

:root {
  --line: #DEDEE3;
  --muted: #86868B;
  --accent: #006EE9;          /* the blue from the work section's dial */
  --accent-soft: rgba(0, 110, 233, 0.14);
  --lilac: #E7A0FE;           /* footer button pink */
  --error: #D93A5B;
}

/* this page scrolls when the window is short (the who page doesn't need to) */
html, body { overflow: auto; height: auto; }

.page-wrapper {
  min-height: 100vh;
  padding: 24px;
  display: flex;
}

.contact-card {
  background: var(--card-bg);
  border-radius: 30px;
  width: 100%;
  min-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 48px;
  padding: 110px 72px 56px;   /* top clears the floating nav */
}

/* ---------- left column ---------- */
.contact-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  max-width: 440px;
}

.contact-title {
  font-family: 'Instrument Serif', serif;
  font-size: 84px;
  font-weight: 400;
  color: var(--text);
  line-height: 1;
  letter-spacing: -1px;
}

.contact-intro p,
.contact-alt {
  font-family: 'PP Neue Montreal', 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
}
/* intro paragraph matches the Creatify case study body text */
.contact-intro p { font-size: 17px; line-height: 28px; }

.contact-alt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
}
.contact-alt-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}
.contact-alt-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  width: fit-content;
}

/* ---------- form ---------- */
.contact-form-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  font-family: 'PP Neue Montreal', 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.field-label i { font-style: normal; color: var(--accent); }

.field input,
.field textarea {
  font-family: 'PP Neue Montreal', 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  outline: none;
  cursor: text !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.6; }

.field input:hover,
.field textarea:hover { border-color: #C9C9D0; }

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* shown after a failed send attempt */
.field.is-invalid input,
.field.is-invalid textarea { border-color: var(--error); }
.field.is-invalid .field-label { color: var(--error); }

.contact-honey { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ---------- receipt checkbox ---------- */
.receipt-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: 'PP Neue Montreal', 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text);
  user-select: none;
  margin-top: 2px;
}
.receipt-check input { position: absolute; opacity: 0; pointer-events: none; }

.receipt-box {
  flex: none;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  border: 1px solid #C9C9D0;
  background: #ffffff;
  display: grid;
  place-items: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.receipt-box::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.receipt-check input:checked + .receipt-box { background: var(--accent); border-color: var(--accent); }
.receipt-check input:checked + .receipt-box::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.receipt-check input:focus-visible + .receipt-box { box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------- send button + status ---------- */
.form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
}

.form-status {
  font-family: 'PP Neue Montreal', 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.form-status.is-error { color: var(--error); }
.form-status a { color: inherit; }

.send-btn {
  flex: none;
  font-family: 'PP Neue Montreal', 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 1.1rem;
  color: #B25BD0;
  background: transparent;
  border: 1px solid #B25BD0;
  border-radius: 999px;
  padding: 0.75rem 2.2rem;
  transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}
.send-btn:hover { background: var(--lilac); color: #000000; border-color: var(--lilac); }
.send-btn[disabled] { opacity: 0.55; pointer-events: none; }

.send-btn--ghost { background: transparent; color: var(--text); border-color: var(--text); }
.send-btn--ghost:hover { background: var(--text); color: #ffffff; border-color: var(--text); }

/* ---------- on-screen receipt (after sending) ---------- */
.contact-receipt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.contact-receipt[hidden] { display: none; }

.receipt-paper {
  width: min(400px, 100%);
  background: #ffffff;
  padding: 28px 28px 40px;
  font-family: 'Xanh Mono', monospace;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  /* torn zig-zag bottom edge */
  --tooth: 10px;
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x;
          mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x;
  animation: receipt-print 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes receipt-print {
  from { clip-path: inset(0 0 100% 0); transform: translateY(-12px); }
  to   { clip-path: inset(0 0 0 0);    transform: none; }
}

.receipt-head { text-align: center; font-size: 17px; letter-spacing: 0.04em; }
.receipt-sub  { text-align: center; color: var(--muted); font-size: 12.5px; }
.receipt-rule { border-top: 1.5px dashed #C9C9D0; margin: 16px 0; }

.receipt-lines { display: flex; flex-direction: column; gap: 4px; }
.receipt-lines div { display: flex; gap: 12px; }
.receipt-lines dt { width: 64px; flex: none; color: var(--muted); }
.receipt-lines dd { overflow-wrap: anywhere; }

.receipt-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 34vh;
  overflow: auto;
}
.receipt-foot { text-align: center; font-size: 12.5px; color: var(--muted); }

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .contact-card {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 96px 28px 40px;
  }
  .contact-title { font-size: 64px; }
}
@media (max-width: 560px) {
  .page-wrapper { padding: 12px; }
  .contact-card { border-radius: 22px; padding: 88px 20px 28px; min-height: calc(100vh - 24px); }
  .field-row { grid-template-columns: 1fr; }
  .form-bottom { flex-direction: column-reverse; align-items: stretch; }
  .send-btn { width: 100%; }
}
.contact-form[hidden] { display: none; }

/* the hover bubble on a dark background (e.g. the footer): no blend there — just
   the plain see-through bubble ("multiply" would turn it almost black) */
.cursor-dot.is-blob.on-dark { mix-blend-mode: normal; opacity: 0.35; }
