@import url("./vendor/fonts.css");

:root {
  --bg: #eff2f6;
  --card: #ffffff;
  --ink: #0d1b3d;
  --muted: #6b7b99;
  --line: #d8dfeb;
  --line-strong: #cfd8e6;
  --blue: #1f6fff;
  --blue-2: #1a63ea;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

body {
  display: grid;
  place-items: center;
  padding: 20px;
  background: #ffffff;
}

.legal-page {
  width: min(1310px, calc(100vw - 40px));
}

.legal-frame {
  display: flex;
  justify-content: center;
  position: relative;
  min-height: min(960px, calc(100vh - 40px));
  min-height: min(960px, calc(100dvh - 40px));
  background: var(--card);
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.legal-visual {
  display: none;
}

.legal-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 16% 20%, rgba(121, 211, 233, 0.2), transparent 42%),
    linear-gradient(168deg, rgba(4, 18, 45, 0.18), rgba(2, 18, 39, 0.78));
}

.legal-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(164, 214, 235, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164, 214, 235, 0.35) 1px, transparent 1px);
  background-size: 34px 34px;
  mix-blend-mode: soft-light;
}

.legal-visual-copy {
  position: relative;
  z-index: 1;
  color: #f2f6ff;
  max-width: 40ch;
}

.legal-visual-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 2.9vw, 2.85rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.legal-visual-copy p {
  margin: 0;
  color: rgba(233, 241, 255, 0.9);
  line-height: 1.5;
  font-size: clamp(0.98rem, 1.08vw, 1.08rem);
}

.legal-panel {
  width: min(720px, 100%);
  padding: 108px 0 92px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #ffffff;
}

.legal-head {
  position: absolute;
  top: 28px;
  left: 34px;
  right: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 0;
  z-index: 2;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0c1633;
}

.legal-brand img {
  width: 28px;
  height: 36px;
  object-fit: contain;
}

.legal-brand strong {
  display: block;
  font-size: 1.28rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
}

.legal-head-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #77829a;
  font-size: 0.84rem;
  font-weight: 500;
}

.legal-head-cta a {
  color: #ff6c37;
  font-weight: 700;
  text-decoration: none;
}

.legal-stage-mark {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  color: #141a23;
}

.legal-stage-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.legal-title {
  margin: 0 0 10px;
  font-size: calc(clamp(2.08rem, 3.2vw, 4.25rem) * 0.765);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #0d1c40;
  text-align: center;
}

.legal-intro {
  max-width: 48ch;
  margin: 0 auto 10px;
  color: #64789d;
  font-size: 0.96rem;
  line-height: 1.5;
  text-align: center;
}

.legal-updated {
  margin: 0 0 24px;
  color: #61749a;
  font-size: clamp(0.98rem, 1.12vw, 1.08rem);
  line-height: 1.4;
  text-align: center;
}

.legal-scroll {
  overflow: auto;
  padding: 2px 8px 2px 0;
  display: grid;
  gap: 12px;
  min-height: 0;
  scrollbar-color: #b9c7dd transparent;
  width: min(720px, 100%);
  margin: 0 auto;
}

.legal-card {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 16px 18px;
  box-shadow: 0 8px 18px rgba(16, 37, 76, 0.06);
}

.legal-card h3 {
  margin: 0 0 9px;
  color: #1a2746;
  font-size: 1.02rem;
  line-height: 1.25;
  font-weight: 800;
}

.legal-card p {
  margin: 0;
  color: #31476d;
  font-size: 0.93rem;
  line-height: 1.55;
}

.legal-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #31476d;
  font-size: 0.93rem;
  line-height: 1.55;
}

.legal-links {
  width: min(720px, 100%);
  margin-left: auto;
  margin-right: auto;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
}

.legal-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  color: #2773f8;
  border: 1px solid #d8e4f7;
  border-radius: 999px;
  padding: 9px 12px;
  background: #ffffff;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.legal-links a:hover,
.legal-links a:focus-visible {
  border-color: #9fc1ff;
  background: #f4f8ff;
  color: var(--blue-2);
  outline: none;
}

@media (max-width: 980px) {
  body {
    padding: 12px;
    background: #ffffff;
  }

  .legal-page {
    width: calc(100vw - 24px);
    min-height: calc(100vh - 24px);
    min-height: calc(100dvh - 24px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 22px 12px 16px;
    margin: 0;
    background: #ffffff;
    border-radius: 0;
    overflow: visible;
  }

  .legal-frame {
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0 auto;
    width: min(100%, 466px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: auto;
  }

  .legal-visual {
    display: none;
  }

  .legal-panel {
    background: #ffffff;
    border-radius: 0;
    padding: 40px 0 32px;
    box-shadow: none;
    width: 100%;
    margin: auto 0;
    max-height: none;
  }

  .legal-head {
    position: static;
    justify-content: center;
    margin-bottom: 32px;
  }

  .legal-brand {
    flex-direction: row;
    gap: 8px;
  }

  .legal-brand img {
    width: 20px;
    height: 24px;
  }

  .legal-brand strong {
    font-size: 1.25rem;
    color: #0b1528;
    letter-spacing: -0.03em;
  }

  .legal-head-cta {
    display: none;
  }

  .legal-stage-mark {
    width: 84px;
    height: 84px;
    margin-bottom: 24px;
  }

  .legal-title {
    text-align: center;
    font-size: 1.8rem;
    line-height: 1.1;
    margin: 0 0 8px;
    color: #0b1528;
  }

  .legal-updated {
    text-align: center;
    font-size: 0.95rem;
    color: #6c7e9e;
    margin: 0 auto 28px;
    max-width: 32ch;
  }

  .legal-scroll {
    overflow: visible;
    padding-right: 0;
    gap: 10px;
  }

  .legal-card {
    border-color: #e2e8f0;
    border-radius: 12px;
    padding: 15px 16px;
    box-shadow: none;
  }

  .legal-card h3 {
    font-size: 0.96rem;
  }

  .legal-card p,
  .legal-card ul {
    font-size: 0.88rem;
  }

  .legal-links {
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
  }

  .legal-links a {
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.86rem;
  }
}

@media (max-width: 760px) {
  body {
    padding: 8px;
  }

  .legal-page {
    width: calc(100vw - 16px);
    min-height: calc(100vh - 16px);
    min-height: calc(100dvh - 16px);
    padding: 16px 10px 12px;
  }

  .legal-frame {
    width: min(100%, 420px);
  }
}
