@import url("/assets/fonts/fonts.css");

:root {
  color-scheme: light dark;
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-soft: #eef5f2;
  --ink: #17211f;
  --muted: #65736f;
  --brand: #0c6f68;
  --brand-dark: #084d49;
  --red: #a40000;
  --red-dark: #7f0000;
  --red-soft: #fff1ed;
  --gold: #b78a38;
  --contact: #6f4bb2;
  --contact-dark: #4f3288;
  --contact-soft: #f4efff;
  --line: rgba(23, 33, 31, 0.12);
  --line-strong: rgba(23, 33, 31, 0.22);
  --grid-line: rgba(12, 111, 104, 0.09);
  --shadow: 0 18px 48px rgba(18, 42, 39, 0.10);
  --container: 1220px;
  --page-x: 48px;
  --radius: 14px;
  --font-latin: "Cabin", Arial, sans-serif;
  --font-cn: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-serif-cn: "Noto Serif SC", SimSun, serif;
  --font-home-title: "ZCOOL XiaoWei", "Noto Serif SC", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1413;
    --surface: #151d1b;
    --surface-soft: #182622;
    --ink: #edf4f1;
    --muted: #a4b0ad;
    --brand: #49b6aa;
    --brand-dark: #7fd0c6;
    --red: #ff8a7a;
    --red-dark: #ffb0a5;
    --red-soft: rgba(164, 0, 0, 0.14);
    --gold: #d6b36a;
    --contact: #b99cff;
    --contact-dark: #d7c8ff;
    --contact-soft: #241c33;
    --line: rgba(237, 244, 241, 0.12);
    --line-strong: rgba(237, 244, 241, 0.22);
    --grid-line: rgba(73, 182, 170, 0.12);
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  }
}

@media (max-width: 900px) {
  :root {
    --page-x: 24px;
  }
}

@media (max-width: 560px) {
  :root {
    --page-x: 16px;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--scrollbar-brand, var(--brand)) 34%, transparent) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--scrollbar-brand, var(--brand)) 28%, transparent);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--scrollbar-brand, var(--brand)) 44%, transparent);
  background-clip: padding-box;
}

@media (prefers-color-scheme: dark) {
  html {
    scrollbar-color: color-mix(in srgb, var(--scrollbar-brand, var(--brand)) 38%, transparent) transparent;
  }

  ::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--scrollbar-brand, var(--brand)) 30%, transparent);
    background-clip: padding-box;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--scrollbar-brand, var(--brand)) 48%, transparent);
    background-clip: padding-box;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-latin), var(--font-cn);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {
  width: min(calc(100% - var(--page-x) * 2), var(--container));
  margin: 0 auto;
}

.grid-bg {
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(0deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color 160ms ease, background-color 160ms ease;
}

body.drawer-open {
  overflow: hidden;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 760;
  line-height: 1.25;
}

.brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: none;
}

.brand picture {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: none;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer,
.nav {
  display: flex;
  align-items: center;
}

.nav {
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  position: relative;
  overflow: hidden;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  padding: 0 12px;
  transition: background-color 160ms ease, color 160ms ease;
}

.menu-button {
  position: relative;
  overflow: hidden;
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.menu-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.menu-close {
  display: none;
}

.drawer-close-button {
  display: none;
}

.site-header.is-drawer-open .menu-open {
  display: none;
}

.site-header.is-drawer-open .menu-close {
  display: block;
}

.nav-backdrop {
  display: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.hero {
  padding: 90px 0 84px;
}

.home-hero {
  min-height: min(720px, calc(100svh - 72px));
  display: flex;
  align-items: center;
  padding: 96px 0 82px;
  border-bottom: 1px solid var(--line);
}

.hero-compact {
  padding: 58px 0 46px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  max-width: 920px;
  font-size: clamp(40px, 6.5vw, 86px);
  line-height: 1.06;
  letter-spacing: 0;
  font-weight: 780;
}

.page-title-serif {
  font-family: var(--font-serif-cn);
  color: var(--red);
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.12;
}

.hero-copy {
  margin: 26px 0 0;
  max-width: 740px;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 2;
}

.home-title {
  max-width: 1120px;
  font-family: var(--font-home-title);
  font-weight: 400;
}

.home-title-break {
  display: none;
}

.text-nowrap {
  white-space: nowrap;
}

.home-copy {
  max-width: 650px;
}

.home-company-name {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.35;
}

.home-company-copy {
  margin: 18px 0 0;
  max-width: 820px;
  color: var(--muted);
  font-size: 16px;
  line-height: 2;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.portal-philosophy {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 42px;
  align-items: start;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.principle-item {
  padding: 22px;
  background: var(--surface);
}

.principle-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.7;
}

.principle-item strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

.principle-item p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.button {
  position: relative;
  overflow: hidden;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 18px;
  font-size: 15px;
  font-weight: 760;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--brand);
  color: #ffffff;
}

.button-secondary {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--ink);
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.section {
  padding: 76px 0;
}

.section-muted {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.section-title {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.25;
  letter-spacing: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.services-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.feature-card {
  min-height: 200px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-card > .icon {
  width: 36px;
  height: 36px;
  stroke-width: 1.7;
  color: var(--brand);
}

.feature-card h3,
.entry-card h3 {
  margin: 22px 0 10px;
  font-size: 21px;
  line-height: 1.35;
}

.feature-card p,
.entry-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.portal-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 24px;
}

.portal-note h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

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

.public-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.entry-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  padding: 0;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.entry-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.entry-card-body {
  flex: 1;
  padding: 24px;
}

.entry-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.7;
}

.entry-meta .icon {
  width: 22px;
  height: 22px;
}

.text-link {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 760;
}

.entry-action {
  min-height: 58px;
  padding: 0 24px;
  border-top: 1px solid var(--line);
  transition: background-color 160ms ease, color 160ms ease;
}

.entry-action:hover {
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.breadcrumb a {
  color: var(--brand-dark);
  font-weight: 760;
}

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.footer-brand {
  margin: 0;
  color: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.85;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  margin-bottom: 8px;
  color: inherit;
  font-size: 13px;
  line-height: 1.85;
}

.footer-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.85;
}

.footer-link {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  transition: color 160ms ease;
}

.footer-link:hover {
  color: var(--brand-dark);
}

.record-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex: none;
}

.theme-home {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #edf3f8;
  --ink: #161b22;
  --muted: #606a75;
  --brand: #315f8d;
  --brand-dark: #1f466d;
  --line: rgba(31, 70, 109, 0.14);
  --line-strong: rgba(31, 70, 109, 0.26);
  --grid-line: rgba(49, 95, 141, 0.10);
  --shadow: 0 18px 48px rgba(23, 44, 68, 0.11);
}

.theme-red {
  --bg: #fff8f5;
  --surface: #fffdfb;
  --surface-soft: #fff0ed;
  --ink: #261715;
  --muted: #766260;
  --brand: #a40000;
  --brand-dark: #7f0000;
  --line: rgba(164, 0, 0, 0.14);
  --line-strong: rgba(164, 0, 0, 0.26);
  --grid-line: rgba(164, 0, 0, 0.12);
}

.theme-red .hero-compact {
  background-color: #fff0ed;
}

.theme-contact {
  --bg: #faf7ff;
  --surface: #fffefd;
  --surface-soft: #f4efff;
  --ink: #211a2d;
  --muted: #6f657c;
  --brand: #6f4bb2;
  --brand-dark: #4f3288;
  --line: rgba(111, 75, 178, 0.14);
  --line-strong: rgba(111, 75, 178, 0.28);
  --grid-line: rgba(111, 75, 178, 0.12);
}

.theme-contact .hero-compact {
  background-color: var(--contact-soft);
}

.ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  background: currentColor;
  opacity: 0.16;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-out 520ms ease-out forwards;
}

@keyframes ripple-out {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(var(--ripple-scale, 16));
  }
}

@media (prefers-color-scheme: dark) {
  .theme-home {
    --bg: #101418;
    --surface: #171d24;
    --surface-soft: #1d2732;
    --ink: #eef3f8;
    --muted: #a7b3bf;
    --brand: #8dbde8;
    --brand-dark: #bddaff;
    --line: rgba(141, 189, 232, 0.15);
    --line-strong: rgba(141, 189, 232, 0.30);
    --grid-line: rgba(141, 189, 232, 0.13);
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
  }

  .theme-red {
    --bg: #17100f;
    --surface: #211816;
    --surface-soft: #2b1917;
    --ink: #fff3ef;
    --muted: #d3b7b2;
    --brand: #ff9a8c;
    --brand-dark: #ffc0b8;
    --line: rgba(255, 154, 140, 0.18);
    --line-strong: rgba(255, 154, 140, 0.30);
    --grid-line: rgba(255, 154, 140, 0.16);
  }

  .theme-red .hero-compact {
    background-color: #211311;
  }

  .theme-contact {
    --bg: #111019;
    --surface: #191622;
    --surface-soft: #241c33;
    --ink: #f5f0ff;
    --muted: #c2b6d6;
    --brand: #b99cff;
    --brand-dark: #d7c8ff;
    --line: rgba(185, 156, 255, 0.16);
    --line-strong: rgba(185, 156, 255, 0.30);
    --grid-line: rgba(185, 156, 255, 0.14);
  }

  .theme-contact .hero-compact {
    background-color: #1f182b;
  }
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  font-size: 13px;
  line-height: 1.85;
}

.footer-nav a:hover {
  color: var(--brand-dark);
}

@media (min-width: 721px) {
  .home-title-break {
    display: block;
  }
}

@media (max-width: 980px) {
  .card-grid,
  .card-grid.four,
  .services-grid,
  .public-grid,
  .principle-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .footer-nav {
    justify-content: flex-start;
  }

  .portal-note {
    grid-template-columns: 1fr;
  }

  .portal-philosophy {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header-inner {
    min-height: 64px;
  }

  .brand span {
    max-width: none;
    font-size: 0;
  }

  .brand span::after {
    content: "Caner \5361\7eb3";
    font-size: 16px;
  }

  .menu-button {
    display: flex;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    background: rgba(0, 0, 0, 0.30);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: none;
    width: min(320px, calc(100vw - 48px));
    height: auto;
    min-height: 100dvh;
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
    padding: max(84px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
    border-left: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: saturate(150%) blur(20px);
    -webkit-backdrop-filter: saturate(150%) blur(20px);
    box-shadow: -18px 0 44px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(calc(100% + 48px));
    transition: transform 220ms ease;
  }

  .nav {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
  }

  .nav a {
    min-height: 48px;
    justify-content: flex-start;
    font-size: 16px;
  }

  .drawer-close-button {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
  }

  .drawer-close-button:hover {
    background: rgba(12, 111, 104, 0.10);
    color: var(--brand-dark);
  }

  .drawer-close-button svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
  }

  body.is-drawer-mounted .drawer,
  body.is-drawer-mounted .nav-backdrop {
    display: flex;
  }

  body.drawer-open .drawer {
    transform: translateX(0);
  }

  body.drawer-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .site-header.is-drawer-open .menu-button {
    z-index: 31;
  }

  .grid-bg {
    background-size: 52px 52px;
  }

  .hero {
    padding: 54px 0 58px;
  }

  .home-hero {
    min-height: auto;
    padding: 58px 0 52px;
  }

  .hero-compact {
    padding: 34px 0 32px;
  }

  .section {
    padding: 52px 0;
  }

  .footer-legal {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

@media (prefers-color-scheme: dark) and (max-width: 720px) {
  .drawer {
    background: rgba(21, 29, 27, 0.74);
  }

  .drawer-close-button:hover {
    background: rgba(73, 182, 170, 0.14);
  }
}

@media (max-width: 460px) {
  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
