
:root {
  --red: #ef3340;
  --red-dark: #d9202d;
  --ink: #20242b;
  --muted: #666c76;
  --surface: rgba(255,255,255,.96);
  --line: rgba(239,51,64,.22);
  --shadow: 0 16px 40px rgba(80, 24, 31, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% -10%, rgba(255,255,255,.95), rgba(255,255,255,0) 30%), linear-gradient(180deg, #fff 0, #fff 20rem, #f34652 42rem, #dc2634 100%);
  min-height: 100vh;
}
body::before {
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 25%, rgba(255,255,255,.16) 0 3px, transparent 4px),
    radial-gradient(circle at 80% 55%, rgba(255,255,255,.10) 0 4px, transparent 5px);
  background-size: 96px 96px, 130px 130px;
  opacity: .55;
}
a { color: inherit; }
.page {
  position: relative;
  width: min(100% - 28px, 660px);
  margin: 0 auto;
  padding: 38px 0 48px;
}
.hero {
  text-align: center;
  padding: 8px 12px 28px;
}
.logo-wrap {
  width: min(92%, 430px);
  margin: 0 auto 20px;
}
.logo-wrap img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.08));
}
h1 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.45rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -.035em;
}
.intro {
  max-width: 560px;
  margin: 16px auto 0;
  color: #4d535d;
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 600;
}
.intro a {
  display: inline-block;
  margin-top: 5px;
  color: var(--red-dark);
  font-weight: 900;
  text-decoration: none;
}

.links {
  display: grid;
  gap: 12px;
}
.link-card, .location-card, .qr-card {
  background: var(--surface);
  border: 1.5px solid rgba(255,255,255,.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.link-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 10px 18px 10px 11px;
  border-radius: 22px;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.96);
  box-shadow: 0 20px 42px rgba(80,24,31,.16);
}
.brand-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: white;
  overflow: hidden;
}
.brand-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.link-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.link-text strong { font-size: 1.05rem; font-weight: 900; }
.link-text small {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .78rem;
  font-weight: 700;
}
.arrow { font-size: 1.3rem; font-weight: 900; color: #9a9fa8; }
.brand-icon {
  background: #fff;
}

.facebook .brand-icon,
.shopee .brand-icon,
.tiktok .brand-icon,
.tiki .brand-icon,
.lazada .brand-icon,
.zalo .brand-icon,
.instagram .brand-icon,
.youtube .brand-icon {
  background: #fff;
}
.location-card {
  margin-top: 18px;
  border-radius: 25px;
  padding: 19px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 15px;
  align-items: start;
}
.location-icon {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: #fff0f1;
  color: var(--red);
}
.location-icon svg { width: 29px; height: 29px; fill: currentColor; }
.location-card > div:last-child { display:flex; flex-direction:column; gap:6px; }
.eyebrow {
  font-size: .72rem;
  letter-spacing: .12em;
  font-weight: 900;
  color: var(--red-dark);
}
.location-card strong { line-height:1.45; font-size:.98rem; }
.location-card a, .qr-card a {
  color: var(--red-dark);
  font-weight: 900;
  text-decoration: none;
  font-size: .9rem;
}

.qr-card {
  margin-top: 18px;
  border-radius: 28px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 160px;
  gap: 22px;
  align-items: center;
}
.qr-copy h2 { margin:5px 0 7px; font-size:1.45rem; }
.qr-copy p { margin:0 0 8px; color:var(--muted); line-height:1.5; font-size:.9rem; }
.qr-image {
  display:block;
  padding:10px;
  background:#fff;
  border-radius:20px;
  border:1px solid #eceef1;
  box-shadow:0 8px 22px rgba(0,0,0,.08);
}
.qr-image img { width:100%; height:auto; display:block; border-radius:10px; }

footer {
  padding: 30px 12px 10px;
  color: #fff;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0,0,0,.08);
}

footer strong { font-size: 1.05rem; }
footer span { font-size: inherit; font-weight: inherit; }
footer small { margin: 0; opacity: .82; }

@media (max-width: 520px) {
  .page { width:min(100% - 20px, 660px); padding-top:24px; }
  .hero { padding-bottom:21px; }
  .logo-wrap { width:min(88%, 350px); }
  .intro { font-size:.93rem; }
  .link-card { min-height:71px; grid-template-columns:50px minmax(0,1fr) 22px; padding-right:14px; border-radius:20px; }
  .brand-icon { width:50px; height:50px; border-radius:15px; }
  .brand-icon img { width:100%; height:100%; }
  .qr-card { grid-template-columns:1fr; text-align:center; }
  .qr-image { width:min(210px, 70%); margin:0 auto; }
}

/* Supplied official/platform artwork */
.brand-icon {
  padding: 3px;
  border: 1px solid rgba(0,0,0,.05);
  box-shadow: 0 4px 12px rgba(0,0,0,.07);
}
.tiki .brand-icon img {
  padding: 7px 4px;
}
.youtube .brand-icon img {
  padding: 7px 3px;
}

/* ===== KN TOYS HERO TEXT ===== */

/* KN TOYS */
.hero h1 {
  color: #243F96;
}

/* Đồ chơi & Sách thiếu nhi */
.hero h1 .title-sub {
  display: inline-block;
  color: #243F96;
  font-size: 0.72em;
  line-height: 1.15;
  white-space: nowrap;
}

/* Giới thiệu tiếng Việt */
.hero .intro {
  color: #FFF8F5;
}

/* Giới thiệu tiếng Anh */
.hero .intro span {
  color: #FFF8F5;
}

/* Tel / Zalo */
.hero .intro a,
.hero .intro a:link,
.hero .intro a:visited {
  color: #FFD166;
  font-weight: 900;
}

/* Mobile */
@media (max-width: 480px) {
  .hero h1 .title-sub {
    font-size: 0.62em;
  }
}


/* ===== KN TOYS FOOTER BRAND ===== */
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  flex-shrink: 0;
}

.footer-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}

.footer-brand strong {
  color: #fff;
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

footer small {
  color: rgba(255,255,255,.82);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 480px) {
  footer {
    padding-left: 4px;
    padding-right: 4px;
    gap: 8px;
  }
  .footer-brand { gap: 6px; }
  .footer-brand img { width: 30px; height: 30px; }
  .footer-brand strong { font-size: .90rem; }
  footer small { font-size: .62rem; }
}


/* ===== HERO QUICK CONTACT ICONS ===== */
.hero-contact-actions {
  margin: 14px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.contact-action {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #243F96;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(36,63,150,.12);
  box-shadow: 0 8px 18px rgba(36,63,150,.10);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.contact-action:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 12px 22px rgba(36,63,150,.16);
}

.contact-action:active {
  transform: translateY(0);
}

.contact-action svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: block;
}

@media (max-width: 480px) {
  .hero-contact-actions {
    margin-top: 12px;
    gap: 12px;
  }

  .contact-action {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .contact-action svg {
    width: 23px;
    height: 23px;
  }
}

/* ===== WHITE STANDALONE HERO CONTACT ICONS ===== */
.hero-contact-actions {
  margin-top: 14px;
  gap: 24px;
}

.contact-action,
.contact-action:link,
.contact-action:visited {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
}

.contact-action:hover {
  background: transparent;
  box-shadow: none;
  color: #fff;
  transform: translateY(-2px) scale(1.06);
}

.contact-action:active {
  transform: scale(.96);
}

.contact-action svg {
  width: 29px;
  height: 29px;
  fill: currentColor;
}

@media (max-width: 480px) {
  .hero-contact-actions {
    gap: 22px;
  }

  .contact-action {
    width: 30px;
    height: 30px;
  }

  .contact-action svg {
    width: 27px;
    height: 27px;
  }
}


/* ===== THEME CONTROL ===== */
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

.theme-toggle {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 1000;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(36,63,150,.14);
  background: rgba(255,255,255,.88);
  color: #243F96;
  box-shadow: 0 8px 24px rgba(36,63,150,.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.theme-icon {
  position: absolute;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity .2s ease, transform .25s ease;
}
.theme-icon-sun { opacity: 1; transform: scale(1) rotate(0); }
.theme-icon-moon { opacity: 0; transform: scale(.75) rotate(-25deg); }
html[data-theme="dark"] .theme-icon-sun { opacity: 0; transform: scale(.75) rotate(25deg); }
html[data-theme="dark"] .theme-icon-moon { opacity: 1; transform: scale(1) rotate(0); }

/* ===== DARK MODE ===== */
html[data-theme="dark"] body {
  color: #F5F6FA;
  background:
    radial-gradient(circle at 15% -10%, rgba(53,60,83,.42), rgba(53,60,83,0) 32%),
    linear-gradient(180deg, #111317 0, #15171d 20rem, #541b25 43rem, #8f1e2b 100%);
}
html[data-theme="dark"] body::before {
  background-image:
    radial-gradient(circle at 20% 25%, rgba(255,255,255,.07) 0 3px, transparent 4px),
    radial-gradient(circle at 80% 55%, rgba(255,255,255,.05) 0 4px, transparent 5px);
  opacity: .65;
}

html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .hero h1 .title-sub { color: #7EA2FF; }

html[data-theme="dark"] .hero .intro,
html[data-theme="dark"] .hero .intro span { color: #F6F2F1; }

html[data-theme="dark"] .hero .intro a,
html[data-theme="dark"] .hero .intro a:link,
html[data-theme="dark"] .hero .intro a:visited { color: #FFD166; }

html[data-theme="dark"] .contact-action,
html[data-theme="dark"] .contact-action:link,
html[data-theme="dark"] .contact-action:visited,
html[data-theme="dark"] .contact-action:hover { color: #fff; }

html[data-theme="dark"] .link-card,
html[data-theme="dark"] .location-card,
html[data-theme="dark"] .qr-card {
  background: rgba(27,29,35,.94);
  border-color: rgba(255,255,255,.09);
  box-shadow: 0 16px 38px rgba(0,0,0,.26);
}

html[data-theme="dark"] .link-text strong,
html[data-theme="dark"] .location-card strong,
html[data-theme="dark"] .qr-copy h2 { color: #F7F7F8; }

html[data-theme="dark"] .link-text small,
html[data-theme="dark"] .qr-copy p { color: #AEB3BE; }

html[data-theme="dark"] .arrow { color: #858B96; }

html[data-theme="dark"] .brand-icon {
  background: #fff;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
}

html[data-theme="dark"] .location-icon {
  background: rgba(239,51,64,.14);
  color: #FF6B75;
}
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .location-card a,
html[data-theme="dark"] .qr-card a { color: #FF8189; }

html[data-theme="dark"] .qr-image {
  background: #fff;
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
}

html[data-theme="dark"] .theme-toggle {
  background: rgba(31,34,41,.88);
  color: #FFD166;
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}

@media (max-width: 520px) {
  .theme-toggle {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 42px;
    height: 42px;
  }
}


/* ===== DARK MODE: PLATFORM ICONS WITHOUT WHITE TILE ===== */
html[data-theme="dark"] .brand-icon,
html[data-theme="dark"] .facebook .brand-icon,
html[data-theme="dark"] .shopee .brand-icon,
html[data-theme="dark"] .tiktok .brand-icon,
html[data-theme="dark"] .tiki .brand-icon,
html[data-theme="dark"] .lazada .brand-icon,
html[data-theme="dark"] .zalo .brand-icon,
html[data-theme="dark"] .instagram .brand-icon,
html[data-theme="dark"] .youtube .brand-icon {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
