/* ========================================================================
   CJS — Cargo Jet Solutions | Stable v2 (rewritten from scratch)
   Goal: clean layout, three languages, HarmonyOS Sans, no fancy 1:1 tricks
   ======================================================================== */

/* --- HarmonyOS Sans (subset, lang-aware loading) --- */
/* SC family: covers Simplified Chinese glyphs + Latin + punctuation */
@font-face {
    font-family: 'HarmonyOS Sans SC';
    font-style: normal; font-weight: 400; font-display: swap;
    src: url('../fonts/harmonyos-sans-sc-regular.subset.woff2') format('woff2');
}
@font-face {
    font-family: 'HarmonyOS Sans SC';
    font-style: normal; font-weight: 700; font-display: swap;
    src: url('../fonts/harmonyos-sans-sc-bold.subset.woff2') format('woff2');
}
/* TC family: covers Traditional Chinese glyphs + Latin + punctuation */
@font-face {
    font-family: 'HarmonyOS Sans TC';
    font-style: normal; font-weight: 400; font-display: swap;
    src: url('../fonts/harmonyos-sans-tc-regular.subset.woff2') format('woff2');
}
@font-face {
    font-family: 'HarmonyOS Sans TC';
    font-style: normal; font-weight: 700; font-display: swap;
    src: url('../fonts/harmonyos-sans-tc-bold.subset.woff2') format('woff2');
}

/* --- Variables --- */
:root {
    --c-accent:       #0196a3;
    --c-accent-dark:  #016c75;
    --c-accent-deep:  #01636b;
    --c-accent-light: #0ceafe;
    --c-alt:          #686d7a;
    --c-bg-soft:      #eeeeee;
    --c-text:         #333;
    --c-text-light:   #666;
    --c-white:        #fff;
    --c-black:        #000;
    --f-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --container: 1170px;
    --gutter: 24px;
    --radius: 8px;
}
/* Per-language font stack.
   - lang=en:    system font only (zero font download)
   - lang=zh-CN: SC subset
   - lang=zh-HK: TC subset with SC subset as fallback (handles 简体混排) */
html:lang(zh-CN) {
    --f-body: 'HarmonyOS Sans SC', system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
html:lang(zh-HK) {
    --f-body: 'HarmonyOS Sans TC', 'HarmonyOS Sans SC', system-ui, "PingFang HK", "Microsoft JhengHei", Arial, sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--c-text);
    background: var(--c-white);
    -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-accent); }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; color: var(--c-alt); margin: 0 0 .5em; }
h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
p  { margin: 0 0 1em; }

/* --- Layout primitives --- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
    width: 100%;
}
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}
.col {
    padding: 0 12px;
    box-sizing: border-box;
}
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6  { flex: 0 0 50%;  max-width: 50%; }
.col-4  { flex: 0 0 33.333%; max-width: 33.333%; }
.col-3  { flex: 0 0 25%; max-width: 25%; }
@media (max-width: 768px) {
    .col-6, .col-4, .col-3 { flex: 0 0 100%; max-width: 100%; }
}
.section {
    padding: 60px 0;
    position: relative;
}
.section--soft { background: var(--c-bg-soft); }
.section--dark {
    background-color: #000;
    background-size: cover;
    background-position: center;
    color: rgba(255,255,255,.9);
    position: relative;
}
.section--dark::before {
    content: '';
    position: absolute; inset: 0;
    background: rgba(0,0,0,.45);
}
.section--dark > .container { position: relative; z-index: 1; }
.section--dark h1, .section--dark h2, .section--dark h3,
.section--dark h4 { color: var(--c-accent); }
.text-center { text-align: center; }

/* --- Header --- */
.site-header {
    background: var(--c-white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 20px;
}
.logo img { height: 60px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    color: var(--c-alt);
    font-weight: 700;
    font-size: 14px;
    padding: 8px 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: color .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--c-accent); }
.mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--c-accent);
    color: var(--c-accent);
    font-size: 22px;
    padding: 4px 10px;
    cursor: pointer;
}
@media (max-width: 900px) {
    .main-nav { display: none; flex-direction: column; width: 100%; padding: 8px 0 0; }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--c-bg-soft); width: 100%; }
    .mobile-toggle { display: inline-flex; }
    .header-inner { flex-wrap: wrap; }
}

/* --- Language switcher --- */
.lang-switcher { position: relative; }
.lang-switcher .lang-btn {
    background: var(--c-accent);
    color: var(--c-white);
    border: none;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: .5px;
}
.lang-switcher .lang-btn:hover { background: var(--c-accent-dark); }
.lang-switcher .lang-menu {
    position: absolute; top: 100%; right: 0; margin-top: 4px;
    background: var(--c-white);
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    min-width: 180px;
    display: none;
    z-index: 110;
}
.lang-switcher.open .lang-menu { display: block; }
.lang-switcher .lang-menu button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--c-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lang-switcher .lang-menu button:hover { background: var(--c-bg-soft); color: var(--c-accent); }
.lang-switcher .lang-menu button.active { color: var(--c-accent); font-weight: 700; }

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 70vh;
    background-size: cover;
    background-position: center;
    color: var(--c-white);
    display: flex;
    align-items: center;
    padding: 80px 0;
}
@media (max-width: 768px) {
    .hero { min-height: 50vh; padding: 60px 0; }
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.2) 100%);
    z-index: 1;
}
.hero .container { position: relative; z-index: 2; width: 100%; }
.hero h1 {
    color: var(--c-accent);
    font-size: 48px;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.15;
    margin: 0 0 20px;
    max-width: 800px;
}
@media (max-width: 768px) { .hero h1 { font-size: 28px; } }
.hero h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--c-accent);
    margin-top: 20px;
}
.hero .hero-subtitle {
    color: var(--c-accent-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}
.hero p { color: rgba(255,255,255,.9); max-width: 700px; font-size: 17px; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--c-accent);
    color: var(--c-white);
    border: 2px solid var(--c-accent);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background .2s;
}
.btn:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); color: var(--c-white); }
.btn a { color: inherit; }

/* --- Services item (icon + text) --- */
.service-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
}
.service-item .icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--c-accent);
    color: var(--c-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.service-item .icon svg { width: 18px; height: 18px; fill: currentColor; }
.service-item h4 {
    color: var(--c-accent);
    margin: 0 0 4px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.service-item p { margin: 0; color: var(--c-text); font-size: 14px; line-height: 1.6; }

/* --- Two-column (text + image) --- */
.two-col {
    display: flex;
    align-items: center;
    gap: 40px;
}
.two-col > * { flex: 1; }
.two-col img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
    aspect-ratio: 4/3;
}
@media (max-width: 768px) {
    .two-col { flex-direction: column; gap: 24px; }
}
.two-col--reverse { flex-direction: row-reverse; }
@media (max-width: 768px) {
    .two-col--reverse { flex-direction: column; }
}

/* --- Card (product / industry) --- */
.card {
    background: var(--c-white);
    border-radius: var(--radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}
.card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}
.card .card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card h3 {
    color: var(--c-accent);
    font-size: 17px;
    text-align: center;
    margin: 0 0 10px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card p { font-size: 14px; line-height: 1.6; color: var(--c-text); }

/* --- Core value (3-col icon) --- */
.core-card { text-align: center; padding: 12px; }
.core-card img {
    width: 110px;
    height: 110px;
    margin: 0 auto 16px;
    object-fit: contain;
}
.core-card h4 {
    color: var(--c-accent);
    font-size: 17px;
    margin-bottom: 10px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.core-card p { font-size: 14px; line-height: 1.6; color: var(--c-text); }

/* --- Aircraft gallery --- */
.aircraft-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 768px) { .aircraft-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .aircraft-grid { grid-template-columns: 1fr; } }
.aircraft-grid .aircraft-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4/3;
}
.aircraft-grid .aircraft-card img { max-width: 100%; max-height: 100%; object-fit: contain; }

.video-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.video-row video { width: 100%; border-radius: var(--radius); background: #000; }
@media (max-width: 768px) { .video-row { grid-template-columns: 1fr; } }

/* --- Contact page --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info, .contact-form {
    background: var(--c-white);
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.contact-info h3 { color: var(--c-accent); }
.contact-info .ic {
    width: 36px;
    height: 36px;
    background: var(--c-accent);
    color: var(--c-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-info .ic svg { width: 16px; height: 16px; fill: currentColor; }
.contact-info .row-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--c-bg-soft);
    font-size: 15px;
}
.contact-info .row-item:last-child { border-bottom: none; }
.contact-info h4 { color: var(--c-accent); font-size: 14px; margin: 0 0 4px; text-transform: uppercase; }
.contact-info p { margin: 0; }
.contact-info a { color: var(--c-text); }
.contact-info a:hover { color: var(--c-accent); }

.contact-form .form-intro { font-size: 13px; color: var(--c-text-light); margin-bottom: 16px; }
.contact-form ul.benefits {
    list-style: none; padding: 0; margin: 0 0 16px;
    display: flex; gap: 20px; flex-wrap: wrap;
    color: var(--c-accent); font-weight: 600;
}
.contact-form ul.benefits li::before { content: '✓ '; }

.form-group { margin-bottom: 14px; }
.form-group label {
    display: block; margin-bottom: 6px;
    font-weight: 600; font-size: 14px;
}
.form-group label .req { color: #c00; margin-left: 3px; }
.form-group .form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    color: var(--c-text);
    background: var(--c-white);
    transition: border-color .2s, box-shadow .2s;
}
.form-group .form-control:focus {
    outline: none;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(1,150,163,.15);
}
.form-group textarea.form-control { min-height: 110px; resize: vertical; }
.checkbox-line { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.5; color: var(--c-text-light); }
.checkbox-line input { margin-top: 3px; }
.form-status { padding: 10px 14px; border-radius: var(--radius); margin-top: 12px; font-size: 14px; display: none; }
.form-status.success { display: block; background: #e6f9ed; color: #1a7a3e; }
.form-status.error { display: block; background: #fdecec; color: #b32d2d; }

/* --- Footer --- */
.footer-curve { height: 14px; background: var(--c-accent-deep); }
.footer {
    background: var(--c-accent-deep);
    color: var(--c-accent-light);
    padding: 22px 0;
    font-size: 14px;
}
.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.footer p { margin: 0; }
.footer ul {
    display: flex;
    gap: 18px;
    list-style: none;
    padding: 0; margin: 0;
    flex-wrap: wrap;
}
.footer ul a {
    color: var(--c-accent-light);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer ul a:hover { color: var(--c-white); }
@media (max-width: 768px) {
    .footer .container { flex-direction: column; text-align: center; }
}

/* --- WhatsApp float --- */
.wa-float {
    position: fixed; right: 22px; bottom: 22px;
    width: 56px; height: 56px;
    background: #25d366;
    color: var(--c-white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px rgba(37,211,102,.4);
    z-index: 50;
    transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); color: var(--c-white); }
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }

/* --- Utility --- */
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }
.lead { font-size: 18px; max-width: 900px; margin: 0 auto; line-height: 1.7; }

/* ====================================================================
   ANIMATIONS  (added on top — layout is untouched)
   Scroll-triggered entrance animations applied via JS (.in-view).
   ==================================================================== */
.animate {
    opacity: 0;
    transition: opacity .7s ease, transform .7s cubic-bezier(.25,.46,.45,.94);
    will-change: opacity, transform;
}
.animate-fadein            { opacity: 0; }
.animate-fadein-up         { opacity: 0; transform: translateY(30px); }
.animate-moveleft          { transform: translateX(-60px); }
.animate-moveright         { transform: translateX(60px); }
.animate-fadein-up.in-view,
.animate-fadein.in-view,
.animate-moveleft.in-view,
.animate-moveright.in-view { opacity: 1; transform: none; }

/* Hover underline for main nav links */
.main-nav a { position: relative; }
.main-nav a::after {
    content: '';
    position: absolute;
    left: 14px; right: 14px; bottom: 4px;
    height: 2px;
    background: var(--c-accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .25s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }

/* Card lift on hover (subtle) */
.card { transition: transform .3s ease; }
.card:hover { transform: translateY(-4px); }

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
    .animate, .animate.in-view { opacity: 1; transform: none; transition: none; }
    .main-nav a::after { transition: none; }
    .card { transition: none; }
}
