/* =========================================================
   HUYI RFID — rfidcard.net
   Business / B2B factory style. Navy + steel blue.
   ========================================================= */

:root {
  --navy:        #0c1e35;
  --navy-2:      #102a44;
  --navy-3:      #16304d;
  --blue:        #2b7de9;
  --blue-2:      #4a9eff;
  --blue-deep:   #1f5fb0;
  --bg:          #f6f8fc;
  --bg-2:        #eef3fa;
  --white:       #ffffff;
  --ink:         #15233a;
  --muted:       #5b6b7e;
  --line:        #dbe4ef;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 18px 50px rgba(12, 30, 53, 0.14);
  --shadow-sm:   0 8px 24px rgba(12, 30, 53, 0.10);
  --maxw:        1200px;
  --font-body:   "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head:   "Sora", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--blue-deep); text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; color: var(--navy); margin: 0 0 .6em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  font-family: var(--font-body); cursor: pointer; border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 24px rgba(43,125,233,.35); }
.btn-primary:hover { background: var(--blue-2); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-lg { padding: 16px 38px; font-size: 17px; }

/* ===== Eyebrow / section heads ===== */
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue-deep); margin-bottom: 12px;
}
.eyebrow-light { color: var(--blue-2); }

.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
.section-head-light, .section-head-light p { color: rgba(255,255,255,.82); }
.section-head-light h2 { color: #fff; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.9); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 38px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { color: var(--navy); font-weight: 500; font-size: 15px; position: relative; }
.main-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--blue); transition: width .2s ease;
}
.main-nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: var(--blue); color: #fff !important; padding: 10px 22px; border-radius: 999px;
  font-weight: 600; box-shadow: 0 8px 20px rgba(43,125,233,.3);
}
.nav-cta:hover { background: var(--blue-2); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: .25s; }

/* ===== Hero ===== */
.hero {
  position: relative; display: flex; align-items: center;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(43,125,233,.35), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(26,90,176,.30), transparent 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--navy-3) 100%);
  color: #fff; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%);
}
.hero-inner {
  position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 48px; align-items: center; padding: 72px 24px 56px; width: 100%; max-width: var(--maxw); margin: 0 auto;
}
.hero-copy { max-width: 600px; }
.hero h1 { color: #fff; font-size: clamp(34px, 5vw, 60px); font-weight: 800; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; color: var(--blue-2); }
.hero-sub { font-size: clamp(16px, 1.6vw, 19px); color: rgba(255,255,255,.85); margin: 22px 0 32px; }
.hero-sub strong { color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-trust { list-style: none; display: flex; gap: 34px; padding: 0; margin: 46px 0 0; }
.hero-trust li { display: flex; flex-direction: column; }
.hero-trust strong { font-family: var(--font-head); font-size: 24px; color: #fff; }
.hero-trust span { font-size: 13px; color: rgba(255,255,255,.65); letter-spacing: .03em; }

/* Hero floating media — clean 2x3 grid, zero overlap */
.hero-media {
  position: relative; display: grid;
  grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 14px; height: 600px;
}
.float-card {
  position: relative; margin: 0; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 18px 44px rgba(0,0,0,.4); border: 3px solid rgba(255,255,255,.12);
}
.float-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== Intro ===== */
.intro { background: #fff; padding: 96px 0; }
.intro-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.intro-grid h2 { font-size: clamp(26px, 3vw, 38px); }
.intro-body p { color: var(--muted); font-size: 17px; margin: 0 0 18px; }
.intro-body strong { color: var(--ink); }

/* ===== Products ===== */
.products { background: var(--bg); padding: 96px 0; }
.products-alt { background: #fff; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.gallery-item { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); transition: transform .2s ease, box-shadow .2s ease; }
.gallery-item:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.gallery-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.gallery-item figcaption { padding: 12px 14px; font-size: 14px; font-weight: 600; color: var(--navy); }

/* ===== QR Redirect ===== */
.qr { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 100px 0; }
.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.qr-copy p { color: rgba(255,255,255,.85); font-size: 17px; }
.qr-copy strong { color: #fff; }
.qr-features { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 16px; }
.qr-features li { display: flex; gap: 14px; align-items: flex-start; }
.tick { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; display: grid; place-items: center; margin-top: 2px; }
.qr-features strong { display: block; color: #fff; font-size: 16px; }
.qr-features div { color: rgba(255,255,255,.78); font-size: 15px; }
.qr-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.qr-shots figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid rgba(255,255,255,.12); background: #0a1a2e; }
.qr-shots img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.qr-shots figcaption { padding: 8px 12px; font-size: 13px; color: rgba(255,255,255,.75); }

/* ===== Why ===== */
.why { background: var(--bg); padding: 96px 0; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.why-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow-sm); transition: transform .2s ease, border-color .2s ease; }
.why-card:hover { transform: translateY(-5px); border-color: var(--blue); }
.why-ico { font-size: 30px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: var(--bg-2); margin-bottom: 16px; }
.why-card h3 { font-size: 19px; margin-bottom: 8px; }
.why-card p { color: var(--muted); font-size: 15px; margin: 0; }

/* ===== Contact CTA ===== */
.contact { background: linear-gradient(135deg, var(--blue-deep), var(--blue)); color: #fff; padding: 90px 0; text-align: center; }
.contact-inner { max-width: 1024px; margin: 0 auto; }
.contact-ico { width: 64px; height: 64px; border-radius: 16px; background: #fff; padding: 6px; margin: 0 auto 18px; box-shadow: var(--shadow); }
.contact h2 { color: #fff; font-size: clamp(26px, 3.2vw, 38px); }
.contact p { color: rgba(255,255,255,.9); font-size: 17px; }
.contact-note { font-size: 13px; color: rgba(255,255,255,.7); margin-top: 14px; }

/* Primary button on the blue contact band: invert to white for contrast */
.contact .btn-primary { background: #fff; color: var(--blue-deep); box-shadow: 0 12px 28px rgba(0,0,0,.22); }
.contact .btn-primary:hover { background: #eaf2ff; color: var(--navy); }

/* ===== Footer ===== */
.site-footer { background: var(--navy); color: rgba(255,255,255,.7); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-logo { display: inline-block; margin-bottom: 16px; transition: opacity .2s ease; }
.footer-logo:hover { opacity: .85; }
.footer-brand img { height: 38px; width: auto; }
.footer-brand p { max-width: 360px; font-size: 14px; margin-bottom: 4px; }
/* Footer contact buttons */
.footer-actions { display: flex; width: 100%; max-width: 300px; gap: 12px; margin-top: 16px; }
.fbtn { display: inline-flex; align-items: center; justify-content: center; flex: 1 1 0%; min-width: 0; padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 700; color: #fff; text-decoration: none; transition: transform .15s ease, filter .15s ease, box-shadow .15s ease; }
.fbtn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.fbtn-wa { background: #25D366; box-shadow: 0 8px 20px rgba(37,211,102,.35); }
.fbtn-wa:hover { box-shadow: 0 12px 26px rgba(37,211,102,.45); }
.fbtn-mail { background: #E0322F; box-shadow: 0 8px 20px rgba(224,50,47,.35); }
.fbtn-mail:hover { box-shadow: 0 12px 26px rgba(224,50,47,.45); }
/* Footer contact info */
/* ===== Contact info band (below Contact Us) ===== */
.contact-info { background: var(--bg-2); color: var(--navy); padding: 80px 0 88px; border-top: 1px solid rgba(12,30,53,.06); }
.contact-info .section-head p { color: var(--muted); }
.ci-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; max-width: 820px; margin: 0 auto; }
.ci-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ci-contact li { display: flex; align-items: center; gap: 14px; font-size: 16px; }
.ci-label { flex: 0 0 96px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--blue); border-radius: 6px; padding: 6px 10px; text-align: center; }
.ci-contact a { color: var(--blue-deep); text-decoration: none; font-weight: 600; transition: color .2s ease; }
.ci-contact a:hover { color: var(--blue); }
.ci-social { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.ci-social .soc { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--blue-deep); border: 1px solid rgba(12,30,53,.1); box-shadow: 0 6px 16px rgba(12,30,53,.08); transition: transform .15s ease, background .2s ease, color .2s ease; }
.ci-social .soc:hover { transform: translateY(-3px); color: #fff; }
.ci-social .soc svg { width: 21px; height: 21px; display: block; }
.ci-social .soc-fb:hover { background: #1877F2; }
.ci-social .soc-ig:hover { background: #E4405F; }
.ci-social .soc-x:hover  { background: #1d1d1f; }
.ci-social .soc-li:hover { background: #0A66C2; }
.ci-social .soc-yt:hover { background: #FF0000; }
@media (max-width: 700px) {
  .ci-grid { grid-template-columns: 1fr; gap: 28px; }
  .ci-social { justify-content: flex-start; }
}
.footer-nav h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-nav a { display: block; color: rgba(255,255,255,.7); font-size: 14px; padding: 5px 0; }
.footer-nav a:hover { color: var(--blue-2); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; font-size: 13px; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Header states (JS hooks) ===== */
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.main-nav a.active { color: var(--blue-deep); }
.main-nav a.active::after { width: 100%; }

/* Footer logo: render white on navy */
.footer-brand img { filter: brightness(0) invert(1); opacity: .95; }

/* ===== Floating scroll navigation ===== */
.sd-btn {
  width: 46px; height: 46px; border-radius: 14px; cursor: pointer;
  display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff; box-shadow: 0 10px 24px rgba(43,125,233,.42);
  transition: transform .18s ease, background .2s ease, opacity .25s ease, box-shadow .2s ease, visibility .25s;
  opacity: 1; visibility: visible; z-index: 90;
}
.sd-btn.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.sd-btn:hover { background: linear-gradient(135deg, var(--blue-2), var(--blue)); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(43,125,233,.52); }
.sd-btn:active { transform: translateY(0); }
.sd-btn:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 3px; }
.sd-btn svg { width: 22px; height: 22px; display: block; }
.sd-btn.is-disabled { opacity: .3; pointer-events: none; }

/* Jump-to-footer icon — appears near the top of the page */
.sd-jump-foot { position: fixed; right: 18px; top: 86px; }
/* Up / down scroll arrows — fixed at vertical center, right edge */
.sd-dock { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 90; display: flex; flex-direction: column; gap: 12px; }
/* Back-to-top icon — appears near the bottom of the page */
.sd-back-top { position: fixed; right: 18px; bottom: 24px; }

@media (max-width: 420px) {
  .sd-btn { width: 42px; height: 42px; border-radius: 12px; }
  .sd-btn svg { width: 20px; height: 20px; }
  .sd-jump-foot { right: 12px; top: 80px; }
  .sd-dock { right: 12px; gap: 10px; }
  .sd-back-top { right: 12px; bottom: 16px; }
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding-top: 72px; }
  .hero-media { height: 480px; max-width: 520px; }
  .intro-grid { grid-template-columns: 1fr; gap: 24px; }
  .qr-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
    transform: translateY(-130%); transition: transform .3s ease; box-shadow: var(--shadow-sm);
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .main-nav a:not(.nav-cta)::after { display: none; }
  .nav-cta { text-align: center; margin-top: 12px; }
  .hero { min-height: auto; padding-bottom: 40px; }
  .hero-media { height: 320px; }
  .hero-trust { gap: 22px; flex-wrap: wrap; }
  .qr-shots { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .intro, .products, .why, .qr { padding: 64px 0; }
}

@media (max-width: 420px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .hero-media { height: 380px; gap: 10px; }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}
