/* CHY Software - redesigned static site styles */

:root {
  color-scheme: dark;
  --bg: #07121f;
  --bg-soft: #0e2034;
  --panel: rgba(12, 31, 51, 0.82);
  --panel-strong: rgba(16, 39, 63, 0.95);
  --text: #e8f0fb;
  --muted: #b8c6d8;
  --line: rgba(184, 205, 229, 0.22);
  --line-strong: rgba(184, 205, 229, 0.35);
  --shadow: 0 18px 55px rgba(1, 8, 15, 0.45);

  --accent: #2dd4bf;
  --accent-2: #f59e0b;
  --accent-3: #38bdf8;

  --radius: 18px;
  --radius-lg: 26px;
  --max: 1140px;
  --pad: 22px;

  --font-display: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Public Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", "Courier New", monospace;

  --h1: clamp(2.2rem, 3vw + 1rem, 3.7rem);
  --h2: clamp(1.7rem, 1.4vw + 1rem, 2.5rem);
  --h3: 1.2rem;
  --lead: 1.12rem;
  --header-offset: 84px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f8fc;
  --bg-soft: #e7f1fb;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --text: #122235;
  --muted: #405267;
  --line: rgba(21, 43, 68, 0.14);
  --line-strong: rgba(21, 43, 68, 0.26);
  --shadow: 0 14px 42px rgba(14, 28, 43, 0.15);
  --accent: #0f766e;
  --accent-2: #d97706;
  --accent-3: #0284c7;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-padding-top: var(--header-offset);
  background:
    radial-gradient(900px 480px at 6% 2%, rgba(45, 212, 191, 0.14), transparent 60%),
    radial-gradient(720px 420px at 92% 8%, rgba(245, 158, 11, 0.15), transparent 60%),
    radial-gradient(900px 580px at 50% 110%, rgba(56, 189, 248, 0.1), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  background-color: var(--bg);
  background-repeat: no-repeat;
}

main[id],
main [id] {
  scroll-margin-top: var(--header-offset);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.58;
  background:
    radial-gradient(900px 480px at 6% 2%, rgba(45, 212, 191, 0.14), transparent 60%),
    radial-gradient(720px 420px at 92% 8%, rgba(245, 158, 11, 0.15), transparent 60%),
    radial-gradient(900px 580px at 50% 110%, rgba(56, 189, 248, 0.1), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  background-repeat: no-repeat;
  overflow-x: hidden;
}

h1,
h2,
h3,
summary {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

code {
  font-family: var(--font-mono);
}

.container {
  width: min(var(--max), calc(100% - 2 * var(--pad)));
  margin: 0 auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--panel-strong);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 12px;
  z-index: 1000;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: linear-gradient(
    180deg,
    rgba(6, 17, 28, 0.72) 0%,
    rgba(6, 17, 28, 0.6) 62%,
    rgba(6, 17, 28, 0.5) 100%
  );
  border-bottom: 1px solid rgba(184, 205, 229, 0.16);
}

[data-theme="light"] .header {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.86) 62%,
    rgba(255, 255, 255, 0.8) 100%
  );
  border-bottom-color: rgba(21, 43, 68, 0.16);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.header--simple {
  position: static;
  backdrop-filter: none;
  background: transparent;
  border-bottom: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
}

.brand:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.brand__text {
  font-family: var(--font-display);
  font-size: 1.04rem;
}

.brand__mark {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__menu a:not(.btn) {
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--muted);
}

.nav__menu a:not(.btn):hover {
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.nav__toggle:hover {
  cursor: pointer;
  background: var(--panel-strong);
}

.nav__toggleLines {
  display: inline-block;
  width: 18px;
  height: 2px;
  position: relative;
  background: currentColor;
  border-radius: 999px;
}

.nav__toggleLines::before,
.nav__toggleLines::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.nav__toggleLines::before {
  top: -5px;
}

.nav__toggleLines::after {
  top: 5px;
}

.theme {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.theme:hover {
  cursor: pointer;
  background: var(--panel-strong);
}

.theme__icon {
  font-size: 1.05rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 12px 16px;
  border: 0;
  color: #081320;
  background: linear-gradient(
    120deg,
    rgba(45, 212, 191, 0.96) 8%,
    rgba(147, 198, 111, 0.96) 52%,
    rgba(245, 158, 11, 0.96) 92%
  );
  box-shadow: 0 12px 26px rgba(4, 12, 19, 0.35);
  font-weight: 700;
  text-decoration: none;
}

.btn:not(.btn--ghost)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  filter: saturate(1.08) brightness(1.03);
}

.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn--sm {
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.link {
  color: var(--accent-3);
  font-weight: 600;
}

.link:hover {
  color: var(--accent);
}

.badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 30px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 130px;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(6, 17, 28, 0.48) 0%,
    rgba(6, 17, 28, 0.2) 62%,
    rgba(6, 17, 28, 0) 100%
  );
}

[data-theme="light"] .hero::before {
  background: linear-gradient(
    180deg,
    rgba(244, 248, 252, 0.6) 0%,
    rgba(244, 248, 252, 0.25) 62%,
    rgba(244, 248, 252, 0) 100%
  );
}

.hero > .container {
  position: relative;
  z-index: 2;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
  gap: 20px;
}

.hero h1 {
  margin: 15px 0 14px;
  font-size: var(--h1);
  line-height: 1.05;
}

.lead {
  max-width: 58ch;
  color: var(--muted);
  font-size: var(--lead);
}

.hero__cta {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__quick {
  margin-top: 16px;
  max-width: 58ch;
}

.hero__card {
  position: relative;
}

.proof-strip {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.proof-item {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.proof-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.proof-item span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Cards and typography */
.card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card--glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
}

[data-theme="light"] .card--glass {
  background: linear-gradient(180deg, rgba(4, 38, 72, 0.06), rgba(4, 38, 72, 0.02));
}

.card__top {
  padding-bottom: 10px;
}

.card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
}

.pill {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.h3 {
  margin: 0;
  font-size: var(--h3);
}

.h4 {
  margin: 0 0 6px;
  font-size: 1.04rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.92rem;
}

.checklist {
  margin: 10px 0 0;
  padding-left: 18px;
}

.checklist li {
  margin: 8px 0;
  color: var(--muted);
}

.checklist li::marker {
  color: var(--accent);
}

/* Sections */
.section {
  padding: 58px 0;
}

.section--alt {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.03), transparent);
}

.section__head {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.section__head h2 {
  margin: 0;
  font-size: var(--h2);
}

.grid {
  display: grid;
  gap: 12px;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.service-grid .card,
.result-grid .card,
.resource-grid .card {
  height: 100%;
}

.hero__focus {
  margin-top: 14px;
  width: fit-content;
  max-width: 100%;
}

.focus-note {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.focus-note__label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focus-note__items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.focus-note__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: var(--accent-3);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: underline;
  text-decoration-color: rgba(56, 189, 248, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.focus-note__link:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.focus-note__link:focus-visible {
  outline: 0;
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.mini {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.mini li {
  margin: 6px 0;
}

.result__line {
  margin-bottom: 0;
  color: var(--muted);
}

.resource {
  border-color: rgba(56, 189, 248, 0.32);
}

.insights-note {
  margin-top: 14px;
}

.divider {
  height: 1px;
  margin: 22px 0;
  background: var(--line);
}

.callout {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(45, 212, 191, 0.13), rgba(245, 158, 11, 0.11));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.callout--why {
  margin-bottom: 22px;
}

.why-grid {
  margin-top: 0;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}

.step__num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(130deg, rgba(45, 212, 191, 0.2), rgba(56, 189, 248, 0.14));
  font-family: var(--font-display);
  font-weight: 700;
}

.step__body h3 {
  margin: 0 0 6px;
}

.step__body p {
  margin: 0;
  color: var(--muted);
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
  gap: 14px;
}

.about__points {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.point {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}

.point p {
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.9rem;
}

.faq {
  display: grid;
  gap: 8px;
}

.faq__item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
}

.faq__item summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 600;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
}

.faq__item[open] summary::after {
  content: "-";
}

.faq__item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  align-items: start;
}

.form {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.form label {
  display: grid;
  gap: 6px;
}

.form span {
  color: var(--muted);
  font-size: 0.92rem;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

input,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(3, 16, 27, 0.5);
  color: var(--text);
  padding: 12px;
  outline: none;
}

[data-theme="light"] input,
[data-theme="light"] textarea {
  background: rgba(248, 252, 255, 0.92);
}

input::placeholder,
textarea::placeholder {
  color: #8ea2bb;
}

input:focus,
textarea:focus {
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.form__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toast {
  min-height: 0;
  margin-top: 8px;
  font-size: 0.95rem;
}

/* Footer */
.footer {
  margin-top: 8px;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  background: rgba(5, 16, 27, 0.4);
}

[data-theme="light"] .footer {
  background: rgba(9, 28, 46, 0.04);
}

.footer__grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.footer__links {
  display: flex;
  gap: 10px;
  color: var(--muted);
}

.footer__links a {
  padding: 8px 10px;
  border-radius: 10px;
}

.footer__links a:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
}

.brand--footer {
  padding-left: 0;
}

.footer--simple {
  background: transparent;
  border-top: 0;
}

/* Prose pages */
.page {
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
}

.prose {
  padding: 42px 0 64px;
  max-width: 860px;
}

.prose h1 {
  font-size: clamp(2rem, 2vw + 1rem, 2.6rem);
  margin-top: 14px;
}

.prose h2 {
  margin-top: 26px;
}

.prose p {
  color: var(--muted);
}

.prose .lead {
  color: var(--text);
}

/* Atmosphere */
.hero__bg {
  position: absolute;
  inset: -20px 0 -180px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 420px at 18% 10%, rgba(45, 212, 191, 0.22), transparent 62%),
    radial-gradient(660px 380px at 86% 12%, rgba(245, 158, 11, 0.18), transparent 60%),
    radial-gradient(980px 720px at 52% 108%, rgba(56, 189, 248, 0.11), transparent 68%);
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.92) 24%,
    rgba(0, 0, 0, 0.95) 58%,
    rgba(0, 0, 0, 0.55) 82%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.92) 24%,
    rgba(0, 0, 0, 0.95) 58%,
    rgba(0, 0, 0, 0.55) 82%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1000px) {
  .hero__grid,
  .about,
  .contact {
    grid-template-columns: 1fr;
  }

  .proof-strip,
  .grid--2,
  .grid--3,
  .row {
    grid-template-columns: 1fr;
  }

  .callout {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav__menu {
    display: none;
    position: absolute;
    right: var(--pad);
    top: 66px;
    min-width: 220px;
    padding: 10px;
    gap: 6px;
    flex-direction: column;
    align-items: stretch;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(5, 17, 28, 0.92);
    box-shadow: var(--shadow);
  }

  [data-theme="light"] .nav__menu {
    background: rgba(255, 255, 255, 0.97);
  }

  .nav__menu.is-open {
    display: flex;
  }

  .nav__menu a,
  .theme {
    width: 100%;
  }

  .footer__grid {
    flex-direction: column;
    align-items: flex-start;
  }
}
