/* Shared visual refinement for the primary IMD pages. */
:root {
    --imd-ink: #25313b;
    --imd-muted: #66727d;
    --imd-accent: #713d76;
    --imd-accent-strong: #5d3063;
    --imd-teal: #237f7a;
    --imd-teal-soft: #edf7f5;
    --imd-canvas: #f3f6f7;
    --imd-surface: #ffffff;
    --imd-surface-soft: #f8fafb;
    --imd-line: #e1e7ea;
    --imd-line-strong: #d2dade;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background: var(--imd-canvas);
}

body {
    min-width: 0;
    padding-bottom: 0;
    overflow-x: hidden;
    background: var(--imd-canvas);
    color: var(--imd-ink);
    line-height: 1.7;
}

.container {
    display: flex;
    max-width: 960px;
    min-height: 100vh;
    flex-direction: column;
    background: var(--imd-surface);
    border-right: 1px solid var(--imd-line);
    border-left: 1px solid var(--imd-line);
    box-shadow: 0 8px 28px rgba(28, 39, 47, 0.08);
}

.header {
    gap: 10px;
    padding: 12px 14px;
    background: var(--imd-surface);
    border-bottom-color: var(--imd-line);
}

.header .logo {
    flex: 0 0 auto;
}

.menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    margin-right: 4px;
    padding: 9px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--imd-line);
    border-radius: 6px;
    background: var(--imd-surface);
}

.menu-toggle:hover {
    background: var(--imd-surface-soft);
    border-color: var(--imd-line-strong);
}

.menu-toggle:focus-visible,
.menu a:focus-visible,
.content a:focus-visible,
.imd-lang-btn:focus-visible {
    outline: 3px solid rgba(35, 127, 122, 0.28);
    outline-offset: 2px;
}

.menu-toggle .bar {
    width: 22px;
    height: 2px;
    margin: 3px 0;
    border-radius: 2px;
    background: var(--imd-ink);
}

.menu-toggle.is-open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.header-hero {
    height: 164px;
    margin-top: 4px;
    border: 1px solid var(--imd-line);
    border-radius: 6px;
    background: var(--imd-surface-soft);
    box-shadow: 0 3px 12px rgba(28, 39, 47, 0.08);
}

.header-hero .hero-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 2.8s ease-in-out, transform 12s ease-out;
    will-change: opacity, transform;
}

.header-hero .hero-img.is-visible {
    opacity: 1;
    transform: scale(1);
}

.header-hero .overlay-hero {
    z-index: 2;
}

.hero-text {
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    -webkit-text-stroke: 0;
    text-shadow: 0 1px 3px rgba(20, 29, 35, 0.55);
    background: rgba(30, 42, 49, 0.48);
    border-radius: 4px;
    animation: hero-slide-in 0.65s ease-out 0.2s forwards;
}

.hero-mini {
    right: 10px;
    bottom: 10px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    filter: drop-shadow(0 2px 4px rgba(20, 29, 35, 0.24));
    animation: hero-fade-in 0.7s ease-out 0.2s forwards;
}

.main {
    flex: 1 1 auto;
    min-width: 0;
}

.menu {
    width: min(310px, calc(100vw - 48px));
    padding: 72px 16px 24px;
    background: #fbfcfc;
    border-right-color: var(--imd-line);
    box-shadow: 12px 0 30px rgba(28, 39, 47, 0.12);
}

.menu .since-text {
    margin: 0 8px 14px;
    color: var(--imd-teal);
    font-size: 0.88rem;
    font-weight: 700;
}

.menu ul li {
    margin-bottom: 3px;
}

.menu ul li a {
    min-height: 42px;
    padding: 9px 10px;
    color: #35424b;
    line-height: 1.45;
    border-radius: 6px;
    transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.menu ul li a:hover {
    color: var(--imd-accent-strong);
    background: #f2f5f5;
}

.menu ul li a i {
    color: var(--imd-teal);
}

.menu ul li a.current {
    color: var(--imd-accent-strong);
    background: #f2edf4;
    box-shadow: inset 3px 0 0 var(--imd-accent);
    font-weight: 700;
}

.menu ul li a.current i {
    color: var(--imd-accent);
}

.menu ul li.child-link {
    margin-top: -3px;
    margin-bottom: 3px;
}

.menu ul li.child-link a {
    min-height: 34px;
    padding: 5px 8px 5px 38px;
    color: var(--imd-muted);
    font-size: 0.86rem;
}

.menu .menu-new-badge {
    margin-left: 7px;
    padding: 2px 6px;
    color: #ffffff;
    background: #d94f61;
    border-radius: 8px;
    box-shadow: none;
    letter-spacing: 0;
}

.menu .menu-new-badge::after {
    display: none;
}

.overlay {
    background: rgba(29, 40, 47, 0.42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.content {
    display: flex;
    width: 100%;
    min-width: 0;
    padding: 30px 20px 24px;
    flex-direction: column;
    overflow-wrap: anywhere;
}

.content h1 {
    align-self: flex-start;
    margin: 0 0 34px;
    padding: 0 0 12px;
    color: var(--imd-ink);
    font-size: 1.75rem;
    line-height: 1.35;
    letter-spacing: 0;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.content h1::after {
    width: 56px;
    height: 3px;
    margin-top: 11px;
    background: var(--imd-accent);
    border-radius: 2px;
}

.content h2 {
    margin-top: 36px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    color: #33414b;
    font-size: 1.3rem;
    line-height: 1.45;
    letter-spacing: 0;
    border-bottom-color: var(--imd-line);
}

.content h1 + h2 {
    margin-top: 10px;
}

.content h3 {
    margin-top: 22px;
    padding: 8px 12px;
    color: #37444d;
    line-height: 1.55;
    letter-spacing: 0;
    border-left-color: var(--imd-teal);
    background: var(--imd-surface-soft);
}

.content p {
    margin-top: 0;
    margin-bottom: 18px;
    color: #3d4952;
    line-height: 1.85;
}

.content .top {
    margin-top: 0;
}

.content a {
    color: var(--imd-accent-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.copyright {
    position: static;
    left: auto;
    bottom: auto;
    width: auto;
    max-width: none;
    margin-top: auto;
    padding: 42px 0 2px;
    transform: none;
    color: #99a2a9;
    background: transparent;
    border-top: 0;
    pointer-events: auto;
}

.content .copyright {
    margin-top: auto;
    margin-bottom: 0;
}

.imd-lang-toggle {
    gap: 3px;
    padding: 3px;
    background: var(--imd-surface);
    border-color: var(--imd-line-strong);
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(28, 39, 47, 0.09);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.imd-lang-btn {
    height: 32px;
    padding: 0 9px;
    color: #4a5861;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 32px;
}

.imd-lang-btn.is-icon {
    width: 38px;
}

.imd-lang-btn.is-active {
    color: #ffffff;
    background: var(--imd-accent);
}

/* Services */
.service-list {
    gap: 14px;
    margin-top: 2px;
}

.service-card {
    padding: 18px;
    background: var(--imd-surface);
    border: 1px solid var(--imd-line);
    border-top: 3px solid var(--imd-teal);
    border-left-width: 1px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(28, 39, 47, 0.04);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.service-card:hover {
    transform: translateY(-1px);
    border-color: #cdd8da;
    border-top-color: var(--imd-accent);
    box-shadow: 0 7px 18px rgba(28, 39, 47, 0.08);
}

.service-card h3 {
    margin: 0 0 8px;
    padding: 0;
    color: var(--imd-ink);
    font-size: 1.08rem;
    line-height: 1.5;
    background: none;
    border: 0;
}

.service-card a {
    color: var(--imd-accent-strong);
}

.service-card p {
    margin: 0;
    color: #53606a;
    font-size: 0.93rem;
    line-height: 1.75;
}

.trademark-list {
    gap: 8px;
}

.trademark-item {
    min-width: 0;
    padding: 10px 12px;
    color: #4c5962;
    background: var(--imd-surface);
    border-color: var(--imd-line);
    border-radius: 4px;
}

.trademark-name {
    min-width: 0;
    color: var(--imd-ink);
}

.trademark-id {
    margin-left: 10px;
    flex: 0 0 auto;
    color: #69757d;
    background: var(--imd-teal-soft);
    border-radius: 3px;
}

/* Company profile */
.profile-dl {
    gap: 0;
}

.profile-dl dt {
    margin-top: 0;
    padding-top: 15px;
    color: var(--imd-accent-strong);
}

.profile-dl dt::before {
    content: none;
    display: none;
}

.profile-dl dd {
    margin: 0;
    padding: 6px 0 15px;
    color: #3f4b54;
    line-height: 1.75;
    border-bottom: 1px solid var(--imd-line);
}

.executive-profile {
    gap: 22px;
    margin: 14px 0 8px;
    padding: 22px;
    background: var(--imd-surface-soft);
    border: 1px solid var(--imd-line);
    border-radius: 6px;
    box-shadow: none;
}

.executive-img {
    width: 144px;
    height: 144px;
    border-color: var(--imd-surface);
    box-shadow: 0 3px 12px rgba(28, 39, 47, 0.12);
}

.executive-name {
    color: var(--imd-ink);
    font-size: 1.25rem;
}

.executive-title {
    color: var(--imd-muted);
    line-height: 1.7;
}

.timeline {
    margin-top: 12px;
    margin-left: 8px;
    padding-left: 22px;
    border-left-color: #cfdedc;
}

.timeline-item {
    margin-bottom: 22px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    left: -30px;
    top: 5px;
    width: 13px;
    height: 13px;
    background: var(--imd-surface);
    border-color: var(--imd-teal);
}

.timeline-year {
    margin-bottom: 7px;
    color: var(--imd-accent-strong);
    font-size: 1.02rem;
}

.timeline-content {
    padding: 14px 16px;
    line-height: 1.75;
    background: var(--imd-surface);
    border-color: var(--imd-line);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(28, 39, 47, 0.04);
}

.timeline-sub {
    margin-top: 10px;
    padding: 9px 11px;
    color: #56636c;
    line-height: 1.7;
    background: var(--imd-surface-soft);
    border-left: 2px solid #a8cac7;
    border-radius: 3px;
}

/* Releases and news */
.news-item {
    margin-bottom: 26px;
    padding-bottom: 26px;
    border-bottom-color: var(--imd-line);
}

.news-item:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.news-item h3 {
    margin: 0 0 10px;
}

.news-item p {
    margin: 0;
}

/* Standalone privacy policy */
body.privacy-page {
    padding: 72px 18px 40px;
    background: var(--imd-canvas);
}

.privacy-page .close-button {
    display: inline-flex;
    top: 14px;
    left: 14px;
    width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: var(--imd-ink);
    font-size: 1.35rem;
    line-height: 1;
    background: var(--imd-surface);
    border: 1px solid var(--imd-line-strong);
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(28, 39, 47, 0.09);
}

.privacy-page .close-button:hover {
    color: var(--imd-accent-strong);
    background: var(--imd-surface-soft);
    border-color: #bec9cd;
}

.privacy-page .close-button:focus-visible {
    outline: 3px solid rgba(35, 127, 122, 0.28);
    outline-offset: 2px;
}

.privacy-page .container {
    display: block;
    max-width: 860px;
    min-height: 0;
    margin: 0 auto;
    padding: 40px 44px;
    background: var(--imd-surface);
    border: 1px solid var(--imd-line);
    border-radius: 6px;
    box-shadow: 0 8px 28px rgba(28, 39, 47, 0.08);
}

.privacy-page h1 {
    position: relative;
    margin: 0 0 36px;
    padding-bottom: 14px;
    color: var(--imd-ink);
    font-size: 2rem;
    line-height: 1.4;
    text-align: left;
    letter-spacing: 0;
}

.privacy-page h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 56px;
    height: 3px;
    background: var(--imd-accent);
    border-radius: 2px;
}

.privacy-page h2 {
    margin: 42px 0 18px;
    padding-bottom: 10px;
    color: #33414b;
    font-size: 1.35rem;
    line-height: 1.5;
    letter-spacing: 0;
    border-bottom: 1px solid var(--imd-line);
}

.privacy-page h3[style] {
    color: #37444d !important;
    line-height: 1.55;
    letter-spacing: 0;
}

.privacy-page p,
.privacy-page li {
    color: #3f4b54;
    line-height: 1.85;
}

.privacy-page ul {
    padding-left: 24px;
}

.privacy-page li::marker {
    color: var(--imd-teal);
}

.privacy-page a {
    color: var(--imd-accent-strong) !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.privacy-page .declaration {
    margin: 28px 0;
    padding: 18px 20px;
    color: #35464b;
    font-style: normal;
    background: var(--imd-teal-soft);
    border-left: 4px solid var(--imd-teal);
    border-radius: 4px;
}

.privacy-page .highlight-policy {
    margin: 14px 0;
    padding: 16px 18px;
    color: #3e3441;
    background: #f5f1f6;
    border-left: 4px solid var(--imd-accent);
    border-radius: 4px;
    box-shadow: none;
}

.privacy-page .highlight-policy small {
    color: var(--imd-muted);
}

.privacy-page .company-info[style] {
    display: block !important;
    margin-top: 34px !important;
    padding: 18px 20px !important;
    color: #3f4b54;
    background: var(--imd-surface-soft) !important;
    border: 1px solid var(--imd-line) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}

@media screen and (max-width: 767px) {
    body.privacy-page {
        padding: 66px 10px 20px;
    }

    .privacy-page .container {
        margin: 0;
        padding: 26px 18px;
    }

    .privacy-page h1 {
        margin-bottom: 30px;
        font-size: 1.7rem;
    }

    .privacy-page h2 {
        margin-top: 36px;
        font-size: 1.2rem;
    }
}

@media screen and (min-width: 768px) {
    .header {
        gap: 18px;
        padding: 16px 18px;
    }

    .header .logo {
        width: 118px;
        height: 118px;
        max-height: none;
        margin: 0;
        object-fit: contain;
    }

    .header-hero {
        height: 124px;
        margin: 0;
        flex: 1 1 auto;
    }

    .hero-mini {
        width: 56px;
        height: 56px;
    }

    .menu-toggle {
        display: none;
    }

    .main {
        display: flex;
        align-items: stretch;
    }

    .menu {
        width: 226px;
        padding: 32px 18px 28px;
        background: #fbfcfc;
        border-right-color: var(--imd-line);
        box-shadow: none;
    }

    .content {
        padding: 38px 40px 28px;
    }

    .content h1 {
        font-size: 2rem;
    }

    .profile-dl {
        grid-template-columns: 168px minmax(0, 1fr);
        column-gap: 16px;
    }

    .profile-dl dt,
    .profile-dl dd {
        padding-top: 13px;
        padding-bottom: 13px;
        border-bottom: 1px solid var(--imd-line);
    }

    .profile-dl dd {
        padding-left: 0;
    }

    .executive-profile {
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
