@font-face {
  font-family: "Geist Pixel";
  src: url("/assets/fonts/GeistPixel-Square.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-background: #ffffff;
  --color-text: #202320;
  --color-accent: #244ee8;
  --color-text-secondary: #595e59;
  --color-rule: #dedfdb;
  --color-control-edge: #858a85;
  --color-surface-subtle: #f5f5f3;
  --color-disabled: #747974;
  --color-primary-hover: #363b36;
  --color-danger: #b42318;
  --color-success: #21633d;
  --font-size-page-title: clamp(2rem, 4vw, 3rem);
  --space-chapter: 4rem;
  --space-related: .5rem;
  --space-control-inline: .75rem;
  --space-item: 1rem;
  --space-group: 1.5rem;
  --space-block: 2rem;
  --space-section: 3rem;
  --radius-control: 4px;
  --font-family: "Inter", sans-serif;
  --font-size-body: 15px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  line-height: 1.5;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--color-background);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(10px);
  border-bottom-color: rgb(15 14 13 / 10%);
}

.navigation {
  display: flex;
  color: #0f0e0d;
  font-size: 14px;
  align-items: center;
  gap: 40px;
  min-height: 72px;
  padding: 14px 32px;
}

.navigation-link {
  color: inherit;
  text-decoration: none;
}

.navigation-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.menu-icon-close,
.is-menu-open .menu-icon-open {
  display: none;
}

.is-menu-open .menu-icon-close {
  display: block;
}

.brand {
  display: block;
  flex-shrink: 0;
}

.navigation-logo {
  display: block;
  width: calc(5.5rem * 374.52101 / 368);
  height: auto;
}

.navigation-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navigation-links a {
  display: block;
  padding: 10px 0;
  font-weight: 400;
}

.navigation-links a:hover,
.search-button:hover {
  color: #646464;
}

.navigation-actions {
  display: flex;
  align-self: center;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.search-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.search-button svg {
  width: 18px;
  height: 18px;
}

.navigation .sign-in-button {
  display: grid;
  place-items: center;
  min-height: 32px;
  padding: 4px 14px;
  border-radius: 4px;
  background: #0f0e0d;
  color: #ffffff;
  font-weight: 400;
  white-space: nowrap;
}

.search-button:hover {
  background: #f1f3f6;
}

.navigation .sign-in-button:hover {
  background: #333333;
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 48px 24px;
  text-align: center;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  color: #0f0e0d;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-description {
  margin: 20px 0 0;
  color: #646464;
  font-size: 15px;
  line-height: 1.6;
}

.hero-corner {
  position: absolute;
  bottom: clamp(24px, 6svh, 64px);
  height: auto;
}

.hero-bluebook {
  right: clamp(24px, 6vw, 96px);
  width: clamp(150px, 20vw, 260px);
  filter: saturate(0.45) contrast(0.9);
}

.case-preview {
  user-select: none;
  -webkit-user-select: none;
  position: absolute;
  top: 110px;
  right: -26px;
  width: 310px;
  text-align: left;
  transform: rotate(-7deg);
}

.hero-note,
.contract-preview {
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.hero-note {
  position: absolute;
  top: 160px;
  left: clamp(24px, 6vw, 96px);
  width: 220px;
  color: var(--color-accent);
  font-family: "Caveat", cursive;
  font-size: 20px;
  transform: rotate(-8deg);
}

.contract-preview {
  left: -20px;
  bottom: -32px;
  width: 380px;
  min-height: 230px;
  padding: 27px 30px 35px;
  background: #fffefb;
  border: 1px solid #e7e5df;
  border-radius: 2px;
  box-shadow: 0 3px 5px rgb(0 0 0 / 5%), 0 14px 28px rgb(0 0 0 / 10%);
  text-align: left;
  transform: rotate(5deg);
}

.contract-heading {
  font-size: 13px;
  font-weight: 600;
}

.contract-review {
  display: grid;
  grid-template-columns: 1fr 105px;
  gap: 18px;
  margin-top: 16px;
}

.contract-review p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
}

.contract-review del {
  color: #b33030;
  text-decoration-thickness: 1.5px;
}

.contract-review .contract-comment {
  padding-left: 10px;
  border-left: 1px solid #b33030;
  color: #b33030;
  font-family: "Caveat", cursive;
  font-size: 19px;
  line-height: 1.15;
  transform: rotate(-4deg);
}

.contract-lines {
  display: grid;
  gap: 8px;
  width: 62%;
  margin-top: 18px;
}

.contract-lines span {
  height: 2px;
  background: #e7e5df;
}

.contract-lines span:last-child {
  width: 70%;
}

.case-preview-paper {
  position: relative;
  padding: 30px 28px 26px;
  background: #fffefb;
  border: 1px solid #e7e5df;
  border-radius: 2px;
  box-shadow: 0 3px 5px rgb(0 0 0 / 5%), 0 14px 28px rgb(0 0 0 / 10%);
}

.case-preview-paper strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.case-preview-paper em {
  display: block;
  margin-top: 7px;
  font-size: 13px;
}

.case-preview-topics {
  display: inline-block;
  margin-top: 17px;
  font-size: 11px;
}

.case-preview-lines {
  display: grid;
  gap: 7px;
  margin-top: 20px;
}

.case-preview-lines span {
  height: 2px;
  background: #e7e5df;
}

.case-preview-lines span:last-child {
  width: 68%;
}

.case-preview-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 166px;
  height: 42px;
  margin: 14px auto 0;
  padding: 0 15px;
  border-radius: 5px;
  background: #f2f1ee;
  color: #646464;
  box-shadow: 0 2px 6px rgb(0 0 0 / 4%);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.case-preview-total {
  margin-left: 4px;
  color: #777;
}

.case-preview-arrow {
  font-size: 17px;
}

@media (min-width: 801px) and (max-height: 750px) {
  .hero {
    padding-top: 380px;
    padding-bottom: 210px;
  }

  .case-preview {
    top: 135px;
    width: 280px;
  }

  .case-preview-paper {
    padding: 24px 20px;
  }
}

@media (min-width: 801px) and (max-height: 650px) {
  .hero {
    padding-top: 380px;
    padding-bottom: 190px;
  }

  .hero-bluebook {
    width: 140px;
  }

}

.hero-partners {
  white-space: nowrap;
}

.hero-traced {
  font-family: "Geist Pixel", monospace;
  font-size: 1.1em;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.hero img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.hero-cases {
  position: relative;
  display: inline-block;
  isolation: isolate;
}

.hero-cases > span {
  position: relative;
}

.case-papers {
  mask-image: linear-gradient(to top, transparent 0%, #000 50%);
  position: absolute;
  z-index: -1;
  width: 1.8em;
  height: 1.8em;
  object-fit: contain;
  left: 50%;
  bottom: 0.3em;
  transform: translateX(-50%) rotate(-6deg);
  pointer-events: none;
}

.partners-illustration {
  display: inline-block;
  width: 2.2em;
  height: 1.1em;
  object-fit: contain;
  vertical-align: -0.12em;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  margin-top: 32px;
  padding: 12px 26px;
  border: 0;
  border-radius: 4px;
  background: #0f0e0d;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.hero-button:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

.hero-button-note {
  margin: 10px 0 0;
  color: #646464;
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-button {
    transition: none;
  }

  .hero-button:hover {
    transform: none;
  }
}

.hero-button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

@media (max-width: 800px) {
  .site-header {
    max-height: 100svh;
    overflow-y: auto;
  }

  .site-header.is-menu-open {
    background: var(--color-background);
    border-bottom-color: #e7e5df;
  }

  .navigation {
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    min-height: 68px;
    padding: 12px 24px;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .navigation-links {
    display: none;
    order: 3;
    flex: 0 0 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 16px 0 8px;
  }

  .navigation-links a {
    min-height: 44px;
  }

  .navigation-actions {
    display: none;
    order: 4;
    flex: 0 0 100%;
    padding-bottom: 12px;
  }

  .navigation-actions a {
    min-width: 44px;
    min-height: 44px;
  }

  .is-menu-open .navigation-links,
  .is-menu-open .navigation-actions {
    display: flex;
  }

  .hero {
    justify-content: center;
    min-height: 100svh;
    padding: 80px 20px;
  }

  .hero-note,
  .hero-bluebook,
  .contract-preview {
    display: none;
  }

  .hero h1 {
    max-width: 540px;
    font-size: clamp(25px, 7.5vw, 40px);
    line-height: 1.2;
  }

  .hero-heading-line {
    display: block;
    white-space: nowrap;
  }

  .hero-traced {
    font-size: 1.5em;
  }

  .hero-description {
    max-width: 380px;
  }

  .case-preview {
    position: absolute;
    top: auto;
    bottom: 16px;
    right: -28px;
    width: 210px;
    margin-top: 0;
  }

  .case-preview-paper {
    padding: 16px;
  }

  .case-preview-paper strong {
    font-size: 10px;
  }

  .case-preview-paper em,
  .case-preview-topics {
    font-size: 10px;
    margin-top: 6px;
  }

  .case-preview-lines {
    gap: 4px;
    margin-top: 10px;
  }

  .case-preview-pagination {
    display: none;
  }
}

@media (max-width: 639px) {
  :root {
    --space-chapter: 3rem;
    --space-block: 1.5rem;
    --space-section: 2rem;
  }
}

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