:root {
    --ink: #1A1A1D;
    --ink-soft: #3D3D42;
    --ink-mute: #6B6B72;
    --paper: #FAFAF8;
    --paper-raised: #FFFFFF;
    --hairline: #E4E3DF;
    --accent: #E84800;
    --accent-deep: #C43D00;
    --accent-bright: #FF6B35;
    --dark-surface: #1A1A1D;
    --dark-hairline: #333338;
    --dark-text: #F4F4F2;
    --dark-mute: #A3A3A9;
    --radius: 2px;
    --font-sans: 'Geist', system-ui, -apple-system, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background: var(--paper);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
section { scroll-margin-top: 88px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }

/* ---------- Type scale ---------- */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
.display {
    font-size: clamp(2.4rem, 4.4vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.08;
}
.h-section {
    font-size: clamp(1.85rem, 3.2vw, 2.6rem);
    letter-spacing: -0.025em;
}
.lead { font-size: 1.125rem; color: var(--ink-soft); line-height: 1.65; }
.mute { color: var(--ink-mute); }
.mono-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9375rem;
    line-height: 1;
    white-space: nowrap;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-primary .btn-arrow { transition: transform 0.2s ease; }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }
.btn-ghost { border: 1px solid var(--hairline); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-invert { background: #fff; color: var(--ink); }
.btn-invert:hover { background: var(--paper); }
.link-accent {
    color: var(--accent-deep);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.link-accent:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Header ---------- */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(250, 250, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}
header.is-stuck { border-bottom-color: var(--hairline); }
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-name { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.nav-links { display: none; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.9rem; color: var(--ink-soft); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: none; align-items: center; gap: 20px; }
.nav-cta .btn { padding: 11px 20px; }
@media (min-width: 1024px) {
    .nav-links { display: flex; }
    .nav-cta { display: flex; }
    .menu-toggle { display: none; }
}

/* Language dropdown */
.lang { position: relative; }
.lang-btn {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.9rem; color: var(--ink-soft);
    padding: 8px 4px;
}
.lang-btn:hover { color: var(--ink); }
.lang-menu {
    position: absolute; top: 100%; right: 0;
    min-width: 160px;
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(26, 26, 29, 0.08);
    padding: 6px 0;
    display: none;
}
.lang.open .lang-menu { display: block; }
.lang-menu a {
    display: block; padding: 9px 16px;
    font-size: 0.875rem; color: var(--ink-soft);
}
.lang-menu a:hover { background: var(--paper); color: var(--ink); }

/* Mobile menu */
.menu-toggle { padding: 8px; margin-right: -8px; }
.mobile-menu {
    display: none;
    border-top: 1px solid var(--hairline);
    background: var(--paper-raised);
    padding: 16px 0 28px;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 13px 0; font-size: 1.05rem; border-bottom: 1px solid var(--hairline); }
.mobile-menu .mm-lang { border-bottom: none; font-size: 0.95rem; color: var(--ink-mute); padding: 9px 0; }
.mobile-menu .mm-lang-head { margin-top: 20px; }

/* ---------- Hero ---------- */
.hero { padding: 150px 0 80px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 56px; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 7fr 5fr; gap: 48px; } }
.hero h1 { max-width: 24ch; }
.hero h1 .accent-word { color: var(--accent-deep); }
.hero .lead { max-width: 46ch; margin-top: 28px; font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero-visual { position: relative; min-height: 320px; }
.hero-visual svg { width: 100%; height: auto; }

/* ---------- Group band ---------- */
.band {
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    padding: 22px 0;
}
.band-inner {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 16px;
}
.band-fact { font-size: 0.9rem; color: var(--ink-mute); }
.band-fact strong { color: var(--ink); font-weight: 600; }
.band-links { display: flex; flex-wrap: wrap; gap: 24px; }
.band-links a { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--ink-soft); }
.band-links a:hover { color: var(--accent-deep); }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-head { max-width: 62ch; margin-bottom: 56px; }
.section-head .lead { margin-top: 16px; }

/* ---------- Services bento ---------- */
.svc-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .svc-grid { grid-template-columns: repeat(12, 1fr); } }
.svc-card {
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--paper-raised);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease;
}
.svc-card:hover { border-color: var(--ink-mute); }
@media (min-width: 900px) {
    .svc-a { grid-column: span 7; }
    .svc-b { grid-column: span 5; }
    .svc-c, .svc-d, .svc-e { grid-column: span 4; }
    .svc-f { grid-column: span 12; }
}
.svc-card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.svc-card p { color: var(--ink-mute); font-size: 0.95rem; margin-bottom: 22px; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.svc-tags span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    padding: 5px 10px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    color: var(--ink-soft);
}
.svc-dark { background: var(--dark-surface); border-color: var(--dark-surface); color: var(--dark-text); position: relative; overflow: hidden; }
.svc-dark:hover { border-color: var(--dark-surface); }
.svc-dark p { color: var(--dark-mute); }
.svc-dark .svc-tags span { border-color: var(--dark-hairline); color: var(--dark-mute); }
.svc-dark .svc-wave { position: absolute; right: -40px; bottom: -60px; width: 260px; opacity: 0.16; pointer-events: none; }
.svc-tint { background: #FBF1EA; border-color: #F0DFD2; }
.svc-tint:hover { border-color: var(--accent); }
.svc-f { flex-direction: column; }
@media (min-width: 900px) {
    .svc-f { flex-direction: row; align-items: center; gap: 48px; }
    .svc-f .svc-f-text { flex: 1 1 55%; }
    .svc-f .svc-tags { flex: 1 1 45%; margin-top: 0; justify-content: flex-end; }
}

/* ---------- Solutions tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.tab-btn {
    padding: 11px 22px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-soft);
    transition: all 0.15s ease;
}
.tab-btn:hover { border-color: var(--ink); color: var(--ink); }
.tab-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.sol-pair { display: grid; gap: 0; grid-template-columns: 1fr; }
@media (min-width: 900px) { .sol-pair { grid-template-columns: 1fr 1fr; } }
.sol-item { padding: 40px 0; border-top: 1px solid var(--hairline); }
@media (min-width: 900px) {
    .sol-item { padding: 48px 48px 48px 0; }
    .sol-item + .sol-item { border-left: 1px solid var(--hairline); padding-left: 48px; padding-right: 0; }
}
.sol-item h3 { font-size: 1.35rem; margin-bottom: 14px; }
.sol-item p { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 20px; max-width: 52ch; }
.sol-item ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sol-item li { display: flex; align-items: baseline; gap: 10px; font-size: 0.9rem; color: var(--ink-mute); }
.sol-item li::before { content: ""; width: 14px; height: 2px; background: var(--accent); flex-shrink: 0; transform: translateY(-3px); }

/* ---------- Industries ---------- */
.ind-grid { display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .ind-grid { grid-template-columns: repeat(4, 1fr); } }
.ind-cell { background: var(--paper-raised); padding: 30px 26px; transition: background 0.2s ease; }
.ind-cell:hover { background: var(--paper); }
.ind-cell h3 { font-size: 1.02rem; font-weight: 600; margin: 14px 0 6px; }
.ind-cell p { font-size: 0.85rem; color: var(--ink-mute); line-height: 1.55; }
.ind-cell svg { color: var(--accent-deep); }

/* ---------- IP collaboration ---------- */
.ip-grid { display: grid; grid-template-columns: 1fr; gap: 64px; }
@media (min-width: 1024px) { .ip-grid { grid-template-columns: 5fr 6fr; } }
.ip-points { margin: 32px 0 36px; display: flex; flex-direction: column; gap: 18px; }
.ip-points li { list-style: none; display: flex; gap: 14px; align-items: flex-start; color: var(--ink-soft); font-size: 0.98rem; }
.ip-points svg { flex-shrink: 0; margin-top: 4px; color: var(--accent-deep); }
.ip-rows { display: flex; flex-direction: column; }
.ip-row { padding: 30px 0; border-top: 1px solid var(--hairline); }
.ip-row:last-child { border-bottom: 1px solid var(--hairline); }
.ip-row h3 { font-size: 1.15rem; margin-bottom: 8px; }
.ip-row p { font-size: 0.92rem; color: var(--ink-mute); max-width: 58ch; }

/* ---------- Case studies ---------- */
.case-row {
    display: grid; grid-template-columns: 1fr; gap: 20px;
    padding: 44px 0; border-top: 1px solid var(--hairline);
}
.case-row:last-of-type { border-bottom: 1px solid var(--hairline); }
@media (min-width: 900px) { .case-row { grid-template-columns: 200px 1fr 2fr; gap: 48px; align-items: start; } }
.case-metric { font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--accent-deep); }
.case-metric small { display: block; font-size: 0.8rem; font-weight: 400; letter-spacing: 0; color: var(--ink-mute); margin-top: 10px; font-family: var(--font-mono); }
.case-title h3 { font-size: 1.25rem; margin-bottom: 10px; }
.case-title .case-tag { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-mute); letter-spacing: 0.05em; }
.case-body { color: var(--ink-soft); font-size: 0.98rem; max-width: 60ch; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr; gap: 48px; }
@media (min-width: 1024px) { .faq-grid { grid-template-columns: 4fr 7fr; } }
.faq-side { position: sticky; top: 110px; align-self: start; }
.faq-list details { border-bottom: 1px solid var(--hairline); }
.faq-list details:first-child { border-top: 1px solid var(--hairline); }
.faq-list summary {
    list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 20px;
    padding: 22px 0; cursor: pointer;
    font-weight: 500; font-size: 1.02rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--accent-deep); }
.faq-list summary .faq-icon { flex-shrink: 0; transition: transform 0.2s ease; color: var(--ink-mute); }
.faq-list details[open] summary .faq-icon { transform: rotate(45deg); color: var(--accent-deep); }
.faq-list .faq-answer { padding: 0 40px 24px 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--dark-surface); color: var(--dark-text); padding: 96px 0; position: relative; overflow: hidden; }
.cta-band .cta-wave { position: absolute; right: -80px; top: 50%; transform: translateY(-50%); width: 420px; opacity: 0.12; pointer-events: none; }
.cta-band h2 { font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -0.03em; max-width: 20ch; }
.cta-band p { color: var(--dark-mute); margin-top: 18px; max-width: 52ch; }
.cta-band .hero-actions { margin-top: 36px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 56px; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 4fr 7fr; } }
.ci-block { padding: 24px 0; border-top: 1px solid var(--hairline); }
.ci-block h4 { font-size: 0.82rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 8px; }
.ci-block a { font-weight: 500; }
.ci-block a:hover { color: var(--accent-deep); }
.ci-brands { display: flex; flex-direction: column; gap: 10px; }
.ci-brands a { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 400; letter-spacing: 0.04em; }

form .field { margin-bottom: 22px; }
form label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 8px; }
form label .req { color: var(--accent-deep); }
form input[type="text"], form input[type="email"], form input[type="tel"], form select, form textarea {
    width: 100%;
    padding: 13px 14px;
    font: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
form input:focus, form select:focus, form textarea:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(26, 26, 29, 0.08);
}
form ::placeholder { color: #9A9AA0; opacity: 1; }
.field-2col { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 640px) { .field-2col { grid-template-columns: 1fr 1fr; } }
.field-2col .field { margin-bottom: 0; }
.privacy-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; color: var(--ink-soft); }
.privacy-row input { margin-top: 4px; accent-color: var(--accent-deep); }
.privacy-row a { color: var(--accent-deep); }
.privacy-row a:hover { text-decoration: underline; }
.form-status { display: none; padding: 14px 16px; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 22px; }
.form-status.show { display: block; }
.form-status.ok { background: #EDF6EE; border: 1px solid #BFDEC3; color: #1E5B29; }
.form-status.err { background: #FBEDEA; border: 1px solid #EFC5BB; color: #8C2A12; }
.btn-submit { width: 100%; justify-content: center; padding: 16px; }
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--hairline); padding: 72px 0 40px; background: var(--paper-raised); }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 56px; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .foot-brand { grid-column: auto; } }
.foot-brand p { font-size: 0.9rem; color: var(--ink-mute); margin-top: 16px; max-width: 34ch; }
footer h3 { font-size: 0.82rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 18px; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
footer ul a { font-size: 0.9rem; color: var(--ink-soft); }
footer ul a:hover { color: var(--ink); }
.foot-bottom {
    border-top: 1px solid var(--hairline);
    padding-top: 28px;
    display: flex; flex-wrap: wrap; gap: 16px;
    justify-content: space-between; align-items: center;
    font-size: 0.85rem; color: var(--ink-mute);
}
.foot-bottom .foot-langs { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-bottom a:hover { color: var(--ink); }

/* ---------- Reveal animation ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
    .reveal.in-view { opacity: 1; transform: none; }
}

/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] .display, [dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; }
[dir="rtl"] .brand-name, [dir="rtl"] body { letter-spacing: 0; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .menu-toggle { margin-right: 0; margin-left: -8px; }
[dir="rtl"] .svc-wave { right: auto; left: -40px; transform: scaleX(-1); }
[dir="rtl"] .cta-wave { right: auto; left: -80px; transform: translateY(-50%) scaleX(-1); }
[dir="rtl"] .faq-list .faq-answer { padding: 0 0 24px 40px; }
[dir="rtl"] .btn-arrow, [dir="rtl"] .link-accent svg { transform: scaleX(-1); }
[dir="rtl"] .btn-primary:hover .btn-arrow { transform: scaleX(-1) translateX(-3px); }
@media (min-width: 900px) {
    [dir="rtl"] .sol-item { padding: 48px 0 48px 48px; }
    [dir="rtl"] .sol-item + .sol-item { border-left: none; border-right: 1px solid var(--hairline); padding-right: 48px; padding-left: 0; }
}

/* ---------- CJK typography ---------- */
html[lang="ja"] .display, html[lang="zh-Hant"] .display,
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3,
html[lang="zh-Hant"] h1, html[lang="zh-Hant"] h2, html[lang="zh-Hant"] h3 { letter-spacing: 0; line-height: 1.25; }
html[lang="ja"] .display, html[lang="zh-Hant"] .display { font-size: clamp(2.1rem, 4vw, 3.1rem); line-height: 1.22; }
