/* =====================================================================
   connectify.no — site styles. Colours, radii and shadows come from
   css/tokens.css (loaded first); nothing here decides a colour.
   ---------------------------------------------------------------------
   1. Base & typography
   2. Layout primitives (container, section, section header, grids)
   3. Buttons & links
   4. Cards, icon tiles, lists
   5. Hero + flow diagram
   6. Logo strip, steps, value grid, fan-out
   7. Comparison table, trust panels
   8. Systems, FAQ, call-to-action panel
   9. Sub-page hero, prose, contact, status pages
   10. Utilities, reveal motion, reduced motion
   ===================================================================== */

/* ===== 1. Base & typography ========================================= */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--surface-raised);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-feature-settings: "cv11", "ss01", "calt";
}

h1, h2, h3, h4 {
    color: var(--brand-navy);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.6em;
    letter-spacing: -0.02em;
    overflow-wrap: break-word;
    text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.25rem); line-height: 1.08; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.012em; }
h4 { font-size: 1.02rem; letter-spacing: -0.01em; }

p {
    margin: 0 0 1em;
    text-wrap: pretty;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--primary-text);
    text-decoration: none;
    text-underline-offset: 0.18em;
    transition: color var(--dur);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

strong {
    font-weight: 600;
}

:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

::selection {
    background: var(--primary-soft);
    color: var(--ink);
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.1em 0.4em;
}

/* ===== 2. Layout primitives ========================================= */

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.container-narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: var(--section-y) 0;
    position: relative;
}

.section-sm {
    padding: var(--section-y-sm) 0;
}

.section-alt {
    background: var(--surface);
}

.section-line {
    border-top: 1px solid var(--line);
}

/* Navy surface with the two faint brand circles (the login-page motif) */
.surface-navy {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--brand-navy);
    color: var(--on-navy);
}

.surface-navy::before,
.surface-navy::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.surface-navy::before {
    width: 900px;
    height: 900px;
    right: -320px;
    top: -420px;
    background: var(--brand-blue);
    opacity: 0.18;
}

.surface-navy::after {
    width: 520px;
    height: 520px;
    left: -200px;
    bottom: -280px;
    background: var(--brand-cyan);
    opacity: 0.14;
}

.surface-navy h1,
.surface-navy h2,
.surface-navy h3 {
    color: #ffffff;
}

.surface-navy p {
    color: var(--on-navy-muted);
}

/* Section header: eyebrow + title + lead */
.section-header {
    max-width: 720px;
    margin: 0 0 clamp(2rem, 4.5vw, 3.25rem);
}

.section-header.is-centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-title {
    margin-bottom: 0.75rem;
}

.section-lead {
    font-size: clamp(1.02rem, 1.5vw, 1.12rem);
    color: var(--ink-muted);
    line-height: 1.7;
    margin: 0;
}

.surface-navy .section-lead {
    color: var(--on-navy-muted);
}

/* The eyebrow: small caps in link-blue; the short line before it is the accent — a line, as the template allows */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary-text);
    margin-bottom: 1rem;
}

.eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.section-header.is-centered .eyebrow::before {
    display: none;
}

.surface-navy .eyebrow {
    color: var(--on-navy-muted);
}

.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
}

.section-actions.is-centered {
    justify-content: center;
}

/* Generic grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }

@media (max-width: 960px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Split layout (text + aside) */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

@media (max-width: 900px) {
    .split {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* ===== 3. Buttons & links =========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.3rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    color: var(--ink);
    background: var(--surface-raised);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    min-height: 44px;
    transition: background var(--dur), color var(--dur), border-color var(--dur), box-shadow var(--dur);
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    text-decoration: none;
    background: var(--surface);
    color: var(--ink);
}

.btn svg {
    width: 1.05em;
    height: 1.05em;
    flex: none;
    transition: transform var(--dur) var(--ease-out);
}

.btn:hover svg {
    transform: translateX(3px);
}

/* The one action on a surface */
.btn-primary {
    color: var(--on-primary);
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    color: var(--on-primary);
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-menu);
}

/* Secondary on a navy surface */
.btn-on-navy {
    color: #ffffff;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-on-navy:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.7);
}

/* Working state: three dots take the icon's place, the label stays */
.btn-dots {
    display: none;
    align-items: center;
    gap: 0.3em;
    height: 1em;
}

.btn-dots i {
    width: 0.4em;
    height: 0.4em;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
    animation: btn-dot 1s infinite ease-in-out;
}

.btn-dots i:nth-child(2) { animation-delay: 0.15s; }
.btn-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes btn-dot {
    0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-0.18em); }
}

.btn.is-busy {
    cursor: progress;
    pointer-events: none;
}

.btn.is-busy svg {
    display: none;
}

.btn.is-busy .btn-dots {
    display: inline-flex;
}

.btn:disabled,
.btn.is-busy {
    opacity: 0.9;
}

.email-reveal-link.is-busy {
    opacity: 0.6;
    cursor: progress;
}

.btn-sm {
    padding: 0.5rem 0.95rem;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-lg {
    padding: 0.85rem 1.6rem;
    font-size: 1rem;
    min-height: 50px;
}

.btn-block {
    width: 100%;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.link-arrow svg {
    width: 1em;
    height: 1em;
    transition: transform var(--dur) var(--ease-out);
}

.link-arrow:hover svg {
    transform: translateX(3px);
}

/* ===== 4. Cards, icon tiles, lists ================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
    gap: 1.25rem;
}

.card {
    position: relative;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--dur), border-color var(--dur), transform var(--dur) var(--ease-out);
}

.card:hover {
    box-shadow: var(--shadow-menu);
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.card h3 {
    margin-bottom: 0.45rem;
    font-size: 1.1rem;
}

.card p {
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.icon-tile {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-xl);
    background: var(--primary-soft);
    color: var(--primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    flex: none;
}

.icon-tile svg {
    width: 24px;
    height: 24px;
}

.icon-tile.is-navy {
    background: var(--brand-navy);
    color: #ffffff;
}

/* Numbered medallion (the setup-funnel / stepper motif) */
.medal {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-navy);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    flex: none;
}

/* Lists with a check mark */
.check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.55;
}

.check-list li::before {
    content: "";
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 0.1rem;
    border-radius: 50%;
    background: var(--success-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23157347' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.surface-navy .check-list li {
    color: var(--on-navy);
}

/* Lists with a plain dash — for what the platform never does */
.dash-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
}

.dash-list li {
    position: relative;
    padding-left: 1.4rem;
    line-height: 1.55;
}

.dash-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 0.8rem;
    height: 2px;
    border-radius: 2px;
    background: var(--mark-muted);
}

/* Value rows: icon + heading + text, in a grid */
.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.25rem 2rem;
}

.value {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.4rem 1.5rem;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.value .icon-tile {
    width: 42px;
    height: 42px;
    margin: 0;
}

.value .icon-tile svg {
    width: 21px;
    height: 21px;
}

.value h3 {
    font-size: 1.02rem;
    margin-bottom: 0.3rem;
}

.value p {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.93rem;
    line-height: 1.6;
}

/* Facts strip */
.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.fact {
    background: var(--surface-raised);
    padding: 1.25rem 1.4rem;
}

.fact-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-subtle);
    margin-bottom: 0.3rem;
}

.fact-value {
    display: block;
    font-weight: 600;
    color: var(--brand-navy);
    line-height: 1.4;
}

.fact-value .email-reveal-link {
    white-space: nowrap;
}

/* ===== 5. Hero + flow diagram ======================================= */

.hero {
    padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3.5rem, 8vw, 6rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.hero-content {
    max-width: 620px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.85rem 0.35rem 0.6rem;
    border-radius: var(--radius-pill);
    background: var(--navy-raised);
    border: 1px solid var(--navy-line);
    color: var(--on-navy);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.hero h1 {
    font-size: clamp(2.3rem, 5vw, 3.7rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.7vw, 1.22rem);
    line-height: 1.65;
    max-width: 560px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-note {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--on-navy-subtle) !important;
}

/* Flow diagram: sources → Connectify → accounting systems */
.flow {
    --flow-gap: 1.25rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--flow-gap);
    align-items: center;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--navy-line);
    border-radius: var(--radius-2xl);
}

.flow-col {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.flow-label {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--on-navy-subtle);
    text-align: center;
    margin-bottom: 0.15rem;
}

.flow-node {
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-md);
    background: var(--navy-raised);
    border: 1px solid var(--navy-line);
    border-left-width: 3px;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
}

/* Role colours: a source is info-blue, a target is accent-cyan — as a stripe, never as text */
.flow-node.is-source { border-left-color: var(--info); --flow-glow: var(--info); }
.flow-node.is-target { border-left-color: var(--accent); --flow-glow: var(--accent); }

/* The catalogue does not stop at the named systems */
.flow-node.is-more {
    background: transparent;
    border: 1px dashed var(--on-navy-subtle);
    color: var(--on-navy-muted);
    font-weight: 500;
    animation: none;
}

/* Data flows left to right: each node lights up in turn — the sources, then the
   hub, then the accounting systems — on a four-second cycle, and the lines carry
   moving dashes. Pure CSS; the reduced-motion block below stops it. */
.flow-node {
    animation: flow-glow 4s var(--ease-out) infinite;
    animation-delay: var(--flow-delay, 0s);
}

.flow-col:first-child .flow-node:nth-child(2) { --flow-delay: 0s; }
.flow-col:first-child .flow-node:nth-child(3) { --flow-delay: 0.22s; }
.flow-col:first-child .flow-node:nth-child(4) { --flow-delay: 0.44s; }
.flow-col:first-child .flow-node:nth-child(5) { --flow-delay: 0.66s; }
.flow-col:last-child .flow-node:nth-child(2) { --flow-delay: 1.9s; }
.flow-col:last-child .flow-node:nth-child(3) { --flow-delay: 2.08s; }
.flow-col:last-child .flow-node:nth-child(4) { --flow-delay: 2.26s; }
.flow-col:last-child .flow-node:nth-child(5) { --flow-delay: 2.44s; }
.flow-col:last-child .flow-node:nth-child(6) { --flow-delay: 2.62s; }
.flow-col:last-child .flow-node:nth-child(7) { --flow-delay: 2.8s; }

@keyframes flow-glow {
    0%, 18%, 100% {
        background: var(--navy-raised);
        box-shadow: 0 0 0 0 transparent;
    }
    7% {
        background: var(--navy-line);
        box-shadow: 0 0 0 1px var(--flow-glow), 0 0 16px var(--flow-glow);
    }
}

@keyframes flow-dash {
    to { background-position: 12px 0; }
}

@keyframes flow-ring {
    0% { transform: scale(0.92); opacity: 0; }
    6% { opacity: 0.9; }
    24% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

.flow-hub {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.75rem;
}

.flow-hub::before,
.flow-hub::after {
    content: "";
    position: absolute;
    top: 50%;
    width: var(--flow-gap);
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 12px);
    opacity: 0.85;
    animation: flow-dash 0.9s linear infinite;
}

.flow-hub::before { right: 100%; }
.flow-hub::after { left: 100%; }

.flow-hub-mark {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--logo-plate);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.06), var(--shadow-overlay);
}

/* The ring that pulses when the hub receives */
.flow-hub-mark::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0;
    pointer-events: none;
    animation: flow-ring 4s var(--ease-out) infinite;
    animation-delay: 1.1s;
}

.flow-hub-mark img {
    width: 56px;
    height: 56px;
}

.flow-hub-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.flow-hub-caption {
    font-size: 0.72rem;
    color: var(--on-navy-subtle);
    text-align: center;
    max-width: 12ch;
    line-height: 1.3;
    text-wrap: balance;
}

@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .flow {
        max-width: 560px;
        margin: 0 auto;
    }
}

@media (max-width: 520px) {
    .flow {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .flow-col {
        grid-template-columns: 1fr 1fr;
    }
    .flow-label {
        grid-column: 1 / -1;
    }
    .flow-hub::before,
    .flow-hub::after {
        display: none;
    }
    .flow-node.is-more {
        grid-column: 1 / -1;
    }
    .hero-actions .btn {
        flex: 1 1 100%;
    }
}

/* ===== 6. Logo strip, steps, value grid, fan-out ==================== */

.logo-strip {
    background: var(--surface-raised);
    border-bottom: 1px solid var(--line);
    padding: 2rem 0;
}

.logo-strip-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.logo-strip-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-subtle);
    text-align: center;
}

.logo-strip-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem clamp(1.5rem, 3.5vw, 2.75rem);
    flex-wrap: wrap;
}

.logo-item {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    height: 36px;
    opacity: 0.85;
    transition: opacity var(--dur);
}

.logo-item:hover {
    opacity: 1;
}

.logo-item img {
    max-height: 30px;
    max-width: 130px;
    width: auto;
    object-fit: contain;
}

/* Marks without a wordmark get the name as text, so the row reads evenly */
.logo-item.has-label img {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
}

.logo-item.has-label span {
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--brand-navy);
    white-space: nowrap;
}

.logo-strip-more {
    font-size: 0.85rem;
    color: var(--ink-muted);
}

/* The four steps, on one track (the pipeline stepper motif) */
.steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.steps::before {
    content: "";
    position: absolute;
    top: 2.6rem;
    left: 12%;
    right: 12%;
    height: 2px;
    background: var(--line-strong);
    opacity: 0.5;
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.3rem;
    box-shadow: var(--shadow-card);
}

.step .medal {
    margin-bottom: 1rem;
}

.step-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-text);
    margin-bottom: 0.3rem;
}

.step h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--ink-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.step-benefit {
    margin-top: 0.85rem !important;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
    color: var(--ink) !important;
    font-size: 0.88rem !important;
}

@media (max-width: 960px) {
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
    .steps::before {
        display: none;
    }
}

@media (max-width: 560px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

/* Fan-out: one POS system → Connectify → many companies with their own books */
.fan {
    display: grid;
    grid-template-columns: 1fr auto 1.3fr;
    gap: 1rem;
    align-items: center;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
}

.fan-source {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: var(--info-soft);
    border-left: 3px solid var(--info);
    text-align: center;
}

.fan-source strong {
    display: block;
    color: var(--brand-navy);
}

.fan-source span {
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.fan-hub {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.75rem;
}

.fan-hub::before,
.fan-hub::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 1.25rem;
    height: 2px;
    background: var(--accent);
}

.fan-hub::before { right: 100%; }
.fan-hub::after { left: 100%; }

.fan-hub img {
    width: 52px;
    height: 52px;
}

.fan-hub span {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-navy);
}

.fan-targets {
    display: grid;
    gap: 0.5rem;
}

.fan-target {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    font-size: 0.85rem;
}

.fan-target strong {
    color: var(--brand-navy);
    font-weight: 600;
    white-space: nowrap;
}

.fan-target span {
    color: var(--ink-muted);
    font-size: 0.78rem;
    text-align: right;
}

@media (max-width: 640px) {
    .fan {
        grid-template-columns: 1fr;
    }
    .fan-hub::before,
    .fan-hub::after {
        display: none;
    }
}

/* ===== 7. Comparison table, trust panels ============================ */

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-raised);
    box-shadow: var(--shadow-card);
}

.compare {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.compare th,
.compare td {
    padding: 1rem 1.1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
    line-height: 1.55;
}

.compare thead th {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    background: var(--surface);
}

.compare tbody th {
    font-weight: 600;
    color: var(--brand-navy);
    background: var(--surface);
    width: 22%;
    position: sticky;
    left: 0;
}

.compare td {
    color: var(--ink-muted);
}

.compare .is-us {
    background: var(--primary-soft);
    color: var(--ink);
    font-weight: 500;
}

.compare thead .is-us {
    color: var(--primary-text);
    border-bottom: 2px solid var(--primary);
}

.compare tbody tr:last-child th,
.compare tbody tr:last-child td {
    border-bottom: none;
}

.compare-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--ink-subtle);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.trust-panel {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
}

.trust-panel h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.trust-panel li {
    color: var(--ink-muted);
    font-size: 0.94rem;
}

@media (max-width: 800px) {
    .trust-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 8. Systems, FAQ, call-to-action panel ======================== */

.system-group {
    margin-top: 2.5rem;
}

.system-group:first-of-type {
    margin-top: 0;
}

.system-group-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand-navy);
    margin-bottom: 1.25rem;
}

.system-group-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1rem;
}

.system-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    padding: 1.5rem 1rem 1.25rem;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.system-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 1rem;
    right: 1rem;
    height: 3px;
    border-radius: 0 0 3px 3px;
}

.system-card.is-source::before { background: var(--info); }
.system-card.is-target::before { background: var(--accent); }

.system-logo {
    height: 64px;
    min-width: 64px;
    width: fit-content;
    border-radius: var(--radius-xl);
    background: var(--logo-plate);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    padding: 12px 14px;
}

.system-logo img {
    height: 38px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.system-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    display: grid;
    place-items: center;
    color: var(--primary-text);
    background: var(--primary-soft);
}

.system-icon svg {
    width: 28px;
    height: 28px;
}

.system-monogram {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--brand-navy);
    background: var(--surface);
    border: 1px solid var(--line);
}

.system-name {
    font-weight: 600;
    color: var(--brand-navy);
    font-size: 0.95rem;
}

.system-desc {
    color: var(--ink-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.system-note {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--ink-subtle);
}

@media (max-width: 640px) {
    .system-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    .system-card {
        padding: 1.2rem 0.75rem 1rem;
        gap: 0.5rem;
    }
    .system-logo {
        height: 56px;
        min-width: 56px;
        padding: 10px 12px;
    }
    .system-logo img {
        height: 34px;
        max-width: 120px;
    }
    .system-icon,
    .system-monogram {
        width: 56px;
        height: 56px;
    }
    .system-desc {
        font-size: 0.78rem;
    }
}

/* Highlight note (a soft plate with a primary stripe) */
.note {
    padding: 1.25rem 1.5rem;
    background: var(--primary-soft);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    line-height: 1.65;
}

.note-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary-text);
}

/* FAQ */
.faq {
    max-width: 820px;
    margin: 0 auto;
    display: grid;
    gap: 0.75rem;
}

.faq-item {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--dur), box-shadow var(--dur);
}

.faq-item[open] {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-card);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--brand-navy);
    font-size: 1rem;
    line-height: 1.45;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    background: var(--surface);
}

.faq-chevron {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-soft);
    position: relative;
    transition: transform var(--dur) var(--ease-out);
}

.faq-chevron::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--primary-text);
    border-bottom: 2px solid var(--primary-text);
    transform: translate(-50%, -65%) rotate(45deg);
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.35rem 1.25rem;
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Call-to-action panel on navy */
.cta-panel {
    border-radius: var(--radius-2xl);
    padding: clamp(2.5rem, 6vw, 4.25rem) clamp(1.5rem, 5vw, 4rem);
    text-align: center;
    box-shadow: var(--shadow-overlay);
}

.cta-panel h2 {
    font-size: clamp(1.6rem, 3.2vw, 2.3rem);
    margin-bottom: 0.75rem;
}

.cta-panel p {
    max-width: 560px;
    margin: 0 auto 1.75rem;
    font-size: clamp(1rem, 1.5vw, 1.1rem);
}

.cta-panel .hero-actions {
    justify-content: center;
}

/* ===== 9. Sub-page hero, prose, contact, status pages =============== */

.page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-raised) 100%);
    border-bottom: 1px solid var(--line);
    padding: clamp(3rem, 7vw, 5rem) 0 clamp(2.5rem, 5vw, 3.75rem);
}

/* The two brand colours as soft glows, faint, echoing the navy surfaces */
.page-hero::before,
.page-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.page-hero::before {
    width: 900px;
    height: 900px;
    right: -300px;
    top: -520px;
    background: radial-gradient(closest-side, var(--primary-soft), transparent 72%);
}

.page-hero::after {
    width: 480px;
    height: 480px;
    right: 14%;
    bottom: -300px;
    background: radial-gradient(closest-side, var(--accent-soft), transparent 72%);
    opacity: 0.8;
}

.page-hero-content {
    position: relative;
    max-width: 760px;
}

.page-hero h1 {
    margin-bottom: 0.9rem;
}

.page-hero p {
    font-size: clamp(1.05rem, 1.7vw, 1.2rem);
    color: var(--ink-muted);
    line-height: 1.65;
    max-width: 640px;
}

.prose {
    max-width: var(--container-narrow);
}

.prose h2 {
    font-size: 1.4rem;
    margin: 2.25rem 0 0.75rem;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
}

.prose p,
.prose li {
    color: var(--ink-muted);
    line-height: 1.75;
}

.prose ul {
    padding-left: 1.3rem;
    margin: 0 0 1em;
}

.prose li {
    margin-bottom: 0.4rem;
}

.prose-updated {
    margin-top: 2.5rem;
    font-size: 0.85rem;
    color: var(--ink-subtle);
}

/* Contact */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.contact-list {
    display: grid;
    gap: 1rem;
}

.contact-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.3rem 1.4rem;
    box-shadow: var(--shadow-card);
}

.contact-card .icon-tile {
    width: 42px;
    height: 42px;
    margin: 0;
}

.contact-card .icon-tile svg {
    width: 21px;
    height: 21px;
}

.contact-card h3 {
    font-size: 1.02rem;
    margin-bottom: 0.25rem;
}

.contact-card p {
    color: var(--ink-muted);
    margin: 0 0 0.35rem;
    font-size: 0.93rem;
}

.contact-card p:last-child {
    margin-bottom: 0;
}

.contact-form-wrapper {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-2xl);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-menu);
}

.contact-form-wrapper h2 {
    font-size: 1.45rem;
    margin-bottom: 0.35rem;
}

.contact-form-intro {
    color: var(--ink-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-size: max(16px, 0.95rem);
    font-family: inherit;
    color: var(--ink);
    background: var(--surface-raised);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    min-height: 44px;
    appearance: none;
    transition: border-color var(--dur), box-shadow var(--dur);
}

.form-input::placeholder {
    color: var(--ink-subtle);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235e6b7a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
    padding-right: 2.25rem;
    cursor: pointer;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-success {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1.6;
}

.form-success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--success-soft);
    color: var(--success);
    display: grid;
    place-items: center;
}

.form-success-icon svg {
    width: 28px;
    height: 28px;
}

.form-error {
    background: var(--danger-soft);
    color: var(--danger);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.field-error {
    display: block;
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

/* Honeypot field — invisible to people, bots fill it in */
.form-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.form-note {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--ink-subtle);
    text-align: center;
}

.phone-input-group {
    display: flex;
    gap: 0.5rem;
}

.phone-code {
    width: 128px;
    flex-shrink: 0;
}

.phone-number {
    flex: 1;
    min-width: 0;
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .phone-input-group {
        flex-direction: column;
    }
    .phone-code {
        width: 100%;
    }
}

/* Not found / error */
.status-page {
    padding: clamp(5rem, 12vw, 9rem) 0;
    text-align: center;
}

.status-code {
    display: inline-block;
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--brand-navy);
    margin-bottom: 1rem;
}

.status-page .section-lead {
    margin: 0 auto;
    max-width: 480px;
}

/* E-mail reveal (address assembled on click, see site.js) */
.email-reveal-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.email-reveal-link:hover {
    color: var(--primary-hover);
}

.site-footer .email-reveal-link {
    color: var(--on-navy-muted);
}

.site-footer .email-reveal-link:hover,
.site-footer .email-revealed {
    color: #ffffff;
}

/* Numbers from the platform */
.proof {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: clamp(2rem, 4vw, 3rem) 0;
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 1rem;
}

.proof-tile {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.3rem;
    box-shadow: var(--shadow-card);
    display: grid;
    gap: 0.3rem;
    align-content: start;
}

.proof-value {
    white-space: nowrap;
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--brand-navy);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.proof-value small {
    font-size: 0.55em;
    font-weight: 500;
    color: var(--ink-muted);
    letter-spacing: 0;
    white-space: nowrap;
}

.proof-label {
    font-size: 0.86rem;
    color: var(--ink-muted);
    line-height: 1.4;
}

.proof-note {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    color: var(--ink-subtle);
    text-align: center;
}

@media (max-width: 640px) {
    .proof-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    .proof-tile {
        padding: 1rem 1.05rem;
    }
    .proof-tile.is-lead {
        grid-column: 1 / -1;
    }
    .proof-value {
        font-size: 1.5rem;
    }
    .proof-label {
        font-size: 0.8rem;
    }
}

/* Why Connectify: the idea in three points beside the prose */
.why-points {
    display: grid;
    gap: 1rem;
}

.why-point {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 1.4rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.why-point h3 {
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

.why-point p {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.93rem;
    line-height: 1.6;
}

/* Everyone wins: four parties, each with "without" and "with" */
.win-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.win-card {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.6rem 1.5rem;
    box-shadow: var(--shadow-card);
    display: grid;
    gap: 1.1rem;
}

.win-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.win-head .icon-tile {
    margin: 0;
    width: 42px;
    height: 42px;
}

.win-head .icon-tile svg {
    width: 21px;
    height: 21px;
}

.win-head h3 {
    margin: 0;
    font-size: 1.15rem;
}

.win-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.win-without .win-label {
    color: var(--ink-subtle);
}

.win-without li {
    color: var(--ink-muted);
    font-size: 0.92rem;
}

.win-with {
    padding: 1rem 1.1rem;
    background: var(--primary-soft);
    border-radius: var(--radius-md);
}

.win-with .win-label {
    color: var(--primary-text);
}

.win-with li {
    font-size: 0.94rem;
    color: var(--ink);
}

.win-with .check-list {
    gap: 0.6rem;
}

@media (max-width: 800px) {
    .win-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 10. Utilities, motion ======================================== */

/* Spacing and layout utilities — the only way to nudge a block, because the
   content-security policy forbids style="" attributes */
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-section { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.align-start { align-items: start; }
.cols-1 { grid-template-columns: 1fr; }
.section-cta { padding-bottom: var(--section-y); }
.reveal-late { --reveal-delay: 120ms; }
.section-title-sm { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.status-note { font-size: 0.9rem; margin-top: 1rem; }
.dash-list-muted { margin-top: 1rem; font-size: 0.93rem; color: var(--ink-muted); }

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.muted {
    color: var(--ink-muted);
}

/* Scroll reveal: only active when site.js has marked the document */
html.js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
}

html.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    html.js [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .btn-dots i {
        animation: none;
        opacity: 0.8;
    }

    /* The flow diagram keeps its calm part — nodes lighting up in turn is a
       colour change, not movement — at a slower pace; the moving dashes and
       the expanding ring stay still. */
    .flow-node {
        animation-duration: 6s !important;
    }
    .flow-hub::before,
    .flow-hub::after,
    .flow-hub-mark::after {
        animation: none !important;
    }
}

@media print {
    .surface-navy::before,
    .surface-navy::after {
        display: none;
    }
}
