/* contact.css: the Contact panel, the /contact/ page form and the one-time
   hint (js/contact.js, 2026-10-22). Colours are the tokens of tokens.css and
   the menu's own (navbar.css): the dark glass of the dropdowns, the cyan of
   the active item, the cyan-to-violet of the main button. Motion is transform
   and opacity only; prefers-reduced-motion gets everything in place. */

html.cf-locked, html.cf-locked body { overflow: hidden; }

.cf-backdrop {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(4, 8, 14, 0.45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.cf-backdrop.is-open { opacity: 1; pointer-events: auto; }

.cf-panel {
  position: fixed; z-index: 2001; top: 0; right: 0; bottom: 0;
  width: 440px; max-width: 100vw; overflow-y: auto;
  background: rgba(30, 33, 36, 0.92);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(0, 240, 255, 0.22); border-right: 0;
  border-radius: 20px 0 0 20px;
  box-shadow: 0 0 0 1px rgba(123, 47, 247, 0.08), 0 0 40px rgba(0, 240, 255, 0.10), 0 24px 64px rgba(0, 0, 0, 0.45);
  transform: translateX(104%); visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1.2, 0.36, 1), visibility 0s linear 0.35s;
}
.cf-panel.is-open { transform: none; visibility: visible; transition: transform 0.35s cubic-bezier(0.22, 1.2, 0.36, 1), visibility 0s; }
.cf-grip { display: none; }
@media (max-width: 639px) {
  .cf-panel {
    top: auto; left: 0; width: 100%; max-height: 92dvh;
    border-right: 1px solid rgba(0, 240, 255, 0.22); border-bottom: 0;
    border-radius: 20px 20px 0 0; transform: translateY(104%);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .cf-grip { display: block; width: 40px; height: 4px; margin: 10px auto 0; border-radius: 4px; background: rgba(255, 255, 255, 0.15); }
}

.cf-body { padding: 26px 26px 32px; }
.cf-close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: none; color: var(--color-text-muted, rgba(200, 206, 216, 0.68)); font-size: 22px; line-height: 1; cursor: pointer;
}
.cf-close:hover { color: var(--color-text-primary, #c8ced8); background: rgba(255, 255, 255, 0.06); }
.cf-title { margin: 0; font-size: 1.25rem; font-weight: 800; color: var(--color-text-primary, #c8ced8); }
.cf-lead { margin: 6px 0 0; font-size: 0.9rem; color: var(--color-text-secondary, rgba(200, 206, 216, 0.7)); }
.cf-reply { margin: 2px 0 0; font-size: 0.78rem; color: var(--color-text-muted, rgba(200, 206, 216, 0.68)); }

.cf-pulse { display: block; width: 100%; height: 40px; margin: 14px 0 8px; }
.cf-pulse path {
  fill: none; stroke: var(--color-cyan, #00f0ff); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: cf-draw 0.9s ease-out 0.25s forwards;
  filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.45));
}
.cf-pulse .cf-tick { stroke-width: 3; animation-duration: 0.5s; animation-delay: 0s; }
@keyframes cf-draw { to { stroke-dashoffset: 0; } }

.cf-form { display: flex; flex-direction: column; gap: 16px; }
.cf-field { display: flex; flex-direction: column; gap: 6px; }
.cf-panel.is-open .cf-field { animation: cf-in 0.28s ease-out both; animation-delay: var(--cf-delay, 0ms); }
@keyframes cf-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cf-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-muted, rgba(200, 206, 216, 0.68)); }
.cf-input {
  width: 100%; box-sizing: border-box; padding: 10px 14px; border-radius: 12px;
  font: inherit; font-size: 0.9rem; color: var(--color-text-primary, #c8ced8);
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.10);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.cf-input { min-height: 140px; resize: vertical; }
.cf-input:focus { outline: none; border-color: rgba(0, 240, 255, 0.55); box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15); }
select.cf-input option { background: #26292d; color: #c8ced8; }
.cf-count { align-self: flex-end; font-size: 0.72rem; color: var(--color-text-muted, rgba(200, 206, 216, 0.68)); font-variant-numeric: tabular-nums; }
.cf-hint { font-size: 0.75rem; color: var(--color-text-muted, rgba(200, 206, 216, 0.68)); }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-error { margin: 0; font-size: 0.85rem; color: var(--color-red, #ff3355); }
.cf-send {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 12px 20px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 0.9rem; color: #020408;
  background: linear-gradient(135deg, #00f0ff, #7b2ff7); box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
  transition: box-shadow 0.2s, opacity 0.2s;
}
.cf-send:hover { box-shadow: 0 0 30px rgba(0, 240, 255, 0.4); }
.cf-send:disabled { opacity: 0.6; cursor: wait; }
.cf-send-ico { width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E") center / contain no-repeat; }
.cf-privacy { margin: 0; font-size: 0.75rem; line-height: 1.5; color: var(--color-text-muted, rgba(200, 206, 216, 0.68)); }
.cf-privacy a, .cf-again { color: var(--color-cyan, #00f0ff); }
.cf-done { padding: 18px 0 6px; text-align: center; color: var(--color-text-primary, #c8ced8); }
.cf-again { margin-top: 14px; border: 0; background: none; font: inherit; font-size: 0.85rem; cursor: pointer; }

/* The hint: a cyan dot with a ring running out of it on About (the menu
   button on a phone), and a bubble in the same glass as the panel. */
.cf-dot { position: relative; }
.cf-dot::after, .cf-dot::before {
  content: ""; position: absolute; top: 4px; right: 2px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-cyan, #00f0ff); pointer-events: none;
}
.cf-dot::before { animation: cf-ripple 1.6s ease-out infinite; animation-iteration-count: 4; opacity: 0; }
@keyframes cf-ripple { from { transform: scale(1); opacity: 0.7; } to { transform: scale(3.2); opacity: 0; } }
.cf-bubble {
  position: fixed; z-index: 1500; padding: 10px 16px; border-radius: 14px; cursor: pointer;
  font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--color-text-primary, #c8ced8);
  background: rgba(30, 33, 36, 0.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(0, 240, 255, 0.28); box-shadow: 0 0 24px rgba(0, 240, 255, 0.14), 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translateY(-6px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.cf-bubble.is-shown { opacity: 1; transform: none; }

/* Light mode: the same layout on the light tokens. */
html.light .cf-backdrop { background: rgba(40, 40, 30, 0.18); }
html.light .cf-panel, html.light .cf-bubble { background: rgba(255, 252, 245, 0.94); border-color: rgba(8, 95, 109, 0.25); box-shadow: 0 0 32px rgba(8, 95, 109, 0.10), 0 24px 64px rgba(0, 0, 0, 0.15); }
html.light .cf-input { background: rgba(0, 0, 0, 0.03); border-color: rgba(0, 0, 0, 0.12); }
html.light .cf-input:focus { border-color: rgba(8, 95, 109, 0.55); box-shadow: 0 0 0 3px rgba(8, 95, 109, 0.15); }
html.light select.cf-input option { background: #fdfaf2; color: #2d3142; }
html.light .cf-pulse path { filter: none; }
html.light .cf-grip { background: rgba(0, 0, 0, 0.15); }
html.light .cf-close:hover { background: rgba(0, 0, 0, 0.05); }

/* The /contact/ page: the same form in a card on the page. */
.cf-page-card {
  max-width: 560px; margin: 0 auto; padding: 28px; border-radius: 20px;
  background: var(--color-bg-card, rgba(38, 41, 45, 0.95)); border: 1px solid rgba(0, 240, 255, 0.18);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.06);
}
html.light .cf-page-card { border-color: rgba(8, 95, 109, 0.2); }

@media (prefers-reduced-motion: reduce) {
  .cf-backdrop, .cf-panel, .cf-panel.is-open, .cf-bubble { transition: none; }
  .cf-panel.is-open .cf-field { animation: none; }
  .cf-pulse path { animation: none; stroke-dashoffset: 0; }
  .cf-dot::before { animation: none; }
}
