/* DESIGN SYSTEM: MANGO GOLD/INK */
:root {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --ink: #f8fafc;
    --ink-light: #94a3b8;
    --mango: #f6b84b;
    --mango-glow: rgba(246, 184, 75, 0.3);
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(30, 41, 59, 0.7);
    --gradient: linear-gradient(135deg, #f6b84b, #d97706);
    --blue-clinic: #1d4ed8;
}

[data-theme="day"] {
    --bg: #fbfbfb;
    --bg-alt: #f5f5f5;
    --ink: #17202a;
    --ink-light: #475569;
    --mango: #d97706;
    --mango-glow: rgba(217, 119, 6, 0.1);
    --border: rgba(0, 0, 0, 0.1);
    --glass: rgba(255, 255, 255, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--ink);
    transition: background 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, .logo-text { font-family: 'Georgia', serif; }

.page-wrapper { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* NAVIGATION */
.main-nav { 
    height: 100px; display: flex; align-items: center; justify-content: space-between; 
    border-bottom: 1px solid var(--border); margin-bottom: 4rem;
}
.logo-container { display: flex; align-items: center; cursor: pointer; }

/* LOGO ANIMATION */
.logo-text {
    font-size: 1.8rem; font-weight: 800; letter-spacing: -1.5px; color: var(--ink);
    display: flex; align-items: baseline; position: relative; overflow: hidden;
    transition: filter 0.4s ease, transform 0.4s ease;
}
.logo-container:hover .logo-text,
.logo-container:focus-visible .logo-text {
    filter: drop-shadow(0 0 14px rgba(246, 184, 75, 0.55)) drop-shadow(0 0 4px rgba(246, 184, 75, 0.35));
}
.logo-text .name-extra,
.logo-text .name-hansen,
.logo-text span.gold {
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.logo-text .name-extra {
    max-width: 0; opacity: 0; overflow: hidden;
    transition: max-width 0.7s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1), margin-right 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    display: inline-block; white-space: nowrap;
    letter-spacing: -1.5px;
    font-weight: 800;
}
.logo-container:hover .name-extra,
.logo-container:focus-within .name-extra { max-width: 150px; opacity: 1; margin-right: 0.1rem; }

.logo-text .name-hansen {
    max-width: 0; opacity: 0; overflow: hidden;
    display: inline-block; white-space: nowrap;
    letter-spacing: -1.5px;
    font-weight: 800;
    transform: translateY(-80px);
}
.logo-container:hover .name-hansen,
.logo-container:focus-within .name-hansen {
    animation: hansen-drop-bounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s 1 forwards;
}
@keyframes hansen-drop-bounce {
    0%   { max-width: 200px; opacity: 0; transform: translateY(-80px); margin-left: 0; }
    30%  { opacity: 1; transform: translateY(0); }
    45%  { transform: translateY(-14px); }
    60%  { transform: translateY(0); }
    72%  { transform: translateY(-7px); }
    83%  { transform: translateY(0); }
    91%  { transform: translateY(-3px); }
    100% { max-width: 200px; opacity: 1; transform: translateY(0); margin-left: 0.2rem; }
}
@media (prefers-reduced-motion: reduce) {
    .logo-container:hover .name-hansen,
    .logo-container:focus-within .name-hansen { animation: none; max-width: 200px; opacity: 1; transform: none; }
}

.nav-partner-brands {
    display: flex; align-items: center; gap: 1.2rem;
    margin-left: auto; margin-right: 1.5rem;
    padding-left: 1.5rem; border-left: 1px solid var(--border);
}
.partner-brand {
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform 0.2s, filter 0.3s;
    line-height: 0;
}
.partner-brand:hover { transform: translateY(-1px); }
.partner-brand img { display: block; height: 22px; width: auto; }
.partner-ortolan img { height: 26px; }
[data-theme="night"] .partner-ortolan img {
    filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.6)) drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}
[data-theme="day"] .partner-ortolan img { filter: none; }
[data-theme="night"] .partner-sossego img {
    filter: drop-shadow(0 0 6px rgba(246, 184, 75, 0.4));
}
[data-theme="day"] .partner-sossego img { filter: none; }
@media (max-width: 980px) {
    .nav-partner-brands { display: none; }
}

.nav-actions { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; }
.nav-link {
    color: var(--ink);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    position: relative;
    transition: color 0.2s ease, background 0.2s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 1rem; right: 1rem; bottom: 0.3rem;
    height: 2px;
    background: linear-gradient(135deg, #f6b84b, #d97706);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 2px;
}
.nav-link:hover {
    color: var(--mango);
    background: rgba(246, 184, 75, 0.06);
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--mango); }
.nav-link.active::after { transform: scaleX(1); }
@media (max-width: 768px) {
    .nav-actions { gap: 0.2rem; }
    .nav-link { font-size: 0.85rem; padding: 0.4rem 0.7rem; }
    .nav-link::after { left: 0.7rem; right: 0.7rem; }
}
@media (max-width: 768px) {
    .nav-actions { gap: 0.8rem; }
    .nav-link { font-size: 0.85rem; }
    .sossego-partner { display: none; }
}
.sossego-partner { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
.sossego-partner span { font-size: 0.6rem; color: var(--ink-light); text-transform: uppercase; letter-spacing: 2px; opacity: 0.8; }

/* SOSSEGO LOGO STYLE */
.s-logo { font-weight: 800; font-family: 'Inter', sans-serif; font-size: 1.1rem; color: var(--ink); }
.s-logo .dot { color: var(--mango); }

.theme-btn {
    background: var(--bg-alt); border: 1px solid var(--border); padding: 0.6rem; border-radius: 50%;
    cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: 0.3s;
    width: 2.4rem; height: 2.4rem; line-height: 1;
}
.theme-btn:hover { border-color: var(--mango); }
[data-theme="night"] .theme-btn .icon-sun { display: inline; }
[data-theme="night"] .theme-btn .icon-moon { display: none; }
[data-theme="day"] .theme-btn .icon-sun { display: none; }
[data-theme="day"] .theme-btn .icon-moon { display: inline; }

.cta-mini {
    background: var(--mango); color: #fff; padding: 0.6rem 1.2rem; border-radius: 50px;
    font-weight: 700; font-size: 0.85rem; text-decoration: none;
    box-shadow: 0 6px 18px var(--mango-glow); transition: 0.3s; white-space: nowrap;
}
.cta-mini:hover { transform: translateY(-2px); box-shadow: 0 10px 24px var(--mango-glow); }

/* Brand logos in nav and CTAs */
.brand-logo-img { display: block; height: 28px; width: auto; }
[data-theme="night"] .brand-logo-img-invert { filter: brightness(0) invert(1); }
[data-theme="day"] .brand-logo-img-invert { filter: none; }
.sossego-partner-logo { height: 22px; display: block; }
[data-theme="night"] .sossego-partner-logo { filter: brightness(0) invert(1); }

/* White stroke around the lettering — for Ortolan logo on dark bg */
.logo-stroke-white {
    filter:
        drop-shadow( 1px  0 0 #fff)
        drop-shadow(-1px  0 0 #fff)
        drop-shadow( 0  1px 0 #fff)
        drop-shadow( 0 -1px 0 #fff);
}

/* White rounded-rectangle pill behind Ortolan logo for readability on dark bg.
   Transparent on day theme — logo PNG already reads on white site bg. */
.logo-pill {
    display: inline-flex; align-items: center; justify-content: center;
    background: #ffffff;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    line-height: 0;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.logo-pill:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255, 255, 255, 0.12); }
.logo-pill img { display: block; height: 50px; width: auto; }
html[data-theme="day"] .logo-pill {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

/* Inline dr.Ortolan wordmark for brand strips */
.drortolan-mark-inline {
    display: inline-flex; align-items: center;
    font-family: 'Georgia', serif; font-weight: 800;
    font-size: 1.5rem; letter-spacing: -0.5px;
    line-height: 1; text-decoration: none;
    color: var(--ink, #f8fafc);
    transition: transform 0.2s ease;
}
.drortolan-mark-inline:hover { transform: translateY(-1px); }
.drortolan-mark-inline .gold {
    background: linear-gradient(135deg, #f6b84b, #d97706);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    margin-left: 1px;
}

/* Sossego pill — dual-theme:
   - Night (default): no pill bg, sossego-wordmark-white.svg (white text + mango dot)
   - Day: cream pill (Sossego brand paper) with sossego-wordmark.svg (dark text + mango dot) */
.sossego-pill {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    padding: 0.5rem 0.9rem;
    border-radius: 14px;
    line-height: 0;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.sossego-pill:hover { transform: translateY(-1px); }
.sossego-pill img { display: block; height: 36px; width: auto; }
.sossego-pill .light-only { display: none; }
.sossego-pill .dark-only { display: inline-block; }
html[data-theme="day"] .sossego-pill {
    background: transparent;
    padding: 0;
    box-shadow: none;
}
html[data-theme="day"] .sossego-pill:hover { box-shadow: none; }
html[data-theme="day"] .sossego-pill .light-only { display: inline-block; }
html[data-theme="day"] .sossego-pill .dark-only { display: none; }

/* CSS-only Ortolan wordmark — used on dark bg where the SVG/PNG looks bad */
.ortolan-wordmark {
    display: inline-flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-family: Georgia, serif; color: #fff;
    line-height: 1; letter-spacing: -0.5px;
    text-decoration: none;
}
.ortolan-wordmark .o-name {
    font-size: 1.5em; font-weight: 800;
}
.ortolan-wordmark .o-sub {
    font-size: 0.5em; font-weight: 400;
    letter-spacing: 0.35em; text-transform: uppercase;
    margin-top: 0.4em; opacity: 0.85;
    font-family: 'Inter', sans-serif;
}

/* HERO */
.hero { text-align: center; padding: 4rem 0 8rem 0; }
.hero h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -2px; color: var(--ink); }
.hero p { font-size: 1.2rem; color: var(--ink-light); max-width: 600px; margin: 0 auto 2.5rem auto; }
@media (max-width: 640px) {
    .hero { padding: 2rem 0 4rem 0; }
    .hero h1 { font-size: 2.6rem; letter-spacing: -1px; margin-bottom: 1rem; }
    .hero p { font-size: 1rem; margin-bottom: 1.75rem; }
    .hero-btns { gap: 0.6rem; }
    .hero-btns a { font-size: 0.85rem; padding: 0.7rem 1.2rem; }
    .section-header h2 { font-size: 1.7rem; }
    .carousel-section { padding-bottom: 4rem; }
    .main-nav { height: 70px; margin-bottom: 2rem; }
    .logo-text { font-size: 1.3rem; letter-spacing: -1px; }
    .nav-actions .cta-mini { display: none; }
}

.hero-btns { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.btn-primary, .btn-secondary, .btn-outline {
    text-decoration: none;
    padding: 1.1rem 2.2rem;
    border-radius: 50px;
    font-weight: 700; font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid transparent;
}
.btn-primary {
    background: var(--mango); color: #fff;
    box-shadow: 0 8px 22px var(--mango-glow);
}
.btn-secondary {
    background: var(--bg-alt); color: var(--ink);
    border-color: var(--border);
}
.btn-outline {
    background: transparent; color: var(--mango);
    border-color: var(--mango);
}
.btn-primary:hover, .btn-secondary:hover, .btn-outline:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 26px 4px rgba(96, 165, 250, 0.5), 0 0 10px 2px rgba(96, 165, 250, 0.3);
}
.btn-secondary:hover { border-color: rgba(96, 165, 250, 0.6); }
.btn-outline:hover { background: rgba(246, 184, 75, 0.08); }

/* Click pulse — instantaneous feedback when pressing any glow-hover element */
.btn-primary:active, .btn-secondary:active, .btn-outline:active,
.cta-box:active, .c-card:active, .hub-card:active,
.fundador-card:active, .section-title-link:active {
    transform: scale(0.985);
    box-shadow: 0 0 44px 8px rgba(96, 165, 250, 0.7), 0 0 18px 4px rgba(246, 184, 75, 0.4) !important;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

/* Ripple wave that expands from the click point */
.click-ripple {
    position: absolute;
    pointer-events: none;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(96, 165, 250, 0.55);
    box-shadow: 0 0 18px 6px rgba(96, 165, 250, 0.5), 0 0 28px 10px rgba(246, 184, 75, 0.25);
    transform: translate(-50%, -50%) scale(0);
    animation: ripple-expand 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    z-index: 200;
    mix-blend-mode: screen;
}
@keyframes ripple-expand {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    60% { opacity: 0.75; }
    100% { transform: translate(-50%, -50%) scale(40); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .click-ripple { display: none; }
}

/* Make ripple-host elements positioned & hide overflow so wave hugs the card */
.btn-primary, .btn-secondary, .btn-outline,
.cta-box, .c-card, .hub-card, .fundador-card, .section-title-link {
    position: relative;
    overflow: hidden;
}

/* TRIPLE CTA SECTION */
.triple-cta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 8rem; }
@media (max-width: 860px) {
    .triple-cta { grid-template-columns: 1fr; gap: 1.25rem; margin-bottom: 4rem; }
    .cta-title-area { height: 100px; margin-bottom: 1rem; }
    .cta-gold-wordmark { font-size: 2.2rem; }
    .cta-box { padding: 2.2rem 1.5rem; }
    .cta-box p { margin-bottom: 1rem; }
}
.cta-box { 
    padding: 3rem 2rem; border-radius: 30px; text-align: center; display: flex; flex-direction: column; 
    justify-content: space-between; align-items: center; transition: 0.4s; text-decoration: none;
}
.cta-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 32px 4px rgba(96, 165, 250, 0.45), 0 0 12px 2px rgba(96, 165, 250, 0.3);
}

.cta-gold { background: var(--gradient); color: #fff; }
.cta-gold-wordmark {
    font-family: Georgia, serif; font-weight: 800;
    font-size: 2.6rem; letter-spacing: -0.8px;
    color: #fff; line-height: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.cta-gold-wordmark span {
    margin-left: 1px;
    color: #fffdf7;
}
.cta-title-area {
    height: 130px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.4rem;
    width: 100%;
}
.cta-title-area img { display: block; max-height: 100%; width: auto; }
.cta-blue { background: var(--blue-clinic); color: #fff; }
.cta-white { background: #fff; color: #17202a; border: 1px solid var(--border); }

/* Day theme — Sossego CTA uses Sossego brand cream paper instead of clinic blue */
html[data-theme="day"] .cta-blue {
    background: #fffdf7;
    color: #17202a;
}
.cta-blue .light-only { display: none; }
.cta-blue .dark-only { display: block; }
html[data-theme="day"] .cta-blue .light-only { display: block; }
html[data-theme="day"] .cta-blue .dark-only { display: none; }


.cta-box h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.cta-box p { font-size: 0.9rem; opacity: 0.9; line-height: 1.5; margin-bottom: 1.5rem; }
.cta-btn-inner { padding: 0.7rem 1.5rem; border-radius: 20px; font-weight: 800; text-transform: uppercase; font-size: 0.75rem; border: 2px solid currentColor; }

/* CAROUSEL */
.carousel-section { padding-bottom: 8rem; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-title-link { text-decoration: none; display: inline-block; cursor: pointer; }
.section-header h2 {
    font-size: 2.4rem; margin-bottom: 0.6rem;
    display: inline-block;
    color: var(--ink);
    transition: text-shadow 0.4s ease, color 0.4s ease, transform 0.3s ease;
}
.section-title-link:hover h2,
.section-title-link:focus-visible h2 {
    background: linear-gradient(135deg, #f6b84b 0%, #d97706 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    text-shadow: 0 0 28px rgba(246, 184, 75, 0.55), 0 0 12px rgba(246, 184, 75, 0.3);
    transform: translateY(-1px);
}
.section-header p { color: var(--ink-light); font-size: 1rem; }

.carousel-container { position: relative; overflow: hidden; }
.carousel-track { display: flex; gap: 2rem; transition: transform 0.5s ease; padding: 0 4%; }
@media (max-width: 640px) {
    .c-card { min-width: 78vw; max-width: 78vw; padding: 2rem 1.5rem; }
    .carousel-track { gap: 1rem; padding: 0 6%; }
}

.c-card {
    min-width: 300px; max-width: 300px;
    background: var(--glass); backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    text-decoration: none; color: inherit;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.c-card:hover, .c-card:focus-visible {
    transform: translateY(-6px);
    border-color: var(--mango);
    box-shadow: 0 0 28px 4px rgba(246, 184, 75, 0.45), 0 0 12px 2px rgba(246, 184, 75, 0.25);
    outline: none;
}
.c-icon {
    font-size: 3.4rem;
    line-height: 1;
    margin-bottom: 1.2rem;
    width: 72px; height: 72px;
    border-radius: 18px;
    background: rgba(246, 184, 75, 0.08);
    border: 1px solid rgba(246, 184, 75, 0.18);
    display: flex; align-items: center; justify-content: center;
}
html[data-theme="day"] .c-icon {
    background: transparent;
    border-color: transparent;
}
.c-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; line-height: 1.3; color: var(--ink); }
.c-card p { color: var(--ink-light); font-size: 0.92rem; line-height: 1.5; margin: 0; }

.carousel-controls {
    display: flex; align-items: center; justify-content: center;
    gap: 1.4rem; margin-top: 2rem;
}
.nav-arrow {
    background: var(--bg-alt);
    border: 1px solid rgba(246, 184, 75, 0.3);
    color: var(--ink);
    width: 44px; height: 44px; border-radius: 50%;
    cursor: pointer; font-size: 1.1rem;
    display: inline-flex; align-items: center; justify-content: center;
    transition: 0.2s;
    box-shadow: 0 0 18px 2px rgba(246, 184, 75, 0.18), 0 0 6px rgba(246, 184, 75, 0.1);
}
.nav-arrow:hover {
    background: var(--mango); color: #fff; border-color: var(--mango);
    box-shadow: 0 0 26px 4px rgba(246, 184, 75, 0.55), 0 0 10px rgba(246, 184, 75, 0.3);
    transform: translateY(-1px);
}

.carousel-dots { display: flex; justify-content: center; align-items: center; gap: 0.5rem; }
.carousel-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: 0.2s; }
.carousel-dots .dot.active { background: var(--mango); width: 24px; border-radius: 4px; }

/* FOOTER */
.main-footer { padding: 4rem 0 3rem 0; border-top: 1px solid var(--border); }
.f-bottom { text-align: center; padding: 0; font-size: 0.85rem; color: var(--ink-light); }
.f-bottom > * + * { margin-top: 1.5rem; }

.social-links { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.social-links a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--ink-light);
    transition: 0.2s;
}
.social-links a:hover { background: var(--mango); color: #fff; border-color: var(--mango); transform: translateY(-2px); }
.social-links svg { width: 18px; height: 18px; fill: currentColor; }

.academic-links {
    display: inline-flex; flex-wrap: wrap; gap: 0.4rem 1rem;
    justify-content: center;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}
.academic-links a {
    color: var(--ink-light);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: 0.2s;
}
.academic-links a:hover { color: var(--mango); border-bottom-color: var(--mango); }

.footer-credit {
    font-size: 0.78rem;
    color: var(--ink-light);
    opacity: 0.65;
    letter-spacing: 0.02em;
    margin-top: 1.5rem;
}
.footer-credit a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); transition: 0.2s; }
.footer-credit a:hover { color: var(--mango); text-decoration-color: var(--mango); }

/* Inline prose links — substitui browser default azul */
.bio-content a,
.work-item a,
.profile-section a {
    color: var(--mango);
    text-decoration: underline;
    text-decoration-color: rgba(246, 184, 75, 0.4);
    text-underline-offset: 2px;
    transition: 0.2s;
}
.bio-content a:hover,
.work-item a:hover,
.profile-section a:hover { text-decoration-color: var(--mango); }

/* Inline brand mentions in prose */
.brand-mention {
    font-weight: 700;
    background: linear-gradient(135deg, #f6b84b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
