/* ==========================================================================
   Connecfy — public website, sign-in pages and error pages
   Needs tokens, base, components. Editorial headings use the serif; the
   interface and body copy use Manrope; identifiers and code use DM Mono.
   ========================================================================== */

.wrap { width: 100%; max-width: var(--site-max); margin-inline: auto; padding-inline: var(--page-pad); }
.wrap--narrow { max-width: 50rem; }
body.site { font-size: var(--fs-500); background: var(--bg); }

/* ---- Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(243, 245, 245, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__bar { display: flex; align-items: center; gap: var(--sp-8); min-height: 4rem; }
.site-logo img { height: 1.625rem; width: auto; }
.site-nav { display: flex; gap: var(--sp-1); margin-right: auto; }
.site-nav a {
  padding: 0.5rem 0.75rem; border-radius: var(--r-2);
  color: var(--text-2); font-size: var(--fs-300); font-weight: 650; text-decoration: none;
}
.site-nav a:hover { color: var(--text); background: var(--slate-100); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-actions { display: flex; align-items: center; gap: var(--sp-2); }

.site-menu { display: none; margin-left: auto; position: relative; }
.site-menu summary {
  list-style: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem;
  border-radius: var(--r-2); cursor: pointer; color: var(--text);
}
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu summary:hover { background: var(--slate-100); }
.site-menu .icon--close { display: none; }
.site-menu[open] .icon--open { display: none; }
.site-menu[open] .icon--close { display: inline-block; }
.site-menu__panel {
  position: absolute; right: 0; top: calc(100% + 0.5rem); width: min(20rem, calc(100vw - 2rem));
  padding: var(--sp-3); display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3); box-shadow: var(--shadow-pop);
}
.site-menu__panel a { padding: 0.75rem var(--sp-3); border-radius: var(--r-2); color: var(--text); font-weight: 650; text-decoration: none; }
.site-menu__panel a:hover { background: var(--slate-100); }
.site-menu__panel .btn { margin-top: var(--sp-2); }

@media (max-width: 52rem) {
  .site-nav, .site-actions { display: none; }
  .site-menu { display: block; }
  .site-header__bar { gap: var(--sp-4); }
}

/* ---- Typography for marketing sections ----------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.625rem;
  font-family: var(--font-mono); font-size: var(--fs-200); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text);
}
.eyebrow::before { content: ""; width: 1.5rem; border-top: 2px solid var(--signal-500); }
.display { font-family: var(--font-serif); font-weight: 500; font-size: var(--fs-display); line-height: 1.02; letter-spacing: -0.03em; }
.title   { font-family: var(--font-serif); font-weight: 500; font-size: var(--fs-title); line-height: 1.1; letter-spacing: -0.022em; }
.lead    { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); line-height: 1.55; color: var(--text-2); max-width: 36rem; }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--paper { background: var(--surface); border-block: 1px solid var(--border); }
.section__head { display: grid; gap: var(--sp-4); max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section__head p { color: var(--text-2); font-size: var(--fs-600); line-height: 1.55; }

/* ---- Hero ------------------------------------------------------------------------ */
.hero { padding-block: clamp(2.75rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4.5rem); overflow: clip; }
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) {
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  /* the product screenshot runs off the right edge of the window, so the interface stays legible */
  .hero .shot { margin-right: calc(-1 * (max(0px, (100vw - var(--site-max)) / 2) + var(--page-pad))); }
  .hero .shot__frame { border-right: 0; border-radius: var(--r-3) 0 0 var(--r-3); }
}
.hero__copy { display: grid; gap: var(--sp-6); justify-items: start; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.ticks { list-style: none; display: grid; gap: 0.625rem; font-size: var(--fs-400); color: var(--text-2); }
.ticks li { display: flex; gap: 0.625rem; align-items: baseline; }
.ticks .icon { color: var(--signal-600); transform: translateY(0.2em); }

/* Product screenshots: real captures of the dashboard, shown with a quiet frame */
.shot { margin: 0; }
.shot__frame {
  border: 1px solid var(--border-strong); border-radius: var(--r-3); overflow: hidden; background: var(--surface);
  box-shadow: 0 1px 2px rgba(10, 21, 32, 0.06), 0 24px 48px -24px rgba(10, 21, 32, 0.28);
}
.shot__frame img { width: 100%; height: auto; }
.shot figcaption { margin-top: var(--sp-3); font-size: var(--fs-200); color: var(--text-muted); }

.split-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); align-items: start; }
@media (max-width: 52rem) { .split-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---- Capabilities: a ruled list, not a grid of cards ------------------------------------ */
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--border-strong); }
@media (max-width: 52rem) { .specs { grid-template-columns: minmax(0, 1fr); } }
.spec { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--sp-2) var(--sp-4); padding: var(--sp-6) var(--sp-6) var(--sp-6) 0; border-bottom: 1px solid var(--border-strong); }
@media (min-width: 52.01rem) { .spec:nth-child(odd) { padding-right: var(--sp-8); } .spec:nth-child(even) { padding-left: var(--sp-8); border-left: 1px solid var(--border-strong); } }
.spec__n { font-family: var(--font-mono); font-size: var(--fs-200); color: var(--accent-text); padding-top: 0.2rem; }
.spec__title { font-size: var(--fs-600); font-weight: 700; letter-spacing: -0.01em; }
.spec__text { margin-top: 0.375rem; color: var(--text-2); }

/* ---- Developer band ---------------------------------------------------------------------- */
.band { background: var(--slate-900); color: #C9D6E0; }
.band .title, .band h2, .band h3 { color: #fff; }
.band .eyebrow { color: var(--signal-400); }
.band .eyebrow::before { border-top-color: var(--signal-400); }
.band a:not(.btn) { color: var(--signal-400); }
.band :focus-visible { outline-color: var(--signal-400); }
.band__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 64rem) { .band__grid { grid-template-columns: minmax(0, 4.6fr) minmax(0, 6fr); } }
.band__copy { display: grid; gap: var(--sp-5); justify-items: start; }
.band__copy p { font-size: var(--fs-600); line-height: 1.55; color: #B6C6D3; }
.band .ticks { color: #C9D6E0; }
.band .ticks .icon { color: var(--signal-400); }
.band .btn--secondary { background: transparent; color: #fff; border-color: #3B566F; }
.band .btn--secondary:hover { background: rgba(255, 255, 255, 0.07); border-color: #5C7890; }
.band .code { background: var(--slate-950); border-color: #1D3349; }
.band :not(pre) > code { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #E6EEF4; }
.code--stack { display: grid; gap: var(--sp-4); }

/* ---- Steps with the route line --------------------------------------------------------------- */
.steps-row { display: grid; gap: var(--sp-8); grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative; counter-reset: s; }
@media (max-width: 52rem) { .steps-row { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); } }
.step { position: relative; display: grid; gap: var(--sp-2); align-content: start; }
.step__node { display: flex; align-items: center; margin-bottom: var(--sp-3); }
.step__dot { width: 0.875rem; height: 0.875rem; flex: none; border-radius: 50%; border: 2px solid var(--signal-500); background: var(--bg); }
.step:first-child .step__dot { background: var(--signal-500); }
.step__line { flex: 1; border-top: 2px dashed var(--slate-300); margin-left: var(--sp-3); margin-right: var(--sp-4); }
.step:last-child .step__line { display: none; }
@media (max-width: 52rem) { .step__node { display: none; } .step { padding-left: var(--sp-5); border-left: 2px dashed var(--slate-300); } }
.step__k { font-family: var(--font-mono); font-size: var(--fs-200); color: var(--accent-text); letter-spacing: 0.06em; }
.step__title { font-size: var(--fs-700); font-weight: 700; letter-spacing: -0.012em; }
.step__text { color: var(--text-2); }

/* ---- Use cases ------------------------------------------------------------------------------------ */
.uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-6); }
@media (max-width: 52rem) { .uses { grid-template-columns: minmax(0, 1fr); } }
.use { padding-top: var(--sp-4); border-top: 2px solid var(--slate-800); display: grid; gap: var(--sp-2); align-content: start; }
.use h3 { font-size: var(--fs-600); font-weight: 700; }
.use p { color: var(--text-2); }
.use code { font-size: 0.8em; }

/* ---- Contact / access ---------------------------------------------------------------------------------- */
.access { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 60rem) { .access { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.access__copy { display: grid; gap: var(--sp-5); }
.contact-lines { list-style: none; display: grid; gap: var(--sp-3); }
.contact-lines li { display: flex; gap: var(--sp-3); align-items: center; }
.contact-lines .icon { color: var(--signal-700); }
.form-grid { display: grid; gap: 0 var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 36rem) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-card { padding: clamp(1.25rem, 3vw, 2rem); }
.thanks { text-align: center; padding: var(--sp-8) var(--sp-4); display: grid; gap: var(--sp-3); justify-items: center; }
.thanks .icon { width: 2.5rem; height: 2.5rem; color: var(--signal-600); }

/* ---- Footer: navy, with the operating company named ------------------------------------------------------- */
.site-footer { background: var(--slate-800); color: #B6C6D3; padding-block: clamp(2.5rem, 5vw, 4rem) var(--sp-6); }
.site-footer a:not(.btn) { color: #D6E1EA; text-decoration: none; }
.site-footer a:not(.btn):hover { color: #fff; text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--signal-400); }
.footer-grid { display: grid; gap: var(--sp-10) var(--sp-8); grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); }
@media (max-width: 52rem) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 30rem) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-brand img { height: 1.625rem; width: auto; margin-bottom: var(--sp-4); }
.footer-brand p { max-width: 26rem; font-size: var(--fs-300); }
.site-footer .footer-brand p a { text-decoration: underline; text-underline-offset: 0.2em; }
.footer-col h2 { font-size: var(--fs-100); font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #8CA3B6; margin-bottom: var(--sp-3); }
.footer-col ul { list-style: none; display: grid; gap: 0.5rem; font-size: var(--fs-300); }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4) var(--sp-8);
  margin-top: var(--sp-10); padding-top: var(--sp-5); border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--fs-200);
}
.footer-company { display: inline-flex; align-items: center; gap: var(--sp-3); }
.footer-company img { height: 1.125rem; width: auto; }

/* ---- Prose pages (about, legal, data handling) ------------------------------------------------------------------ */
.page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-hero .lead { margin-top: var(--sp-4); }
.page-hero + .section--tight { padding-top: 0; }
.prose { font-size: var(--fs-500); color: var(--text-2); }
.prose > * + * { margin-top: var(--sp-4); }
.prose h2 { margin-top: var(--sp-10); font-size: var(--fs-800); font-weight: 700; color: var(--text); letter-spacing: -0.018em; }
.prose h3 { margin-top: var(--sp-8); font-size: var(--fs-600); color: var(--text); }
.prose ul, .prose ol { padding-left: 1.25rem; display: grid; gap: var(--sp-2); }
.prose li::marker { color: var(--slate-400); }
.prose strong { color: var(--text); }
.prose .panel { margin-top: var(--sp-6); }
.facts-table { width: 100%; font-size: var(--fs-400); }
.facts-table th, .facts-table td { text-align: left; padding: 0.75rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.facts-table th { width: 11rem; color: var(--text-muted); font-weight: 600; padding-right: var(--sp-4); }
.notice { margin-top: var(--sp-6); }

/* ---- Pricing (rendered only when PUBLIC_PRICING_ENABLED) -------------------------------------------------------------------- */
.plans { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.plan { display: grid; gap: var(--sp-4); align-content: start; padding: var(--sp-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3); }
.plan__name { font-size: var(--fs-600); font-weight: 700; }
.plan__price { font-size: var(--fs-1000); font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan__price small { font-size: var(--fs-400); font-weight: 600; color: var(--text-muted); letter-spacing: 0; }

/* ---- Auth pages --------------------------------------------------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; background: var(--bg); }
.auth__top { padding: var(--sp-6) var(--page-pad); display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); }
.auth__top img { height: 1.625rem; width: auto; }
.auth__main { display: grid; place-items: start center; padding: clamp(1.5rem, 6vh, 4.5rem) var(--page-pad) var(--sp-12); }
.auth-card { width: min(26rem, 100%); }
.auth-card__head { margin-bottom: var(--sp-6); }
.auth-card__head h1 { font-family: var(--font-serif); font-weight: 500; font-size: var(--fs-1000); letter-spacing: -0.025em; line-height: 1.08; }
.auth-card__head p { margin-top: var(--sp-2); color: var(--text-muted); }
.auth-card .panel { padding: var(--sp-6); }
.auth-card__links { display: flex; justify-content: space-between; gap: var(--sp-4); margin-top: calc(var(--sp-2) * -1); margin-bottom: var(--sp-5); font-size: var(--fs-300); }
.auth__foot { padding: var(--sp-6) var(--page-pad); text-align: center; font-size: var(--fs-200); color: var(--text-muted); }
.auth__foot a { color: var(--text-2); }
.auth-note { margin-top: var(--sp-6); text-align: center; font-size: var(--fs-300); color: var(--text-muted); }

/* ---- Error pages ----------------------------------------------------------------------------------------------------------------- */
.error-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.error-page__main { display: grid; place-items: center; padding: var(--sp-12) var(--page-pad); }
.error-box { max-width: 36rem; display: grid; gap: var(--sp-4); }
.error-code { font-family: var(--font-mono); font-size: var(--fs-300); font-weight: 500; color: var(--accent-text); letter-spacing: 0.1em; }
.error-box h1 { font-family: var(--font-serif); font-weight: 500; font-size: var(--fs-title); letter-spacing: -0.022em; line-height: 1.1; }
.error-box p { color: var(--text-2); font-size: var(--fs-600); }
.error-box .route { margin-block: var(--sp-2); max-width: 14rem; }
