@font-face {
  font-family: "LoliMeow";
  src: url("../assets/fonts/alimama.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f8f7ff;
  --ink: #272727;
  --muted: #6f7280;
  --line: rgba(39, 39, 39, 0.18);
  --primary: #d87cff;
  --primary-2: #8183ff;
  --accent: #ff4c60;
  --mint: #b5f4e2;
  --cream: #ffd6a5;
  --blue: #89cff0;
  --radius: 16px;
  --radius-lg: 22px;
  --pill: 999px;
  --shadow-hard: 2px 2px 0 0 var(--ink);
  --shadow-soft: 0 24px 34px -32px rgba(7, 10, 25, 0.35);
  --container: min(1180px, calc(100% - 40px));
}

[data-theme="dark"] {
  --bg: #0e0e0e;
  --surface: #171717;
  --surface-soft: #202026;
  --ink: #f8f8fb;
  --muted: #b9b9c6;
  --line: rgba(255, 255, 255, 0.22);
  --shadow-hard: 2px 2px 0 0 #ffffff;
  --shadow-soft: 0 20px 40px -28px rgba(255, 255, 255, 0.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "LoliMeow", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto auto 8% -8%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(216, 124, 255, 0.16), transparent 68%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  inset: 18% -10% auto auto;
  background: radial-gradient(circle, rgba(181, 244, 226, 0.18), transparent 68%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.container { width: var(--container); margin-inline: auto; }
.section { padding: 82px 0; }
.section.compact { padding: 54px 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--ink);
  border-radius: var(--pill);
  background: var(--surface);
  font-size: 0.82rem;
  box-shadow: var(--shadow-hard);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.section-title {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 4vw, 3.55rem);
  line-height: 1.08;
  letter-spacing: 0;
}
.section-lead { max-width: 720px; color: var(--muted); margin: 0; }
.gradient-text {
  color: transparent;
  background: linear-gradient(90deg, #cbfdb1, #acbff1, #efa7ec, #ffd6a5, #ffadad, #b5f4e2, #c5a3ff);
  background-size: 700% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: gradientFlow 13s linear infinite;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.65);
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 18px 0;
}
.site-nav {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  transition: all 0.28s ease;
}
.site-header.is-scrolled {
  position: fixed;
  animation: navDrop 0.36s ease both;
}
.site-header.is-scrolled .site-nav {
  margin-top: 6px;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-hard);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cream), var(--primary), var(--blue));
  box-shadow: var(--shadow-hard);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-size: 0.9rem;
}
.nav-links a:hover,
.nav-links a.active { border-color: var(--ink); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn,
.menu-toggle,
.search-submit {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  transition: all 0.24s ease;
}
.icon-btn:hover,
.menu-toggle:hover,
.search-submit:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-hard); border-color: var(--ink); }
.menu-toggle { display: none; }
.primary-btn,
.ghost-btn,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ink);
  border-radius: var(--pill);
  color: var(--ink);
  background: var(--surface);
  transition: all 0.24s cubic-bezier(.5, 2.5, .7, .7);
}
.primary-btn { padding: 11px 20px; background: var(--primary); box-shadow: var(--shadow-hard); }
.ghost-btn { padding: 11px 20px; }
.small-btn { padding: 7px 12px; font-size: 0.82rem; }
.primary-btn:hover,
.ghost-btn:hover,
.small-btn:hover { transform: translate(2px, 2px); box-shadow: none; background: var(--accent); color: #fff; }
.search-shell { position: relative; }
.search-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: none;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--ink);
  border-radius: var(--pill);
  background: var(--surface);
  box-shadow: var(--shadow-hard);
}
.search-panel.is-open { display: flex; }
.search-panel input {
  width: min(260px, 56vw);
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  padding: 0 4px 0 12px;
}

.hero {
  position: relative;
  min-height: 82vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #202026;
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.18);
  transition: opacity 1s ease, transform 1.8s cubic-bezier(.5, 0, 0, 1);
}
.hero-image.is-loaded { opacity: 1; transform: scale(1); }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.18), rgba(0,0,0,0.36) 42%, rgba(0,0,0,0.5));
}
.hero-content {
  position: relative;
  z-index: 2;
  width: var(--container);
  text-align: center;
  color: #fff;
  padding-top: 70px;
  opacity: 0;
  transform: translateY(28px);
  transition: all 0.78s ease 0.3s;
}
.hero-content.is-loaded { opacity: 1; transform: translateY(0); }
.hero h1 {
  margin: 22px auto 16px;
  max-width: 900px;
  font-size: clamp(2.8rem, 8vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}
.hero p { max-width: 720px; margin: 0 auto; color: rgba(255,255,255,0.88); }
.hitokoto {
  min-height: 32px;
  margin-top: 16px !important;
  font-size: 0.95rem;
}
.hero-actions { margin-top: 26px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.wave-wrap { position: absolute; left: 0; right: 0; bottom: -7px; z-index: 3; pointer-events: none; }
.waves { width: 100%; height: 96px; }
.parallax > use { fill: var(--bg); animation: waveMove 25s cubic-bezier(.55,.5,.45,.5) infinite; }
.parallax > use:nth-child(1) { opacity: .7; animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { opacity: .5; animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { opacity: .3; animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }

.grid { display: grid; gap: 22px; }
.service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 34px; }
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.service-card { padding: 24px; transition: all 0.24s cubic-bezier(.5,2.5,.7,.7); }
.service-card:hover { transform: translate(-2px, -2px); border-color: var(--ink); box-shadow: var(--shadow-hard); }
.service-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--ink);
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--mint), var(--cream));
}
.service-card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.service-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.split { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 42px; align-items: center; }
.feature-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feature-tile {
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.feature-tile:nth-child(1) { background: #ffd6a5; color: #272727; }
.feature-tile:nth-child(2) { background: #b5f4e2; color: #272727; }
.feature-tile:nth-child(3) { background: #acbff1; color: #272727; }
.feature-tile:nth-child(4) { background: #efa7ec; color: #272727; }
.feature-tile strong { display: block; font-size: 2rem; line-height: 1; margin-bottom: 12px; }

.preview-grid,
.image-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 34px; }
.image-card,
.news-card {
  transition: all 0.24s cubic-bezier(.5,2.5,.7,.7);
}
.image-card:hover,
.news-card:hover { transform: translate(-2px, -2px); border-color: var(--ink); box-shadow: var(--shadow-hard); }
.image-frame { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-soft); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  font-size: 0.76rem;
  color: var(--muted);
}
.card-body h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card-body p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.page-hero {
  padding: 150px 0 70px;
  background: linear-gradient(135deg, rgba(216,124,255,.18), rgba(181,244,226,.14)), var(--surface-soft);
  border-bottom: 1px solid var(--line);
}
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.filter-btn {
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 14px;
}
.filter-btn.active,
.filter-btn:hover { border-color: var(--ink); box-shadow: var(--shadow-hard); }

.news-list { display: grid; gap: 24px; margin-top: 34px; }
.news-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 210px;
}
.news-card .image-frame { aspect-ratio: auto; height: 100%; }
.news-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 0.8rem; margin-top: 14px; }
.load-wrap { display: flex; justify-content: center; margin-top: 30px; }

.contact-band {
  border-block: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,214,165,.24), rgba(216,124,255,.14));
}
.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 26px;
  padding: 34px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-hard);
}
.site-footer { padding: 34px 0; border-top: 1px solid var(--line); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.socials { display: flex; gap: 10px; }
.socials a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; background: var(--surface); }
.socials a:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-hard); }

.toast {
  position: fixed;
  right: 22px;
  bottom: 116px;
  z-index: 100;
  max-width: min(340px, calc(100vw - 40px));
  padding: 12px 16px;
  border: 1px solid var(--ink);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-hard);
  transform: translateX(120%);
  transition: transform 0.3s ease;
}
.toast.show { transform: translateX(0); }

#sakura-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 90;
}
.mascot {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  width: 104px;
  height: 128px;
  border: 0;
  background: transparent;
  padding: 0;
  filter: drop-shadow(3px 3px 0 var(--ink));
}
.mascot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.24s cubic-bezier(.5,2.5,.7,.7);
}
.mascot:hover .mascot-img { transform: translateY(-4px) rotate(-2deg); }
.mascot-bubble {
  position: absolute;
  right: 86px;
  bottom: 36px;
  width: max-content;
  max-width: 190px;
  padding: 8px 12px;
  border: 1px solid var(--ink);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-hard);
  font-size: 0.78rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s ease;
}
.mascot:hover .mascot-bubble { opacity: 1; transform: translateY(0); }

@keyframes gradientFlow { to { background-position: 100% 50%; } }
@keyframes waveMove { from { transform: translate3d(-90px,0,0); } to { transform: translate3d(85px,0,0); } }
@keyframes navDrop { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 980px) {
  .menu-toggle { display: inline-grid; }
  .nav-links {
    position: fixed;
    inset: 76px 18px auto 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--ink);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-hard);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .service-grid,
  .preview-grid,
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .news-card { grid-template-columns: 1fr; }
  .news-card .image-frame { aspect-ratio: 16 / 9; }
}

@media (max-width: 640px) {
  :root { --container: min(100% - 24px, 1180px); }
  .section { padding: 58px 0; }
  .nav-actions .primary-btn { display: none; }
  .hero { min-height: 78vh; }
  .service-grid,
  .preview-grid,
  .image-grid,
  .feature-board { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; padding: 24px; }
  .mascot { width: 76px; height: 96px; right: 14px; bottom: 14px; }
  .mascot-bubble { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  #sakura-canvas { display: none; }
}
