/* =====================================================
   SYNAEPSYS
   Sistema visual basado en VALOR COMÚN
   ===================================================== */

:root {
    --bg: #0d1117;
    --bg-alt: #161b22;
    --text: #e6edf3;
    --muted: #8b949e;
    --accent: #f0b429;
    --accent-soft: #d29922;
    --border: #30363d;
    --code-bg: #1c2128;
    --link: #58a6ff;
    --success: #3fb950;

    --content-width: 820px;
    --wide-width: 1100px;
    --side-space: 24px;
    --radius: 12px;
}

/* BASE */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease;
}

a:hover {
    color: var(--accent);
}

strong,
b {
    color: #ffffff;
}

p {
    margin: 0 0 18px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text);
    line-height: 1.3;
    letter-spacing: -.3px;
}

h1 {
    font-size: 2.6rem;
    margin: 0 0 20px;
}

h2 {
    font-size: 1.6rem;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

h3 {
    font-size: 1.15rem;
    margin: 32px 0 12px;
    color: var(--accent);
}

ul,
ol {
    padding-left: 24px;
    margin: 0 0 18px;
}

li {
    margin-bottom: 8px;
}

blockquote {
    border-left: 3px solid var(--accent);
    margin: 24px 0;
    padding: 8px 20px;
    background: var(--bg-alt);
    border-radius: 0 8px 8px 0;
    color: var(--muted);
    font-style: italic;
}

::selection {
    background: rgba(240, 180, 41, .3);
    color: #ffffff;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* CONTENEDORES CENTRADOS Y MÁRGENES */

.container,
.section-wrap,
.hero-inner {
    width: calc(100% - (var(--side-space) * 2));
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

/* CABECERA */

.site-header {
    width: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 38px 0 28px;
}

.header-inner {
    width: calc(100% - (var(--side-space) * 2));
    max-width: var(--wide-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
}

.brand-name {
    color: var(--text);
    font-size: 1.65rem;
    font-weight: 650;
    letter-spacing: .08em;
    line-height: 1.3;
}

.brand-caption {
    margin-top: 7px;
    color: var(--muted);
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* NAVEGACIÓN */

.main-nav,
.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 28px;
}

.main-nav a {
    color: var(--muted);
    font-size: .91rem;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent);
}

/* ESTRUCTURA GENERAL */

main {
    width: 100%;
    min-height: 55vh;
    margin: 0;
    padding: 0;
}

main > section {
    width: 100%;
}

.section-wrap {
    width: calc(100% - (var(--side-space) * 2));
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

/* PORTADA */

.hero {
    position: relative;
    width: 100%;
    min-height: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 76px 0 70px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-inner {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 22px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0 auto 22px;
    color: var(--text);
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1.2;
    letter-spacing: -.6px;
}

.hero h1 span,
.closing-section h2 span {
    display: block;
    color: var(--accent);
}

.hero-description {
    max-width: 650px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 1.12rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 26px;
    margin-top: 32px;
}

.button-dark {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    background: var(--accent);
    color: #0d1117;
    border: 1px solid var(--accent);
    border-radius: 7px;
    font-size: .94rem;
    font-weight: 650;
    transition: background .2s ease, border-color .2s ease;
}

.button-dark:hover {
    background: #ffd166;
    border-color: #ffd166;
    color: #0d1117;
}

.text-link {
    color: var(--link);
    font-size: .94rem;
}

.text-link:hover {
    color: var(--accent);
}

.hero-mark {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: 360px;
    height: 360px;
    transform: translate(-50%, -50%);
    opacity: .10;
    pointer-events: none;
}

.orbit {
    position: absolute;
    inset: 0;
    border: 1px solid var(--accent);
    border-radius: 50%;
}

.orbit-one {
    transform: rotate(0deg) scaleY(.42);
}

.orbit-two {
    transform: rotate(60deg) scaleY(.42);
}

.orbit-three {
    transform: rotate(120deg) scaleY(.42);
}

.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--accent);
}

/* INTRODUCCIÓN */

.intro-section {
    padding-top: 64px;
    padding-bottom: 64px;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: start;
}

.intro-grid h2 {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.35;
}

.intro-copy {
    color: var(--muted);
}

.intro-copy p {
    margin-bottom: 18px;
}

.underlined-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--link);
    border-bottom: 1px solid var(--border);
    padding-bottom: 3px;
}

.underlined-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* PRINCIPIOS */

.principles-section {
    width: 100%;
    padding: 58px 0 64px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.principle {
    margin: 0;
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s ease, transform .2s ease;
}

.principle:hover {
    border-color: var(--accent-soft);
    transform: translateY(-2px);
}

.principle-number {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--accent);
    font-size: .82rem;
    letter-spacing: 1.5px;
}

.principle h3 {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 1.15rem;
}

.principle p {
    margin: 0;
    color: var(--muted);
    font-size: .96rem;
}

/* CIERRE DE PORTADA */

.closing-section {
    padding-top: 72px;
    padding-bottom: 80px;
    text-align: center;
}

.closing-section h2 {
    max-width: 700px;
    margin: 0 auto 28px;
    padding: 0;
    border: 0;
    font-size: clamp(1.8rem, 4vw, 2.3rem);
}

.closing-section h2 span {
    margin-top: 8px;
    font-size: .85em;
    line-height: 1.4;
}

/* PÁGINAS EDITORIALES */

.page,
.page-content,
.content,
.content-section,
.section-inner {
    width: calc(100% - (var(--side-space) * 2));
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

.page-intro,
.manifesto-intro {
    width: calc(100% - (var(--side-space) * 2));
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 64px 0 36px;
    text-align: center;
}

.page-intro p,
.manifesto-intro p {
    color: var(--muted);
}

.page-content,
.content {
    padding-top: 24px;
    padding-bottom: 64px;
}

/* ELEMENTOS DESTACADOS */

.badge {
    display: inline-block;
    margin-bottom: 24px;
    padding: 6px 16px;
    color: var(--accent);
    border: 1px solid var(--accent-soft);
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.principle,
.callout,
.phase,
.content-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin: 20px 0;
}

.callout {
    background: linear-gradient(
        135deg,
        rgba(240, 180, 41, .08),
        rgba(210, 153, 34, .03)
    );
    border-color: var(--accent-soft);
}

.callout p:last-child {
    margin-bottom: 0;
}

/* BOTONES GENERALES */

button,
.button,
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: var(--accent);
    color: #0d1117;
    border: 1px solid var(--accent);
    border-radius: 7px;
    font-family: inherit;
    font-size: .94rem;
    font-weight: 650;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

button:hover,
.button:hover,
.btn:hover {
    background: #ffd166;
    border-color: #ffd166;
    color: #0d1117;
}

button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* FORMULARIOS */

form {
    width: 100%;
    max-width: var(--content-width);
    margin: 24px auto;
}

.form-group,
.form-field {
    margin-bottom: 22px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: .92rem;
    font-weight: 600;
}

input,
textarea,
select {
    display: block;
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color .2s ease, box-shadow .2s ease;
}

textarea {
    min-height: 160px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(240, 180, 41, .12);
}

input[type="checkbox"],
input[type="radio"] {
    display: inline-block;
    width: auto;
    accent-color: var(--accent);
}

/* TABLAS */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 24px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--bg-alt);
    color: var(--accent);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 600;
}

tr:hover td {
    background: rgba(240, 180, 41, .04);
}

/* CONVERGENCIA */

.convergence-page {
    width: calc(100% - (var(--side-space) * 2));
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 64px 0 80px;
    color: var(--text);
}

.convergence-intro {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.convergence-eyebrow {
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.convergence-intro h1 {
    margin: 0 0 18px;
    color: var(--text);
    font-size: clamp(2rem, 5vw, 2.6rem);
}

.convergence-description {
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.8;
}

.convergence-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.contribution-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 26px 28px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s ease, transform .2s ease;
}

.contribution-card:hover {
    border-color: var(--accent-soft);
    transform: translateY(-2px);
}

.contribution-title {
    margin: 0 0 12px;
    font-size: 1.3rem;
    line-height: 1.4;
}

.contribution-title a {
    color: var(--text);
}

.contribution-title a:hover {
    color: var(--accent);
}

.contribution-author {
    margin: 0 0 18px;
    color: var(--accent);
    font-size: .9rem;
}

.contribution-content {
    color: #c5cdd5;
    font-size: .97rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.contribution-date {
    margin: 20px 0 12px;
    color: var(--muted);
    font-size: .82rem;
}

.contribution-read-more {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 8px;
    color: var(--link);
    font-size: .92rem;
}

.contribution-read-more:hover {
    color: var(--accent);
}

.convergence-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 42px;
    color: var(--muted);
}

.pagination-link {
    color: var(--accent);
}

.pagination-current {
    font-size: .9rem;
}

.convergence-empty {
    padding: 48px 28px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.convergence-empty h2 {
    color: var(--text);
    font-weight: 500;
}

.convergence-empty p {
    max-width: 620px;
    margin: 14px auto 0;
    color: var(--muted);
}

.convergence-invitation {
    margin-top: 64px;
    text-align: center;
}

.convergence-invitation p {
    color: var(--muted);
}

.convergence-invitation a {
    color: var(--link);
}

/* FICHA DE APORTACIÓN */

.contribution-detail,
.aportacion-page {
    width: calc(100% - (var(--side-space) * 2));
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 64px 0 80px;
}

.contribution-detail h1,
.aportacion-page h1 {
    margin-bottom: 16px;
}

.contribution-detail .contribution-author,
.aportacion-page .contribution-author {
    color: var(--accent);
}

.contribution-detail .contribution-content,
.aportacion-page .contribution-content {
    margin-top: 28px;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.9;
}

/* PIE DE PÁGINA */

.site-footer {
    width: 100%;
    margin-top: 64px;
    padding: 40px 0 48px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .88rem;
    text-align: center;
}

.footer-inner {
    width: calc(100% - (var(--side-space) * 2));
    max-width: var(--wide-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-brand {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 650;
    letter-spacing: .08em;
}

.footer-inner p {
    margin: 8px 0 0;
}

.footer-nav a {
    color: var(--muted);
    font-size: .88rem;
}

.footer-nav a:hover {
    color: var(--accent);
}

.copyright {
    color: var(--muted);
    font-size: .82rem;
}

/* MENSAJES */

.success,
.alert-success {
    padding: 14px 18px;
    background: rgba(63, 185, 80, .08);
    border: 1px solid var(--success);
    border-radius: 8px;
    color: var(--success);
}

.error,
.alert-error {
    padding: 14px 18px;
    background: rgba(248, 81, 73, .08);
    border: 1px solid #f85149;
    border-radius: 8px;
    color: #ff7b72;
}

/* RESPONSIVE */

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    :root {
        --side-space: 18px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    .site-header {
        padding: 30px 0 24px;
    }

    .header-inner {
        gap: 20px;
    }

    .brand-name {
        font-size: 1.45rem;
    }

    .main-nav {
        gap: 12px 18px;
    }

    .main-nav a {
        font-size: .85rem;
    }

    .hero {
        min-height: 400px;
        padding: 58px 0;
    }

    .hero h1 {
        font-size: 2.15rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-mark {
        width: 270px;
        height: 270px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 16px;
    }

    .intro-section {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .intro-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .intro-grid h2 {
        font-size: 1.55rem;
    }

    .principles-section {
        padding: 44px 0;
    }

    .principles-grid {
        grid-template-columns: 1fr;
    }

    .closing-section {
        padding-top: 52px;
        padding-bottom: 60px;
    }

    .convergence-page {
        padding-top: 44px;
        padding-bottom: 60px;
    }

    .convergence-grid {
        grid-template-columns: 1fr;
    }

    .contribution-card {
        padding: 22px;
    }

    .contribution-detail,
    .aportacion-page {
        padding-top: 44px;
        padding-bottom: 60px;
    }

    .page-intro,
    .manifesto-intro {
        padding-top: 44px;
    }

    .principle,
    .callout,
    .phase,
    .content-card {
        padding: 20px;
    }

    .footer-nav {
        gap: 12px 18px;
    }
}

/* IMPRESIÓN */

@media print {
    body {
        background: #ffffff;
        color: #000000;
    }

    .site-header,
    .site-footer,
    .principles-section {
        background: #ffffff;
        color: #000000;
    }

    a {
        color: #000000;
    }

    button,
    .button,
    .btn {
        display: none;
    }
}

/* =========================================
   MANIFIESTO - DEFINICIÓN DE SYNAEPSYS
========================================= */

.manifesto-section {
    width: 100%;
    padding: 56px 24px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.manifesto-inner {
    width: 100%;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.manifesto-inner .eyebrow {
    display: block;
    margin-bottom: 22px;
    color: var(--accent);
    text-align: center;
}

.manifesto-inner blockquote {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 28px 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.9;
    text-align: left;
}

@media (max-width: 640px) {
    .manifesto-section {
        padding: 40px 18px;
    }

    .manifesto-inner blockquote {
        padding: 22px 20px;
        font-size: 1rem;
    }
}

