/* ============================================
   Yelen Group — styles
   ============================================ */

:root {
    --linen: #F2EBDD;
    --linen-warm: #EDE5D3;
    --linen-deep: #E4DAC4;
    --charcoal: #1F2421;
    --charcoal-soft: #3A413C;
    --charcoal-muted: #6B716C;
    --emerald: #0F5132;
    --emerald-bright: #156942;
    --hairline: rgba(31, 36, 33, 0.14);

    --sidebar-w: 280px;
    --serif: 'Cormorant Garamond', 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: var(--charcoal);
    background: var(--linen);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 180ms var(--ease);
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    padding: 48px 36px 36px;
    display: flex;
    flex-direction: column;
    background: var(--linen);
    border-right: 1px solid var(--hairline);
    z-index: 50;
}

.brand {
    margin-bottom: 56px;
}

.brand a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    color: var(--charcoal);
    line-height: 1;
    transition: opacity 200ms var(--ease);
}

.brand a:hover { opacity: 0.7; }

.brand-logo {
    width: 72px;
    height: 72px;
    display: block;
    background-color: var(--charcoal);
    -webkit-mask: url('logo.svg') center / contain no-repeat;
    mask: url('logo.svg') center / contain no-repeat;
    transition: background-color 200ms var(--ease);
}

.brand a:hover .brand-logo { background-color: var(--emerald); }

.brand-name {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 500;
    letter-spacing: 0.18em;
}

.brand-mark {
    margin-top: 4px;
    margin-left: 1px;
    font-size: 10px;
    letter-spacing: 0.32em;
    color: var(--charcoal-muted);
    font-weight: 400;
    text-transform: uppercase;
}

.nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.nav a {
    display: block;
    padding: 11px 0 11px 16px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--charcoal-soft);
    position: relative;
    transition: color 180ms var(--ease), padding-left 200ms var(--ease);
}

.nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 0;
    background: var(--emerald);
    transition: height 220ms var(--ease);
}

.nav a:hover {
    color: var(--emerald);
}

.nav a:hover::before { height: 18px; }

.nav a.active {
    color: var(--emerald);
    font-weight: 500;
}

.nav a.active::before {
    height: 22px;
}

.sidebar-foot {
    margin-top: auto;
    padding-top: 24px;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--charcoal-muted);
    line-height: 1.6;
}

.sidebar-foot .rule {
    height: 1px;
    background: var(--hairline);
    margin-bottom: 18px;
}

.sidebar-foot .muted {
    margin-top: 4px;
    font-style: italic;
    opacity: 0.8;
}

.lang-switcher {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}

.lang-btn {
    background: none;
    border: 0;
    padding: 3px 2px;
    margin: 0;
    font: inherit;
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--charcoal-muted);
    cursor: pointer;
    transition: color 180ms var(--ease);
}

.lang-btn:not(:last-child)::after {
    content: '·';
    display: inline-block;
    margin: 0 6px;
    color: var(--hairline);
}

.lang-btn:hover {
    color: var(--emerald);
}

.lang-btn.active {
    color: var(--emerald);
    font-weight: 500;
}

/* ============================================
   Main
   ============================================ */

main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    padding: 96px 80px 120px;
    position: relative;
}

.panel {
    display: none;
    animation: fadeIn 360ms var(--ease);
}

.panel.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.panel-inner {
    max-width: 1080px;
}

.panel-inner.narrow {
    max-width: 680px;
}

.panel-inner.centered {
    text-align: center;
}

/* ============================================
   Typography — content
   ============================================ */

.eyebrow {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--emerald);
    margin-bottom: 28px;
}

.panel h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 56px;
    line-height: 1.08;
    letter-spacing: -0.005em;
    color: var(--charcoal);
    margin-bottom: 36px;
    max-width: 14ch;
}

.panel-inner.narrow h1 { max-width: 16ch; }
.panel-inner.centered h1 { max-width: none; }

.panel h1.display {
    font-size: 64px;
    max-width: 18ch;
}

.panel h2 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 26px;
    line-height: 1.3;
    color: var(--charcoal);
    margin-top: 56px;
    margin-bottom: 18px;
    letter-spacing: 0.005em;
}

.lede {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.5;
    color: var(--charcoal-soft);
    margin-bottom: 32px;
    max-width: 32ch;
}

.panel-inner.narrow .lede { max-width: none; }
.panel-inner.centered .lede { max-width: 46ch; margin-left: auto; margin-right: auto; }

.panel p {
    margin-bottom: 18px;
    max-width: 62ch;
    color: var(--charcoal-soft);
}

.panel-inner.centered p { margin-left: auto; margin-right: auto; }

.postscript {
    margin-top: 48px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 18px;
    color: var(--charcoal-muted);
}

.muted { color: var(--charcoal-muted); }
.small { font-size: 13px; }

.link {
    color: var(--emerald);
    border-bottom: 1px solid var(--emerald);
    padding-bottom: 1px;
}
.link:hover { color: var(--emerald-bright); border-bottom-color: var(--emerald-bright); }

/* ============================================
   Operations — two-column layout
   ============================================ */

.ops-intro {
    max-width: 56ch;
    margin-bottom: 56px;
    color: var(--charcoal-soft);
}

.ops-verticals {
    border-top: 1px solid var(--hairline);
    max-width: 900px;
}

.vertical-item {
    border-bottom: 1px solid var(--hairline);
}

.vertical-toggle {
    display: grid;
    grid-template-columns: 56px 1fr 20px;
    align-items: center;
    gap: 24px;
    width: 100%;
    padding: 24px 0;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    transition: padding 220ms var(--ease);
}

.vertical-toggle:hover { padding-left: 8px; }

.v-num {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--charcoal-muted);
    font-weight: 400;
}

.v-name {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 400;
    color: var(--charcoal);
    line-height: 1.1;
    transition: color 180ms var(--ease);
}

.vertical-toggle:hover .v-name { color: var(--emerald); }

.v-chev {
    width: 14px;
    height: 14px;
    position: relative;
    justify-self: end;
}

.v-chev::before,
.v-chev::after {
    content: '';
    position: absolute;
    background: var(--charcoal-muted);
    transition: transform 280ms var(--ease), background 180ms var(--ease);
}

.v-chev::before {
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    transform: translateY(-50%);
}

.v-chev::after {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
}

.vertical-item.active .v-chev::after {
    transform: translateX(-50%) scaleY(0);
}

.vertical-item.active .v-name { color: var(--emerald); }
.vertical-item.active .v-chev::before { background: var(--emerald); }

.vertical-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 420ms var(--ease), padding 300ms var(--ease);
    padding: 0 0 0 80px;
}

.vertical-item.active .vertical-body {
    max-height: 1400px;
    padding-bottom: 32px;
}

.vertical-body p {
    margin: 0 0 14px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--charcoal-soft);
    max-width: 52ch;
}

.vertical-body p:last-child { margin-bottom: 0; }

/* Companies tucked inside an expanded sector */

.vertical-companies {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--hairline);
}

.company {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.company + .company {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
}

.company-image {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    background: var(--linen-deep);
    border: 1px solid var(--hairline);
}

.company-info {
    flex: 1;
    min-width: 0;
}

.company-name {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 6px;
    color: var(--charcoal);
}

.company-name a {
    color: inherit;
    transition: color 180ms var(--ease);
}

.company-name a:hover {
    color: var(--emerald);
}

.company-meta {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--charcoal-muted);
    margin: 0 0 8px;
}

.company-meta .role {
    color: var(--emerald);
    font-weight: 500;
}

.company-meta .sep {
    margin: 0 0.4em;
    color: var(--hairline);
}

.company-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--charcoal-soft);
    margin: 0;
}

/* Mobile */

@media (max-width: 900px) {
    .vertical-toggle {
        grid-template-columns: 36px 1fr 18px;
        gap: 14px;
    }

    .v-name {
        font-size: 24px;
    }

    .vertical-body {
        padding: 0;
    }

    .vertical-item.active .vertical-body {
        max-height: 1800px;
        padding-bottom: 28px;
    }

    .company {
        gap: 14px;
    }

    .company-image {
        width: 48px;
        height: 48px;
    }

    .company-name {
        font-size: 19px;
    }
}

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

.email {
    display: inline-block;
    margin: 24px auto 32px;
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 400;
    color: var(--emerald);
    border-bottom: 1px solid var(--emerald);
    padding-bottom: 4px;
    transition: color 180ms var(--ease), border-color 180ms var(--ease);
}
.email:hover { color: var(--emerald-bright); border-bottom-color: var(--emerald-bright); }

/* ============================================
   Mobile toggle
   ============================================ */

.menu-toggle {
    display: none;
    position: fixed;
    top: 22px;
    right: 22px;
    width: 44px;
    height: 44px;
    background: var(--linen);
    border: 1px solid var(--hairline);
    cursor: pointer;
    z-index: 100;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transition: background 180ms var(--ease);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 1px;
    background: var(--charcoal);
    transition: transform 220ms var(--ease), opacity 220ms var(--ease);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

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

@media (max-width: 1100px) {
    main { padding: 88px 56px 96px; }
    .panel h1 { font-size: 48px; }
    .panel h1.display { font-size: 54px; }
    .v-name { font-size: 28px; }
}

@media (max-width: 900px) {
    :root { --sidebar-w: 240px; }

    .menu-toggle { display: flex; }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 280ms var(--ease);
        width: 280px;
        box-shadow: 0 0 0 9999px rgba(31, 36, 33, 0);
        pointer-events: none;
    }
    .sidebar.open {
        transform: translateX(0);
        pointer-events: auto;
        box-shadow: 0 0 0 9999px rgba(31, 36, 33, 0.35);
    }

    main {
        margin-left: 0;
        padding: 96px 32px 80px;
    }

    .panel h1 { font-size: 40px; }
    .panel h1.display { font-size: 44px; }
    .lede { font-size: 19px; }
    .v-name { font-size: 24px; }
    .verticals a { grid-template-columns: 40px 1fr auto; gap: 18px; padding: 22px 0; }
    .hero { aspect-ratio: 4 / 3; }
    .email { font-size: 24px; }

    .holdings li { flex-direction: column; align-items: flex-start; gap: 4px; }
    .holdings em { text-align: left; }
}

@media (max-width: 480px) {
    main { padding: 88px 22px 64px; }
    .panel h1 { font-size: 34px; }
    .panel h1.display { font-size: 36px; }
    .lede { font-size: 17px; }
    .v-name { font-size: 20px; }
    .email { font-size: 20px; }
}

/* ============================================
   Focus / accessibility
   ============================================ */

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--emerald);
    outline-offset: 3px;
}

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

/* ============================================
   Language-specific typography
   ============================================ */

html[lang="ar"] body {
    font-family: 'Noto Naskh Arabic', 'Inter', system-ui, sans-serif;
}

html[lang="ar"] .panel h1,
html[lang="ar"] .panel h2,
html[lang="ar"] .lede,
html[lang="ar"] .v-name,
html[lang="ar"] .company-name,
html[lang="ar"] .brand-name,
html[lang="ar"] .email,
html[lang="ar"] .postscript {
    font-family: 'Noto Naskh Arabic', 'Cormorant Garamond', serif;
}

html[lang="zh"] body {
    font-family: 'Noto Serif SC', 'Inter', system-ui, sans-serif;
}

html[lang="zh"] .panel h1,
html[lang="zh"] .panel h2,
html[lang="zh"] .lede,
html[lang="zh"] .v-name,
html[lang="zh"] .company-name,
html[lang="zh"] .email,
html[lang="zh"] .postscript {
    font-family: 'Noto Serif SC', 'Cormorant Garamond', serif;
}

html[lang="zh"] .panel h1,
html[lang="ar"] .panel h1 {
    letter-spacing: 0;
}

/* ============================================
   RTL overrides (Arabic)
   ============================================ */

html[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    border-right: 0;
    border-left: 1px solid var(--hairline);
}

html[dir="rtl"] main {
    margin-left: 0;
    margin-right: var(--sidebar-w);
}

html[dir="rtl"] .menu-toggle {
    right: auto;
    left: 22px;
}

html[dir="rtl"] .nav a {
    padding: 11px 16px 11px 0;
}

html[dir="rtl"] .nav a::before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .nav a:hover {
    padding-left: 0;
    padding-right: 22px;
}

html[dir="rtl"] .brand a,
html[dir="rtl"] .brand-mark {
    text-align: right;
}

html[dir="rtl"] .vertical-toggle {
    grid-template-columns: 20px 1fr 56px;
    direction: rtl;
}

html[dir="rtl"] .vertical-toggle:hover {
    padding-left: 0;
    padding-right: 8px;
}

html[dir="rtl"] .vertical-body {
    padding: 0 80px 0 0;
}

html[dir="rtl"] .back:hover {
    transform: translateX(3px);
}

html[dir="rtl"] .lang-btn:not(:last-child)::after {
    /* keep separator in place; flex order handles direction */
}

@media (max-width: 900px) {
    html[dir="rtl"] .sidebar {
        transform: translateX(100%);
    }
    html[dir="rtl"] .sidebar.open {
        transform: translateX(0);
    }
    html[dir="rtl"] main {
        margin-right: 0;
    }
    html[dir="rtl"] .vertical-body {
        padding: 0;
    }
}
