/* Base: design tokens, reset, typography, layout primitives (section, card, button). */

:root {
    color-scheme: dark;

    --primary: hsl(358, 73%, 46%);
    --primary-40: hsl(358, 73%, 27%);
    --bg: #0b0f17;
    --bg-40: #080b12;
    --bg-80: #04060a;
    --fg: hsl(0, 0%, 100%);
    --fg-20: hsl(0, 0%, 80%);
    --card: hsl(217, 61%, 18%);
    --border: hsl(60, 10%, 90%);
    --gradient: linear-gradient(135deg, var(--primary), var(--primary-40));

    --container-xs: 20rem;
    --container-7xl: 80rem;

    --space-4xs: clamp(0.33rem, calc(-0.03vw + 0.33rem), 0.31rem);
    --space-3xs: clamp(0.41rem, calc(0.04vw + 0.4rem), 0.44rem);
    --space-2xs: clamp(0.51rem, calc(0.16vw + 0.48rem), 0.62rem);
    --space-xs: clamp(0.64rem, calc(0.35vw + 0.57rem), 0.88rem);
    --space-s: clamp(0.8rem, calc(0.65vw + 0.67rem), 1.24rem);
    --space-m: clamp(1rem, calc(1.11vw + 0.78rem), 1.75rem);
    --space-l: clamp(1.25rem, calc(1.81vw + 0.89rem), 2.47rem);
    --space-xl: clamp(1.56rem, calc(2.87vw + 0.99rem), 3.5rem);
    --space-2xl: clamp(1.95rem, calc(4.44vw + 1.07rem), 4.95rem);
    --space-3xl: clamp(2.44rem, calc(6.75vw + 1.09rem), 7rem);
    --space-4xl: clamp(3.05rem, calc(10.13vw + 1.02rem), 9.89rem);

    --text-xs: 1rem;
    --text-s: clamp(1rem, calc(0.37vw + 0.93rem), 1.25rem);
    --text-m: clamp(1.25rem, calc(0.37vw + 1.18rem), 1.5rem);
    --text-l: clamp(1.5rem, calc(0.56vw + 1.39rem), 1.88rem);
    --text-xl: clamp(2.25rem, calc(1.11vw + 2.03rem), 3rem);
    --text-2xl: clamp(3rem, calc(2.22vw + 2.56rem), 4.5rem);

    --columns-1: repeat(1, minmax(0, 1fr));
    --columns-2: repeat(2, minmax(0, 1fr));
    --columns-3: repeat(3, minmax(0, 1fr));
    --columns-4: repeat(4, minmax(0, 1fr));
    --columns-5: repeat(5, minmax(0, 1fr));
    --columns-6: repeat(6, minmax(0, 1fr));
    --columns-7: repeat(7, minmax(0, 1fr));
    --columns-8: repeat(8, minmax(0, 1fr));

    --radius-xs: clamp(0.25rem, calc(0vw + 0.25rem), 0.25rem);
    --radius-s: clamp(0.38rem, calc(-0.19vw + 0.54rem), 0.5rem);
    --radius-m: clamp(0.63rem, calc(-0.19vw + 0.79rem), 0.75rem);
    --radius-l: clamp(1rem, calc(-0.37vw + 1.32rem), 1.25rem);
    --radius-xl: clamp(1.63rem, calc(-0.56vw + 2.11rem), 2rem);
    --radius-full: 999rem;

    --shadow-primary: hsl(213 73% 3% / 0.45);
    --shadow-xs: 0 1px 2px var(--shadow-primary);
    --shadow-s: 0 1.5px 3px var(--shadow-primary);
    --shadow-m: 0 2px 6px var(--shadow-primary);
    --shadow-l: 0 3px 12px var(--shadow-primary);
    --shadow-xl: 0 6px 48px var(--shadow-primary);
}

/**GLOBAL**/
*,
html,
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

/* only the site navigation is fixed (a bare `nav` selector would also pin footer link groups) */
/* sits above every section (some sections use z-index 2 to cover the pinned globe),
   so the Expertise dropdown is never cut off by the section underneath */
.navigation {
    position: fixed;
    top: 0;
    z-index: 100;
}

html {
    scroll-padding-top: var(--navigation-height, 4.5rem);
}

/* Tablets (touch screens ~640–1376px wide, either way up): the type and spacing
   scale is tuned for desktop and bottoms out too small here, so scale the whole
   site up a step. Everything sized in rem (text, spacing, icons, map pins) follows. */
@media (min-width: 40rem) and (max-width: 86rem) and (pointer: coarse) {
    html {
        font-size: 112.5%;
    }
}

/**LAYOUTS**/
main {
    display: flex;
    flex-direction: column;
    color: var(--fg);
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--bg);
    width: 100%;
    /* clip (not hidden) so position: sticky keeps working inside <main> */
    overflow-x: clip;
}

/**COMPONENTS**/

/*1. section*/
/* sections size to their content; only the scroll-driven globe story needs
   full-screen sections (see components/globe/globe-story.css) */
.section {
    background-color: var(--bg);
    height: 100%;
    padding: var(--space-4xl) var(--space-2xl) var(--space-4xl) var(--space-2xl);
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    position: relative;
}

.section-alt {
    background-color: var(--bg-40);
}

.section__wrapper {
    max-width: var(--container-7xl);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    align-items: start;
}

.section__content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}


.section h2 {
    font-size: var(--text-s);
    color: var(--fg);
}

.section p {
    font-size: var(--text-xl);
}

/* section heading: red line + spaced uppercase label, then a large Manrope title */
.section-heading {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    font-family: 'Manrope', Arial, Helvetica, sans-serif;
}

.section .section-heading h2 {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: clamp(0.8125rem, calc(0.2vw + 0.75rem), 1rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.section-heading h2::before {
    content: '';
    flex-shrink: 0;
    width: 3rem;
    height: 3px;
    background: var(--primary);
}

.section .section-heading p {
    font-size: clamp(2.25rem, calc(2vw + 1.75rem), 3.75rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/*2. card*/
.card {
    /* background-color: transparent; */
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    min-height: 8.5rem;
    padding: var(--space-s);
}

/*3. button*/
button {
    font: inherit;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    min-height: 2.25rem;
    padding: var(--space-xs) var(--space-l);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    background: var(--gradient);
    color: var(--fg);
    font-size: var(--text-m);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease,
        color 0.2s ease, transform 0.2s ease;
}

.button:hover {
    background: var(--primary);
    /* transform: translateY(-1px); */
}

.button:focus-visible,
.button--outline:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: 3px;
}

.button--outline {
    background: transparent;
    border-color: var(--fg);
    color: var(--fg);
}

.button--outline:hover {
    background: var(--fg);
    color: var(--bg);
}

/* solid arrow icon used by slider controls (scripts/utils.js → solidArrow) */
.slider-arrow {
    width: 1.4rem;
    height: 1.4rem;
    fill: currentColor;
    transition: transform 0.2s ease;
}

/* ---------- touch targets: ≥ 24px tall without changing the look ---------- */
.navigation__link,
.solution-breadcrumb a,
.footer-bottom__legal a {
    display: inline-block;
    padding-block: 0.4rem;
    margin-block: -0.4rem;
}

/* "Show all" switch: invisible padding enlarges the tap area */
.expertise-card__toggle-switch {
    position: relative;
}

.expertise-card__toggle-switch::before {
    content: '';
    position: absolute;
    inset: -0.5rem -0.4rem;
}
