/* CIBC AG Sports landing page */
:root {
  --navy: #0b1b3a;
  --navy-2: #13284f;
  --ink: #1d2b45;
  --muted: #5a6a85;
  --line: #e3e9f2;
  --bg: #f4f7fb;
  --card: #ffffff;
  --blue: #1688f2;
  --blue-2: #0d6fd1;
  --blue-soft: #e8f3fe;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(11, 27, 58, .05), 0 10px 30px -12px rgba(11, 27, 58, .16);
  --shadow-hover: 0 2px 4px rgba(11, 27, 58, .06), 0 22px 44px -18px rgba(11, 27, 58, .28);
  --font: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--navy); line-height: 1.15; margin: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.lang-zh h1, .lang-zh h2, .lang-zh h3 { letter-spacing: 0; }
.lang-zh body, body.lang-zh { line-height: 1.8; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.ico { width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 3px solid rgba(22, 136, 242, .45); outline-offset: 2px; border-radius: 6px; }

/* hex pattern background */
.section, .hero { position: relative; }
.services::before, .why::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='194' viewBox='0 0 112 194'%3E%3Cpath d='M56 0 112 32v65L56 129 0 97V32zM56 129l56 32v65M56 129 0 161' fill='none' stroke='%23d9e3f0' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size: 112px 194px;
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 0%, transparent 60%);
  mask-image: radial-gradient(ellipse at top right, #000 0%, transparent 60%);
}
.section > .wrap { position: relative; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(11, 27, 58, .35); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.logo-mark { width: 34px; height: 37px; color: var(--blue); }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font-size: 21px; font-weight: 800; letter-spacing: .01em; }
.logo-text small { font-size: 12.5px; font-weight: 600; letter-spacing: .32em; color: var(--navy-2); margin-top: 4px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.nav-links { gap: 4px; }
.nav-links a {
  display: block; padding: 8px 12px; font-size: 15px; font-weight: 500; color: var(--ink);
  text-decoration: none; border-radius: 8px; position: relative; white-space: nowrap;
}
.nav-links a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px;
  background: var(--blue); transform: scaleX(0); transition: transform .25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-links a.active::after { transform: scaleX(1); }
.lang-switch { padding-left: 22px; border-left: 1px solid var(--line); gap: 2px; }
.lang-switch a {
  display: block; padding: 6px 9px; font-size: 13.5px; font-weight: 600; color: var(--muted);
  text-decoration: none; border-radius: 6px;
}
.lang-switch a:hover { color: var(--navy); background: var(--bg); }
.lang-switch a[aria-current] { color: var(--blue); }
.burger { display: none; margin-left: auto; background: none; border: 0; padding: 8px; color: var(--navy); cursor: pointer; border-radius: 8px; }
.burger .ico { width: 26px; height: 26px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 10px; border: 0; font: inherit; font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 24px -10px rgba(22, 136, 242, .7); }
.btn-primary:hover { background: var(--blue-2); transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(22, 136, 242, .75); }
.btn .ico { width: 20px; height: 20px; transition: transform .2s; }
.btn:hover .ico { transform: translateX(3px); }
.btn-block { width: 100%; text-transform: uppercase; letter-spacing: .06em; }
.btn[disabled] { opacity: .7; cursor: progress; }

/* ---------- hero ---------- */
.hero { padding: 20px 0 40px; }
.hero-card {
  position: relative; min-height: clamp(520px, 68vh, 640px); border-radius: 24px; overflow: hidden;
  background: #fff; box-shadow: var(--shadow); display: flex; align-items: center;
}
.hero-media { position: absolute; inset: 0 0 0 38%; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 55%; }
.hero-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, .85) 14%, rgba(255, 255, 255, 0) 42%);
}
.hero-copy { position: relative; z-index: 2; padding: 56px clamp(24px, 5vw, 64px); max-width: 640px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 22px; }
.lang-zh .hero h1 { letter-spacing: 0; }
.lead { font-size: clamp(16px, 1.35vw, 18.5px); color: var(--muted); max-width: 520px; margin-bottom: 32px; }

/* ---------- common section ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.lang-zh .eyebrow { letter-spacing: .2em; }
.section-head { text-align: center; max-width: 820px; margin: 0 auto 52px; }
.divider { display: flex; align-items: center; gap: 8px; margin: 22px 0 26px; }
.divider::before { content: ""; width: 44px; height: 2px; background: var(--blue); border-radius: 2px; }
.divider i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.divider.center { justify-content: center; margin-bottom: 0; }
.divider.center::after { content: ""; width: 88px; height: 1px; background: var(--blue); opacity: .6; }
.divider.center::before { width: 88px; height: 1px; opacity: .6; }

/* ---------- about ---------- */
.about { background: #fff; }
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-copy > p:not(.eyebrow) { color: var(--muted); }
.adv-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.adv {
  display: flex; gap: 18px; align-items: flex-start; padding: 18px 22px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.adv .ico { width: 34px; height: 34px; color: var(--blue); padding-right: 16px; box-sizing: content-box; border-right: 1px solid var(--line); }
.adv h3 { margin-bottom: 4px; }
.adv p { margin: 0; font-size: 15px; color: var(--muted); }
.about-media { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: var(--shadow); clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
.about-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.svc { grid-column: span 2; }
.svc:nth-child(4) { grid-column: 2 / span 2; }
.svc {
  display: flex; gap: 20px; padding: 28px 26px; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid rgba(227, 233, 242, .7); transition: transform .25s, box-shadow .25s;
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.svc-ico { flex: none; width: 68px; height: 68px; border-radius: 50%; background: var(--blue-soft); display: grid; place-items: center; color: var(--blue); }
.svc-ico .ico { width: 32px; height: 32px; }
.svc-num { display: block; font-size: 13px; font-weight: 700; color: var(--blue); letter-spacing: .08em; margin-bottom: 6px; }
.svc h3 { margin-bottom: 10px; }
.svc p { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- sports ---------- */
.sports { background: #fff; }
.sport-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.sport { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.sport img { width: 100%; aspect-ratio: 3 / 4.4; object-fit: cover; transition: transform .6s; }
.sport:hover img { transform: scale(1.05); }
.sport figcaption { display: flex; align-items: center; gap: 12px; padding: 16px 16px; font-weight: 800; font-size: 15.5px; color: var(--navy); text-transform: uppercase; letter-spacing: .02em; position: relative; background: #fff; }
.sport figcaption .ico { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--blue); color: #fff; }

/* ---------- why ---------- */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.why-card {
  display: flex; gap: 26px; align-items: flex-start; padding: 34px 32px; background: #fff;
  border-radius: 6px var(--radius) var(--radius) var(--radius); box-shadow: var(--shadow); position: relative;
  transition: transform .25s, box-shadow .25s;
}
.why-card::before {
  /* folder tab, as in the mockup */
  content: ""; position: absolute; left: 0; top: -14px; width: 42%; height: 18px; background: #fff;
  border-radius: 12px 12px 0 0; clip-path: polygon(0 0, 88% 0, 100% 100%, 0 100%);
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.why-card > .ico { width: 56px; height: 56px; color: var(--blue); padding-right: 24px; box-sizing: content-box; border-right: 1px solid var(--line); stroke-width: 1.5; }
.why-card h3 { font-size: 22px; color: var(--blue); margin-bottom: 10px; }
.why-card p { margin: 0; color: var(--muted); }

/* ---------- contact ---------- */
.contact { background: #fff; }
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); }
.contact-form-col h2 { margin-bottom: 16px; }
.contact-lead { color: var(--muted); margin-bottom: 28px; max-width: 560px; }
.cform { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { position: relative; display: block; }
.field .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #93a1b8; pointer-events: none; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 15.5px; color: var(--ink); background: #fff;
  border: 1px solid #d6deea; border-radius: 10px; padding: 14px 16px 14px 46px; transition: border-color .2s, box-shadow .2s;
}
.field.area textarea { padding-left: 16px; resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22, 136, 242, .14); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #d64545; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 4px 0 0; min-height: 1.6em; font-size: 15px; font-weight: 500; }
.form-status.ok { color: #138a52; }
.form-status.err { color: #c43c3c; }

.contact-info { display: grid; gap: 18px; align-content: start; }
.hq-card { padding: 28px; border-radius: var(--radius); background: var(--navy); color: #d4def0; box-shadow: var(--shadow); }
.hq-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.hq-ico { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .25); display: grid; place-items: center; color: #6fb8ff; }
.hq-ico .ico { width: 26px; height: 26px; }
.hq-head small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #8fa5c8; }
.hq-head strong { font-size: 21px; color: #fff; letter-spacing: .01em; }
.hq-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hq-lines li { display: flex; gap: 12px; align-items: flex-start; }
.hq-lines .ico { width: 19px; height: 19px; color: #6fb8ff; margin-top: 3px; }
.hq-lines a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .3); }
.hq-lines a:hover { border-color: #fff; }
.regions { position: relative; padding: 26px 28px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.regions small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.regions ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.regions li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14.5px; font-weight: 600; color: var(--navy); }
.regions li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(22, 136, 242, .18); }
.regions li.hk { background: var(--blue); color: #fff; border-color: var(--blue); }
.regions li.hk::before { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .3); animation: pulse 2s infinite; }
.dotmap {
  position: absolute; right: -20px; bottom: -30px; width: 260px; height: 160px; opacity: .5;
  background-image: radial-gradient(#b9c8dc 1.4px, transparent 1.6px); background-size: 12px 12px;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent); mask-image: radial-gradient(closest-side, #000, transparent);
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(255, 255, 255, .45); } 50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #a9b8d2; padding: 48px 0 28px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.logo-light { color: #fff; }
.logo-light .logo-mark { color: #4ea8ff; }
.logo-light .logo-text small { color: #a9b8d2; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 26px; }
.footer-nav a, .legal a { color: #d4def0; text-decoration: none; font-size: 15px; }
.footer-nav a:hover, .legal a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 22px; font-size: 14px; }
.footer-bottom p { margin: 0; }
.legal { display: flex; flex-wrap: wrap; gap: 10px; }
.legal a { font-size: 14px; }

/* ---------- reveal ---------- */
.js .reveal { transform: translateY(18px); transition: transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1140px) {
  .nav-links a { padding: 8px 8px; font-size: 14.5px; }
  .nav { gap: 16px; }
  .lang-switch { padding-left: 14px; }
}
@media (max-width: 1024px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(11, 27, 58, .35);
    padding: 8px 16px 20px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links { flex-direction: column; align-items: stretch; }
  .nav-links a { padding: 14px 6px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links a::after { display: none; }
  .lang-switch { border: 0; padding: 16px 0 0; gap: 8px; }
  .lang-switch a { border: 1px solid var(--line); padding: 8px 14px; }
  .lang-switch a[aria-current] { border-color: var(--blue); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .svc, .svc:nth-child(4) { grid-column: auto; }
  .svc:nth-child(5) { grid-column: 1 / -1; }
  .sport-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .hero-card { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-media { position: relative; inset: auto; order: 2; height: 300px; }
  .hero-media::before { background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0) 35%); }
  .hero-copy { padding: 36px 24px 8px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media { aspect-ratio: 16 / 11; clip-path: none; order: -1; }
  .why-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .logo-mark { width: 28px; height: 31px; }
  .logo-text b { font-size: 18px; }
  .logo-text small { font-size: 11px; }
  .hero { padding-top: 12px; }
  .hero-card { border-radius: 18px; }
  .btn { width: 100%; padding: 15px 18px; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc { padding: 22px 20px; gap: 16px; }
  .svc-ico { width: 52px; height: 52px; }
  .svc-ico .ico { width: 26px; height: 26px; }
  .sport-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sport:last-child { grid-column: 1 / -1; }
  .sport:last-child img { aspect-ratio: 16 / 9; }
  .sport figcaption { font-size: 13.5px; padding: 12px; gap: 9px; }
  .sport figcaption .ico { width: 32px; height: 32px; padding: 7px; }
  .why-card { flex-direction: column; gap: 16px; padding: 26px 22px; }
  .why-card > .ico { border: 0; padding: 0; width: 44px; height: 44px; }
  .row2 { grid-template-columns: 1fr; }
  .adv { padding: 16px; gap: 14px; }
  .adv .ico { width: 28px; height: 28px; padding-right: 12px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}
