@layer reset, page;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; }
  a { color: inherit; }
}

@layer page {
  :root, .sw-root {
    --sw-bg: #F4F5F1;
    --sw-ink: #17233C;
    --sw-ink-soft: #526078;
    --sw-accent: #2864DC;
    --sw-font-display: "STKaiti", "KaiTi", "Noto Serif SC", serif;
    --sw-font-body: "FZLanTingHeiS-R-GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  }

  body {
    color: #17233C;
    background: #F4F5F1;
    font-family: var(--sw-font-body);
    text-rendering: optimizeLegibility;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 30;
    pointer-events: none;
    border: 10px solid rgba(23, 35, 60, .055);
    mix-blend-mode: multiply;
  }

  .skip-link {
    position: fixed;
    z-index: 100;
    top: 1rem;
    left: 1rem;
    padding: .75rem 1rem;
    background: #17233C;
    color: white;
    transform: translateY(-160%);
  }

  .skip-link:focus { transform: translateY(0); }
  #world { position: relative; isolation: isolate; }
  #world::after {
    content: "CHENGDU · 30.5728° N / 104.0668° E";
    position: fixed;
    z-index: 8;
    left: clamp(1.25rem, 4vw, 4rem);
    bottom: 1.25rem;
    color: rgba(23, 35, 60, .48);
    font: 600 .62rem/1.2 Consolas, monospace;
    letter-spacing: .15em;
    pointer-events: none;
  }

  .sw-root .sw-brand__mark {
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid #E7473C;
    border-radius: 50%;
    background: linear-gradient(90deg, transparent 42%, #2864DC 42% 58%, transparent 58%),
                linear-gradient(transparent 42%, #2864DC 42% 58%, transparent 58%);
    box-shadow: 0 0 0 4px rgba(231, 71, 60, .1);
  }

  .sw-root .sw-brand__name {
    font-weight: 700;
    letter-spacing: .08em;
  }

  .sw-root .sw-copy__title {
    max-width: 8em;
    white-space: pre-line;
    font-family: var(--sw-font-display);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: 1.04;
  }

  .sw-root .sw-copy__eyebrow,
  .sw-root .sw-copy__num,
  .sw-root .sw-copy__tags,
  .sw-root .sw-nav,
  .sw-root .sw-route {
    font-family: Consolas, "Microsoft YaHei", sans-serif;
    letter-spacing: .08em;
  }

  .sw-root .sw-copy__tags li {
    border-radius: 999px;
    border: 1px solid rgba(40, 100, 220, .22);
    border: 1px solid color-mix(in srgb, var(--sw-accent) 36%, transparent);
    background: rgba(244, 245, 241, .82);
    background: color-mix(in srgb, #F4F5F1 82%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  .sw-root .sw-route__dot i {
    transform: rotate(45deg);
    border-radius: 2px;
  }

  .sw-root .sw-topcta,
  .sw-root .sw-copy__cta a {
    border-radius: 999px;
  }

  .contact {
    position: relative;
    min-height: 85svh;
    display: grid;
    align-content: center;
    justify-items: start;
    overflow: hidden;
    padding: clamp(5rem, 10vw, 10rem) clamp(1.5rem, 10vw, 10rem);
    color: #F4F5F1;
    background: #17233C;
  }
  .contact::after {
    content: "";
    position: absolute;
    width: min(50vw, 42rem);
    aspect-ratio: 1;
    right: -12vw;
    top: 50%;
    border: 1px solid rgba(242, 181, 68, .34);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 5vw rgba(242, 181, 68, .06), 0 0 0 10vw rgba(40, 100, 220, .05);
  }

  .contact__eyebrow {
    margin: 0 0 1.2rem;
    color: #F2B544;
    font: 700 .72rem/1 Consolas, monospace;
    letter-spacing: .18em;
  }

  .contact h2 {
    position: relative;
    z-index: 1;
    max-width: 9em;
    margin: 0;
    font-family: var(--sw-font-display);
    font-size: clamp(3rem, 8vw, 8rem);
    line-height: .98;
    letter-spacing: -.06em;
  }

  .contact > p:not(.contact__eyebrow) {
    max-width: 34rem;
    margin: 2rem 0;
    color: #B9C4D8;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.8;
  }

  .contact__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
  .button {
    padding: .9rem 1.25rem;
    border: 1px solid rgba(244, 245, 241, .28);
    border-radius: 999px;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease;
  }
  .button:hover { transform: translateY(-2px); }
  .button[aria-disabled="true"] { opacity: .62; cursor: not-allowed; }
  .button[aria-disabled="true"]:hover { transform: none; }
  .button:focus-visible { outline: 3px solid #F2B544; outline-offset: 3px; }
  .button--primary { color: #17233C; background: #F2B544; border-color: #F2B544; }
  .contact small { margin-top: 3rem; color: #75829A; }
  .contact__route { display: flex; gap: .5rem; margin-bottom: 2rem; }
  .contact__route i { width: 2.5rem; height: 3px; background: #E7473C; }
  .contact__route i:nth-child(2) { background: #2864DC; }
  .contact__route i:nth-child(3) { background: #F2B544; }

  @media (max-width: 860px) {
    body::before { border-width: 5px; }
    #world::after { display: none; }
    .contact { min-height: 75svh; padding-block: 6rem; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .button { transition: none; }
  }
}
