/* Shared styles for the Clara, Thomas and Marcus pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #111318;
    color: #e0e0e0;
    line-height: 1.6;
    padding: 0;
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
}

.avatar-name {
    text-align: center;
    font-size: 64px;
    color: #7edbd0;
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 2px;
}

.avatar-personality {
    text-align: center;
    font-size: 14px;
    color: #a0e8df;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 40px;
    font-weight: 400;
}

.avatar-description {
    text-align: justify;
    font-size: 18px;
    color: #b5b5b5;
    line-height: 1.8;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.avatar-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 60px auto 60px auto;
    perspective: 1000px;
}

.flip-container {
    position: relative;
    width: 240px;
    height: 240px;
    transition: transform 0.85s ease-in-out, width 0.85s ease-in-out, height 0.85s ease-in-out;
    transform-style: preserve-3d;
}

.flip-container.flipped {
    width: 336px; height: 416px;
    transform: rotateX(180deg);
}

.flip-front,
.flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.flip-front {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-back {
    transform: rotateX(180deg);
}

/* Circular video wrapper */
.video-wrapper {
    position: relative;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.4s ease;
    box-shadow: 0 20px 60px rgba(126, 219, 208, 0.3);
    background: #7edbd0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.video-wrapper:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease, opacity 0.4s ease;
}

.video-wrapper.faded-out {
    opacity: 0;
}

.video-wrapper.fading-in {
    opacity: 1;
}

.avatar-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}


.avatar-nav {
    background: #0c0e13;
    padding: 18px 50px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid rgba(126, 219, 208, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible;
}
.logo-wrapper {
    position: relative;
    z-index: 1001;
    display: inline-block;
    height: 60px;
    width: 180px;
}
.avatar-nav .nav-logo {
    height: 180px;
    width: auto;
    display: block;
    border-radius: 8px;
    border: 2px solid rgba(126, 219, 208, 0.4);
    filter: drop-shadow(0 4px 15px rgba(126, 219, 208, 0.2));
}
.avatar-nav .nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}
/* Top menu: the same links as the homepage, plus Home (Thomas and Marcus pages) */
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: #999; text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: #7edbd0; }
.nav-links .nav-cta {
    background: linear-gradient(135deg, #7edbd0, #6bcbc2);
    color: #0c0e13;
    padding: 9px 24px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
}
.nav-links .nav-cta:hover { background: linear-gradient(135deg, #a0e8df, #7edbd0); color: #0c0e13; }
body.light-mode .nav-links a { color: #666; }
body.light-mode .nav-links a:hover { color: #4aa89e; }
body.light-mode .nav-links .nav-cta { background: linear-gradient(135deg, #4aa89e, #2d7a94); color: #fff; }
/* Menu on smaller screens: tighter spacing, then (up to 900px) only the main buttons, like on phones */
@media (max-width: 1200px) { .nav-links { gap: 18px; } }
@media (max-width: 1100px) { .nav-links { gap: 14px; } .nav-links a { font-size: 13px; } }
@media (max-width: 900px) { .nav-links { gap: 12px; } .nav-links a:not(.nav-cta):not(.theme-toggle):not(.lang-switch) { display: none; } }
@media (min-width: 901px) and (max-width: 1060px) { .avatar-nav .nav-logo, .header .nav-logo { height: 140px !important; } }
body.light-mode .nav-links .nav-cta:hover { background: linear-gradient(135deg, #7edbd0, #4aa89e); }
@media (max-width: 768px) {
    .nav-links { gap: 12px; }
    .nav-links a:not(.nav-cta) { display: none; }
}

.back-button {
    background: transparent;
    border: 2px solid #7edbd0;
    color: #7edbd0;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover {
    background: #7edbd0;
    color: #111318;
}


.online-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #2a8a7e;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(42, 138, 126, 0.7);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 0 4px rgba(42, 138, 126, 0);
        opacity: 0.7;
    }
}

.features-section {
    margin-top: 80px;
    text-align: center;
}

.features-title {
    font-size: 32px;
    color: #7edbd0;
    margin-bottom: 40px;
    font-weight: 400;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.feature-item {
    background: rgba(126, 219, 208, 0.1);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(126, 219, 208, 0.3);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(126, 219, 208, 0.15);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 64px;
    margin-bottom: 15px;
    color: white;
}

.feature-text {
    color: #c0c0c0;
    font-size: 15px;
}
.theme-toggle {
    background: none;
    border: 1px solid rgba(126,219,208,0.15);
    border-radius: 50%;
    width: 32px; height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.3s;
    padding: 0;
}
.theme-toggle:hover { border-color: #7edbd0; }
.theme-icon-sun { display: inline; color: #f0c040; font-size: 1.5em; }
.theme-icon-moon { display: none; color: #000; font-size: 1.5em; }
.theme-icon-moon svg { width: 0.9em; height: 0.9em; fill: currentColor; vertical-align: middle; display: inline-block; }
body.light-mode .theme-icon-sun { display: none; }
body.light-mode .theme-icon-moon { display: inline; }

::view-transition-old(root) {
    animation: themeOut 1.2s ease-in-out forwards !important;
}
::view-transition-new(root) {
    animation: themeIn 1.2s ease-in-out forwards !important;
}
@keyframes themeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes themeIn { from { opacity: 0; } to { opacity: 1; } }

body.light-mode { background: #f0f1f3; color: #333; }
body.light-mode .avatar-nav { background: #fff; border-bottom-color: rgba(0,0,0,0.08); }
body.light-mode .back-button { border-color: #4aa89e; color: #4aa89e; }
body.light-mode .back-button:hover { background: #4aa89e; color: #fff; }
body.light-mode .theme-toggle { border-color: rgba(0,0,0,0.1); }
body.light-mode .avatar-name { color: #4aa89e; }
body.light-mode .avatar-personality { color: #4aa89e; }
body.light-mode .avatar-description { color: #666; }
body.light-mode .avatar-description strong { color: #333; }
body.light-mode .section-title { color: #222; }
body.light-mode .section-subtitle { color: #4aa89e; }
body.light-mode .feature-item { background: rgba(58,143,170,0.06); border-color: rgba(58,143,170,0.2); }
body.light-mode .feature-item:hover { background: rgba(58,143,170,0.1); }
body.light-mode .feature-text { color: #666; }
body.light-mode .video-wrapper { box-shadow: 0 20px 60px rgba(58,143,170,0.2); }
body.light-mode .nav-logo { filter: drop-shadow(0 4px 20px rgba(0,0,0,0.15)) !important; }
body.light-mode footer { background: #dcdee1; border-top-color: #ccc; }
body.light-mode footer div[style*="color: #888"] { color: #888 !important; }
body.light-mode footer p { color: #888 !important; }
body.light-mode #chatMessages { background: #f5f5f5 !important; }
body.light-mode .flip-back > div { background: #fff !important; border-color: #4aa89e !important; }
body.light-mode .flip-back [style*="background: #7edbd0"] { background: #4aa89e !important; }
body.light-mode .flip-back [style*="background: #252836"] { background: #e8e8e8 !important; border-top-color: #ccc !important; }
body.light-mode .flip-back input { background: #fff !important; color: #333 !important; border-color: #ccc !important; }
body.light-mode .flip-back button[style*="background: #7edbd0"] { background: #4aa89e !important; }
.chat-text { color: #e0e0e0; }
body.light-mode .chat-text { color: #333; }
body.light-mode .flip-back [style*="color: #e0e0e0"] { color: #333 !important; }

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

/* Live demo section on the Thomas and Marcus pages (styles in ../demo/demo.css) */
#demo { padding: 10px 20px 70px; }
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 13px 30px;
    border-radius: 5px;
    background: linear-gradient(135deg, #7edbd0, #6bcbc2);
    color: #0c0e13;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}
.btn-primary:hover { background: linear-gradient(135deg, #a0e8df, #7edbd0); transform: translateY(-2px); }
body.light-mode .btn-primary { background: linear-gradient(135deg, #4aa89e, #2d7a94); color: #fff; }
body.light-mode #demo { background: transparent; }

/* "Proudly Canadian": centered in the top bar (wide screens) and above the footer copyright */
.nav-canada { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; align-items: center; gap: 8px; color: #bbb; font-size: 13px; font-weight: 500; letter-spacing: 1px; white-space: nowrap; pointer-events: none; }
@media (min-width: 1360px) { .nav-canada { display: flex; } }   /* only when it fits between the logo and the menu links */
.footer-canada { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0 0 6px; color: #777; font-size: 12px; letter-spacing: 1px; }
.nav-canada img, .footer-canada img { height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); }
body.light-mode .nav-canada { color: #555; }
body.light-mode .footer-canada { color: #888; }

/* Key Capabilities: the same six on every agent page, 3 per row; personality line underneath */
.features-grid-six { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .features-grid-six { grid-template-columns: 1fr; } }
.agent-style { margin-top: 30px; color: #a0e8df; font-size: 16px; font-style: italic; }
body.light-mode .agent-style { color: #4aa89e; }

/* Page transitions: the logo stays in place while the rest of the page cross-fades
   (Chrome, Edge, Safari 18.2+; other browsers keep the normal fade-in) */
@view-transition { navigation: auto; }
html.vt-nav body { animation: none; opacity: 1; }
::view-transition-group(site-logo) { animation-duration: 0.6s; }
.avatar-nav .nav-logo { view-transition-name: site-logo; }

/* Language switcher (English / Français), between Get Started and the theme button */
.nav-links a.lang-switch, a.lang-switch { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid rgba(126,219,208,0.18); border-radius: 16px; color: #aaa; font-size: 13px; font-weight: 500; text-decoration: none; transition: all 0.3s; white-space: nowrap; }
.nav-links a.lang-switch:hover, a.lang-switch:hover { border-color: #7edbd0; color: #7edbd0; }
a.lang-switch img { width: 18px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.2); display: block; }
body.light-mode .nav-links a.lang-switch, body.light-mode a.lang-switch { color: #555; border-color: rgba(0,0,0,0.15); }
body.light-mode .nav-links a.lang-switch:hover, body.light-mode a.lang-switch:hover { color: #4aa89e; border-color: #4aa89e; }
