/* =========================================================
   NILIN TRADING CO., LTD – landing page
   Editorial monochrome · paper, ink & seal red · sharp corners
   ========================================================= */
:root {
    --ink: #111111;
    --ink-2: #2A2A2A;
    --paper: #F6F4EF;
    --paper-2: #ECE8DF;
    --white: #FFFFFF;
    --gray: #8A8A8A;
    --gray-2: #BDBDBD;
    --line: #D9D4C9;
    --muted: #5C5A55;
    --red: #B22222;
    --red-dark: #8E1A1A;
    --serif: 'Playfair Display', 'Noto Serif TC', Georgia, serif;
    --sans: 'DM Sans', 'Noto Sans TC', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --nav-h: 62px;
}
html:lang(zh-Hant) { --serif: 'Noto Serif TC', 'Playfair Display', serif; --sans: 'Noto Sans TC', 'DM Sans', sans-serif; }

html { scroll-behavior: smooth; overflow-x: clip; }
body { font-family: var(--sans); background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4, h5 { font-family: var(--serif); color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
html:lang(zh-Hant) h1, html:lang(zh-Hant) h2, html:lang(zh-Hant) h3, html:lang(zh-Hant) h4 { letter-spacing: .02em; line-height: 1.35; }
a { color: var(--ink); }
section[id] { scroll-margin-top: var(--nav-h); }
::selection { background: var(--red); color: #fff; }
em.accent, .accent { font-style: italic; color: var(--red); }
html:lang(zh-Hant) em.accent { font-style: normal; }

/* ---------- Buttons ---------- */
.btn-ink, .btn-line, .btn-paper { display: inline-flex; align-items: center; gap: 10px; padding: 15px 28px; font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; border-radius: 0; transition: all .25s ease; border: 1.5px solid var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-paper:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ink i, .btn-line i { transition: transform .25s ease; }
.btn-ink:hover i, .btn-line:hover i { transform: translateX(4px); }

/* ---------- Common ---------- */
.section { padding: 120px 0; position: relative; overflow-x: clip; }
@media (max-width: 767.98px) { .section { padding: 76px 0; } }
.kicker { display: inline-flex; align-items: center; gap: 12px; font-size: 12.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--ink); margin-bottom: 22px; }
.kicker::before { content: ""; width: 10px; height: 10px; background: var(--red); }
.title { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.12; margin-bottom: 22px; }
.lead { font-size: 18px; color: var(--muted); font-weight: 400; }
.rule { border: 0; border-top: 1px solid var(--line); opacity: 1; margin: 0; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: rgba(255, 255, 255, .7); font-size: 13px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.topbar a:hover { color: #fff; }
.lang-switch { display: inline-flex; border: 1px solid rgba(255, 255, 255, .25); }
.lang-switch button { background: transparent; border: 0; color: rgba(255, 255, 255, .7); font-size: 12.5px; font-weight: 600; padding: 4px 12px; letter-spacing: .06em; cursor: pointer; font-family: var(--sans); }
.lang-switch button.active { background: #fff; color: var(--ink); }
.lang-switch.dark { border-color: var(--line); }
.lang-switch.dark button { color: var(--muted); }
.lang-switch.dark button.active { background: var(--ink); color: #fff; }

/* ---------- Masthead ---------- */
.masthead { padding: 34px 0 28px; text-align: center; background: var(--paper); }
.masthead img { height: 64px; width: auto; max-width: 100%; }
@media (max-width: 575.98px) { .masthead { padding: 24px 0 20px; } .masthead img { height: 40px; } }

/* ---------- Sticky nav ---------- */
.mainnav { position: sticky; top: 0; z-index: 1030; background: rgba(246, 244, 239, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.mainnav .container { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-h); gap: 16px; }
.mainnav .mini-brand { font-family: 'Playfair Display', serif; font-weight: 800; font-size: 20px; letter-spacing: .14em; text-decoration: none; color: var(--ink); opacity: 0; transform: translateY(6px); transition: all .3s ease; pointer-events: none; white-space: nowrap; }
.mainnav .mini-brand span { color: var(--red); }
.mainnav.stuck .mini-brand { opacity: 1; transform: none; pointer-events: auto; }
.mainnav .nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.mainnav .nav-links a { display: block; padding: 8px 14px; font-size: 13.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); position: relative; }
html:lang(zh-Hant) .mainnav .nav-links a { letter-spacing: .12em; font-size: 15px; }
.mainnav .nav-links a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.mainnav .nav-links a:hover::after, .mainnav .nav-links a.active::after { transform: scaleX(1); }
.mainnav .nav-cta { font-size: 12.5px; padding: 10px 18px; }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--ink); width: 42px; height: 42px; font-size: 22px; line-height: 1; color: var(--ink); align-items: center; justify-content: center; }
@media (max-width: 1199.98px) {
    .mainnav .mini-brand { opacity: 1; transform: none; pointer-events: auto; }
    .nav-toggle { display: inline-flex; }
    .mainnav .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--ink); padding: 10px 0 18px; display: none; }
    .mainnav.open .nav-links { display: flex; }
    .mainnav .nav-links a { padding: 14px 24px; }
    .mainnav .nav-links a::after { left: 24px; right: auto; width: 30px; }
    .mainnav .nav-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 80px 0 0; overflow-x: clip; }
.hero h1 { font-size: clamp(42px, 6vw, 84px); line-height: 1.04; margin-bottom: 28px; }
html:lang(zh-Hant) .hero h1 { line-height: 1.25; }
.hero p.lead { max-width: 540px; margin-bottom: 38px; }
.gauge-card { background: var(--ink); color: #fff; padding: 34px; position: relative; }
.gauge-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255, 255, 255, .12); pointer-events: none; }
.gauge-card svg { width: 100%; height: auto; display: block; }
.gauge-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.gauge-meta strong { display: block; color: #fff; font-size: 15px; letter-spacing: .04em; text-transform: none; font-weight: 600; margin-top: 4px; }
.gauge-needle { transform-origin: 200px 200px; animation: needle 6s ease-in-out infinite; }
@keyframes needle { 0%, 100% { transform: rotate(-35deg); } 50% { transform: rotate(48deg); } }
.vehicle-strip { margin-top: 90px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.vehicle-strip .v-item { padding: 30px 28px; display: flex; align-items: center; gap: 22px; height: 100%; text-decoration: none; color: var(--ink); transition: background .25s ease; }
.vehicle-strip .col-md-4 + .col-md-4 .v-item { border-left: 1px solid var(--ink); }
@media (max-width: 767.98px) { .vehicle-strip .col-md-4 + .col-md-4 .v-item { border-left: 0; border-top: 1px solid var(--ink); } }
.vehicle-strip .v-item:hover { background: var(--ink); color: #fff; }
.vehicle-strip .v-item:hover .v-title, .vehicle-strip .v-item:hover .v-sub { color: #fff; }
.v-num { font-family: 'Playfair Display', serif; font-size: 15px; color: var(--red); font-weight: 700; }
.v-icon { font-size: 40px; line-height: 1; }
.v-title { font-family: var(--serif); font-weight: 700; font-size: 24px; color: var(--ink); line-height: 1.2; }
.v-sub { font-size: 13.5px; color: var(--muted); letter-spacing: .04em; }

/* ---------- Solutions ---------- */
.sol-grid { border-top: 1px solid var(--ink); }
.sol { padding: 46px 36px 50px; height: 100%; border-bottom: 1px solid var(--ink); transition: background .3s ease; position: relative; }
.sol-grid .col-lg-4 + .col-lg-4 .sol { border-left: 1px solid var(--ink); }
@media (max-width: 991.98px) { .sol-grid .col-lg-4 + .col-lg-4 .sol { border-left: 0; } .sol { padding: 38px 8px; } }
.sol .sol-icon { width: 72px; height: 72px; border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 34px; margin-bottom: 30px; transition: all .3s ease; }
.sol:hover .sol-icon { background: var(--red); border-color: var(--red); color: #fff; }
.sol h3 { font-size: 32px; margin-bottom: 14px; }
.sol p { color: var(--muted); margin-bottom: 26px; }
.sol ul { list-style: none; padding: 0; margin: 0; }
.sol li { padding: 12px 0; border-top: 1px solid var(--line); font-weight: 500; display: flex; align-items: center; gap: 12px; }
.sol li::before { content: ""; width: 6px; height: 6px; background: var(--red); flex-shrink: 0; }
.sol .sol-idx { position: absolute; top: 40px; right: 36px; font-family: 'Playfair Display', serif; font-size: 64px; line-height: 1; color: var(--paper-2); font-weight: 800; }
@media (max-width: 991.98px) { .sol .sol-idx { right: 8px; } }

/* ---------- Capabilities (dark) ---------- */
.dark { background: var(--ink); color: rgba(255, 255, 255, .72); }
.dark h2, .dark h3, .dark h4 { color: #fff; }
.dark .kicker { color: #fff; }
.dark .lead { color: rgba(255, 255, 255, .62); }
.cap-sticky { position: sticky; top: calc(var(--nav-h) + 40px); }
.cap-list { border-top: 1px solid rgba(255, 255, 255, .2); }
.cap-row { display: grid; grid-template-columns: 70px 1fr; gap: 10px 24px; padding: 30px 0; border-bottom: 1px solid rgba(255, 255, 255, .2); transition: padding .3s ease; }
.cap-row:hover { padding-left: 14px; }
.cap-row .n { font-family: 'Playfair Display', serif; font-size: 18px; color: var(--red); font-weight: 700; padding-top: 4px; }
.cap-row h4 { font-size: 26px; margin: 0 0 6px; }
.cap-row p { margin: 0; color: rgba(255, 255, 255, .6); }
@media (max-width: 575.98px) { .cap-row { grid-template-columns: 44px 1fr; } .cap-row h4 { font-size: 21px; } }

/* ---------- About ---------- */
.statement { font-family: var(--serif); font-size: clamp(26px, 3.2vw, 42px); line-height: 1.35; color: var(--ink); font-weight: 500; }
html:lang(zh-Hant) .statement { line-height: 1.6; }
.seal { width: 150px; height: 150px; background: var(--red); color: #fff; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; padding: 14px; font-family: 'Noto Serif TC', serif; font-weight: 900; font-size: 46px; line-height: 1; text-align: center; align-items: center; box-shadow: inset 0 0 0 4px var(--red), inset 0 0 0 6px rgba(255, 255, 255, .7); transform: rotate(-4deg); border-radius: 6px; }
.values { border-top: 1px solid var(--ink); margin-top: 70px; }
.value { padding: 34px 28px 10px 0; }
.value h4 { font-size: 24px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.value h4 i { color: var(--red); font-size: 22px; }
.value p { color: var(--muted); margin: 0; }

/* ---------- Process ---------- */
.steps { counter-reset: s; }
.step { background: var(--white); border: 1px solid var(--line); padding: 40px 34px; height: 100%; position: relative; transition: all .3s ease; }
.step:hover { border-color: var(--ink); transform: translateY(-4px); box-shadow: 8px 8px 0 var(--ink); }
.step .s-num { font-family: 'Playfair Display', serif; font-size: 60px; line-height: 1; font-weight: 800; color: var(--ink); margin-bottom: 24px; }
.step .s-num span { color: var(--red); }
.step h4 { font-size: 26px; margin-bottom: 10px; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Contact ---------- */
.contact-box { background: var(--white); border: 1px solid var(--ink); }
.contact-side { background: var(--ink); color: rgba(255, 255, 255, .72); padding: 54px 46px; height: 100%; }
.contact-side h2 { color: #fff; }
.contact-side .kicker { color: #fff; }
.c-line { display: flex; gap: 16px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .15); color: #fff; text-decoration: none; }
.c-line i { font-size: 22px; color: var(--red); }
.c-line small { display: block; color: rgba(255, 255, 255, .5); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.c-line:hover { color: #fff; }
.c-form { padding: 54px 46px; }
@media (max-width: 575.98px) { .contact-side, .c-form { padding: 36px 22px; } }
.c-form label { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; display: block; }
.c-form .form-control, .c-form .form-select { border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; padding: 10px 0; background-color: transparent; font-size: 16px; color: var(--ink); box-shadow: none !important; }
.c-form .form-select { background-position: right 0 center; }
.c-form .form-control:focus, .c-form .form-select:focus { border-bottom-color: var(--red); }
.c-form .was-validated .form-control:invalid, .c-form .form-control.is-invalid { border-bottom-color: var(--red); }
.form-msg { border-left: 3px solid var(--red); background: var(--paper); padding: 12px 16px; font-size: 14.5px; }

/* ---------- Footer ---------- */
.footer { background: var(--paper-2); padding: 90px 0 0; overflow: hidden; }
.footer .f-logo { height: 52px; width: auto; max-width: 100%; }
.footer p { color: var(--muted); }
.footer h6 { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--red); }
.footer-giant { font-family: 'Playfair Display', serif; font-weight: 800; font-size: clamp(80px, 19vw, 300px); line-height: .78; letter-spacing: -.02em; color: var(--ink); margin: 70px 0 0; white-space: nowrap; user-select: none; display: flex; justify-content: space-between; align-items: flex-end; }
.footer-giant .cn { font-family: 'Noto Serif TC', serif; font-size: .32em; color: var(--red); line-height: 1; padding-bottom: .1em; letter-spacing: .05em; }
.footer-bottom { background: var(--ink); color: rgba(255, 255, 255, .6); font-size: 13.5px; padding: 18px 0; }
.footer-bottom .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.footer-bottom a { color: rgba(255, 255, 255, .8); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; transition: none; } .gauge-needle { animation: none; } }
