:root {
    --bg: #F7F6F2;
    --surface: #FFFFFF;
    --surface-alt: #EEF4F6;
    --text: #2D271C;
    --text-muted: #726A5A;
    --border: #E4E0D8;
    --primary: #184858;
    --primary-hover: #10313C;
    --accent: #C2A85A;
    --dark-band: #11333E;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Old Standard TT', serif;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-weight: 700;
    line-height: 1.25;
}

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

ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

#cookieConsentBanner,
#cookieConsentModal {
    display: none;
}

@media (max-width: 768px) {
    h1 {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
    }

    h2 {
        font-size: clamp(1.5rem, 4.5vw, 1.875rem);
    }

    h3 {
        font-size: clamp(1.25rem, 4vw, 1.5rem);
    }

    h4,
    h5,
    h6 {
        font-size: clamp(1.1rem, 3.5vw, 1.25rem);
    }

    a[href^="mailto:"],
    a[href^="tel:"],
    .text-break-mobile {
        word-break: break-word;
        overflow-wrap: anywhere;
        font-size: 0.95em;
    }
}

/* ===== header ===== */
html {
    scroll-behavior: smooth;
}

#header {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.js-mobile-menu.open {
    display: flex;
}

/* ===== hero ===== */
#hero {
    overflow: hidden;
    background: var(--hero-bg, var(--bg));
    position: relative;
    color: var(--text);
}

#hero .hero-heading {
    hyphens: auto;
}

#hero .hero-dots-bg {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 160px;
    height: 160px;
    background-image: radial-gradient(var(--accent) 1.5px, transparent 1.5px);
    background-size: 14px 14px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
}

#hero .hero-visual-wrapper {
    position: relative;
}

#hero .hero-accent-shape {
    position: absolute;
    inset: 14px 4px 2px 18px;
    z-index: 1;
    transition: transform 0.3s ease;
}

#hero .hero-secondary-shape {
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 60%;
    transform: translate(-6px, -6px);
    z-index: 0;
}

#hero .hero-image-frame {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

#hero .hero-visual-wrapper:hover .hero-image-frame {
    transform: translate(-5px, -5px);
}

#hero .hero-diagonal-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--border) 60%, transparent 100%);
    transform: rotate(-0.6deg);
    transform-origin: left bottom;
    z-index: 5;
}

/* ===== featured_article ===== */
#articulo-destacado {
    overflow: hidden;
    background-color: var(--bg);
    color: var(--text);
}

#articulo-destacado h1,
#articulo-destacado h2,
#articulo-destacado h3 {
    hyphens: auto;
}

#articulo-destacado .anx-accent-line {
    width: 56px;
    height: 4px;
    background-color: var(--accent);
}

#articulo-destacado .anx-diagonal-divider {
    height: 1px;
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--border) 45%, transparent 100%);
}

#articulo-destacado .anx-photo-wrap {
    position: relative;
    transition: transform 0.3s ease;
}

#articulo-destacado .anx-photo-wrap:hover {
    transform: translate(-4px, -4px);
}

/* ===== popular_posts ===== */
#articulos-populares {
    overflow: hidden;
}

#articulos-populares h2,
#articulos-populares h3,
#articulos-populares p {
    hyphens: auto;
}

/* ===== trends ===== */
#tendencias-tecnologicas {
    overflow: hidden;
}

#tendencias-tecnologicas article {
    width: 100%;
}

/* ===== about ===== */
#sobre-nosotros {
    overflow: hidden;
}

/* ===== contact ===== */
#formulario-contacto {
    overflow: hidden;
}

#formulario-contacto .contact-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

#formulario-contacto input::placeholder,
#formulario-contacto textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.85;
}

/* ===== footer ===== */
#footer {
    overflow: hidden;
}

#footer a {
    text-decoration: none;
}