@font-face {
  font-family: 'Red Hat Display';
  src: url('/assets/RedHatDisplay.ttf') format('truetype');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --ink: #10131a;
  --paper: #fffdf7;
  --muted: #5a6072;
  --line: #e4e0d4;
  --accent: #f5b820;
  --max: 46rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Red Hat Display', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

main { max-width: var(--max); margin: 0 auto; padding: 2rem 1.25rem 5rem; }
header { max-width: var(--max); margin: 0 auto; padding: 2rem 1.25rem 0; }
header img.logo { height: 2.5rem; width: auto; }

h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; margin: 1.5rem 0 0.5rem; }
h2 { font-size: 1.5rem; margin-top: 3rem; }
p.lead { font-size: 1.25rem; color: var(--muted); }

.hero { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.hero div { flex: 1 1 18rem; }

details {
  border-top: 1px solid var(--line);
  padding: 0.875rem 0;
}
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { color: var(--muted); }
details p { margin: 0.75rem 0 0; }

a { color: var(--ink); text-underline-offset: 0.2em; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.button:disabled { opacity: 0.5; cursor: progress; }

form label { display: block; margin-top: 1rem; font-weight: 600; }
form input[type='email'],
form input[type='password'],
form textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  font: inherit;
  background: #fff;
}
form textarea { min-height: 7rem; resize: vertical; }
.honeypot { position: absolute; left: -9999px; }

.status { margin-top: 1rem; color: var(--muted); min-height: 1.5rem; }
.status[data-state='error'] { color: #a3271f; }

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.hero svg {
  width: 9rem;
  height: auto;
  display: block;
}

.bobee-frame {
  opacity: 0;
  animation: bobee-wave 1.2s steps(1, end) 4;
}
.bobee-frame.frame-0 {
  opacity: 1;
  animation-name: bobee-wave-first;
}
.bobee-frame.frame-1 { animation-delay: 0.15s; }
.bobee-frame.frame-2 { animation-delay: 0.3s; }
.bobee-frame.frame-3 { animation-delay: 0.45s; }

.hero svg:hover .bobee-frame { animation-iteration-count: infinite; }

@keyframes bobee-wave {
  0%, 50% { opacity: 1; }
  12.5%, 62.5%, 100% { opacity: 0; }
}
@keyframes bobee-wave-first {
  0%, 50%, 100% { opacity: 1; }
  12.5%, 62.5% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bobee-frame { animation: none !important; opacity: 0; }
  .bobee-frame.frame-0 { opacity: 1; }
}

/* Bobee floating contact widget */

.bobee-launcher {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: var(--ink);
}

.bobee-hint {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 16rem;
  margin-bottom: 2.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 1rem 1rem 0.2rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 4px 24px rgba(16, 19, 26, 0.14);
  text-align: left;
  line-height: 1.4;
}
.bobee-hint strong { font-size: 1rem; }
.bobee-hint span { font-size: 0.8125rem; font-weight: 500; }
.bobee-hint small { display: block; font-size: 0.6875rem; font-weight: 400; color: var(--muted); }

.bobee-launcher[aria-expanded='true'] .bobee-hint { display: none; }

.bobee-orb {
  position: relative;
  display: block;
  width: 8.875rem;
  height: 8.875rem;
  flex: none;
}
.bobee-orb svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 4px 3px rgba(16, 19, 26, 0.2));
}

.bobee-launcher:hover .bobee-orb .bobee-frame { animation-iteration-count: infinite; }
.bobee-launcher[aria-expanded='true'] .bobee-orb .bobee-frame { animation: none; opacity: 0; }
.bobee-launcher[aria-expanded='true'] .bobee-orb .bobee-frame.frame-0 { opacity: 1; }

.bobee-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 8.5rem;
  z-index: 31;
  width: 22rem;
  max-width: calc(100% - 2rem);
  max-height: calc(100dvh - 10rem);
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  box-shadow: 0 16px 64px rgba(16, 19, 26, 0.24);
  animation: bobee-panel-in 0.2s ease-out;
}

.bobee-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  background: var(--ink);
  color: #fff;
  border-radius: 1.1rem 1.1rem 0 0;
}
.bobee-panel-header h2 { margin: 0; font-size: 1.5rem; }
.bobee-panel-header p { margin: 0.25rem 0 0; font-size: 0.75rem; color: #c9cdd8; }

.bobee-panel-close {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  border-radius: 50%;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.bobee-panel-body { padding: 1.35rem; }

.bobee-greeting {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.2rem 1rem 1rem 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}
.bobee-greeting p { margin: 0; font-size: 0.8125rem; line-height: 1.65; }
.bobee-greeting p + p { margin-top: 0.5rem; font-size: 0.75rem; color: var(--muted); }

.bobee-panel-note { font-size: 0.6875rem; color: var(--muted); margin: 0.75rem 0 0; }

.bobee-panel form .button { width: 100%; }
.bobee-panel .status { margin-top: 0.75rem; }

body.has-bobee footer { padding-bottom: 7.5rem; }

@keyframes bobee-panel-in {
  from { opacity: 0; transform: translateY(0.6rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .bobee-launcher { right: 0.75rem; bottom: max(0.75rem, env(safe-area-inset-bottom)); gap: 0.35rem; }
  .bobee-orb { width: 6.5rem; height: 6.75rem; }
  .bobee-hint { max-width: 13rem; margin-bottom: 1.25rem; padding: 0.65rem 0.75rem; }
  .bobee-hint strong { font-size: 0.875rem; }
  .bobee-hint span { font-size: 0.75rem; }
  .bobee-hint small { font-size: 0.625rem; }
  .bobee-panel { right: 0.75rem; bottom: 6.5rem; width: calc(100% - 1.5rem); max-width: 22rem; max-height: calc(100dvh - 8rem); }
  .bobee-panel-header { padding: 0.85rem 1rem; }
  .bobee-panel-body { padding: 1rem; }
  body.has-bobee footer { padding-bottom: 6rem; }
}
