/* Shared foundation for the brand landing pages (caseongo.com / rangeen.com).
   Each brand's styles.css sets the palette via CSS variables:
     --lp-accent          brand primary
     --lp-accent-strong   darker hover shade
     --lp-accent-soft     faint tint for selected states
   and builds its own page design on top. This file only carries what both
   sites share: the font, sane resets, and the sign-in dialog injected by
   /shared/portal.js. */

@font-face {
  font-family: 'Inter';
  src: url('/shared/fonts/inter-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--lp-accent, #1d4ed8); }

:focus-visible {
  outline: 2px solid var(--lp-accent, #1d4ed8);
  outline-offset: 2px;
}

/* Screen-reader-only helper + the enquiry honeypot field. Kept off-screen
   rather than display:none so naive form-filling bots still "see" it. */
.lp-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* ── Sign-in dialog (markup injected by portal.js) ─────────────────────── */

.lp-modal[hidden] { display: none; }

.lp-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 16px 16px;
}

.lp-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.lp-modal__panel {
  position: relative;
  width: 100%; max-width: 440px;
  background: #fff; color: #0f172a;
  border-radius: 14px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
}

.lp-modal__close {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px;
  border: 0; border-radius: 8px;
  background: transparent; color: #64748b;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.lp-modal__close:hover { background: #f1f5f9; color: #0f172a; }

.lp-modal__panel h2 {
  margin: 0 0 6px;
  font-size: 20px; font-weight: 700; letter-spacing: -0.01em;
}

.lp-modal__hint {
  margin: 0 0 18px;
  font-size: 13.5px; line-height: 1.55; color: #475569;
}
.lp-modal__hint b { color: #0f172a; }

.lp-modal__mode {
  display: flex; gap: 6px;
  background: #f1f5f9; border-radius: 9px; padding: 4px;
  margin-bottom: 16px;
}
.lp-modal__mode label {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px; font-weight: 600; color: #475569;
  cursor: pointer; user-select: none;
}
.lp-modal__mode input { accent-color: var(--lp-accent, #1d4ed8); margin: 0; }
.lp-modal__mode label:has(input:checked) {
  background: #fff; color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}

.lp-modal__row {
  display: flex; align-items: stretch;
  border: 1.5px solid #cbd5e1; border-radius: 9px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.lp-modal__row:focus-within { border-color: var(--lp-accent, #1d4ed8); }
.lp-modal__row input {
  flex: 1; min-width: 0;
  border: 0; outline: none;
  padding: 11px 12px;
  font: inherit; font-size: 15px; color: #0f172a;
}
.lp-modal__domain {
  display: flex; align-items: center;
  padding: 0 12px 0 4px;
  font-size: 14px; font-weight: 500; color: #64748b;
  background: #f8fafc; border-left: 1px solid #e2e8f0;
  white-space: nowrap;
}

.lp-modal__error {
  margin: 10px 2px 0;
  font-size: 13px; line-height: 1.5; color: #b91c1c;
}
.lp-modal__error[hidden] { display: none; }

.lp-modal__submit {
  width: 100%;
  margin-top: 16px;
  padding: 11px 16px;
  border: 0; border-radius: 9px;
  background: var(--lp-accent, #1d4ed8); color: #fff;
  font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.lp-modal__submit:hover { background: var(--lp-accent-strong, #1e3a8a); }
.lp-modal__submit:disabled { opacity: 0.65; cursor: default; }

.lp-modal__anyway {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 13px; font-weight: 500;
}
.lp-modal__anyway[hidden] { display: none; }

@media (max-width: 480px) {
  .lp-modal { padding-top: 8vh; }
  .lp-modal__panel { padding: 22px 18px 18px; }
}
