
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}


body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden; 
}

/* Load local Chinese fonts and apply to Chinese-language text so
   Simplified and Traditional render with the same typeface/weight. */
@font-face {
  font-family: 'LocalSimsun';
  src: url('./la-art-cn/app-files/fonts/Chinese_Fonts_Collection/simsun.ttc') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'LocalSimsun';
  src: url('./la-art-cn/app-files/fonts/Chinese_Fonts_Collection/simsunb.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'LocalSimHei';
  src: url('./la-art-cn/app-files/fonts/Chinese_Fonts_Collection/simhei.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* Apply the local CJK fonts to all Chinese text in the hub titles. */
.hub-titles :lang(zh),
.hub-titles :lang(zh-Hans),
.hub-titles :lang(zh-Hant) {
  font-family: 'LocalSimHei', 'LocalSimsun', "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


.page-bg {
  position: fixed;
  inset: 0;
  background: url('./assets/IMG_5253.webp') center center / cover no-repeat;
  z-index: -1; /* sit behind everything */
}


.hub-outer {
  height: 100vh;
  height: 100dvh; 
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

/* scrollable front tile thing */
.hub-container {
  width: 100%;
  max-width: 720px;
  max-height: 100%;        
  padding: 1.75rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
  text-align: center;

  overflow-y: auto;         
  -webkit-overflow-scrolling: touch; 
}

/* Titles and logo */
.hub-titles {
  margin-bottom: 1.75rem;
}

.hub-title {
  font-size: 1.4rem;
  line-height: 1.4;
  margin: 0 0 0.75rem;
  word-break: break-word;
  font-weight: 400;
}

.hub-title:last-child {
  margin-bottom: 0;
}

.hub-logo {
  max-width: 260px;
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
}

.hub-subtitle {
  font-size: 1rem;
  color: #000;
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}


.language-grid {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.lang-card {
  display: block;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 10px;
  width: min(260px, 100%);
  padding: 1.25rem 1rem;
  text-decoration: none;
  color: #111;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow-wrap: break-word;
  text-align: center;
}

.lang-card h2 {
  font-size: 1.3rem;
  margin: 0 0 0.25rem;
  line-height: 1.2;
  font-weight: bold;
  letter-spacing: 0.02em;
}

.lang-card p {
  margin: 0.1rem 0;
  font-size: 0.95rem;
}

.lang-card:hover,
.lang-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px #4caf50;
  border-color: #4caf50;
  outline: none;
}


@media (max-width: 768px) {
  .hub-outer {
    padding: 1rem;
  }

  .hub-container {
    padding: 1.5rem 1.25rem;
  }

  .hub-logo {
    max-width: 220px;
  }

  .hub-title {
    font-size: 1.25rem;
  }

  .language-grid {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .lang-card {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    font-size: 0.95rem;
  }
}


@media (max-width: 480px) {
  .hub-outer {
    padding: 0.75rem;
  }

  .hub-container {
    padding: 1.25rem 1rem;
  }

  .hub-logo {
    max-width: 170px;
    margin-bottom: 1.25rem;
  }

  .hub-title {
    font-size: 1.05rem;
  }

  .lang-card h2 {
    font-size: 1.15rem;
  }

  .lang-card p {
    font-size: 0.9rem;
  }
}
