/* ============================================================
   BookSync design system — tokens + shared components
   ------------------------------------------------------------
   One source of truth for colour, type, spacing and the shared
   building blocks every sub page uses. Page CSS files only
   arrange these components; they never invent new colours,
   sizes or radii.

   Principles
   - Calm: one statement per screen, lots of white space.
   - Every sub page opens the same way: a centred statement with
     one orange word, and a thin orange line leading into the page.
   - Big, rounded photos of real people and places.
   - Orange is an accent (one word, bullets, buttons), never a fill
     for large areas.
   - One button style: orange outline with a bold arrow, shaped like
     the header buttons (15px radius, 2px border, semibold).

   All classes are prefixed `bs-` so this file can load on every
   page without touching the legacy styles.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
    font-family: 'BS Display';
    src: url('../fonts/nexa-black-regular/Nexa Black Regular/Nexa Black Regular.ttf');
    font-weight: 900;
    font-display: swap;
}
@font-face {
    font-family: 'BS Text';
    src: url('../fonts/Graphik_Collection/Graphik Family/Graphik-Regular-Trial.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'BS Text';
    src: url('../fonts/Graphik_Collection/Graphik Family/Graphik-Medium-Trial.otf') format('opentype');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'BS Text';
    src: url('../fonts/Graphik_Collection/Graphik Family/Graphik-Semibold-Trial.otf') format('opentype');
    font-weight: 600;
    font-display: swap;
}

:root {
    /* Colour — black, white, orange; two greys for hierarchy */
    --bs-orange: #ee5a23;
    --bs-orange-text: #c4441a;     /* orange as small text on white (AA) */
    --bs-ink: #111116;
    --bs-ink-2: #3f3f48;           /* body text */
    --bs-ink-3: #74747e;           /* secondary text */
    --bs-line: #e4e4e7;
    --bs-field-line: #d4d4d8;
    --bs-paper: #ffffff;
    --bs-paper-2: #f6f6f4;

    /* Type */
    --bs-font-display: 'BS Display', 'Nexa Black', system-ui, sans-serif;
    --bs-font-text: 'BS Text', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --bs-size-display: clamp(2.4rem, 5.4vw, 4.5rem);
    --bs-size-h2: clamp(1.9rem, 3.6vw, 3rem);
    --bs-size-h3: clamp(1.5rem, 2.4vw, 2.1rem);
    --bs-size-h4: 1.0625rem;
    --bs-size-lede: clamp(1.0625rem, 1.4vw, 1.2rem);
    --bs-size-body: 1rem;
    --bs-size-small: 0.875rem;

    /* Space — 8pt scale */
    --bs-space-1: 8px;
    --bs-space-2: 16px;
    --bs-space-3: 24px;
    --bs-space-4: 40px;
    --bs-space-5: 64px;
    --bs-space-6: 104px;
    --bs-space-7: 160px;

    /* Layout */
    --bs-page: 1180px;
    --bs-narrow: 920px;
    --bs-read: 640px;
    --bs-gutter: clamp(20px, 5vw, 48px);

    /* Shape */
    --bs-radius: 16px;             /* photos, panels */
    --bs-radius-field: 6px;        /* inputs */
    --bs-pill: 999px;              /* pills: filters, choices */
    --bs-radius-btn: 15px;         /* buttons, same as the header buttons */
    --bs-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 5.5l6.5 6.5-6.5 6.5'/%3E%3C/svg%3E");

    --bs-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Page wrapper ---------- */
.bs-page {
    font-family: var(--bs-font-text);
    font-size: var(--bs-size-body);
    line-height: 1.7;
    color: var(--bs-ink-2);
    background: var(--bs-paper);
    -webkit-font-smoothing: antialiased;
}

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

.bs-container--narrow { max-width: calc(var(--bs-narrow) + 2 * var(--bs-gutter)); }

.bs-section { padding-block: var(--bs-space-6); }

.bs-page a:focus-visible,
.bs-page button:focus-visible,
.bs-page summary:focus-visible,
.bs-page select:focus-visible {
    outline: 2px solid var(--bs-orange);
    outline-offset: 3px;
}

/* ---------- Headings ---------- */
.bs-display,
.bs-h2,
.bs-h3 {
    font-family: var(--bs-font-display);
    font-weight: 900;
    color: var(--bs-ink);
    margin: 0;
    text-wrap: balance;
}

.bs-display { font-size: var(--bs-size-display); line-height: 1.08; letter-spacing: -0.01em; }
.bs-h2 { font-size: var(--bs-size-h2); line-height: 1.12; }
.bs-h3 { font-size: var(--bs-size-h3); line-height: 1.15; }

.bs-display em,
.bs-h2 em,
.bs-h3 em { font-style: normal; color: var(--bs-orange); }

.bs-h4 {
    font-family: var(--bs-font-text);
    font-weight: 600;
    font-size: var(--bs-size-h4);
    color: var(--bs-ink);
    margin: 0;
    line-height: 1.4;
}

.bs-lede {
    font-size: var(--bs-size-lede);
    line-height: 1.6;
    color: var(--bs-ink-2);
    margin: 0;
    text-wrap: pretty;
}

.bs-center { text-align: center; }
.bs-center .bs-lede { margin-inline: auto; max-width: 52ch; }

/* ---------- Hero: how every sub page opens ---------- */
.bs-hero {
    padding-block: var(--bs-space-6) 0;
    text-align: center;
}

.bs-hero .bs-display { max-width: 16ch; margin-inline: auto; }

.bs-hero .bs-lede {
    max-width: 48ch;
    margin: var(--bs-space-3) auto 0;
}

/* Thin orange line that leads the eye from the statement into the page */
.bs-hero__line {
    display: block;
    width: 1.5px;
    height: var(--bs-space-6);
    margin: var(--bs-space-5) auto 0;
    background: linear-gradient(var(--bs-orange), rgba(238, 90, 35, 0));
}

/* Jump links under the hero statement: "01 Administratie  02 ..." */
.bs-toc {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 32px;
    margin-top: var(--bs-space-4);
}
.bs-toc a {
    color: var(--bs-ink);
    font-size: 1.0625rem;
    text-decoration: none;
    border-bottom: 1.5px solid transparent;
    transition: border-color .2s var(--bs-ease), color .2s var(--bs-ease);
}
.bs-toc a span { color: var(--bs-orange); font-family: var(--bs-font-display); font-size: .875rem; margin-right: 4px; }
.bs-toc a:hover { color: var(--bs-orange-text); border-color: var(--bs-orange); }

/* Small orange number above a chapter heading */
.bs-num {
    display: block;
    font-family: var(--bs-font-display);
    font-size: 1.125rem;
    color: var(--bs-orange);
    margin-bottom: var(--bs-space-1);
}

/* One big centred sentence between two sections */
.bs-statement { text-align: center; padding-block: var(--bs-space-5); }
.bs-statement .bs-h2 { margin: 0; }

/* ---------- Section intro (centred h2 + optional lede) ---------- */
.bs-intro {
    text-align: center;
    max-width: 760px;
    margin: 0 auto var(--bs-space-5);
}
.bs-intro .bs-lede { margin-top: var(--bs-space-2); }

/* ---------- Buttons: one style ----------
   Matches the header buttons: 15px radius, 2px border, semibold 18px
   lettering, and a fill that wipes down from the top on hover. The arrow
   is drawn as thick as the border so it holds up next to the bold type.
   :visited is listed so reset.css (a:visited { color: inherit }) can't turn
   the lettering dark once the link has been followed. */
.bs-btn,
.bs-btn:visited {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px 0 18px;
    border-radius: var(--bs-radius-btn);
    border: 2px solid var(--bs-orange);
    background: linear-gradient(var(--bs-orange), var(--bs-orange)) top / 100% 0 no-repeat;
    color: var(--bs-orange-text);
    font-family: var(--bs-font-text);
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: .5px;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-size .3s ease, color .3s ease;
}

.bs-btn::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: var(--bs-arrow) center / contain no-repeat;
    mask: var(--bs-arrow) center / contain no-repeat;
    transition: transform .3s ease;
}

.bs-btn:hover { background-size: 100% 100%; color: #fff; }
.bs-btn:hover::before { transform: translateX(3px); }

/* ---------- Bullets (orange rings) ---------- */
.bs-bullets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bs-bullets li { position: relative; padding-left: 22px; font-size: var(--bs-size-small); color: var(--bs-ink-2); }
.bs-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .6em;
    width: 8px;
    height: 8px;
    border: 1.5px solid var(--bs-orange);
    border-radius: 50%;
}

/* ---------- Photo ---------- */
.bs-photo { margin: 0; }

.bs-photo__frame {
    aspect-ratio: var(--bs-ratio, 4 / 5);
    border-radius: var(--bs-radius);
    overflow: hidden;
    background: var(--bs-paper-2);
}

.bs-photo__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--bs-focus, 50% 50%);
    display: block;
    transition: transform .7s var(--bs-ease);
}

a:hover .bs-photo__frame img { transform: scale(1.03); }

.bs-photo figcaption { margin-top: var(--bs-space-1); font-size: var(--bs-size-small); color: var(--bs-ink-3); }

.bs-photo--landscape { --bs-ratio: 3 / 2; }

/* App screenshots sit on warm paper instead of filling the frame */
.bs-photo__frame--screen { position: relative; }
.bs-photo__frame--screen img {
    position: absolute;
    top: 14%;
    left: 12%;
    width: auto;
    height: 72%;
    max-width: none;
    object-fit: contain;
    object-position: left top;
    border-radius: 8px;
    border: 1px solid var(--bs-line);
}
.bs-photo__frame--phone img {
    left: 50%;
    top: 8%;
    height: 92%;
    transform: translateX(-50%);
    border-radius: 18px;
}
a:hover .bs-photo__frame--screen img,
.pub-card:hover .bs-photo__frame--screen img { transform: none; }
.bs-photo__frame--phone img { transform: translateX(-50%) !important; }
.bs-photo--square { --bs-ratio: 1 / 1; }
.bs-photo--tall { --bs-ratio: 3 / 5; }

/* ---------- Split: photo next to text, alternating ---------- */
.bs-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--bs-space-5);
    align-items: center;
}
.bs-split + .bs-split { margin-top: var(--bs-space-6); }
.bs-split--flip > :first-child { order: 2; }

/* ---------- Form fields ---------- */
.bs-field { display: flex; flex-direction: column; gap: 6px; }

.bs-field__label {
    font-weight: 600;
    font-size: var(--bs-size-small);
    color: var(--bs-ink);
}
.bs-field__label span { font-weight: 400; color: var(--bs-ink-3); }
.bs-field__label abbr { color: var(--bs-orange); text-decoration: none; }

.bs-input {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border: 1px solid var(--bs-field-line);
    border-radius: var(--bs-radius-field);
    background: var(--bs-paper);
    font: inherit;
    font-size: 1rem;
    color: var(--bs-ink);
    transition: border-color .2s var(--bs-ease), box-shadow .2s var(--bs-ease);
}

textarea.bs-input { min-height: 160px; resize: vertical; line-height: 1.5; }

select.bs-input {
    appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ee5a23' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.bs-input::placeholder { color: #a1a1aa; }

.bs-input:hover { border-color: #a1a1aa; }

.bs-input:focus {
    outline: none;
    border-color: var(--bs-orange);
    box-shadow: 0 0 0 3px rgba(238, 90, 35, .15);
}

.bs-check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: var(--bs-size-small);
    color: var(--bs-ink-2);
    line-height: 1.5;
}
.bs-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--bs-orange); flex: none; }
.bs-check a { color: var(--bs-orange-text); }

/* ---------- Cases: client photo + their words ---------- */
.bs-cases {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--bs-space-3);
}

.bs-case {
    display: flex;
    flex-direction: column;
    gap: var(--bs-space-2);
    color: inherit;
    text-decoration: none;
}

.bs-case:nth-child(even) { margin-top: var(--bs-space-5); }   /* staggered, calmer rhythm */

.bs-case blockquote {
    margin: 0;
    font-size: var(--bs-size-body);
    line-height: 1.5;
    color: var(--bs-ink);
    text-wrap: pretty;
}

.bs-case cite {
    display: block;
    margin-top: 6px;
    font-style: normal;
    font-size: var(--bs-size-small);
    color: var(--bs-ink-3);
}

/* ---------- FAQ ---------- */
.bs-faq { max-width: var(--bs-narrow); margin: 0 auto; }

.bs-faq details { border-bottom: 1px solid var(--bs-line); }
.bs-faq details:first-child { border-top: 1px solid var(--bs-line); }

.bs-faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--bs-space-3);
    padding: 22px 0;
    cursor: pointer;
    list-style: none;
    font-weight: 500;
    font-size: 1.125rem;
    color: var(--bs-ink);
}
.bs-faq summary::-webkit-details-marker { display: none; }
.bs-faq summary:hover { color: var(--bs-orange-text); }

.bs-faq summary::after {
    content: "";
    flex: none;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--bs-orange);
    border-radius: 50%;
    background:
        linear-gradient(var(--bs-orange), var(--bs-orange)) center / 10px 1.5px no-repeat,
        linear-gradient(var(--bs-orange), var(--bs-orange)) center / 1.5px 10px no-repeat;
    transition: transform .25s var(--bs-ease);
}
.bs-faq details[open] summary::after {
    background: linear-gradient(var(--bs-orange), var(--bs-orange)) center / 10px 1.5px no-repeat;
    transform: rotate(180deg);
}

.bs-faq__a { padding: 0 52px 24px 0; color: var(--bs-ink-2); }
.bs-faq__a p { margin: 0 0 var(--bs-space-1); }
.bs-faq__a a { color: var(--bs-orange-text); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .bs-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bs-split { grid-template-columns: 1fr; gap: var(--bs-space-4); }
    .bs-split--flip > :first-child { order: 0; }
    .bs-section { padding-block: var(--bs-space-5); }
}

@media (max-width: 560px) {
    .bs-hero { padding-top: var(--bs-space-5); }
    .bs-hero__line { height: var(--bs-space-5); margin-top: var(--bs-space-4); }
    .bs-cases { gap: var(--bs-space-4) var(--bs-space-2); }
    .bs-case:nth-child(even) { margin-top: var(--bs-space-4); }
    .bs-faq__a { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .bs-page * { transition: none !important; }
}

/* ---------- Scroll reveal (main.js initScrollReveal): soft fade in place ----------
   `translate` (not `transform`) so it adds to the transforms other scripts set
   (the parallax service cards, the magnetic buttons). The classes are removed
   once the block is in, so nothing stays layered or promoted afterwards. */
.reveal {
    opacity: 0;
    translate: 0 14px;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), translate 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-revealed {
    opacity: 1;
    translate: none;
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; translate: none; transition: none; }
}

/* ---------- Logo (src/templates/logo.php): one shape, its colours per background ---------- */
.bs-logo {
    display: block;
    width: 100%;
    height: auto;
    --logo-accent-a: #F17C16;   /* top of the cube, "Book" */
    --logo-accent-b: #ED9954;
    --logo-accent-c: #ED5117;
}
.bs-logo__accent-a, .bs-logo__book { fill: var(--logo-accent-a); }
.bs-logo__accent-b { fill: var(--logo-accent-b); }
.bs-logo__accent-c { fill: var(--logo-accent-c); }
.bs-logo__base-a { fill: var(--logo-base-a); }
.bs-logo__base-b { fill: var(--logo-base-b); }
.bs-logo__base-c { fill: var(--logo-base-c); }
.bs-logo__sync { fill: var(--logo-ink); }

/* Dark background (the home hero video): light grey base and lettering */
.bs-logo--on-dark { --logo-base-a: #D2D2D2; --logo-base-b: #F3F3F3; --logo-base-c: #E2E2E2; --logo-ink: #F3F3F3; }

/* Light background: grey base, dark lettering (was #999, too light on white) */
.bs-logo--on-light { --logo-base-a: #777777; --logo-base-b: #999999; --logo-base-c: #898989; --logo-ink: #5f5f68; }

/* Loader overlay: the whole logo tone-on-tone grey, just lighter than the overlay (#202025) */
.bs-logo--muted {
    --logo-accent-a: #4e4e57; --logo-accent-b: #5a5a63; --logo-accent-c: #45454d;
    --logo-base-a: #34343b; --logo-base-b: #3d3d45; --logo-base-c: #2f2f36;
    --logo-ink: #4e4e57;
}

/* ---------- Squircle corners (owner, 2026-12-01) ----------
   Photos, panels and cards get a continuous corner (a superellipse, like Apple's) where the browser can draw
   one (`corner-shape`, Chrome and Edge for now); every other browser keeps today's round corners, so nothing
   changes or breaks there. A squircle looks tighter than a round corner of the same radius, so the radius goes
   up by about 1.4. Buttons, pills, badges and the phone mock-ups keep their shape. The page sheets load after
   this one: `:root` keeps these rules ahead of theirs. */
@supports (corner-shape: squircle) {
    :root { --bs-radius: 22px; }
    :root .bs-photo__frame,
    :root .signup-company,
    :root .whitepaper-window__frame,
    :root .drawer-body .reader-header-image,
    :root .services-stage__frame,
    :root .services-compare__col { corner-shape: squircle; }

    /* home: the three service cards */
    :root .services-container > div,
    :root .services-container > div > div,
    :root .services-container > div > img { corner-shape: squircle; border-radius: 28px; }

    /* tarieven */
    :root .pcd-card { corner-shape: squircle; border-radius: 34px; }
    :root .pricing-table-wrapper { corner-shape: squircle; border-radius: 25px; }

    /* automatisering: the app window and its cards */
    :root .app-window-frame { corner-shape: squircle; border-radius: 25px; }
    :root .app-kpi-card,
    :root .app-panel,
    :root .advisory-message-card { corner-shape: squircle; border-radius: 22px; }
    :root .mobile-app-card,
    :root .mobile-pillar-card { corner-shape: squircle; border-radius: 28px; }
}
