/* =====================================================================================================
   Base styles shared by every section: fonts, design tokens, reset, page background, layout helpers,
   buttons and the baked-text convention. Section styles live in css/sections/<name>.css.
   ===================================================================================================== */

/* ----- Fonts ----------------------------------------------------------------------------------------- */

/* Poppins (SIL Open Font License, fonts/poppins/OFL.txt): body text, navigation, cards. */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/poppins/poppins-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/poppins/poppins-latin-ext-400-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/poppins/poppins-latin-500-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/poppins/poppins-latin-ext-500-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/poppins/poppins-latin-600-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/poppins/poppins-latin-ext-600-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/poppins/poppins-latin-700-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/poppins/poppins-latin-ext-700-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Kardige: display font. The design uses Cropasor, which we don't have; Kardige is the closest one available.
   Used for text that the design sets in Cropasor (card numbers and titles in text layers). */
@font-face {
    font-family: 'Kardige';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Kardige_2.otf') format('opentype');
}

/* ----- Design tokens --------------------------------------------------------------------------------- */

:root {
    /* Brand gradient, exactly as in the designer's colour reference ("Color reference.jpeg", 2026-10-01): magenta →
       blue-violet (halfway) → orange. Everything drawn in code uses it. */
    --brand-magenta: #c05c9d;
    --brand-violet: #6d67bb;
    --brand-orange: #f07f36;
    --brand-gradient: linear-gradient(90deg, var(--brand-magenta) 0%, var(--brand-violet) 50%, var(--brand-orange) 100%);

    /* Neutrals */
    --white: #ffffff;
    --page-bg: #ffffff;            /* under the paper texture; together they look ~#f3f3f3 as in the design, a bit
                                      lighter than card 01 (#ededed) */
    --grey-100: #eeeeee;           /* card 01 */
    --grey-200: #e0e0e0;           /* card 02, use cases panel */
    --grey-300: #d6d6d6;           /* card 03 */
    --grey-400: #cccccc;           /* card 04, pills before filling */
    --grey-500: #bfbfbf;           /* card 05 */
    --dark-panel: #2a2a2a;         /* contact panel */
    --text-strong: #5e5e5e;        /* card titles */
    --text: #6b6b6b;               /* body text */
    --text-muted: #8a8a8a;
    --line: rgba(0, 0, 0, 0.12);

    /* Typography */
    --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Kardige', 'Poppins', sans-serif;   /* < 64em: Poppins (see below) */
    --text-xs: 0.75rem;            /* 12px */
    --text-sm: 0.875rem;           /* 14px */
    --text-base: 1rem;             /* 16px */
    --text-md: clamp(1.0625rem, 0.95rem + 0.4vw, 1.375rem);   /* 17 → 22px: ticker, nav */
    --text-lg: clamp(1.125rem, 0.95rem + 0.6vw, 1.5rem);      /* 18 → 24px: intro paragraphs */
    --text-xl: clamp(1.375rem, 1.1rem + 0.9vw, 2.0625rem);    /* 22 → 33px: card titles */
    --leading: 1.5;

    /* Layout */
    --content-max: 100rem;         /* design canvas: 1440px at 100%, 1296px with the 90% root size */
    --gutter: clamp(1rem, 4vw, 4.5rem);
    --section-space: clamp(4rem, 8vw, 8rem);
    --header-height: 5.25rem;      /* sticky header; sections use it as scroll offset */

    /* Shape */
    --radius-sm: 0.5rem;
    --radius-md: 1.25rem;
    --radius-lg: 2.5rem;           /* big panels (hero bottom corners, use cases, contact) */
    --radius-pill: 999px;
    --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.12);

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Mobile and tablet (< 64em, the same breakpoint as the mobile menu and the live What we do cards): Poppins only. */
@media (max-width: 63.999em) {
    :root { --font-display: var(--font-body); }
}

/* ----- Reset ----------------------------------------------------------------------------------------- */

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

/* The whole page is set at 90% of its design size, exactly as viewing it with Chrome's zoom at 90% (user feedback):
   under browser zoom, lengths relative to the screen (vw, vh, %) look the same and absolute ones (rem, px) shrink by
   10%, so the root font size is 90% and every absolute length is in rem. Media queries (em) are not affected. */
html {
    font-size: 90%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }

ul[role="list"],
ol[role="list"] { list-style: none; padding: 0; }

img, svg, video { display: block; max-width: 100%; height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: inherit; }

/* ----- Page ------------------------------------------------------------------------------------------ */

body {
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading);
    color: var(--text);
    background-color: var(--page-bg);
    background-image: url('../img/page/paper-texture-2x.webp');   /* resource 35, tiled */
    background-size: 182px 182px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Every section block: offset anchors so the sticky header doesn't cover the section title. */
.section {
    position: relative;
    scroll-margin-top: var(--header-height);
}

/* Centred content column, 1440px design canvas with responsive side gutters. */
.container {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Section titles are images (the text is in their alt). The 1x files are exported at their size in the 1440px design,
   so they show at natural size there; on smaller screens max-height (and max-width) scale them down proportionally,
   so all titles keep the same cap height and are never squashed. */
.section-title {
    display: flex;
    justify-content: center;
}
.section-title img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: clamp(1.1rem, 0.6rem + 1.6vw, 1.95rem);
}

/* ----- Utilities ------------------------------------------------------------------------------------- */

/* Visually hidden, still read by screen readers and search engines. */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.hidden { display: none !important; }

.gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

:focus-visible {
    outline: 2px solid var(--brand-violet);
    outline-offset: 3px;
}

/* ----- Buttons --------------------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    border: 0;
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background-color 0.2s ease, opacity 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* White button with grey text ("Contact us" in the design). */
.btn--light {
    background: var(--white);
    color: var(--text);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.btn--light:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); }

/* Brand gradient button (form submit). */
.btn--brand {
    background: var(--brand-gradient);
    color: var(--white);
    font-weight: 500;
}
.btn--brand:hover { box-shadow: 0 10px 24px rgba(109, 103, 187, 0.35); }

/* ----- Baked-text convention -------------------------------------------------------------------------
   For images that have text drawn into them (except logos and titles). The real text lives in .baked__text,
   styled as it must look over the future text-free image. While the image still has the text baked in, the
   container has [data-baked-text] and the layer is only visually hidden. When the text-free image arrives:
   replace the file and remove the attribute. Preview the layers with ?unbake in the URL (js/base.js).

   <div class="baked" data-baked-text>
       <img class="baked__img" src="…" alt="" width="…" height="…">
       <div class="baked__text">…</div>
   </div>
   ----------------------------------------------------------------------------------------------------- */

.baked { position: relative; }

.baked__img {
    display: block;
    width: 100%;
    height: auto;
}

.baked__text {
    position: absolute;
    inset: 0;
}

.baked[data-baked-text] .baked__text {
    clip-path: inset(50%);
    pointer-events: none;
}

/* ?unbake preview: fade the image and show the text layer on top of it. */
.unbake .baked[data-baked-text] .baked__img { opacity: 0.35; }
.unbake .baked[data-baked-text] .baked__text {
    clip-path: none;
    outline: 1px dashed rgba(255, 0, 128, 0.6);
    outline-offset: -1px;
}

/* ----- Motion ---------------------------------------------------------------------------------------- */

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