@import url("./front-desktop.css");
@import url("./front-mobile.css");

:root {
  color-scheme: light;
  --bg: #eef4f7;
  --bg-soft: #f8fbfd;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-weak: rgba(247, 251, 253, 0.86);
  --surface-alt: #e7f0f4;
  --line: rgba(42, 58, 72, 0.1);
  --line-strong: rgba(42, 58, 72, 0.2);
  --text: #17212b;
  --muted: #697786;
  --primary: #0f766e;
  --primary-strong: #0b4f4a;
  --primary-soft: rgba(15, 118, 110, 0.11);
  --accent: #e26d4f;
  --accent-soft: rgba(226, 109, 79, 0.12);
  --danger: #dc4c64;
  --danger-text: #ffffff;
  --danger-soft: rgba(220, 76, 100, 0.12);
  --success: #0f9f6e;
  --success-soft: rgba(15, 159, 110, 0.12);
  --info: #2563eb;
  --info-soft: rgba(37, 99, 235, 0.1);
  --glass: rgba(255, 255, 255, 0.68);
  --action-bg: #111827;
  --action-text: #ffffff;
  --hover-line: #cbd5e1;
  --nav-text: #4b5563;
  --active-ink: #050816;
  --active-bg: #f3f4f6;
  --subtle-bg: #f8fafc;
  --shadow-sm: 0 10px 30px rgba(26, 42, 58, 0.08);
  --shadow-md: 0 16px 42px rgba(26, 42, 58, 0.12);
  --shadow-lg: 0 24px 70px rgba(26, 42, 58, 0.15);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius: 18px;
  --content-width: min(1180px, calc(100% - 28px));
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121417;
  --bg-soft: #191d22;
  --surface: rgba(31, 36, 43, 0.88);
  --surface-strong: #242a32;
  --surface-weak: #1d232a;
  --surface-alt: #2d3540;
  --line: rgba(226, 232, 240, 0.14);
  --line-strong: rgba(226, 232, 240, 0.26);
  --text: #f4f7fb;
  --muted: #bac4d0;
  --primary: #42b9a8;
  --primary-strong: #74d8ca;
  --primary-soft: rgba(66, 185, 168, 0.18);
  --accent: #ee9b63;
  --accent-soft: rgba(238, 155, 99, 0.16);
  --danger: #f47d93;
  --danger-text: #191d22;
  --danger-soft: rgba(244, 125, 147, 0.16);
  --success: #4fd1a5;
  --success-soft: rgba(79, 209, 165, 0.16);
  --glass: rgba(36, 42, 50, 0.72);
  --action-bg: #42b9a8;
  --action-text: #071513;
  --hover-line: rgba(226, 232, 240, 0.34);
  --nav-text: #c3ccd8;
  --active-ink: #f8fafc;
  --active-bg: #303843;
  --subtle-bg: #2a313a;
  --shadow-sm: 0 18px 38px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 22px 54px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.36);
}

[data-theme="dark"] body {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
}

[data-theme="eye"] body,
[data-theme="focus"] body {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
}

[data-theme="eye"] {
  color-scheme: light;
  --bg: #eef4e8;
  --bg-soft: #f8fbf3;
  --surface: rgba(253, 255, 247, 0.84);
  --surface-strong: #fffdf4;
  --surface-weak: #f2f7eb;
  --surface-alt: #e5edd9;
  --line: rgba(94, 112, 73, 0.2);
  --line-strong: rgba(94, 112, 73, 0.32);
  --text: #20281f;
  --muted: #607059;
  --primary: #426b47;
  --primary-strong: #315137;
  --primary-soft: rgba(66, 107, 71, 0.12);
  --accent: #8c7652;
  --accent-soft: rgba(140, 118, 82, 0.14);
  --danger: #a8465d;
  --danger-text: #ffffff;
  --danger-soft: rgba(168, 70, 93, 0.12);
  --success: #3f7b51;
  --success-soft: rgba(63, 123, 81, 0.12);
  --action-bg: #315137;
  --action-text: #ffffff;
  --hover-line: rgba(94, 112, 73, 0.38);
  --nav-text: #586650;
  --active-ink: #172015;
  --active-bg: #e2ead8;
  --subtle-bg: #edf3e6;
  --shadow-sm: 0 14px 30px rgba(36, 42, 31, 0.1);
  --shadow-md: 0 18px 44px rgba(36, 42, 31, 0.13);
  --shadow-lg: 0 28px 60px rgba(36, 42, 31, 0.16);
}

[data-theme="focus"] {
  color-scheme: light;
  --bg: #f5f6f8;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --surface-weak: #f4f6f8;
  --surface-alt: #eef0f3;
  --line: rgba(17, 24, 39, 0.1);
  --line-strong: rgba(17, 24, 39, 0.18);
  --text: #1c1f24;
  --muted: #5f6672;
  --primary: #285c8f;
  --primary-strong: #1f476f;
  --primary-soft: rgba(40, 92, 143, 0.1);
  --accent: #6f6148;
  --accent-soft: rgba(111, 97, 72, 0.12);
  --danger: #a83f55;
  --danger-text: #ffffff;
  --danger-soft: rgba(168, 63, 85, 0.12);
  --success: #28765a;
  --success-soft: rgba(40, 118, 90, 0.12);
  --action-bg: #1c1f24;
  --action-text: #ffffff;
  --hover-line: #c7ccd3;
  --nav-text: #525a66;
  --active-ink: #15171b;
  --active-bg: #e9ecef;
  --subtle-bg: #f0f2f5;
  --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 8%, color-mix(in srgb, var(--primary) 15%, transparent), transparent 27%),
    radial-gradient(circle at 86% 10%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 24%),
    linear-gradient(135deg, var(--bg-soft), var(--bg) 58%, color-mix(in srgb, var(--primary-soft) 36%, var(--bg)));
  background-attachment: fixed;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 160ms ease, opacity 160ms ease;
}

a:hover {
  color: var(--primary-strong);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 84%, transparent);
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--primary) 72%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
  transform: translateY(-1px);
}

input[type="checkbox"] {
  width: auto;
  accent-color: var(--primary);
}

textarea {
  min-height: 104px;
  resize: vertical;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.16;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

::selection {
  color: #fff;
  background: color-mix(in srgb, var(--primary) 80%, black);
}

.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition: opacity 560ms ease, transform 560ms cubic-bezier(0.2, 0.7, 0, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@supports not (background: color-mix(in srgb, white, black)) {
  input:focus,
  select:focus,
  textarea:focus {
    box-shadow: 0 0 0 4px rgba(39, 95, 74, 0.14);
  }
}
