/* ==========================================================================
   Passhai Technologies — shared site styles
   ========================================================================== */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --navy-950: #061229;
  --navy-900: #0b1f45;
  --navy-800: #13295a;
  --navy-700: #1e3a73;
  --blue-600: #1d68f0;
  --blue-500: #3b7cf4;
  --blue-50: #eef4ff;
  --mint-500: #00c48c;
  --mint-600: #00a877;
  --mint-50: #e9faf3;
  --ink: #0b1f45;
  --ink-2: #3d4b66;
  --ink-3: #6b7890;
  --line: rgba(11, 31, 69, 0.09);
  --line-strong: rgba(11, 31, 69, 0.16);
  --shadow-sm: 0 1px 2px rgba(11, 31, 69, 0.05), 0 2px 8px rgba(11, 31, 69, 0.04);
  --shadow-md: 0 12px 32px -8px rgba(11, 31, 69, 0.14), 0 4px 10px -4px rgba(11, 31, 69, 0.06);
  --shadow-lg: 0 32px 64px -16px rgba(11, 31, 69, 0.24);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 999px;
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --accent: var(--blue-600);
  --accent-soft: var(--blue-50);
  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--ink);
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }

.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 600; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(255, 255, 255, 0.92); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 0.92rem; font-weight: 600; color: var(--ink-2);
  padding: 8px 14px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav .nav-dot { width: 8px; height: 8px; border-radius: 50%; }
.nav .nav-cta { background: var(--navy-900); color: #fff; margin-left: 8px; }
.nav .nav-cta:hover { background: var(--navy-700); color: #fff; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong);
  background: var(--surface); border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
  position: relative; transition: transform .2s, background .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--r-full);
  font-weight: 700; font-size: 0.96rem; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-primary:hover { box-shadow: 0 12px 26px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-dark { background: var(--navy-900); color: #fff; }
.btn-dark:hover { background: var(--navy-700); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-light { background: #fff; color: var(--navy-900); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.3); }
.btn-outline-light:hover { border-color: #fff; }

/* ===== Typography helpers ===== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.display { font-size: clamp(2.5rem, 5.6vw, 4.25rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; }
.h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.025em; }
.h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.015em; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-2); line-height: 1.65; }
.muted { color: var(--ink-3); }
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-tight { padding: clamp(56px, 7vw, 80px) 0; }
.section-head { max-width: 700px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { margin-top: 16px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--r-full);
  font-size: 0.8rem; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill .dot.live { animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.icon-tile {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); flex-shrink: 0;
}
.icon-tile svg { width: 24px; height: 24px; }

/* Feature grid (used on product pages) */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 28px; }
.feature .icon-tile { margin-bottom: 20px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--ink-2); font-size: 0.96rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 28px; position: relative; }
.step-num {
  font-family: var(--font-display); font-weight: 800; font-size: 0.85rem;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-900); color: #fff; margin-bottom: 20px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: 0.96rem; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color .15s; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 24px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; width: 10px; height: 10px; flex-shrink: 0;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq .answer { padding: 0 24px 22px; color: var(--ink-2); }

/* Check list */
.checks { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.checks li::before {
  content: ''; flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d68f0' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.checks li strong { color: var(--ink); }

/* ===== Reveal on scroll (only when JS is running) ===== */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: .08s; }
.js .reveal-d2 { transition-delay: .16s; }
.js .reveal-d3 { transition-delay: .24s; }

/* ===== Footer ===== */
.site-footer { background: var(--navy-950); color: #a9b5cc; padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand img { height: 40px; width: auto; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: .95; }
.footer-brand p { font-size: 0.92rem; max-width: 320px; line-height: 1.65; }
.footer-tagline { margin-top: 24px; font-family: var(--font-display); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.24em; color: #fff; }
.footer-tagline span { color: var(--mint-500); margin: 0 6px; }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin-bottom: 16px; font-weight: 700; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.92rem; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 28px; font-size: 0.84rem; color: #7d8aa5; }

/* ===== Simple / legal pages ===== */
.page-head { padding: clamp(56px, 8vw, 88px) 0 32px; }
.page-head .display { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
.page-head .lead { margin-top: 14px; max-width: 680px; }
.prose-card { padding: clamp(28px, 5vw, 48px); margin-bottom: 96px; }
.prose { color: var(--ink-2); font-size: 1rem; }
.prose h2 { font-size: 1.35rem; margin: 36px 0 12px; }
.prose h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.prose > :first-child { margin-top: 0; }
.prose p { margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; display: flex; flex-direction: column; gap: 6px; }
.prose strong { color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.prose code { font-size: 0.88em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.prose a, .link { color: var(--blue-600); text-decoration: underline; text-underline-offset: 3px; }
.callout { background: var(--blue-50); border-left: 4px solid var(--blue-600); padding: 16px 20px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 20px 0; color: var(--ink-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; padding: 12px 16px 20px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 16px; font-size: 1rem; border-radius: 12px; }
  .nav .nav-cta { margin: 8px 0 0; justify-content: center; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container, .container-narrow { padding: 0 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .brand img { height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.contact-card { padding: 28px; display: flex; flex-direction: column; }
.contact-card .icon-tile { margin-bottom: 20px; }
.contact-card h2 { font-size: 1.15rem; margin-bottom: 6px; }
.contact-card p { color: var(--ink-2); font-size: .95rem; margin-bottom: 20px; }
.contact-card .btn { margin-top: auto; align-self: flex-start; }
.contact-card.passhai .icon-tile { background: var(--blue-50); color: var(--blue-600); }
.contact-card.jama .icon-tile { background: #fcf0d9; color: #9a5d0c; }
.company-strip { padding: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 96px; }
.company-strip small { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.company-strip p { font-weight: 600; font-size: .95rem; }

/* ===== 404 ===== */
.notfound { text-align: center; padding: clamp(80px, 14vw, 160px) 0; }
.notfound .code { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 14vw, 8rem); line-height: 1; letter-spacing: -.05em; background: linear-gradient(120deg, var(--blue-600), var(--mint-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 16px 0 10px; }
.notfound p { color: var(--ink-2); margin-bottom: 32px; }
.notfound .btn-row { justify-content: center; }

@media (max-width: 860px) {
  .contact-grid, .company-strip { grid-template-columns: 1fr; }
}

/* ===== Mobile readability ===== */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0; }
  .section-head { margin-bottom: 28px; }
  .section-head .lead { margin-top: 12px; }
  .display { font-size: clamp(2.1rem, 9.5vw, 2.6rem); line-height: 1.08; }
  .h2 { font-size: 1.6rem; line-height: 1.18; }
  .h3 { font-size: 1.08rem; }
  .lead { font-size: 1.04rem; line-height: 1.6; }
  .eyebrow { font-size: .74rem; margin-bottom: 12px; }
  .btn { padding: 14px 20px; }

  /* cards become compact icon + text rows */
  .feature-grid { gap: 12px; }
  .feature { padding: 20px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: start; }
  .feature .icon-tile { grid-row: span 2; margin-bottom: 0; width: 42px; height: 42px; border-radius: 12px; }
  .feature .icon-tile svg { width: 20px; height: 20px; }
  .feature h3 { margin-bottom: 4px; }
  .feature p { font-size: .94rem; }
  .steps { gap: 12px; }
  .step { padding: 20px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; }
  .step-num { grid-row: span 2; margin-bottom: 0; }
  .step h3 { margin-bottom: 4px; }

  .faq summary { padding: 16px 18px; font-size: .98rem; }
  .faq .answer { padding: 0 18px 18px; font-size: .95rem; }

  .page-head { padding: 40px 0 24px; }
  .prose-card { padding: 22px 18px; margin-bottom: 56px; border-radius: var(--r-md); }
  .prose h2 { font-size: 1.2rem; margin-top: 28px; }
  .contact-card { padding: 22px; }
  .company-strip { padding: 22px; margin-bottom: 56px; }
  .site-footer { padding: 48px 0 28px; }
  .footer-grid { padding-bottom: 32px; }
}

/* Legal tables */
.table-wrap { overflow-x: auto; margin: 8px 0 20px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: .82rem; letter-spacing: .02em; }
.prose tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  .table-wrap { border: 0; overflow: visible; }
  .prose table { min-width: 0; }
  .prose thead { display: none; }
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose tr { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 10px; }
  .prose td { border: 0; padding: 3px 0; }
  .prose td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
  .prose td:first-child { font-size: 1rem; }
}

/* Data deletion request template */
.request-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; margin: 16px 0 20px; }
.request-box .rb-row { display: flex; gap: 12px; margin-bottom: 8px; color: var(--ink); font-weight: 600; font-size: .94rem; }
.request-box span { flex-shrink: 0; width: 72px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.request-box .rb-body { display: flex; gap: 12px; margin: 4px 0 18px; }
.request-box .rb-body p { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin: 0; flex: 1; font-size: .92rem; color: var(--ink); line-height: 1.7; }
.request-box em { color: var(--ink-3); }
.prose .request-box .btn { color: #fff; text-decoration: none; }
@media (max-width: 640px) {
  .request-box { padding: 16px; }
  .request-box .rb-row, .request-box .rb-body { flex-direction: column; gap: 2px; }
  .request-box .btn { width: 100%; }
}
