/* ========================================================================== 
   01. Design tokens
   ========================================================================== */
:root {
    --site-bg: #ffffff;
    --site-text: #1c1d20;
    --site-muted: #5F5F5F;
    --site-accent: #70ff4d;
    --site-surface-soft: #ededed;
    --site-border: rgba(28, 29, 32, 0.18);
    --site-focus: #005fcc;
    --site-container: 1600px;
    --site-gutter: clamp(1rem, 3vw, 3rem);
    --site-section: clamp(4rem, 9vw, 9rem);
    --site-radius: 0.25rem;
    --site-transition: 180ms ease;
    --site-font-sans: Arial, Helvetica, sans-serif;
}

/* Project reset — replaces the small Bootstrap Reboot subset used by the site. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ========================================================================== 
   02. Document / base
   ========================================================================== */
html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--site-bg);
    color: var(--site-text);
    font-family: var(--site-font-sans);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.025em !important;
}

/*
 * H1 layout is controlled by its line breaks and grid, not an arbitrary
 * max-width. This also neutralizes page-level mobile max-width overrides.
 */
h1 {
    max-width: none !important;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

ol,
ul,
dl {
    margin-top: 0;
    margin-bottom: 1rem;
}

ol,
ul {
    padding-left: 2rem;
}

a {
    text-decoration: underline;
}

img,
svg {
    vertical-align: middle;
}

button {
    border-radius: 0;
}

button,
input,
textarea,
select {
    margin: 0;
    font: inherit;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}


img,
picture,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

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

::selection {
    background: var(--site-text);
    color: var(--site-bg);
}

/* Green selection on dark surfaces. */
.page-contact ::selection,
.page-404 ::selection,
.services-hero ::selection,
.services-list ::selection,
.home-hero ::selection,
.about-principles ::selection,
.site-footer ::selection,
.site-footer-minimal ::selection,
.floating-menu--dark ::selection {
    background: var(--site-accent);
    color: var(--site-text);
}

/* ========================================================================== 
   03. Accessibility
   ========================================================================== */
.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 9999;
    padding: 0.75rem 1rem;
    background: var(--site-text);
    color: var(--site-bg);
    transform: translateY(-200%);
    transition: transform var(--site-transition);
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid var(--site-focus);
    outline-offset: 3px;
}

[tabindex="-1"]:focus {
    outline: 0;
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================================================== 
   04. Layout helpers
   ========================================================================== */
.site-container {
    width: 100%;
    max-width: var(--site-container);
    margin-inline: auto;
    padding-inline: var(--site-gutter);
}

.py-section {
    padding-block: var(--site-section);
}

/* ========================================================================== 
   05. Progressive enhancement
   ========================================================================== */
.no-js [data-requires-js] {
    display: none !important;
}

/* ==========================================================================
   06. Scroll reveal
   Generic structure. GSAP + ScrollTrigger own the animation itself.
   ========================================================================== */
[data-line-reveal] .span-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.06em;
    margin-bottom: -0.06em;
}

[data-line-reveal] .span-line__inner {
    display: block;
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    [data-line-reveal] .span-line__inner {
        transform: none !important;
    }
}
