/*
 * clanzu.com. One dark, quiet surface: warm ivory type on near-black, a film
 * grain, one slow light behind the circle. No cards, no gradient text, no
 * section templates. The circle animation is the only illustration.
 */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-opsz.woff2") format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-cyrillic-opsz.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@layer site {
  :root {
    color-scheme: dark;
    --ink: #08080a;
    --ink-2: #111114;
    --ivory: #f2efe6;
    --ivory-2: rgb(242 239 230 / 62%);
    --ivory-3: rgb(242 239 230 / 38%);
    --line: rgb(242 239 230 / 10%);
    --line-2: rgb(242 239 230 / 18%);
    --mint: #8be3b5;
    --mint-deep: #3fbf86;
    --glow: rgb(120 112 255 / 22%);
    --font:
      "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI",
      "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Noto Sans",
      "Noto Sans CJK SC", "Malgun Gothic", "Microsoft YaHei", sans-serif;
    --font-ar:
      system-ui, -apple-system, "SF Arabic", "Segoe UI", "Noto Sans Arabic",
      "Geeza Pro", Tahoma, sans-serif;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background: var(--ink);
  }

  body {
    margin: 0;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--ink);
    color: var(--ivory);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }

  :lang(ar) body,
  body:lang(ar) {
    font-family: var(--font-ar);
  }

  :lang(ko) body,
  body:lang(ko) {
    word-break: keep-all;
  }

  /* Film grain over everything; it is what keeps the black from looking flat. */
  body::after {
    content: "";
    position: fixed;
    inset: -50%;
    z-index: 100;
    pointer-events: none;
    opacity: 0.07;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    animation: grain 1.2s steps(4) infinite;
  }

  @keyframes grain {
    25% {
      transform: translate(-3%, 2%);
    }
    50% {
      transform: translate(2%, -3%);
    }
    75% {
      transform: translate(-2%, -1%);
    }
  }

  a {
    color: inherit;
  }

  :focus-visible {
    outline: 1.5px solid var(--ivory);
    outline-offset: 4px;
    border-radius: 8px;
  }

  .sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .skip {
    position: absolute;
    inset-inline-start: 16px;
    top: -60px;
    z-index: 200;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--ivory);
    color: var(--ink);
    text-decoration: none;
  }

  .skip:focus {
    top: 12px;
  }

  .wrap {
    width: min(1120px, 100% - 48px);
    margin-inline: auto;
  }

  /* ---------- Header: the mark, nothing else ---------- */

  .top {
    position: relative;
    z-index: 2;
    padding-block: 28px 0;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Inter Variable", "Inter", system-ui, sans-serif;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.03em;
    text-decoration: none;
  }

  .brand svg {
    width: 26px;
    height: 26px;
  }

  .brand svg circle:last-child {
    fill: var(--mint);
  }

  /* ---------- Landing ---------- */

  .stage {
    position: relative;
    overflow: clip;
    flex: 1;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0;
    padding-block: 24px 56px;
    text-align: center;
  }

  .light {
    position: absolute;
    top: 6%;
    left: 50%;
    width: min(900px, 140vw);
    aspect-ratio: 1;
    translate: -50% 0;
    border-radius: 50%;
    background: radial-gradient(closest-side, var(--glow), transparent 70%);
    pointer-events: none;
    animation: breathe 9s ease-in-out infinite;
  }

  @keyframes breathe {
    50% {
      opacity: 0.55;
      scale: 0.92;
    }
  }

  .orbit {
    --size: min(420px, 78vw, 50svh);
    position: relative;
    width: var(--size);
    height: var(--size);
    margin: 0;
    animation: enter 1.4s var(--ease) both;
  }

  @keyframes enter {
    from {
      opacity: 0;
      scale: 0.94;
      filter: blur(8px);
    }
  }

  .orbit-ring {
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    border: 1px dashed var(--line-2);
    animation: spin 90s linear infinite;
  }

  .orbit-ring::before {
    content: "";
    position: absolute;
    top: -3px;
    left: 50%;
    width: 5px;
    height: 5px;
    margin-left: -2.5px;
    border-radius: 50%;
    background: var(--ivory-2);
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  .core {
    position: absolute;
    inset: 30%;
    display: grid;
    place-items: center;
  }

  .core svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
  }

  .core circle {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
  }

  .core .track {
    stroke: var(--line);
  }

  .core .bar {
    stroke: var(--mint);
    stroke-dasharray: 289;
    stroke-dashoffset: calc(289 - 289 * var(--p, 0));
    transition: stroke-dashoffset 1s var(--ease);
  }

  .core-num {
    font-size: calc(var(--size) * 0.15);
    font-weight: 300;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
  }

  .core-num small {
    font-size: 0.36em;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--ivory-3);
    margin-inline-start: 2px;
  }

  .member {
    --r: calc(var(--size) * 0.38);
    --m: calc(var(--size) * 0.15);
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--m);
    height: var(--m);
    margin: calc(var(--m) / -2) 0 0 calc(var(--m) / -2);
    transform: rotate(var(--a)) translate(var(--r)) rotate(calc(var(--a) * -1));
  }

  .member .av {
    position: absolute;
    inset: 12%;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ink-2);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--ivory-2);
    font-size: calc(var(--m) * 0.3);
    font-weight: 500;
    transition:
      color 0.6s,
      background 0.6s;
  }

  .member svg {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
  }

  .member circle {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .member .track {
    stroke: var(--line);
  }

  .member .bar {
    stroke: var(--mint);
    stroke-dasharray: 189;
    stroke-dashoffset: 189;
    transition: stroke-dashoffset 0.9s var(--ease);
  }

  .member.is-done .bar {
    stroke-dashoffset: 0;
  }

  .member.is-done .av {
    color: var(--ivory);
  }

  .member.is-you .av {
    background: var(--ivory);
    color: var(--ink);
    box-shadow: none;
  }

  .member .you {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    translate: -50% 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ivory-2);
    white-space: nowrap;
  }

  :lang(zh) .member .you,
  :lang(ja) .member .you,
  :lang(ko) .member .you,
  :lang(ar) .member .you {
    letter-spacing: 0;
  }

  .toast {
    position: absolute;
    left: 50%;
    bottom: -44px;
    translate: -50% 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgb(20 20 24 / 82%);
    box-shadow: inset 0 0 0 1px var(--line-2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(8px);
    transition:
      opacity 0.4s,
      transform 0.5s var(--ease);
  }

  .toast.is-on {
    opacity: 1;
    transform: none;
  }

  .caption {
    margin: 58px 0 0;
    font-size: 13px;
    color: var(--ivory-3);
    font-variant-numeric: tabular-nums;
    animation: rise 1s var(--ease) 0.3s both;
  }

  .caption b {
    font-weight: 500;
    color: var(--ivory-2);
  }

  h1 {
    margin: 44px 0 0;
    font-size: clamp(36px, 6.4vw, 80px);
    line-height: 1;
    letter-spacing: -0.05em;
    font-weight: 500;
    text-wrap: balance;
    animation: rise 1.1s var(--ease) 0.45s both;
  }

  h1 .dim {
    color: var(--ivory-3);
  }

  :lang(zh) h1,
  :lang(ja) h1,
  :lang(ko) h1,
  :lang(ar) h1 {
    letter-spacing: -0.01em;
    line-height: 1.2;
    font-size: clamp(30px, 5.2vw, 64px);
    word-break: keep-all;
    line-break: strict;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }

  /* ---------- Platforms ---------- */

  .platforms {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 48px 0 0;
    padding: 0;
    list-style: none;
    animation: rise 1.1s var(--ease) 0.6s both;
  }

  .platform {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 46px;
    padding-inline: 16px 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--line-2);
    color: var(--ivory-3);
    font: inherit;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
  }

  .platform svg {
    width: 17px;
    height: 17px;
    flex: none;
  }

  .platform b {
    font-weight: 500;
    color: var(--ivory-2);
  }

  .platform small {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  :lang(zh) .platform small,
  :lang(ja) .platform small,
  :lang(ko) .platform small,
  :lang(ar) .platform small {
    letter-spacing: 0;
  }

  .platform[disabled] {
    cursor: default;
  }

  .platform.is-live {
    background: var(--ivory);
    box-shadow: none;
    color: var(--ink);
    transition:
      transform 0.25s var(--ease),
      box-shadow 0.25s;
  }

  .platform.is-live b {
    color: var(--ink);
    font-weight: 600;
  }

  .platform.is-live small {
    color: rgb(8 8 10 / 55%);
  }

  .platform.is-live:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px -10px rgb(242 239 230 / 45%);
  }

  .platform.is-live .arrow {
    transition: transform 0.25s var(--ease);
  }

  .platform.is-live:hover .arrow {
    transform: translateX(2px);
  }

  [dir="rtl"] .platform .arrow {
    scale: -1 1;
  }

  /* ---------- Footer: one line ---------- */

  .foot {
    position: relative;
    z-index: 2;
    padding-block: 22px 26px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--ivory-3);
  }

  .foot-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
  }

  .foot a {
    text-decoration: none;
    transition: color 0.2s;
  }

  .foot a:hover {
    color: var(--ivory);
  }

  .foot nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
  }

  .foot .spacer {
    flex: 1;
  }

  .lang {
    position: relative;
    display: inline-flex;
    align-items: center;
  }

  .lang select {
    appearance: none;
    -webkit-appearance: none;
    height: 32px;
    padding-inline: 12px 30px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--line-2);
    color: var(--ivory-2);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
  }

  [dir="rtl"] .lang select {
    padding-inline: 12px 30px;
  }

  .lang select:hover {
    color: var(--ivory);
  }

  .lang option {
    background: var(--ink-2);
    color: var(--ivory);
  }

  .lang svg {
    position: absolute;
    inset-inline-end: 11px;
    width: 12px;
    height: 12px;
    pointer-events: none;
  }

  /* ---------- Legal pages ---------- */

  .doc {
    flex: 1;
    max-width: 720px;
    padding-block: 72px 96px;
    animation: rise 0.9s var(--ease) both;
  }

  .doc h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    animation: none;
  }

  .doc .updated {
    margin: 14px 0 0;
    color: var(--ivory-3);
    font-size: 14px;
  }

  .doc .fallback {
    margin: 28px 0 0;
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px var(--line-2);
    color: var(--ivory-2);
    font-size: 14px;
  }

  .doc-body {
    margin-top: 36px;
    color: var(--ivory-2);
    font-size: 16px;
  }

  .doc-body h2 {
    margin: 44px 0 10px;
    color: var(--ivory);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.02em;
  }

  .doc-body h3 {
    margin: 26px 0 6px;
    color: var(--ivory);
    font-size: 16px;
    font-weight: 500;
  }

  .doc-body a {
    color: var(--ivory);
    text-decoration-color: var(--line-2);
    text-underline-offset: 3px;
  }

  .doc-body strong {
    color: var(--ivory);
    font-weight: 500;
  }

  .doc-body li + li {
    margin-top: 8px;
  }

  .back {
    display: inline-block;
    margin-top: 48px;
    color: var(--ivory-2);
    font-size: 14px;
    text-decoration: none;
  }

  .back:hover {
    color: var(--ivory);
  }

  .notfound {
    flex: 1;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 16px;
    padding-block: 80px;
    text-align: center;
  }

  .notfound h1 {
    margin: 0;
    animation: none;
  }

  .notfound p {
    margin: 0 0 12px;
    color: var(--ivory-2);
  }

  /* ---------- Small screens ---------- */

  @media (max-width: 640px) {
    .wrap {
      width: calc(100% - 32px);
    }

    .top {
      padding-top: 20px;
    }

    .stage {
      padding-block: 12px 40px;
    }

    h1 {
      margin-top: 34px;
    }

    .platforms {
      display: grid;
      grid-template-columns: 1fr 1fr;
      width: 100%;
      margin-top: 36px;
    }

    .platforms li:first-child {
      grid-column: 1 / -1;
    }

    .platform {
      width: 100%;
      justify-content: center;
    }

    .foot-inner {
      flex-direction: column;
      align-items: flex-start;
      gap: 14px;
    }

    .foot .spacer {
      display: none;
    }
  }
}

/* Unlayered, so it wins over every rule in the "site" layer without !important. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms;
    animation-iteration-count: 1;
    transition-duration: 0.001ms;
  }
}
