/* ============================================
   Base — Tipografia, Body, Links, Utility
   ============================================ */

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--fw-normal);
    line-height: 1.7;
    color: var(--fg1);
    background-color: var(--bg-primary);
    border: none;
}

/* Headings */
h1 {
    font-size: var(--text-5xl);
    font-weight: var(--fw-black);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

h2 {
    font-size: var(--text-4xl);
    font-weight: var(--fw-bold);
    line-height: 1.15;
    letter-spacing: -0.015em;
}

h3 {
    font-size: var(--text-2xl);
    font-weight: var(--fw-bold);
    line-height: 1.25;
}

h4 {
    font-size: var(--text-xl);
    font-weight: var(--fw-bold);
    line-height: 1.3;
}

h5 {
    font-size: var(--text-lg);
    font-weight: var(--fw-medium);
    line-height: 1.4;
}

/* Paragraph */
p {
    color: var(--fg2);
    margin-bottom: var(--space-md);
    word-spacing: 0.06em;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
}

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

/* Links */
a {
    color: inherit;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-light);
}

/* Code */
code, pre {
    font-family: var(--font-mono);
}

code {
    font-size: 0.9em;
    padding: 0.15em 0.4em;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

pre {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    overflow-x: auto;
    font-size: var(--text-sm);
    line-height: 1.6;
}

pre code {
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}

/* Strong */
strong {
    font-weight: var(--fw-bold);
    color: var(--fg1);
}

/* Selection */
::selection {
    background: var(--accent-dim);
    color: var(--fg1);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--fg3);
}

/* ---------- Utility classes ---------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-3xl);
}
@media (max-width: 768px) { .container { padding: 0 var(--space-xl); } }

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

/* Eyebrow / section label — uppercase mono, lime */
.label,
.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-light);
}

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

.text-mono {
    font-family: var(--font-mono);
}

.text-muted {
    color: var(--fg3);
}

.text-secondary {
    color: var(--fg2);
}

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

/* ─── Light mode variable overrides ─── */
html[data-theme="light"] body {
    background: #f4f4f5;
    color: var(--fg1-light);
}
html[data-theme="light"] {
    --bg-primary:       #f4f4f5;
    --bg-surface:       #ffffff;
    --bg-surface-light: #fafafb;
    --bg-card:          #ffffff;
    --bg-card-hover:    #ffffff;
    --bg-elevated:      #ffffff;
    --fg1: #0d0f18;
    --fg2: #4d5167;
    --fg3: #81859a;
    --border-subtle: rgba(13, 15, 24, 0.08);
    --border-medium: rgba(13, 15, 24, 0.14);
    --overlay: rgba(255, 255, 255, 0.88);
}
/* Light mode: small accent text uses body text color, lime stays for backgrounds only */
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .label,
html[data-theme="light"] .section__label,
html[data-theme="light"] .mega__link-tag,
html[data-theme="light"] .mega__preview-label,
html[data-theme="light"] .mega__featured-cta,
html[data-theme="light"] .service-card__link,
html[data-theme="light"] .service-card__num,
html[data-theme="light"] .process__step-num,
html[data-theme="light"] .principle__num,
html[data-theme="light"] .clients__label,
html[data-theme="light"] .hero__eyebrow { color: var(--fg2); }
html[data-theme="light"] .stack__col-icon,
html[data-theme="light"] .sector__icon { color: var(--fg1); }
html[data-theme="light"] .footer__link:hover { color: var(--fg1); }
html[data-theme="light"] code {
    background: rgba(13, 15, 24, 0.04);
    border-color: rgba(13, 15, 24, 0.08);
}
