/* =============================================
   SAVING OF SWEDOVIA — Stylesheet
   Modern, clean design. Space Grotesk + Inter.
   ============================================= */

:root {
    --night:       #0d1117;
    --deep:        #161b22;
    --steel:       #21262d;
    --accent:      #4a6fa5;
    --sage:        #2ea043;
    --gold:        #c9963c;
    --gold-light:  #ddb565;
    --gold-pale:   #f5e6c8;
    --ember:       #cf4e2b;

    --bg:          #f6f8fa;
    --bg-alt:      #eef1f5;
    --surface:     #ffffff;
    --text:        #1f2328;
    --text-2:      #656d76;
    --text-3:      #8b949e;
    --border:      #d0d7de;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body:    'Inter', sans-serif;
    --font-ui:      'Inter', sans-serif;

    --max-w:  1120px;
    --gutter: 2rem;
    --nav-h:  64px;

    --ease: cubic-bezier(.4,0,.2,1);
}

/* ---- Reset ---- */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:var(--nav-h)}
body{font-family:var(--font-body);font-size:1rem;line-height:1.75;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;overflow-x:hidden}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%;height:auto}
ul{list-style:none}
button{font-family:inherit;cursor:pointer}
input,select,textarea{font-family:var(--font-ui)}

/* ---- Utility ---- */
.container{max-width:var(--max-w);margin:0 auto;padding:0 var(--gutter)}
.reveal{opacity:0;transform:translateY(24px);transition:opacity .7s var(--ease),transform .7s var(--ease)}
.reveal.visible{opacity:1;transform:none}

/* =============================================
   NAVIGATION
   ============================================= */
.navbar{
    position:fixed;top:0;left:0;right:0;z-index:100;
    height:var(--nav-h);display:flex;align-items:center;
    transition:background .35s var(--ease),box-shadow .35s var(--ease);
}
.navbar.scrolled{
    background:rgba(13,17,23,.94);
    backdrop-filter:blur(12px);
    box-shadow:0 1px 0 rgba(255,255,255,.06);
}
.nav-inner{
    max-width:var(--max-w);margin:0 auto;padding:0 var(--gutter);
    width:100%;display:flex;align-items:center;justify-content:space-between;
}
.nav-logo{
    font-family:var(--font-display);font-size:.85rem;font-weight:700;
    color:#fff;letter-spacing:.02em;
    transition:color .25s;
}
.nav-logo:hover{color:var(--gold-light)}

.nav-links{display:flex;gap:1.6rem}
.nav-links a{
    font-family:var(--font-ui);font-size:.8rem;font-weight:500;
    letter-spacing:.02em;color:rgba(255,255,255,.6);
    padding:.3rem 0;position:relative;transition:color .25s;
}
.nav-links a::after{
    content:'';position:absolute;bottom:0;left:0;
    width:0;height:1.5px;background:var(--gold);
    transition:width .3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active{color:#fff}
.nav-links a:hover::after,
.nav-links a.active::after{width:100%}

.nav-right{display:flex;align-items:center;gap:.75rem}

/* Language switch */
.lang-switch{
    display:flex;align-items:center;gap:2px;
    background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);
    border-radius:6px;padding:4px 2px;
}
.lang-switch span{
    font-family:var(--font-ui);font-size:.7rem;font-weight:600;
    color:rgba(255,255,255,.35);padding:2px 8px;border-radius:4px;
    transition:all .2s;
}
.lang-switch span.active{
    color:var(--night);background:var(--gold);
}

/* Mobile toggle */
.mobile-toggle{
    display:none;flex-direction:column;gap:5px;
    background:none;border:none;padding:4px;
}
.mobile-toggle span{
    display:block;width:22px;height:1.5px;background:#fff;
    border-radius:1px;transition:all .3s var(--ease);
}
.mobile-toggle.open span:nth-child(1){transform:rotate(45deg) translate(4.5px,4.5px)}
.mobile-toggle.open span:nth-child(2){opacity:0}
.mobile-toggle.open span:nth-child(3){transform:rotate(-45deg) translate(4.5px,-4.5px)}

/* =============================================
   HERO
   ============================================= */
.hero{
    position:relative;min-height:100vh;min-height:100dvh;
    display:flex;flex-direction:column;
    justify-content:center;align-items:center;
    color:#fff;overflow:hidden;
}
.hero-bg{
    position:absolute;inset:0;z-index:0;
    background:url('../images/SOS_NEW.png') center center / cover no-repeat;
}
.hero-gradient{
    position:absolute;inset:0;
    background:
        radial-gradient(ellipse 80% 60% at 30% 45%, rgba(13,17,23,.3) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 75% 65%, rgba(207,78,43,.08) 0%, transparent 60%),
        linear-gradient(180deg, rgba(13,17,23,.78) 0%, rgba(13,17,23,.35) 35%, rgba(13,17,23,.3) 60%, rgba(13,17,23,.82) 100%);
}
#fireCanvas{
    position:absolute;inset:0;width:100%;height:100%;
    opacity:.15;pointer-events:none;
}

.hero-content{
    position:relative;z-index:2;text-align:center;
    max-width:720px;padding:calc(var(--nav-h) + 2rem) var(--gutter) 2rem;
}
.hero-label{
    display:inline-flex;align-items:center;gap:.5rem;
    font-family:var(--font-ui);font-size:.72rem;font-weight:600;
    letter-spacing:.14em;text-transform:uppercase;
    color:var(--gold);margin-bottom:2rem;
    border:1px solid rgba(201,150,60,.3);
    padding:.45rem 1.2rem;border-radius:100px;
    background:rgba(201,150,60,.08);
}
.label-dot{
    width:6px;height:6px;border-radius:50%;background:var(--ember);
    animation:blink 2s ease-in-out infinite;
}
@keyframes blink{0%,100%{opacity:1}50%{opacity:.3}}

.hero h1{
    font-family:var(--font-display);
    font-size:clamp(2.4rem,6vw,3.8rem);font-weight:700;
    letter-spacing:-.02em;line-height:1.1;
    margin-bottom:1.4rem;
    color:#fff;
}
.hero-desc{
    font-size:clamp(.92rem,1.6vw,1.05rem);
    color:rgba(255,255,255,.55);font-weight:400;
    max-width:560px;margin:0 auto 2.2rem;line-height:1.8;
}

.hero-buttons{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}

/* Buttons */
.btn{
    display:inline-block;font-family:var(--font-ui);
    font-size:.82rem;font-weight:600;letter-spacing:.02em;
    padding:.75rem 1.8rem;border-radius:8px;
    border:none;cursor:pointer;transition:all .25s var(--ease);
    text-align:center;
}
.btn-primary{
    background:var(--gold);color:var(--night);
}
.btn-primary:hover{
    background:var(--gold-light);
    transform:translateY(-1px);
    box-shadow:0 8px 24px rgba(201,150,60,.3);
}
.btn-ghost{
    background:transparent;color:#fff;
    border:1px solid rgba(255,255,255,.2);
}
.btn-ghost:hover{
    border-color:rgba(255,255,255,.45);
    background:rgba(255,255,255,.06);
    transform:translateY(-1px);
}

/* Hero scroll indicator */
.hero-scroll{
    position:absolute;bottom:2rem;left:50%;transform:translateX(-50%);z-index:2;
}
.scroll-line{
    width:1px;height:40px;
    background:linear-gradient(180deg,rgba(255,255,255,.25),transparent);
    animation:scroll-bob 2s ease-in-out infinite;
}
@keyframes scroll-bob{0%,100%{transform:scaleY(1);opacity:.5}50%{transform:scaleY(1.3);opacity:1}}

/* =============================================
   SECTIONS — shared
   ============================================= */
.section{padding:5.5rem 0}
.section-alt{background:var(--bg-alt)}
.section-dark{background:var(--deep);color:#fff}

.section-eyebrow{
    font-family:var(--font-ui);font-size:.7rem;font-weight:600;
    letter-spacing:.14em;text-transform:uppercase;
    color:var(--gold);text-align:center;margin-bottom:.5rem;
}
.section-eyebrow.light{color:var(--gold-light)}

.section-heading{
    font-family:var(--font-display);font-size:clamp(1.6rem,3.5vw,2.2rem);
    font-weight:700;text-align:center;margin-bottom:1rem;
    color:var(--text);line-height:1.2;letter-spacing:-.01em;
}
.section-heading.light{color:#fff}

.section-intro{
    font-size:.95rem;color:var(--text-2);text-align:center;
    max-width:620px;margin:0 auto 3rem;
}

/* =============================================
   ABOUT
   ============================================= */
.about-content{
    max-width:780px;margin:0 auto;
}
.about-content .lead{
    font-size:1.05rem;font-weight:500;color:var(--text);margin-bottom:1.2rem;line-height:1.8;
}
.about-content p{margin-bottom:1rem;color:var(--text-2);font-size:.95rem;line-height:1.8}

/* Research questions */
.research-questions{
    margin-top:2.5rem;
    padding:2rem;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:12px;
}
.research-questions h3{
    font-family:var(--font-display);font-size:1.1rem;font-weight:700;
    color:var(--text);margin-bottom:1.2rem;letter-spacing:-.01em;
    text-transform:uppercase;font-size:.8rem;letter-spacing:.1em;
}
.research-questions ul{
    list-style:none;display:flex;flex-direction:column;gap:1rem;
}
.research-questions li{
    font-size:.92rem;color:var(--text-2);line-height:1.7;
    padding-left:1.4rem;position:relative;
}
.research-questions li::before{
    content:'';position:absolute;left:0;top:.55em;
    width:6px;height:6px;border-radius:50%;
    background:var(--gold);
}

/* =============================================
   RESEARCH PHASES
   ============================================= */
.phases{margin-top:3rem}
.phases-heading{
    font-family:var(--font-display);font-size:1.1rem;font-weight:700;
    text-align:center;color:var(--text);margin-bottom:1.5rem;
    letter-spacing:-.01em;
}
.phases-track{
    height:3px;background:var(--border);border-radius:2px;
    margin-bottom:2.5rem;position:relative;overflow:hidden;
}
.phases-progress{
    position:absolute;top:0;left:0;height:100%;
    background:linear-gradient(90deg,var(--gold),var(--ember));
    border-radius:2px;
}

.phases-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:1.2rem}

.phase{
    background:var(--surface);border:1px solid var(--border);
    border-radius:10px;padding:1.2rem;
    position:relative;transition:all .3s var(--ease);
}
.phase.current{border-color:var(--gold);box-shadow:0 4px 20px rgba(201,150,60,.1)}
.phase.future{opacity:.55}
.phase.future:hover{opacity:.75}

.phase-marker{
    width:28px;height:28px;border-radius:50%;
    border:2px solid var(--border);background:var(--bg);
    display:flex;align-items:center;justify-content:center;
    margin-bottom:.75rem;position:relative;
}
.phase.done .phase-marker{background:var(--sage);border-color:var(--sage)}
.phase.current .phase-marker{background:var(--gold);border-color:var(--gold)}

.phase-pulse{
    width:8px;height:8px;border-radius:50%;background:var(--night);
    animation:pulse-ring 2s ease-in-out infinite;
}
@keyframes pulse-ring{
    0%,100%{box-shadow:0 0 0 0 rgba(13,17,23,.3)}
    50%{box-shadow:0 0 0 6px rgba(13,17,23,0)}
}

.phase-number{
    font-family:var(--font-ui);font-size:.65rem;font-weight:600;
    letter-spacing:.1em;text-transform:uppercase;
    color:var(--text-3);margin-bottom:.3rem;
}
.phase-badge{
    display:inline-block;font-family:var(--font-ui);
    font-size:.6rem;font-weight:700;letter-spacing:.08em;
    text-transform:uppercase;color:var(--gold);
    background:rgba(201,150,60,.1);
    padding:.15rem .5rem;border-radius:3px;
    margin-bottom:.3rem;
}
.phase h4{
    font-family:var(--font-display);font-size:.88rem;font-weight:600;
    color:var(--text);margin-bottom:.4rem;line-height:1.3;
}
.phase p{font-size:.82rem;color:var(--text-2);line-height:1.6}

/* =============================================
   TEAM
   ============================================= */
.team-row{
    display:flex;justify-content:center;gap:2.5rem;
    max-width:720px;margin:0 auto;
}
.member{
    display:block;text-align:center;
    transition:all .3s var(--ease);
}
.member:hover{transform:translateY(-3px)}
a.member{text-decoration:none}
.member-img{
    width:180px;height:180px;border-radius:50%;overflow:hidden;
    margin:0 auto 1rem;
    border:3px solid rgba(255,255,255,.1);
    transition:border-color .3s var(--ease);
}
.member:hover .member-img{border-color:var(--gold)}
.member-img img{width:100%;height:100%;object-fit:cover}
.member h3{
    font-family:var(--font-display);font-size:1rem;font-weight:600;
    color:#fff;letter-spacing:-.01em;
}

/* =============================================
   RESEARCH
   ============================================= */
.research-block{
    max-width:780px;margin:0 auto 3rem;
    background:var(--surface);border:1px solid var(--border);
    border-radius:12px;padding:2.5rem;
}
.research-block h3{
    font-family:var(--font-display);font-size:1.1rem;font-weight:700;
    color:var(--text);margin-bottom:1.2rem;letter-spacing:-.01em;
}
.research-block p{font-size:.92rem;color:var(--text-2);margin-bottom:.75rem;line-height:1.7}

/* Presentations grid */
.presentations-grid{display:flex;flex-direction:column;gap:1rem}
.presentation-item{
    display:flex;align-items:flex-start;gap:1.2rem;
    padding:1rem 1.2rem;
    background:var(--bg);
    border:1px solid var(--border);
    border-radius:8px;
    transition:all .25s var(--ease);
}
.presentation-item:hover{
    border-color:var(--accent);
    box-shadow:0 2px 12px rgba(74,111,165,.06);
}
.presentation-date{
    flex-shrink:0;width:56px;text-align:center;
    background:var(--deep);border-radius:8px;
    padding:.5rem .4rem;color:#fff;
}
.pres-day{
    display:block;font-family:var(--font-display);
    font-size:1.4rem;font-weight:700;line-height:1.1;
    color:var(--gold-light);
}
.pres-month{
    display:block;font-family:var(--font-ui);
    font-size:.65rem;font-weight:600;
    letter-spacing:.08em;text-transform:uppercase;
    color:rgba(255,255,255,.45);margin-top:.1rem;
}
.presentation-info{flex:1}
.presentation-info h4{
    font-family:var(--font-display);font-size:.9rem;font-weight:600;
    color:var(--text);margin-bottom:.15rem;line-height:1.3;
}
.presentation-info h4 a{color:var(--text);transition:color .2s}
.presentation-info h4 a:hover{color:var(--accent)}
.presentation-info p{
    font-family:var(--font-ui);font-size:.82rem;
    color:var(--text-2);line-height:1.5;margin-bottom:0;
}
.pres-time{
    display:inline-block;font-family:var(--font-ui);
    font-size:.68rem;font-weight:600;
    color:var(--accent);letter-spacing:.02em;
    margin-bottom:.2rem;
}
.pres-note{
    font-style:italic;color:var(--text-3) !important;
    font-size:.8rem !important;margin-top:.3rem;
}

/* Research coming soon */
.research-coming{
    max-width:600px;margin:0 auto;text-align:center;
    padding:2.5rem 2rem;
    border:1.5px dashed var(--border);border-radius:12px;
    background:var(--surface);
}
.research-coming svg{margin:0 auto .8rem;color:var(--text-3)}
.research-coming p{font-size:.9rem;color:var(--text-3);font-style:italic}

/* =============================================
   OPPORTUNITIES
   ============================================= */
.positions-block{max-width:840px;margin:0 auto}
.positions-list{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem}
.position-item{
    display:block;background:var(--surface);border:1px solid var(--border);
    border-radius:10px;padding:1.5rem;
    transition:all .3s var(--ease);
}
a.position-item:hover{
    border-color:var(--accent);
    box-shadow:0 4px 16px rgba(0,0,0,.06);
    transform:translateY(-2px);
}
.position-top{
    display:flex;justify-content:space-between;align-items:center;
    margin-bottom:.75rem;flex-wrap:wrap;gap:.4rem;
}
.position-badge{
    font-family:var(--font-ui);font-size:.62rem;font-weight:700;
    letter-spacing:.06em;text-transform:uppercase;
    color:#fff;background:var(--sage);
    padding:.2rem .6rem;border-radius:4px;
}
.position-item h4{
    font-family:var(--font-display);font-size:.95rem;font-weight:600;
    color:var(--text);margin-bottom:.4rem;line-height:1.3;
}
.position-item p{font-size:.85rem;color:var(--text-2);margin-bottom:.75rem;line-height:1.6}
.position-cta{
    font-family:var(--font-ui);font-size:.8rem;font-weight:600;
    color:var(--accent);transition:color .2s;
}
a.position-item:hover .position-cta{color:var(--text)}

/* =============================================
   CONTACT FORM
   ============================================= */
.contact-form-wrap{
    max-width:600px;margin:0 auto;
    background:var(--surface);border:1px solid var(--border);
    border-radius:12px;padding:2.5rem;
}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.form-group{margin-bottom:1rem}
.form-group label{
    display:block;font-family:var(--font-ui);
    font-size:.78rem;font-weight:600;color:var(--text);
    margin-bottom:.35rem;letter-spacing:.01em;
}
.form-group input,
.form-group textarea,
.form-group select{
    width:100%;font-family:var(--font-body);font-size:.88rem;
    color:var(--text);background:var(--bg);
    border:1px solid var(--border);border-radius:8px;
    padding:.65rem .85rem;line-height:1.5;
    transition:border-color .2s var(--ease),box-shadow .2s var(--ease);
    appearance:none;-webkit-appearance:none;
}
.form-group select{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%23656d76' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right .85rem center;
    padding-right:2.2rem;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus{
    outline:none;border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(74,111,165,.1);
}
.form-group textarea{resize:vertical;min-height:100px}
.form-submit{margin-top:.25rem}

/* =============================================
   FOOTER
   ============================================= */
.footer{background:var(--night);color:rgba(255,255,255,.6);padding:3.5rem 0 1.5rem}
.footer-top{
    display:grid;grid-template-columns:1fr 1fr 1fr;gap:2.5rem;
    margin-bottom:2.5rem;
}
.footer-col h4{
    font-family:var(--font-ui);font-size:.68rem;font-weight:600;
    letter-spacing:.12em;text-transform:uppercase;
    color:var(--gold);margin-bottom:.75rem;
}
.footer-col ul{display:flex;flex-direction:column;gap:.35rem}
.footer-col a{
    font-family:var(--font-ui);font-size:.82rem;
    color:rgba(255,255,255,.45);transition:color .2s;
}
.footer-col a:hover{color:#fff}
.footer-col p{font-family:var(--font-ui);font-size:.82rem;margin-bottom:.2rem}
.footer-address{color:rgba(255,255,255,.3);margin-top:.3rem}

/* Funded by — centered */
.funded-by{
    text-align:center;
    padding:2rem 0;
    border-top:1px solid rgba(255,255,255,.06);
    border-bottom:1px solid rgba(255,255,255,.06);
    margin-bottom:1.5rem;
}
.funded-label{
    font-family:var(--font-ui);font-size:.65rem;font-weight:600;
    letter-spacing:.12em;text-transform:uppercase;
    color:rgba(255,255,255,.25);display:block;margin-bottom:.75rem;
}
.funded-logos{
    display:flex;align-items:center;justify-content:center;gap:1.5rem;
}
.funder-link{
    display:flex;align-items:center;gap:.4rem;
    color:rgba(255,255,255,.4);font-family:var(--font-ui);font-size:.8rem;
    transition:color .2s;
}
.funder-link:hover{color:rgba(255,255,255,.7)}
.funder-link img{width:24px;height:24px;opacity:.4;transition:opacity .2s}
.funder-link:hover img{opacity:.6}
.funder-divider{
    width:1px;height:20px;background:rgba(255,255,255,.12);
}

.footer-bottom{
    text-align:center;
}
.footer-bottom p{
    font-family:var(--font-ui);font-size:.75rem;
    color:rgba(255,255,255,.25);
}
.footer-bottom a{color:rgba(255,255,255,.35);transition:color .2s}
.footer-bottom a:hover{color:rgba(255,255,255,.7)}

/* =============================================
   MODAL
   ============================================= */
.modal-backdrop{
    position:fixed;inset:0;z-index:200;
    background:rgba(13,17,23,.6);backdrop-filter:blur(6px);
    display:flex;align-items:center;justify-content:center;
    opacity:0;visibility:hidden;transition:all .3s var(--ease);
}
.modal-backdrop.open{opacity:1;visibility:visible}

.modal-box{
    background:var(--surface);border-radius:14px;
    padding:2.5rem;max-width:380px;width:90%;text-align:center;
    transform:translateY(16px) scale(.97);
    transition:transform .3s var(--ease);
    position:relative;
}
.modal-backdrop.open .modal-box{transform:none}

.modal-x{
    position:absolute;top:.75rem;right:1rem;
    background:none;border:none;font-size:1.4rem;
    color:var(--text-3);padding:.25rem;
}
.modal-check{
    width:52px;height:52px;border-radius:50%;
    background:var(--sage);display:flex;
    align-items:center;justify-content:center;
    margin:0 auto 1.2rem;
}
.modal-box h3{
    font-family:var(--font-display);font-size:1.15rem;font-weight:700;
    color:var(--text);margin-bottom:.5rem;
}
.modal-box p{font-size:.9rem;color:var(--text-2);margin-bottom:1.5rem}
.modal-box .btn{width:100%}

/* =============================================
   RESPONSIVE
   ============================================= */
@media(max-width:768px){
    :root{--gutter:1.3rem;--nav-h:56px}
    .section{padding:4rem 0}

    .mobile-toggle{display:flex}
    .nav-links{
        position:fixed;top:0;right:-100%;
        width:260px;height:100vh;height:100dvh;
        flex-direction:column;gap:0;
        background:var(--night);padding:calc(var(--nav-h) + 1.5rem) 1.5rem 2rem;
        transition:right .35s var(--ease);
        box-shadow:-8px 0 30px rgba(0,0,0,.3);
    }
    .nav-links.open{right:0}
    .nav-links a{
        display:block;padding:.7rem 0;font-size:.9rem;
        border-bottom:1px solid rgba(255,255,255,.06);
    }

    .phases-grid{grid-template-columns:1fr}
    .team-row{flex-direction:column;align-items:center;gap:2rem}
    .member-img{width:150px;height:150px}
    .positions-list{grid-template-columns:1fr}
    .footer-top{grid-template-columns:1fr;gap:1.5rem}

    .hero-scroll{display:none}

    .research-block{padding:1.5rem}
    .form-row{grid-template-columns:1fr}
    .contact-form-wrap{padding:1.5rem}
    .presentation-item{flex-direction:column;gap:.8rem}
    .presentation-date{width:auto;display:flex;align-items:center;gap:.5rem;padding:.4rem .8rem}
    .pres-day{font-size:1.1rem}
    .funded-logos{flex-direction:column;gap:.6rem}
}

@media(max-width:480px){
    .hero-buttons{flex-direction:column;align-items:center}
    .hero-buttons .btn{width:100%;max-width:260px}
}
