/* ============================================================
   HospiFlow AI — styles.css
   Custom styles layered on top of Tailwind (CDN).
   Brand tokens per the HospiFlow AI Brand Book:
   Midnight #0E1A2B · Flow Blue #2563EB · Copper #C0754D
   Cloud #F6F8FA · Linen #FAF7F2
   ============================================================ */

/* ---------- Base ---------- */

:root {
  --midnight: #0E1A2B;
  --surface: #14233A;
  --flow: #2563EB;
  --deepflow: #1D4ED8;
  --copper: #C0754D;
  --copper-light: #E8C4A8;
  --cloud: #F6F8FA;
  --linen: #FAF7F2;
  --ink: #0E1A2B;
  --body: #334155;
  --muted: #64748B;
  --mist: #94A3B8;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  color: var(--body);
  background: #ffffff;
}

/* Display font for headings */
.font-display {
  font-family: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
}

/* Tabular numerals for data — brand rule */
.font-data {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

/* Accessible skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--midnight);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* Visible focus for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Shadows (cool-toned, per brand book) ---------- */

.shadow-brand-sm { box-shadow: 0 2px 8px rgba(14, 26, 43, 0.08); }
.shadow-brand-md { box-shadow: 0 8px 24px rgba(14, 26, 43, 0.10); }
.shadow-brand-lg { box-shadow: 0 16px 48px rgba(14, 26, 43, 0.14); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1;
  border-radius: 10px;
  padding: 0.875rem 1.5rem;
  transition: transform 150ms ease, background-color 150ms ease,
    border-color 150ms ease, box-shadow 150ms ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--flow);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--deepflow);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid #cbd5e1;
}
.btn-secondary:hover { background: var(--cloud); border-color: var(--mist); }

.btn-lg { padding: 1rem 1.75rem; font-size: 1.0625rem; }

/* On-dark variants */
.btn-on-dark { background: #ffffff; color: var(--midnight); }
.btn-on-dark:hover { background: var(--cloud); transform: translateY(-1px); }

/* ---------- Cards ---------- */

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 2px 8px rgba(14, 26, 43, 0.08);
  transition: box-shadow 200ms ease, transform 200ms ease;
}
a.card:hover, .card-hover:hover {
  box-shadow: 0 8px 24px rgba(14, 26, 43, 0.10);
  transform: translateY(-2px);
}

/* Flat technical card (used on Cloud surfaces) */
.card-flat {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.75rem;
}

/* Premium marker: copper top edge — one per card group max */
.card-featured { border-top: 3px solid var(--copper); }

/* ---------- Section label (kicker) ---------- */

.kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.75rem;
}

/* ---------- Navigation ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.nav-link {
  color: var(--body);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); }
.nav-link[aria-current="page"] { font-weight: 600; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--midnight);
  display: none;
  flex-direction: column;
  padding: 1.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: #f1f5f9;
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: 2rem;
  font-weight: 600;
  padding: 0.75rem 0;
  text-decoration: none;
}
.mobile-menu a:hover { color: var(--copper-light); }

/* ---------- Flowmark logo ---------- */

.flowmark-lines .fl-line {
  stroke: var(--flow);
  stroke-width: 3.5;
  stroke-linecap: round;
  fill: none;
}
.flowmark-lines .fl-node { fill: var(--copper); }

/* ---------- Hero product mockup (pure CSS, no photography) ---------- */

.mockup-scene { perspective: 1200px; }

.mockup-cover {
  background: linear-gradient(155deg, #0e1a2b 0%, #14233a 60%, #1d3252 100%);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(14, 26, 43, 0.30);
  transform: rotateY(-8deg) rotateX(2deg);
  transition: transform 400ms ease;
}
.mockup-scene:hover .mockup-cover { transform: rotateY(-4deg) rotateX(1deg); }

.mockup-page {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(14, 26, 43, 0.12);
}

/* Floating stat badge on the mockup */
.float-badge {
  animation: floaty 5s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Skeleton lines inside mockups/placeholders */
.skeleton-line {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
}
.skeleton-line.dark { background: rgba(241, 245, 249, 0.22); }

/* Screenshot frames (product page) */
.shot-frame {
  background: var(--cloud);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* ---------- FAQ accordion ---------- */

.faq-item { border-bottom: 1px solid #e2e8f0; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  padding: 1.25rem 0;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: 0;
  font-size: 1.0625rem;
  cursor: pointer;
}
.faq-icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--flow);
  transition: transform 200ms ease;
}
.faq-item[data-open="true"] .faq-icon { transform: rotate(45deg); }
.faq-a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 250ms ease;
}
.faq-a > p { padding-bottom: 1.25rem; }

/* ---------- Forms ---------- */

.field {
  width: 100%;
  background: var(--cloud);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.field::placeholder { color: var(--mist); }
.field:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--flow);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.375rem;
}

/* ---------- Scroll reveal (JS adds .revealed) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* Respect reduced motion — brand rule, non-negotiable */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-badge { animation: none; }
  .mockup-cover { transform: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Prose (legal + article pages) ---------- */

.prose-brand h2 {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ink);
  margin: 2rem 0 0.625rem;
}
.prose-brand h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  margin: 1.5rem 0 0.5rem;
}
.prose-brand p { margin: 0 0 1rem; line-height: 1.7; }
.prose-brand ul { list-style: disc; padding-left: 1.5rem; margin: 0 0 1rem; }
.prose-brand li { margin: 0.375rem 0; line-height: 1.6; }
.prose-brand a { color: var(--flow); text-decoration: underline; text-underline-offset: 2px; }
.prose-brand strong { color: var(--ink); }

/* ---------- Misc ---------- */

/* Copper closing line in footer */
.footer-signoff { color: var(--copper); letter-spacing: 0.02em; }

/* Check bullet lists */
.check-list li {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin: 0.5rem 0;
  line-height: 1.55;
}
.check-list svg { flex: none; margin-top: 0.2rem; }

/* Subtle divider */
.rule { border-top: 1px solid #e2e8f0; }
