:root {
  --navy: #002147;
  --navy-soft: #0a3358;
  --ink: #1a1a1a;
  --muted: #5c6470;
  --line: #e6e8ec;
  --bg: #ffffff;
  --gold: #c4a35a;
  --font-display: "Noto Serif SC", "Songti SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg);
}

button {
  font: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 28px;
  background: var(--navy);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  min-width: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
  color: #fff;
}

.logo-seal {
  display: block;
  width: clamp(48px, 6vw, 64px);
  height: clamp(48px, 6vw, 64px);
  object-fit: cover;
  object-position: left center;
  flex-shrink: 0;
}

.logo-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  white-space: nowrap;
}

.header-motto {
  flex: 0 1 auto;
  min-width: 0;
  width: min(200px, 28vw);
  max-width: 200px;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 10%,
    #000 90%,
    transparent
  );
}

.header-motto-track {
  display: flex;
  width: max-content;
  gap: 3.5em;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-display);
  font-size: clamp(15px, 2vw, 22px);
  font-weight: 500;
  letter-spacing: 0.28em;
  white-space: nowrap;
  line-height: 1.2;
  animation: motto-scroll 18s linear infinite;
}

.header-motto-track span {
  flex-shrink: 0;
}

@keyframes motto-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-25% - 0.875em));
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  flex-shrink: 0;
}

.site-nav a,
.site-nav .nav-btn {
  border: 0;
  padding: 0;
  background: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
}

.site-nav a:hover,
.site-nav .nav-btn:hover {
  color: var(--gold);
}

.hero-banner {
  position: relative;
  width: 100%;
  background: var(--navy);
  z-index: 1;
}

.hero-track {
  display: flex;
  width: 100%;
  height: min(42vw, 420px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scrollbar-width: none;
}

/* Landscape phones: banner must not eat the whole viewport */
@media (orientation: landscape) and (max-height: 500px) {
  .site-header {
    padding: 8px 16px;
  }

  .logo-seal {
    width: 40px;
    height: 40px;
  }

  .logo-title {
    font-size: 18px;
  }

  .hero-track {
    height: min(34vh, 168px);
  }

  .anni-float {
    width: min(112px, 20vw);
  }
}

.hero-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.hero-track::-webkit-scrollbar {
  display: none;
}

.hero-slide {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: auto;
}

.hero-dots button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-dots button i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dots button.is-active i {
  background: #fff;
  transform: scale(1.2);
}

.brand-intro {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.4fr);
  gap: 40px 56px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 28px 40px;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-seal {
  width: 120px;
  height: auto;
  flex-shrink: 0;
}

.brand-names h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--navy);
  line-height: 1.1;
}

.brand-en {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.brand-copy p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  text-align: justify;
}

.brand-copy p:last-child {
  margin-bottom: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, minmax(180px, 22vw));
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px 56px;
}

.tile {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: pointer;
  background: #0f2740;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.tile:hover img {
  transform: scale(1.05);
}

.tile.focus-cups {
  object-position: 50% 35%;
}

.tile.focus-bears {
  object-position: 50% 70%;
}

.tile::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(transparent, rgba(0, 20, 45, 0.72));
  pointer-events: none;
}

.tile span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 1;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-align: center;
}

.tile-tall {
  grid-column: 4;
  grid-row: 1 / span 2;
}

.tile-tall {
  background: #c62828;
}

.tile-tall .contain-img,
.tile .contain-img {
  object-fit: contain;
  padding: 8% 6% 18%;
  background: transparent;
}

.miniapp {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 28px 48px;
  border-top: 1px solid var(--line);
}

.miniapp h2 {
  margin: 28px 0 10px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--navy);
}

.miniapp p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
}

.miniapp strong {
  color: var(--navy);
}

.appid {
  font-size: 12px !important;
  letter-spacing: 0.06em;
}

.site-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 28px 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-foot a {
  color: var(--navy-soft);
  text-decoration: none;
}

.site-foot a:hover {
  text-decoration: underline;
}

.anni-float {
  position: fixed;
  left: 40px;
  top: 120px;
  z-index: 50;
  width: min(200px, 40vw);
  will-change: left, top;
  /* don't block page scroll outside the float itself */
  pointer-events: none;
}

.anni-float-close,
.anni-float-card {
  pointer-events: auto;
}

.anni-float.is-hidden {
  display: none;
}

.anni-float-close {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(120, 16, 16, 0.95);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.anni-float-card {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  text-decoration: none;
  background: #c62828;
  border: 0;
  box-shadow: 0 14px 36px rgba(80, 0, 0, 0.35);
}

.anni-float-card img {
  display: block;
  width: 100%;
  height: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 40;
  max-width: min(90vw, 360px);
  padding: 14px 22px;
  border-radius: 4px;
  background: rgba(0, 33, 71, 0.94);
  border: 1px solid rgba(196, 163, 90, 0.45);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .brand-intro {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 36px;
  }

  .brand-copy p {
    text-align: left;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
    auto-rows: minmax(160px, 42vw);
  }

  .tile-tall {
    grid-column: auto;
    grid-row: auto;
    min-height: 220px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 14px 16px;
  }

  .header-motto {
    width: min(120px, 26vw);
    max-width: 120px;
  }

  .header-motto-track {
    font-size: 13px;
    letter-spacing: 0.16em;
  }

  .brand-intro,
  .category-grid,
  .miniapp,
  .site-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-seal {
    width: 96px;
  }

  .category-grid {
    grid-template-columns: 1fr;
    auto-rows: 220px;
  }

  .anni-float {
    width: min(148px, 44vw);
  }
}
