﻿.page-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-0);
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 45%;
  filter: saturate(0.8);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 11, 20, 0.92) 0%, rgba(5, 11, 20, 0.6) 50%, rgba(5, 11, 20, 0.25) 100%),
    linear-gradient(180deg, rgba(5, 11, 20, 0.7) 0%, rgba(5, 11, 20, 0) 35%, rgba(5, 11, 20, 0) 55%, var(--bg-0) 100%);
}
.page-hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(108, 192, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 192, 255, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 30% 60%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 70% at 30% 60%, #000 10%, transparent 75%);
}
.page-hero__inner {
  padding-top: calc(var(--header-h) + var(--util-h) + 48px);
  padding-bottom: 56px;
}

.page-hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.75rem);
  letter-spacing: -0.035em;
  color: var(--white);
  text-shadow: 0 6px 40px rgba(5, 11, 20, 0.45);
}
.page-hero__summary {
  margin-top: 18px;
  max-width: 40em;
  color: var(--on-dark-2);
  font-size: 1.0625rem;
  line-height: 1.8;
}
.page-hero__summary:empty { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .page-hero__inner > * { animation: page-rise 900ms var(--ease) both; }
  .page-hero__inner > *:nth-child(2) { animation-delay: 80ms; }
  .page-hero__inner > *:nth-child(3) { animation-delay: 160ms; }
  .page-hero__inner > *:nth-child(4) { animation-delay: 240ms; }
}
@keyframes page-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.page-body {
  --pb-line: #E3E8EF;
  --pb-rule: var(--ink-900);
  --pb-soft: #F3F6FA;
  --pb-tint: #EEF5FF;
  background: var(--white);
  color: var(--text-2);
}
.page-crumbs { padding-top: 28px; }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pb-line);
  font-size: var(--fs-small);
  color: var(--muted);
}
.crumbs a { transition: color var(--t-fast) var(--ease); }
.crumbs a:hover { color: var(--accent-strong); }
.crumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--line-strong);
}
.crumbs [aria-current] { color: var(--text); font-weight: 700; }

.page-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(40px, 2rem + 4vw, 96px);
  padding-block: 56px clamp(5rem, 3.5rem + 6vw, 8rem);
  align-items: start;
}

.subnav {
  position: sticky;
  top: calc(var(--header-h) + var(--util-h) + 32px);
  border-top: 3px solid var(--pb-rule);
  counter-reset: sub;
}
.subnav h2 {
  padding: 20px 0 18px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
}
.subnav ul { border-top: 1px solid var(--pb-line); }
.subnav li { counter-increment: sub; }
.subnav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 12px 4px 12px 0;
  border-bottom: 1px solid var(--pb-line);
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: color var(--t-fast) var(--ease), padding var(--t-mid) var(--ease);
}
.subnav a::before {
  content: counter(sub, decimal-leading-zero);
  flex: none;
  width: 22px;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--line-strong);
  transition: color var(--t-fast) var(--ease);
}
.subnav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: var(--accent-strong);
  transition: width var(--t-mid) var(--ease);
}
.subnav a:hover { color: var(--text); padding-left: 6px; }
.subnav a:hover::before { color: var(--accent-strong); }
.subnav a[aria-current="page"] { color: var(--text); font-weight: 800; }
.subnav a[aria-current="page"]::before { color: var(--accent-strong); }
.subnav a[aria-current="page"]::after { width: 100%; }

.page-content { min-width: 0; color: var(--text-2); }
.page-content h2 {
  color: var(--text);
  font-size: var(--fs-h2);
  letter-spacing: -0.03em;
}
.page-content h3 { color: var(--text); }
.page-content a:not(.pill) {
  color: var(--accent-strong);
  transition: text-decoration-color var(--t-fast) var(--ease);
}
.page-content a:not(.pill):hover { text-decoration-color: currentColor; }
.page-content .pill--line,
.page-content .pill--glass {
  color: var(--text);
  background: transparent;
  border-color: var(--pb-rule);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.page-content .pill--line:hover,
.page-content .pill--glass:hover { color: var(--white); background: var(--pb-rule); }
.page-content .pill--white { background: var(--pb-tint); }

.page-intro {
  position: relative;
  padding: 4px 0 40px 28px;
  margin-bottom: 8px;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: -0.01em;
  color: var(--text);
  border-bottom: 1px solid var(--pb-line);
}
.page-intro::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 4px;
  height: 1.6em;
  background: var(--accent-strong);
}

.slot {
  position: relative;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-top: 40px;
  padding: 44px;
  background:
    linear-gradient(var(--pb-line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--pb-line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--pb-soft);
  text-align: left;
}
.slot::before,
.slot::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border: 0 solid var(--accent-strong);
}
.slot::before { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; }
.slot::after { right: 0; bottom: 0; border-right-width: 3px; border-bottom-width: 3px; }
.slot__label {
  align-self: flex-start;
  padding: 5px 12px;
  background: var(--pb-rule);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white);
}
.slot__title {
  margin-top: 18px;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.slot__desc {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--fs-small);
}

.meta {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 160px 1fr;
  border-top: 3px solid var(--pb-rule);
}
.meta dt,
.meta dd {
  margin: 0;
  padding: 22px 0;
  border-bottom: 1px solid var(--pb-line);
  font-size: 0.9375rem;
}
.meta dt { font-weight: 800; color: var(--text); }
.meta dd { color: var(--text-2); }
.meta ul li + li { margin-top: 8px; }
.meta ul li::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 2px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--accent-strong);
}

.page-narrow .page-layout { grid-template-columns: minmax(0, 1fr); }
.page-narrow .subnav { display: none; }
.page-narrow .page-content { width: 100%; max-width: 560px; justify-self: center; }

.field { display: grid; gap: 8px; }
.field > span { font-size: var(--fs-small); font-weight: 700; color: var(--text); }
.field input {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--white);
  color: var(--text);
  transition: border-color var(--t-fast) var(--ease);
}
.field input:focus { outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(11, 111, 224, 0.15); }
.field__hint { font-size: var(--fs-micro); color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--pb-rule);
  border-radius: 0;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn--primary { background: var(--pb-rule); color: var(--white); }
.btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn--line { background: var(--white); color: var(--text); }
.btn--line:hover { background: var(--pb-soft); }
.btn--block { width: 100%; }

.form-error { margin: 0; font-size: var(--fs-small); color: #C8323A; }
.form-error:empty { display: none; }

.login-form { display: grid; gap: 20px; padding-top: 32px; border-top: 3px solid var(--pb-rule); }
.login-form__notice {
  padding: 14px 16px;
  background: var(--pb-tint);
  border-left: 3px solid var(--accent-strong);
  font-size: var(--fs-small);
  color: var(--text);
}
.login-form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-small);
  color: var(--text);
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 0;
  accent-color: var(--pb-rule);
}
.login-form__links { display: flex; align-items: center; gap: 12px; font-size: var(--fs-small); }
.login-form__links button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  cursor: pointer;
}
.login-form__links button:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 4px; }
.login-form__links .sep { width: 1px; height: 12px; background: var(--line-strong); }

.modal {
  --pb-line: #E3E8EF;
  --pb-rule: var(--ink-900);
  --pb-soft: #F3F6FA;
  --pb-tint: #EEF5FF;
  width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-top: 3px solid var(--pb-rule);
  border-radius: 0;
  background: var(--white);
  color: var(--text-2);
  box-shadow: 0 24px 64px -16px rgba(5, 11, 20, 0.45);
}
.modal::backdrop { background: rgba(5, 11, 20, 0.6); }
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 0;
}
.modal .modal__title { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.modal__close {
  width: 36px;
  height: 36px;
  margin-right: -8px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { color: var(--accent-strong); }
.modal__body { display: grid; gap: 18px; padding: 20px 28px 28px; }
.modal__desc { font-size: var(--fs-small); color: var(--muted); line-height: 1.7; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: var(--fs-small); }
.otp-reset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--pb-line);
}
.otp-reset p { font-size: var(--fs-micro); line-height: 1.6; color: var(--muted); }
.otp-reset .btn { flex: none; }
@media (max-width: 420px) { .otp-reset { flex-direction: column; align-items: flex-start; } }
.modal__result {
  padding: 16px;
  background: var(--pb-soft);
  border-left: 3px solid var(--accent-strong);
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--text);
}
.modal__result:empty { display: none; }
.modal__result strong { font-size: 1.0625rem; color: var(--accent-strong); }
.otp-input {
  text-align: center;
  font-size: 1.5rem !important;
  font-weight: 700;
  letter-spacing: 0.5em;
}

@media (max-width: 960px) {
  .page-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 0; }
  .page-crumbs { padding-top: 20px; }
  .crumbs { border-bottom: 0; padding-bottom: 0; }
  .subnav {
    position: static;
    margin-inline: calc(var(--gutter) * -1);
    border-top: 0;
    border-bottom: 1px solid var(--pb-line);
  }
  .subnav h2 { display: none; }
  .subnav ul {
    display: flex;
    gap: 24px;
    padding-inline: var(--gutter);
    border-top: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .subnav ul::-webkit-scrollbar { display: none; }
  .subnav li { flex: none; }
  .subnav a {
    min-height: 56px;
    padding: 0;
    border-bottom: 0;
    white-space: nowrap;
  }
  .subnav a::before { display: none; }
  .subnav a:hover { padding-left: 0; }
}

@media (max-width: 720px) {
  .page-hero { min-height: 380px; }
  .page-hero__inner { padding-top: calc(var(--header-h) + 48px); padding-bottom: 44px; }
}

@media (max-width: 640px) {
  .slot { padding: 24px; min-height: 260px; }
  .meta { grid-template-columns: 1fr; }
  .meta dt { border-bottom: 0; padding-bottom: 4px; }
}
