/* Kafana — landing page styles */

:root {
  --cream: #FBF8F1;
  --ink: #1A1A19;
  --smoke: #5F5E5A;
  --copper: #D85A30;
  --copper-deep: #993C1D;
  --honey: #BA7517;
  --honey-light: #FAEEDA;
  --plum: #4A1B0C;
  --whisper: #D3D1C7;

  /* dark */
  --d-bg: #1A1815;
  --d-text: #F1EFE8;
  --d-card: #23211C;
  --d-whisper: rgba(241, 239, 232, 0.14);
  --d-smoke: #9E9A92;

  --serif: ui-serif, "New York", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

/* type scale */
.t-display { font-family: var(--serif); font-size: 32px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.05; color: var(--ink); }
.t-h1 { font-family: var(--sans); font-size: 24px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.t-h2 { font-family: var(--sans); font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.t-h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.t-body { font-family: var(--sans); font-size: 16px; font-weight: 400; line-height: 1.55; color: var(--ink); }
.t-small { font-family: var(--sans); font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--smoke); }
.t-overline { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--smoke); }
.t-mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }

/* shared utilities */
.kf-hairline { border: 0.5px solid var(--whisper); }
.kf-hairline-b { border-bottom: 0.5px solid var(--whisper); }
.kf-hairline-t { border-top: 0.5px solid var(--whisper); }

/* Frame containers (artboards) */
.kf-frame {
  background: var(--cream);
  font-family: var(--sans);
  color: var(--ink);
  overflow: hidden;
  position: relative;
}
.kf-frame.dark {
  background: var(--d-bg);
  color: var(--d-text);
}
.kf-frame.dark .t-display,
.kf-frame.dark .t-h1,
.kf-frame.dark .t-h2,
.kf-frame.dark .t-h3,
.kf-frame.dark .t-body { color: var(--d-text); }
.kf-frame.dark .t-small,
.kf-frame.dark .t-overline { color: var(--d-smoke); }

/* CTA */
.kf-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--copper);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.1px;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  cursor: pointer;
  transition: background 220ms cubic-bezier(.2,.7,.3,1), transform 220ms cubic-bezier(.2,.7,.3,1);
  white-space: nowrap;
}
.kf-cta:hover { background: var(--copper-deep); }
.kf-cta:active { transform: scale(0.98); background: var(--copper-deep); }
.kf-cta:disabled { background: var(--whisper); color: var(--smoke); cursor: default; }

.kf-input {
  background: var(--cream);
  border: 0.5px solid var(--whisper);
  border-radius: 999px;
  padding: 14px 20px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  flex: 1;
  min-width: 0;
  transition: border-color 220ms cubic-bezier(.2,.7,.3,1);
}
.kf-input::placeholder { color: var(--smoke); }
.kf-input:focus { border-color: var(--ink); }

.kf-frame.dark .kf-input {
  background: var(--d-card);
  border-color: var(--d-whisper);
  color: var(--d-text);
}
.kf-frame.dark .kf-input::placeholder { color: var(--d-smoke); }

/* Phone bezel */
.kf-phone {
  border-radius: 38px;
  background: #1A1A19;
  padding: 8px;
  position: relative;
}

/* Soft honey-tinted halo behind a hero phone bezel. The phone sat
   "plopped" against cream — the radial atmosphere grounds it without
   adding a drop-shadow (BRAND.md forbids shadows). $honey at low
   opacity matches the warm hero theme; the gradient extends ~30%
   past the phone on each side and feathers to transparent before
   reaching the section padding. Wrap pattern:
     <div class="kf-phone-glow">
       <div class="kf-phone">…</div>
     </div>
*/
.kf-phone-glow {
  position: relative;
  display: inline-block;
}
.kf-phone-glow::before {
  content: '';
  position: absolute;
  /* Tight 40px halo on all four sides. Wider haloes (was -70px) were
     eclipsing the layered background phones in the desktop hero —
     the warm fog masked the screenshots peeking out from behind the
     foreground. `inset: -40px` keeps the halo as a soft ring around
     just the foreground bezel without bleeding into bg-phone space. */
  inset: -40px;
  background: radial-gradient(
    ellipse at center,
    rgba(186, 117, 23, 0.36) 0%,
    rgba(186, 117, 23, 0.16) 45%,
    rgba(186, 117, 23, 0) 78%
  );
  z-index: 0;
  pointer-events: none;
}
.kf-phone-glow > .kf-phone {
  position: relative;
  z-index: 1;
}
.kf-phone-screen {
  border-radius: 32px;
  overflow: hidden;
  background: var(--cream);
  position: relative;
}
.kf-phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #1A1A19;
  border-radius: 999px;
  z-index: 5;
}

/* Imagery placeholders — warm striped fills with mono captions */
.kf-img {
  position: relative;
  background: var(--honey-light);
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(186, 117, 23, 0.08) 0px,
      rgba(186, 117, 23, 0.08) 1px,
      transparent 1px,
      transparent 8px
    );
  border: 0.5px solid var(--whisper);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  overflow: hidden;
}
.kf-img.copper {
  background: #E8C8A8;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(153, 60, 29, 0.10) 0px,
      rgba(153, 60, 29, 0.10) 1px,
      transparent 1px,
      transparent 8px
    );
}
.kf-img.plum {
  background: #C9A89A;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(74, 27, 12, 0.12) 0px,
      rgba(74, 27, 12, 0.12) 1px,
      transparent 1px,
      transparent 8px
    );
}
.kf-img.wood {
  background: #C9A57A;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(74, 27, 12, 0.06) 0px,
      rgba(74, 27, 12, 0.06) 2px,
      transparent 2px,
      transparent 14px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(74, 27, 12, 0.04) 0px,
      rgba(74, 27, 12, 0.04) 1px,
      transparent 1px,
      transparent 4px
    );
}
.kf-img-cap {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--plum);
  background: rgba(251, 248, 241, 0.85);
  padding: 4px 8px;
  letter-spacing: 0.02em;
}

/* Pills */
.kf-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0.5px solid var(--whisper);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  white-space: nowrap;
}
.kf-pill.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* Stars */
.kf-star { color: var(--honey); font-size: 18px; line-height: 1; }
.kf-star.muted { color: var(--whisper); }

/* Map dots / strokes */
.kf-map-country {
  fill: var(--honey-light);
  stroke: var(--whisper);
  stroke-width: 0.5;
  transition: fill 220ms cubic-bezier(.2,.7,.3,1);
}
.kf-map-country.visited {
  fill: var(--copper);
}
.kf-map-country.muted {
  fill: var(--whisper);
}

/* Subtle entry */
@keyframes kfFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.kf-fade { animation: kfFadeUp 280ms cubic-bezier(.2,.7,.3,1) both; }

/* hide scrollbars in inner artboard scrolling regions */
.kf-frame::-webkit-scrollbar { display: none; }
.kf-frame { scrollbar-width: none; }

/* ---------------------------------------------------------------------------
 * Waitlist modal — vanilla DOM, controlled by waitlist-modal.js.
 * Brand-locked per BRAND.md:
 *   cream fill, 0.5px whisper border, 16pt radius, no shadows,
 *   scrim 200ms fade, modal 250ms slide-up + fade.
 * ------------------------------------------------------------------------- */

.kf-wl-locked {
  /* Prevents background scroll while the modal is open without
     introducing a layout shift on overlay-scrollbar systems. */
  overflow: hidden;
}

.kf-wl-scrim {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 25, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms cubic-bezier(.2,.7,.3,1);
  z-index: 100;
}
.kf-wl-scrim.kf-wl-open {
  opacity: 1;
  pointer-events: auto;
}

.kf-wl-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: calc(100% - 32px);
  max-width: 400px;
  background: var(--cream);
  border: 0.5px solid var(--whisper);
  border-radius: 16px;
  padding: 28px;
  z-index: 101;
  opacity: 0;
  /* Start state: 24px below center + faded out. End state slides up
     and fades in. Both the open and close paths use the same
     transition curve. */
  transform: translate(-50%, calc(-50% + 24px));
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(.2,.7,.3,1), transform 250ms cubic-bezier(.2,.7,.3,1);
}
.kf-wl-modal.kf-wl-open {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.kf-wl-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--smoke);
  cursor: pointer;
  border-radius: 999px;
  padding: 0;
  transition: background 180ms cubic-bezier(.2,.7,.3,1), color 180ms cubic-bezier(.2,.7,.3,1);
}
.kf-wl-close:hover {
  background: var(--honey-light);
  color: var(--ink);
}
.kf-wl-close:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

.kf-wl-title {
  margin: 0 0 18px 0;
  padding-right: 32px; /* leave room for the close button */
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

.kf-wl-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kf-wl-input {
  width: 100%;
  background: #FFFFFF;
  border: 0.5px solid var(--whisper);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  box-sizing: border-box;
  transition: border-color 220ms cubic-bezier(.2,.7,.3,1);
}
.kf-wl-input::placeholder {
  color: var(--smoke);
}
.kf-wl-input:focus {
  border-color: var(--ink);
}
.kf-wl-input:disabled {
  opacity: 0.6;
  cursor: default;
}

.kf-wl-cta {
  width: 100%;
  background: var(--copper);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.1px;
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  cursor: pointer;
  transition: background 220ms cubic-bezier(.2,.7,.3,1), transform 220ms cubic-bezier(.2,.7,.3,1);
}
.kf-wl-cta:hover {
  background: var(--copper-deep);
}
.kf-wl-cta:active {
  background: var(--copper-deep);
  transform: scale(0.98);
}
.kf-wl-cta:disabled {
  background: var(--whisper);
  color: var(--smoke);
  cursor: default;
  transform: none;
}

.kf-wl-error {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  color: #A32D2D;
  line-height: 1.4;
}

.kf-wl-caption {
  margin: 4px 0 0 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--smoke);
  line-height: 1.45;
}

.kf-wl-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 0;
  gap: 12px;
}

.kf-wl-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.kf-wl-success-title {
  margin: 4px 0 0 0;
  padding-right: 0;
  text-align: center;
}

.kf-wl-success-body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--smoke);
  line-height: 1.5;
  max-width: 280px;
}

@media (prefers-reduced-motion: reduce) {
  .kf-wl-scrim,
  .kf-wl-modal {
    transition: opacity 0ms;
  }
  .kf-wl-modal.kf-wl-open {
    transform: translate(-50%, -50%);
  }
  .kf-wl-modal {
    transform: translate(-50%, -50%);
  }
}
