@font-face {
  font-family: Manrope;
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #070807;
  --panel: rgba(18, 18, 16, 0.78);
  --panel-solid: #11120f;
  --text: #f4f0e9;
  --muted: #aaa79f;
  --gold: #e5aa43;
  --gold-light: #f2ca76;
  --line: rgba(229, 170, 67, 0.24);
  --white-line: rgba(255, 255, 255, 0.11);
  --page-pad: clamp(24px, 5vw, 84px);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 9%, rgba(162, 101, 25, 0.15), transparent 26rem),
    linear-gradient(180deg, #090a09, #050605 72%);
  font-family: Manrope, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.lab-hero {
  position: relative;
  display: flex;
  min-height: min(760px, 92vh);
  align-items: flex-end;
  overflow: hidden;
  padding: 190px var(--page-pad) 88px;
  border-bottom: 1px solid var(--white-line);
  isolation: isolate;
}

.lab-grid,
.tool-backdrop::before {
  position: absolute;
  inset: 0;
  z-index: -3;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(to right, #000, transparent 82%);
}

.lab-hero::before {
  position: absolute;
  z-index: -4;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 6, 5, 0.98) 0%, rgba(5, 6, 5, 0.75) 46%, rgba(5, 6, 5, 0.16) 100%),
    radial-gradient(circle at 82% 55%, rgba(229, 170, 67, 0.17), transparent 29%),
    #080908;
}

.lab-hero::after {
  position: absolute;
  z-index: -2;
  width: 64vw;
  height: 1px;
  right: -8vw;
  bottom: 30%;
  content: "";
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: rotate(-18deg);
  box-shadow: 0 0 28px rgba(229, 170, 67, 0.55);
}

.lab-orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(229, 170, 67, 0.32);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.lab-orbit-one {
  width: 630px;
  height: 340px;
  right: -84px;
  bottom: 78px;
}

.lab-orbit-two {
  width: 460px;
  height: 214px;
  right: 20px;
  bottom: 134px;
  border-color: rgba(229, 170, 67, 0.13);
}

.lab-hero-copy {
  max-width: 820px;
}

.chapter-label {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 34px;
  color: #c4c0b8;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.chapter-label span {
  color: var(--gold-light);
}

.chapter-label i {
  display: block;
  width: 74px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.lab-hero h1,
.tool-intro h1 {
  margin: 0;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: clamp(58px, 7.4vw, 116px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.lab-hero h1 span,
.tool-intro h1 span {
  color: var(--gold-light);
}

.lab-hero-copy > p:last-child,
.tool-intro > p {
  max-width: 690px;
  margin: 38px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1.7;
}

.lab-status {
  position: absolute;
  right: var(--page-pad);
  bottom: 90px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c9c4ba;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 15px var(--gold);
}

.projects {
  padding: 112px var(--page-pad) 130px;
}

.lab-projects {
  min-height: calc(100vh - 155px);
  padding-top: 178px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) 1.15fr;
  gap: 54px;
  align-items: end;
  margin-bottom: 58px;
}

.section-heading .chapter-label {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(44px, 5vw, 78px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.section-heading > p:last-child {
  max-width: 620px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

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

.project-card {
  position: relative;
  display: flex;
  min-height: 350px;
  flex-direction: column;
  overflow: hidden;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 16, 14, 0.72);
  isolation: isolate;
}

.project-card-active {
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.project-card-active:hover {
  border-color: rgba(242, 202, 118, 0.58);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3), inset 0 0 45px rgba(229, 170, 67, 0.035);
  transform: translateY(-4px);
}

.project-card-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #b7b2a9;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.13em;
}

.project-state {
  color: var(--gold-light);
}

.project-card-copy {
  position: relative;
  z-index: 2;
  margin-top: 76px;
}

.project-card h3 {
  margin: 0 0 17px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(25px, 2vw, 34px);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.project-card-copy p {
  margin: 0;
  color: #a9a59d;
  font-size: 15px;
  line-height: 1.7;
}

.project-link {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 34px;
  padding-top: 19px;
  border-top: 1px solid var(--white-line);
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
}

.project-link b {
  font-size: 20px;
  font-weight: 400;
}

.project-card-muted {
  color: rgba(244, 240, 233, 0.7);
}

/* Message launcher */

.tool-page {
  min-height: 100vh;
}

.tool-main {
  min-height: calc(100vh - 92px);
  padding: 132px var(--page-pad) 54px;
}

.tool-shell {
  position: relative;
  display: grid;
  min-height: 670px;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 0.72fr);
  gap: clamp(48px, 7vw, 120px);
  align-items: center;
  overflow: hidden;
  padding: clamp(42px, 6vw, 88px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(10, 11, 10, 0.8);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.34);
  isolation: isolate;
}

.tool-shell::after {
  position: absolute;
  z-index: -4;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 78% 30%, rgba(229, 170, 67, 0.12), transparent 25rem),
    linear-gradient(115deg, rgba(255, 255, 255, 0.02), transparent 45%);
}

.tool-backdrop {
  position: absolute;
  z-index: -2;
  inset: 0;
  overflow: hidden;
}

.tool-ring {
  position: absolute;
  border: 1px solid rgba(229, 170, 67, 0.12);
  border-radius: 50%;
}

.tool-ring-one {
  width: 620px;
  height: 620px;
  top: -190px;
  right: -180px;
}

.tool-ring-two {
  width: 430px;
  height: 430px;
  top: -90px;
  right: -80px;
}

.tool-line {
  position: absolute;
  right: -12%;
  width: 58%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(229, 170, 67, 0.3), transparent);
  transform: rotate(-18deg);
}

.tool-line-one {
  top: 34%;
}

.tool-line-two {
  top: 42%;
  opacity: 0.45;
}

.tool-intro {
  position: relative;
  z-index: 2;
}

.back-link {
  display: inline-flex;
  margin-bottom: 58px;
  color: #aaa69e;
  font-size: 13px;
  font-weight: 700;
}

.back-link:hover {
  color: var(--gold-light);
}

.tool-intro .chapter-label {
  margin-bottom: 30px;
}

.tool-intro h1 {
  font-size: clamp(58px, 6vw, 96px);
}

.tool-intro > p {
  max-width: 610px;
  font-size: 17px;
}

.privacy-note {
  display: flex;
  max-width: 520px;
  align-items: flex-start;
  gap: 13px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--white-line);
  color: #8e8b84;
  font-size: 12px;
  line-height: 1.65;
}

.privacy-note p {
  margin: 0;
}

.privacy-mark {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #0a0b0a;
  background: var(--gold);
}

.message-panel {
  position: relative;
  z-index: 3;
  padding: clamp(28px, 3.5vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(16, 17, 15, 0.88);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
  color: #d2cec6;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.17em;
}

.panel-status {
  color: #8f8b83;
}

.panel-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(229, 170, 67, 0.7);
}

.field-label {
  display: block;
  margin: 23px 0 9px;
  color: #d5d1c9;
  font-size: 12px;
  font-weight: 700;
}

.select-wrap,
.phone-field {
  position: relative;
  display: flex;
  min-height: 62px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.select-wrap:focus-within,
.phone-field:focus-within {
  border-color: rgba(229, 170, 67, 0.65);
  box-shadow: 0 0 0 3px rgba(229, 170, 67, 0.08);
}

.select-wrap select,
.phone-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
}

.select-wrap select {
  height: 60px;
  padding: 0 48px 0 17px;
  appearance: none;
}

.select-arrow {
  position: absolute;
  right: 18px;
  color: var(--gold-light);
  pointer-events: none;
}

.phone-field > span {
  flex: 0 0 auto;
  padding: 0 15px 0 17px;
  border-right: 1px solid var(--white-line);
  color: var(--gold-light);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}

.phone-field input {
  height: 60px;
  padding: 0 17px;
}

.phone-field input::placeholder {
  color: #5f5d58;
}

.field-help {
  display: block;
  margin-top: 8px;
  color: #74716b;
  font-size: 11px;
  line-height: 1.5;
}

.number-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
  padding: 16px 0;
  border-top: 1px solid var(--white-line);
  border-bottom: 1px solid var(--white-line);
}

.number-preview > span {
  color: #77746e;
  font-family: "Space Grotesk", sans-serif;
  font-size: 9px;
  letter-spacing: 0.15em;
}

#preview-number {
  padding: 0;
  border: 0;
  color: var(--gold-light);
  background: transparent;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

#preview-number:disabled {
  color: #6e6b65;
  cursor: default;
}

.phone-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: #8d8982;
  font-size: 11px;
}

.phone-status.is-error {
  color: #e2a990;
}

.phone-status.is-valid {
  color: #bdb68c;
}

.tool-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 26px;
}

.tool-action {
  display: flex;
  min-width: 0;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid rgba(229, 170, 67, 0.38);
  border-radius: 11px;
  color: var(--gold-light);
  background: rgba(229, 170, 67, 0.035);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.tool-action:hover:not(.is-disabled):not(:disabled) {
  border-color: var(--gold-light);
  color: #090a09;
  background: var(--gold-light);
}

.tool-action b {
  font-size: 17px;
  font-weight: 400;
}

.tool-action.is-disabled,
.tool-action:disabled {
  border-color: rgba(255, 255, 255, 0.09);
  color: #65635e;
  background: rgba(255, 255, 255, 0.018);
  cursor: not-allowed;
}

.telegram-note {
  margin: 18px 0 0;
  color: #6f6c66;
  font-size: 10px;
  line-height: 1.5;
}

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

  .project-card:first-child {
    grid-column: 1 / -1;
  }

  .tool-shell {
    grid-template-columns: 1fr;
  }

  .tool-intro {
    max-width: 780px;
  }
}

@media (max-width: 720px) {
  :root {
    --page-pad: 18px;
  }

  .lab-hero {
    min-height: 690px;
    padding-top: 150px;
    padding-bottom: 68px;
  }

  .lab-hero h1,
  .tool-intro h1 {
    font-size: clamp(50px, 15vw, 68px);
    line-height: 0.96;
  }

  .tool-intro h1 {
    font-size: clamp(45px, 12.4vw, 54px);
  }

  .chapter-label {
    gap: 13px;
    margin-bottom: 25px;
    font-size: 11px;
    letter-spacing: 0.17em;
  }

  .chapter-label i {
    width: 38px;
  }

  .lab-hero-copy > p:last-child {
    margin-top: 28px;
    font-size: 15px;
  }

  .lab-status {
    right: auto;
    bottom: 24px;
    left: var(--page-pad);
  }

  .lab-orbit-one {
    width: 430px;
    height: 240px;
    right: -230px;
    bottom: 132px;
  }

  .lab-orbit-two {
    width: 340px;
    height: 180px;
    right: -180px;
    bottom: 158px;
  }

  .projects {
    padding-top: 78px;
    padding-bottom: 84px;
  }

  .lab-projects {
    min-height: calc(100vh - 145px);
    padding-top: 132px;
  }

  .section-heading {
    display: block;
    margin-bottom: 38px;
  }

  .section-heading .chapter-label {
    margin-bottom: 25px;
  }

  .section-heading h1,
  .section-heading h2 {
    font-size: 48px;
  }

  .section-heading > p:last-child {
    margin-top: 20px;
    font-size: 15px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card:first-child {
    grid-column: auto;
  }

  .project-card {
    min-height: 310px;
    padding: 22px;
  }

  .project-card-top {
    font-size: 9px;
  }

  .tool-main {
    padding-top: 100px;
    padding-bottom: 24px;
  }

  .tool-shell {
    min-height: 0;
    gap: 42px;
    padding: 30px 20px 20px;
    border-radius: 21px;
  }

  .back-link {
    margin-bottom: 40px;
  }

  .tool-intro > p {
    margin-top: 26px;
    font-size: 15px;
  }

  .privacy-note {
    margin-top: 27px;
  }

  .message-panel {
    padding: 25px 18px;
    border-radius: 17px;
  }

  .tool-actions {
    grid-template-columns: 1fr;
  }

  .tool-action {
    min-height: 52px;
  }

  .number-preview {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .tool-ring-one {
    right: -420px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
