/* ESYNC website, version 2 (shorter page, no app pictures).
   Brand rules (ESYNC_BRAND_GUIDE.md): light theme only, Plus Jakarta Sans + IBM Plex Mono,
   12px minimum text, 1px borders, 10px card radius, 8px controls. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Brand */
  --ink: #0A1628;
  --ink-2: #12223B;
  --ink-line: #24375A;
  --primary: #1557B0;
  --primary-hover: #124A96;
  --primary-deep: #0C3B6E;
  --sky: #4DA3F7;
  --sky-soft: #A9D0FB;
  --on-dark: #CBD6E7;
  --on-dark-strong: #E6EDF7;

  /* Neutrals */
  --text: #0A1628;
  --muted: #3D4654;
  --page: #F7F8FA;
  --card: #FFFFFF;
  --border: #D1D5DB;
  --border-lt: #E5E7EB;
  --tint: #E0ECFA;
  --tint-border: #C4D8F2;

  /* Status */
  --success: #1A7A4E; --success-text: #0D5A2E; --success-border: #A3D9B1;
  --danger: #B42030;  --danger-text: #6B1620;

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --radius-card: 10px;
  --radius-ctl: 8px;
  --shadow-sm: 0 1px 2px rgba(10, 22, 40, 0.06);
  --shadow-md: 0 18px 40px -18px rgba(10, 22, 40, 0.28);

  --container: 1200px;
  --gutter: 16px;
  --header-h: 68px;
}
@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  overflow-x: clip;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary-hover); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-deep); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.site-header :focus-visible,
.hero :focus-visible,
.section-dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--sky); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -120px; z-index: 100;
  background: #fff; color: var(--ink); padding: 12px 18px; border-radius: var(--radius-ctl);
  font-weight: 700; text-decoration: none; box-shadow: var(--shadow-md);
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-deep);
}
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-white { background: #fff; }
.section-page { background: var(--page); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 14px;
  text-wrap: balance;
}
.section-head > p:not(.eyebrow) { font-size: 1.125rem; color: var(--muted); margin-top: 16px; text-wrap: pretty; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 11px 20px;
  border-radius: var(--radius-ctl); border: 1px solid transparent;
  font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn .icon { width: 18px; height: 18px; }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 17px; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-secondary { background: #fff; border-color: var(--border); color: var(--ink); }
.btn-secondary:hover { background: var(--page); border-color: #B9BFC8; color: var(--ink); }
.btn-ghost-dark { background: transparent; border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.btn-ghost-dark:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.7); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8); }
.bar { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; margin-right: auto; }
.brand:hover { color: #fff; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: 0.08em; }
.brand-desc {
  font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sky-soft); margin-top: 5px;
}
.nav { display: none; align-items: center; gap: 2px; }
.nav a {
  color: var(--on-dark-strong); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 12px; border-radius: var(--radius-ctl);
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.nav a.is-current { color: #fff; background: rgba(255, 255, 255, 0.11); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-cta { display: none; }
.menu-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--radius-ctl); border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent; color: #fff; cursor: pointer;
}
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.mobile-menu { border-top: 1px solid rgba(255, 255, 255, 0.08); background: var(--ink); padding-bottom: 20px; }
.mobile-menu ul { display: grid; padding-top: 6px; }
.mobile-menu li a {
  display: block; padding: 14px 2px; color: #fff; text-decoration: none; font-weight: 600; font-size: 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.mobile-menu .btn { width: 100%; margin-top: 18px; }
@media (min-width: 560px) {
  .header-cta { display: inline-flex; }
}
/* Keep in step with the matchMedia width in site.js */
@media (min-width: 900px) {
  .nav { display: flex; }
  .menu-btn { display: none; }
  .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: #fff; text-align: center;
  padding-block: clamp(56px, 8vw, 104px) clamp(170px, 19vw, 260px);
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% -10%, rgba(21, 87, 176, 0.45), rgba(21, 87, 176, 0) 70%),
    radial-gradient(36% 30% at 50% 84%, rgba(77, 163, 247, 0.2), rgba(77, 163, 247, 0) 70%);
}
.hero .container { position: relative; z-index: 1; }
.hero-copy { max-width: 980px; margin-inline: auto; }
.hero .eyebrow { color: var(--sky-soft); }
.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.4rem, 1rem + 6vw, 5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.hero h1 .accent { display: block; color: var(--sky); }
/* Plus Jakarta Sans sets commas and periods loosely at display sizes; pull them in */
.p { margin-left: -0.06em; }
.lead {
  font-size: clamp(1.1rem, 0.95rem + 0.7vw, 1.4rem);
  color: var(--on-dark);
  margin: 24px auto 0;
  max-width: 32em;
  text-wrap: balance;
}
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
@media (max-width: 559px) {
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-ctas .btn { width: min(100%, 280px); }
}

/* Abstract "sync ribbon": lines that meet at one point. Decoration only, no product imagery. */
.hero-ribbon {
  position: absolute; left: 0; bottom: 0; width: 100%;
  height: clamp(160px, 21vw, 300px); pointer-events: none;
}
.rib-lines path { fill: none; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.rib-signals path {
  fill: none; stroke: #E6F1FE; stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 26 1974; stroke-dashoffset: 2000;
  animation: rib-signal 9s linear infinite;
}
/* Different speeds and start points, so the pulses never line up */
.rib-signals .s1 { animation-duration: 8s; animation-delay: -0.6s; }
.rib-signals .s2 { animation-duration: 9.6s; animation-delay: -2.3s; }
.rib-signals .s3 { animation-duration: 11.2s; animation-delay: -4s; }
.rib-signals .s4 { animation-duration: 8s; animation-delay: -5.7s; }
.rib-signals .s5 { animation-duration: 9.6s; animation-delay: -7.4s; }
@keyframes rib-signal { to { stroke-dashoffset: 0; } }
.rib-dot { fill: #EAF4FF; }
.rib-halo {
  fill: none; stroke: var(--sky-soft); stroke-width: 1.5; vector-effect: non-scaling-stroke;
  transform-box: view-box; transform-origin: 720px 139.6px;
  animation: rib-halo 3.2s ease-out infinite;
}
@keyframes rib-halo { from { transform: scale(1); opacity: 0.8; } to { transform: scale(5); opacity: 0; } }

/* ---------- Who it's for ---------- */
.roles { background: #fff; border-bottom: 1px solid var(--border-lt); }
.roles-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; padding-block: 28px; }
.roles-label { font-weight: 700; color: var(--muted); font-size: 15px; text-align: center; text-wrap: balance; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; padding: 6px 14px;
  background: var(--tint); color: var(--primary-deep); border: 1px solid var(--tint-border);
  border-radius: 999px; font-size: 14px; font-weight: 600;
}

/* ---------- Cards ---------- */
.grid-3 { display: grid; gap: 20px; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-3 { gap: 24px; } }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px; }
@media (min-width: 760px) and (max-width: 1023px) { .card, .sec-card { padding: 22px; } }
.card h3 { font-size: 1.22rem; font-weight: 700; margin-top: 20px; letter-spacing: -0.015em; }
.card p { color: var(--muted); margin-top: 10px; font-size: 1rem; text-wrap: pretty; }
.icon-tile {
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 12px; background: var(--primary); color: #fff;
}
.icon-tile .icon { width: 24px; height: 24px; }

/* ---------- How it works ---------- */
.path { display: grid; max-width: 1080px; margin-inline: auto; }
.path-step { position: relative; padding: 0 0 30px 76px; }
.path-step:last-child { padding-bottom: 0; }
.path-node {
  position: absolute; left: 0; top: 0; width: 56px; height: 56px;
  display: grid; place-items: center; border-radius: 16px;
  background: var(--tint); border: 1px solid var(--tint-border); color: var(--primary);
}
.path-node .icon { width: 26px; height: 26px; }
.path-step::after { content: ""; position: absolute; left: 27px; top: 64px; bottom: 6px; width: 2px; background: var(--tint-border); }
.path-step:last-child::after { display: none; }
.path-num { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; color: var(--primary-deep); }
.path-step h3 { font-size: 1.2rem; font-weight: 700; margin-top: 4px; letter-spacing: -0.015em; }
.path-text { color: var(--muted); font-size: 1rem; margin-top: 8px; text-wrap: pretty; }
@media (min-width: 900px) {
  .path { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .path-step, .path-step:last-child { padding: 76px 0 0; }
  .path-step::after { left: 68px; right: -20px; top: 27px; bottom: auto; width: auto; height: 2px; }
}

/* ---------- Security (dark band) ---------- */
.section-dark { background: var(--ink); color: #fff; }
.section-dark .eyebrow { color: var(--sky-soft); }
.section-dark .section-head > p:not(.eyebrow) { color: var(--on-dark); }
.sec-card { background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: var(--radius-card); padding: 28px; }
.sec-card .icon-tile { background: rgba(77, 163, 247, 0.14); color: var(--sky); border: 1px solid rgba(77, 163, 247, 0.32); }
.sec-card h3 { font-size: 1.18rem; font-weight: 700; margin-top: 18px; letter-spacing: -0.015em; }
.sec-card p { color: var(--on-dark); font-size: 1rem; margin-top: 8px; text-wrap: pretty; }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; gap: 8px; }
@media (min-width: 1024px) {
  .faq-layout { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
  .faq-layout .section-head { position: sticky; top: calc(var(--header-h) + 32px); }
}
.faq-list { border-top: 1px solid var(--border); }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; cursor: pointer; list-style: none;
  font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--primary-hover); }
.faq-list summary .icon { color: var(--primary); transition: transform 0.2s ease; }
.faq-list details[open] summary .icon { transform: rotate(180deg); }
.answer { padding: 0 4px 22px; color: var(--muted); max-width: 64ch; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; gap: 40px; }
@media (min-width: 1024px) { .contact-layout { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 64px; align-items: center; } }
.contact-copy h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; margin-top: 14px; }
.contact-lead { font-size: 1.125rem; color: var(--muted); margin-top: 16px; }
.email-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px;
  margin-top: 28px; padding: 18px 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card);
}
.ec-text { min-width: 0; }
.ec-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.ec-email { font-size: 1.22rem; font-weight: 800; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.ec-email:hover { color: var(--primary-hover); text-decoration: underline; }
.email-card .btn { margin-left: auto; }

.form-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow-sm); }
.form-card h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.form-grid { display: grid; gap: 18px; margin: 22px 0 24px; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .full { grid-column: 1 / -1; }
}
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.opt { font-weight: 500; color: var(--muted); }
.input {
  width: 100%; padding: 12px 14px; font-size: 16px; color: var(--ink); background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: #6B7280; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21, 87, 176, 0.2); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field-error { display: none; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--danger-text); }
.field.has-error .field-error { display: block; }
.form-note { margin-top: 12px; text-align: center; font-size: 13px; color: var(--muted); }
.contact-done {
  margin-top: 22px; padding: 20px; border-radius: 12px;
  background: #F1F9F4; border: 1px solid var(--success-border);
}
.contact-done:focus { outline: none; }
.contact-done:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.done-title { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--success-text); }
.done-title .icon { color: var(--success); }
.contact-done > p:not(.done-title) { margin-top: 8px; color: var(--muted); font-size: 0.97rem; }
.contact-done .textarea { margin-top: 14px; min-height: 170px; font-family: var(--mono); font-size: 13px; }
.done-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); padding-block: 56px 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}
.footer-brand .brand { margin-right: 0; }
.footer-tag { margin-top: 16px; font-size: 1.05rem; font-weight: 600; color: var(--on-dark-strong); }
.footer-mail { margin-top: 8px; }
.site-footer a { color: var(--on-dark-strong); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-col h2 {
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sky-soft);
}
.footer-col ul { display: grid; gap: 10px; margin-top: 16px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px; color: var(--on-dark);
}

/* ---------- Simple pages (privacy, not found) ---------- */
.simple-page { min-height: 100vh; display: flex; flex-direction: column; }
.simple-page main { flex: 1 0 auto; }
.site-footer.compact { padding-block: 28px; }
.site-footer.compact .footer-bottom { margin-top: 0; padding-top: 0; border-top: 0; }
.page-hero { background: var(--ink); color: #fff; padding-block: clamp(48px, 7vw, 80px); }
.page-hero .eyebrow { color: var(--sky-soft); }
.page-hero h1 { margin-top: 14px; font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); font-weight: 800; letter-spacing: -0.035em; }
.page-hero p:not(.eyebrow) { margin-top: 14px; color: var(--on-dark); max-width: 46em; font-size: 1.1rem; }
.prose { max-width: 72ch; padding-block: 48px 88px; }
.prose h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 40px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose p { margin-top: 12px; }
.prose ul { list-style: disc; padding-left: 1.3em; margin-top: 12px; display: grid; gap: 8px; }
.notfound { padding-block: clamp(72px, 12vw, 140px); text-align: center; }
.notfound .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.notfound-code { font-family: var(--mono); font-size: 14px; letter-spacing: 0.14em; color: var(--primary-deep); }
.notfound h1 { margin-top: 14px; font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); font-weight: 800; letter-spacing: -0.035em; }
.notfound p:not(.notfound-code) { margin: 14px auto 0; max-width: 34em; color: var(--muted); font-size: 1.1rem; }

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

/* ---------- Print ---------- */
@media print {
  .site-header, .hero-ribbon, .form-card, .skip-link { display: none !important; }
  .hero, .section-dark, .site-footer { background: #fff !important; color: #000 !important; }
  .hero { padding-bottom: 32px; }
}
