/*
  Haoxue Mandarin - Static Site Styles
  Author: Cascade
*/

:root {
  --brand: #2ea3f2;
  --brand-600: #1e8cd6;
  --ink: #333;
  --muted: #666;
  --bg: #ffffff;
  --alt: #f7fbff;
  --card: #ffffff;
  --border: #e6eef5;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: "Open Sans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", Arial, sans-serif;
  color: var(--muted);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  color: var(--brand-600);
}
a:focus-visible {
  outline: 3px solid rgba(46, 163, 242, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: min(1080px, 90%);
  margin: 0 auto;
}
.section {
  padding: 72px 0;
  scroll-margin-top: 80px;
}
.section.alt {
  background: var(--alt);
}
.section-title {
  text-align: center;
  color: var(--ink);
  margin: 0 0 28px;
  font-size: 2rem;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  line-height: 1.25;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lang-switcher {
  display: inline-flex;
  background: rgba(46, 163, 242, 0.08);
  border: 1px solid rgba(46, 163, 242, 0.35);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.lang-option {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--brand-600);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.lang-option:hover {
  background: rgba(46, 163, 242, 0.12);
}
.lang-option.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(46, 163, 242, 0.25);
}
.lang-option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 163, 242, 0.35);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
}
.logo {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}
.brand-text {
  letter-spacing: 0.2px;
}
.logo-img {
  height: 40px;
  width: auto;
  display: block;
}
@media (max-width: 860px) {
  .logo-img {
    height: 34px;
  }
}
.footer-logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.site-nav ul {
  display: flex;
  gap: 18px;
  align-items: center;
}
.site-nav a {
  color: var(--ink);
  font-weight: 600;
}
.site-nav .btn {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: 0.2s ease;
}

@media (max-width: 860px) {
  .nav-wrap {
    gap: 12px;
  }
  .nav-actions {
    gap: 10px;
  }
  .lang-switcher {
    order: 1;
  }
  .nav-toggle {
    display: inline-block;
  }
  .site-nav {
    position: fixed;
    inset: 64px 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform 0.25s ease;
  }
  .site-nav.open {
    transform: translateY(0);
  }
  .site-nav ul {
    padding: 14px 5%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Hero */
.hero {
  padding: 80px 0 0;
  position: relative;
  overflow: hidden;
}
.hero .grid-2 {
  align-items: center;
  gap: 36px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin: 0 0 12px;
}
.hero p {
  margin: 0 0 22px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-media .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-badge {
  display: inline-block;
  background: #e8f5ff;
  color: var(--brand);
  border: 1px solid var(--brand);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 10px;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px;
}
.checklist li {
  padding-left: 26px;
  position: relative;
  margin: 6px 0;
  color: var(--ink);
}
.checklist li::before {
  content: "✔";
  color: #20b26b;
  position: absolute;
  left: 0;
  top: 0;
}
.link {
  font-weight: 700;
}

.hero-wave {
  height: 80px;
  margin-top: 36px;
  background: radial-gradient(
      80px 40px at 10% 60%,
      rgba(46, 163, 242, 0.15) 0 60%,
      transparent 62%
    ),
    radial-gradient(
      80px 40px at 40% 20%,
      rgba(46, 163, 242, 0.2) 0 60%,
      transparent 62%
    ),
    radial-gradient(
      120px 60px at 90% 40%,
      rgba(46, 163, 242, 0.12) 0 60%,
      transparent 62%
    );
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 980px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Features */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.feature-icon {
  font-size: 28px;
}

/* Cards */
.cards .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.cards .card h3 {
  margin: 0 0 6px;
}
.cards .card p {
  margin: 0 0 12px;
}
.bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.bullets li {
  padding-left: 16px;
  position: relative;
  margin: 6px 0;
}
.bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 800;
}

/* Benefits */
.benefits {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.benefits li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.benefit-icon {
  font-size: 20px;
}

/* Testimonials */
.t-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.t-card footer {
  color: var(--muted);
  margin-top: 8px;
  font-weight: 700;
}

/* Contact */
.contact .contact-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
label {
  font-weight: 700;
  color: var(--ink);
}
input,
textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 12px;
  font: inherit;
}
input:focus,
textarea:focus {
  outline: 2px solid rgba(46, 163, 242, 0.25);
  border-color: var(--brand);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 800;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-600);
}
.btn-secondary {
  background: #e8f5ff;
  color: var(--brand);
  border-color: #bfe4fb;
}
.btn-secondary:hover {
  background: #dff0ff;
}
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}
.btn-ghost:hover {
  background: rgba(46, 163, 242, 0.06);
}
.btn.full {
  width: 100%;
}

/* Footer */
.site-footer {
  padding: 28px 0;
  background: #0f2434;
  color: #cfe6f6;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
}
.footer-links {
  list-style: none;
  display: flex;
  gap: 16px;
  padding: 0;
  margin: 0;
}
.site-footer a {
  color: #cfe6f6;
}
.site-footer a:hover {
  color: #ffffff;
}
.brand-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.muted {
  color: #b5d6ea;
  margin: 8px 0 0;
}

/* Utilities */
.hidden {
  display: none !important;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: #000;
  color: #fff;
  border-radius: 8px;
  z-index: 1000;
}
