/* ============================================================
   SSLO Chile – Brand-aligned stylesheet
   Colors: Green #70b68e | Salmon #f39872 | Yellow #ffed99
   Font: Sora (variable)
   ============================================================ */

@font-face {
    font-family: 'Sora';
    src: url('assets/font/Sora-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 800;
    font-display: swap;
}

/* Reset & base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --green:        #70b68e;
    --green-light:  #b8dbc7;
    --salmon:       #f39872;
    --salmon-light: #f9ccb9;
    --yellow:       #ffed99;
    --yellow-light: #fff6cc;
    --dark:         #1d1d1b;
    --white:        #ffffff;
    --gray-bg:      #f8f8f6;
    --radius:       12px;
    --max-w:        1100px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Sora', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ============================================================
   Header / Nav
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(112,182,142,0.2);
    transition: box-shadow 0.3s;
}

.site-header.scrolled {
    box-shadow: 0 2px 16px rgba(29,29,27,0.08);
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-link { flex-shrink: 0; }

.sslo-logo {
    height: 68px;
    width: auto;
}

.main-nav { flex: 1; }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark);
    transition: color 0.2s;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--green);
    transform: scaleX(0);
    transition: transform 0.2s;
}

.main-nav a:hover { color: var(--green); }
.main-nav a:hover::after { transform: scaleX(1); }

.lang-toggle {
    background: none;
    border: 1.5px solid var(--green);
    color: var(--green);
    font-family: 'Sora', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.lang-toggle:hover {
    background: var(--green);
    color: var(--white);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--white);
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.kv-canvas {
    position: absolute;
    inset: 0;
}

/* Key visual shape positioning via CSS custom props */
.kv-shape {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: auto;
    opacity: 0;
    transform: scale(0.4) translateY(20px);
    transition-property: opacity, transform;
    transition-duration: 0.8s;
    transition-timing-function: ease;
    transition-delay: var(--delay);
    will-change: opacity, transform;
}

.kv-shape.visible {
    opacity: 0.55;
    transform: scale(1) translateY(0px);
}

/* Once entrance is done, JS takes over transform for parallax — remove transform transition */
.kv-shape.parallax-ready {
    transition-property: opacity;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
    max-width: 680px;
    margin-left: 6vw;
}

.hero-label {
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--salmon);
    margin-bottom: 1rem;
}

.hero-headline {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.hero-headline em {
    color: var(--green);
    font-style: normal;
}

.hero-sub {
    font-size: 1.05rem;
    color: #555;
    max-width: 560px;
    margin-bottom: 2.5rem;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    text-decoration: none;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1.75rem;
    border-radius: 100px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.btn-primary {
    background: var(--green);
    color: var(--white);
}

.btn-outline {
    border: 2px solid var(--green);
    color: var(--green);
}

/* ============================================================
   Sections – shared
   ============================================================ */

.section {
    position: relative;
    padding: 6rem 0;
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.section-shape {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--salmon);
    margin-bottom: 0.75rem;
}

.section-header h2 {
    font-size: clamp(1.7rem, 3.5vw, 2.6rem);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.section-intro {
    font-size: 1.05rem;
    color: #666;
    max-width: 560px;
    margin: 0 auto;
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   About
   ============================================================ */

.section-about {
    background: var(--gray-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #444;
}

.about-text strong { color: var(--dark); font-weight: 600; }

.about-list {
    list-style: none;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.about-list li {
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
    color: #444;
}

.about-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--green);
    font-size: 0.8rem;
    top: 0.1em;
}

.about-visual {
    position: relative;
    height: 320px;
}

.kv-composition,
.contact-visual {
    position: relative;
    width: 100%;
    height: 100%;
}

.comp-shape {
    position: absolute;
    height: auto;
}

/* ============================================================
   Mission / Cards
   ============================================================ */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--white);
    border: 1.5px solid rgba(112,182,142,0.2);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    border-color: var(--green);
    box-shadow: 0 4px 24px rgba(112,182,142,0.15);
}

.card-icon {
    width: 100%;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-icon i {
    font-size: 2rem;
    color: var(--green);
}

.card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--dark);
}

.card p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.55;
}

/* ============================================================
   Universities
   ============================================================ */

.section-universities {
    background: var(--white);
}

.unis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.uni-card {
    background: var(--white);
    border: 1.5px solid rgba(112,182,142,0.2);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.uni-card:hover {
    border-color: var(--green);
    box-shadow: 0 4px 24px rgba(112,182,142,0.15);
    transform: translateY(-3px);
}

.uni-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.uni-card-name a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.2s;
}

.uni-card-name a:hover { color: var(--green); }

.uni-card p {
    font-size: 0.88rem;
    color: #555;
}

/* Group headings within the universities section */
.unis-group-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--green);
    margin: 2.5rem 0 1rem;
}

.unis-group-label:first-child { margin-top: 0; }

.benefits-bar {
    background: var(--green);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
    justify-content: center;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
}

.benefit-icon {
    color: var(--yellow);
    font-size: 0.7rem;
}

/* ============================================================
   Contact
   ============================================================ */

.section-contact {
    background: var(--gray-bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    min-width: 140px;
}

.contact-photo-wrap {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--green-light);
    flex-shrink: 0;
}

.contact-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-photo-placeholder {
    width: 100%;
    height: 100%;
    background: var(--green-light);
    color: var(--green);
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.05em;
}

.contact-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}

.contact-title {
    font-size: 0.83rem;
    color: var(--green);
    font-weight: 500;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--green);
    margin-bottom: 0.4rem;
}

.contact-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

.contact-item a {
    color: var(--green);
    font-weight: 600;
    text-decoration: none;
}

.contact-item a:hover { text-decoration: underline; }

.contact-visual {
    position: relative;
    height: 280px;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
    background: var(--gray-bg);
    border-top: 1px solid rgba(112,182,142,0.25);
    color: #555;
    padding: 3rem 2rem 2rem;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    text-align: center;
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.footer-logo { height: auto; }
.footer-logo-sslo { height: 60px; }
.footer-logo-tuc  { height: 140px; }
.footer-logo-smwk { height: 48px; }

.footer-funded {
    font-size: 0.82rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.footer-copy {
    font-size: 0.78rem;
    color: #999;
}

.footer-copy a {
    color: var(--green);
    text-decoration: none;
}

.footer-copy a:hover { text-decoration: underline; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .contact-person {
        grid-column: 1 / -1;
    }

    .about-visual,
    .contact-visual {
        height: 200px;
    }

    .hero-content {
        margin-left: 0;
        padding: 5rem 1.5rem 3rem;
    }
}

@media (max-width: 640px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 0.6rem 1rem;
        gap: 0.75rem;
    }

    .main-nav ul {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .main-nav a { font-size: 0.82rem; }

    .section { padding: 4rem 0; }

    .hero { min-height: auto; }

    .hero-ctas { flex-direction: column; align-items: flex-start; }

    .benefits-bar { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
}
