:root {
  --ink: #171717;
  --ink-soft: #2d2a25;
  --paper: #f3eee4;
  --paper-2: #e8e0d2;
  --paper-3: #faf6ee;
  --white: #fffdf8;
  --brass: #a9824e;
  --brass-2: #c9a46e;
  --muted: #6d6559;
  --line: rgba(23, 23, 23, 0.14);
  --line-strong: rgba(23, 23, 23, 0.26);
  --danger: #8a2f2f;
  --danger-bg: #f6e4df;
  --ok: #3f6b4f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(32, 26, 18, 0.12);
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(201, 164, 110, 0.16), transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

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

.muted {
  color: var(--muted);
}

.kicker {
  margin-bottom: 12px;
  color: var(--brass);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 238, 228, 0.9);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--ink);
}

.brand-stone {
  display: block;
  width: 12px;
  height: 12px;
  border: 1px solid var(--brass-2);
  border-radius: 50%;
  background: var(--paper);
}

.brand-text {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  font-size: 0.94rem;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-form {
  margin: 0;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.94rem;
}

.link-button:hover {
  color: var(--ink);
}

/* Buttons */

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}

.btn--primary:hover {
  background: var(--ink-soft);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(23, 23, 23, 0.04);
}

.btn--small {
  min-height: 40px;
  padding: 9px 16px;
  font-size: 0.88rem;
}

.btn--full {
  width: 100%;
}

.btn--light {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.btn--light:hover {
  background: var(--white);
}

.btn:focus-visible,
.nav-link:focus-visible,
.link-button:focus-visible,
input:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--brass-2);
  outline-offset: 3px;
}

/* Hero */

.hero {
  padding: clamp(52px, 8vw, 96px) 0 clamp(44px, 6vw, 76px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(36px, 6vw, 76px);
}

.hero h1 {
  max-width: 13ch;
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 6vw, 5rem);
  line-height: 1.02;
}

.lead {
  max-width: 52ch;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-note {
  max-width: 46ch;
  margin-top: 22px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-visual {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.board {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(80, 60, 34, 0.35);
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.32), transparent 45%),
    linear-gradient(145deg, #d8c8aa, #c3ad8a 55%, #b39a73);
  box-shadow: var(--shadow);
}

.board-grid {
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(42, 32, 18, 0.42);
  background-image:
    linear-gradient(to right, rgba(42, 32, 18, 0.3) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(42, 32, 18, 0.3) 1px, transparent 1px);
  background-size: calc(100% / 9) calc(100% / 9);
}

.stone {
  position: absolute;
  width: 9.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow:
    0 8px 14px rgba(20, 14, 8, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.22);
}

.stone--black {
  background: radial-gradient(circle at 32% 26%, #555 0, #1b1b1b 38%, #050505 100%);
}

.stone--white {
  background: radial-gradient(circle at 32% 26%, #fffdf6 0, #e6ddcb 55%, #c8bca6 100%);
}

.stone--brass {
  background: radial-gradient(circle at 32% 26%, #ecd2a1 0, #b98f55 55%, #7e5c2e 100%);
}

.stone--1 {
  top: 24%;
  left: 28%;
}

.stone--2 {
  top: 38%;
  left: 48%;
}

.stone--3 {
  top: 56%;
  left: 38%;
}

.stone--4 {
  top: 34%;
  left: 68%;
}

.stone--5 {
  top: 66%;
  left: 62%;
}

.board-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Sections */

.section {
  padding: clamp(52px, 7vw, 86px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 760px;
  margin-bottom: 32px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.62);
}

.card-num {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--brass);
  font-family: var(--serif);
  font-size: 0.9rem;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: 22px;
  border-top: 2px solid var(--ink);
  background: rgba(255, 253, 248, 0.4);
}

.step-num {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--brass);
  font-family: var(--serif);
  font-size: 1.4rem;
}

.step h3 {
  font-size: 1.12rem;
}

.step p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.space {
  padding: clamp(30px, 5vw, 56px);
  border-radius: 26px;
  background:
    radial-gradient(700px 300px at 85% 0%, rgba(201, 164, 110, 0.22), transparent 70%),
    var(--ink);
  color: var(--paper);
}

.space h2 {
  max-width: 18ch;
}

.space-text {
  max-width: 62ch;
  margin-bottom: 24px;
  color: rgba(243, 238, 228, 0.74);
}

/* Auth */

.auth {
  display: grid;
  min-height: calc(100vh - 190px);
  place-items: center;
  padding: 48px 0;
}

.auth-card {
  width: min(460px, 100%);
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(40, 30, 18, 0.08);
}

.auth-title {
  margin-bottom: 8px;
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.form {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.form label {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.form input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-3);
  color: var(--ink);
}

.form input:focus {
  border-color: var(--brass);
  background: var(--white);
}

.form .btn {
  margin-top: 16px;
}

.hint {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.alert {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(138, 47, 47, 0.25);
  border-radius: 10px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.9rem;
}

.auth-links {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-links a {
  color: var(--ink);
  text-underline-offset: 3px;
}

/* Cabinet */

.cabinet {
  padding: clamp(40px, 6vw, 72px) 0;
}

.cabinet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.cabinet-head h1 {
  margin-bottom: 6px;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.notice {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(169, 130, 78, 0.35);
  border-radius: var(--radius-sm);
  background: #f7edd7;
  color: #4d3a1f;
  font-size: 0.92rem;
}

.notice--soft {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.55);
  color: var(--muted);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.meta {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 248, 0.6);
}

.meta span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta strong {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.panel {
  min-height: 190px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.4);
}

.panel h2 {
  margin: 18px 0 8px;
  font-size: 1.4rem;
}

.panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.soon {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
}

.footer-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.footer-inner p {
  margin: 0;
  font-size: 0.86rem;
}

.footer-inner .muted {
  max-width: 56ch;
  text-align: right;
}

/* Responsive */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 16ch;
  }

  .hero-visual {
    order: -1;
  }

  .board {
    width: min(100%, 380px);
  }

  .cards,
  .steps,
  .meta-grid,
  .panel-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    display: block;
  }

  .footer-inner .muted {
    margin-top: 8px;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(100% - 28px, 1120px);
  }

  .header-inner {
    min-height: 66px;
    gap: 10px;
  }

  .nav {
    gap: 12px;
  }

  .nav-link:not(.nav-link--keep) {
    display: none;
  }

  .brand-text {
    font-size: 1.12rem;
  }

  .hero {
    padding-top: 36px;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 11vw, 3.4rem);
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .cards,
  .steps,
  .meta-grid,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .cabinet-head {
    display: block;
  }

  .badge {
    margin-top: 12px;
  }

  .section {
    padding: 44px 0;
  }

  .space {
    border-radius: 20px;
  }

  .auth {
    min-height: auto;
    padding: 32px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
