/* Shared project-page template for Regstar2.github.io */

.project-page {
  --project-accent: var(--accent);
  --project-highlight: var(--code);
}

.project-shell {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.project-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.project-nav a {
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.project-nav a:hover {
  color: var(--text);
}

.project-nav-github {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-strong) !important;
}

.project-nav-github:hover {
  border-color: var(--border-hover);
  background: var(--surface);
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
  gap: clamp(48px, 7vw, 104px);
  align-items: center;
  min-height: 720px;
  padding-block: 68px 82px;
}

.project-hero-copy {
  position: relative;
  z-index: 2;
}

.project-breadcrumb {
  display: inline-flex;
  margin-bottom: 34px;
  color: #777b99;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
  transition: color 160ms ease;
}

.project-breadcrumb:hover {
  color: var(--code);
}

.project-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.project-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 15px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
}

.project-status {
  padding: 6px 10px;
  border: 1px solid rgba(125, 255, 179, 0.17);
  border-radius: 999px;
  background: var(--code-soft);
  color: var(--code);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.project-hero .code-label {
  margin-bottom: 15px;
}

.project-hero h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(4.1rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.067em;
  line-height: 0.83;
}

.project-lead {
  max-width: 670px;
  margin: 34px 0 0;
  color: var(--muted-strong);
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.project-summary {
  max-width: 640px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.project-download::before {
  content: "↓";
  margin-right: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.hero-tags {
  margin-top: 22px;
}

.phone-stage {
  position: relative;
  min-height: 610px;
  perspective: 1400px;
}

.phone {
  position: absolute;
  overflow: hidden;
  border: 1px solid #333851;
  border-radius: 34px;
  background: #10111b;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.phone::after,
.screenshot-phone::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 6px rgba(8, 9, 15, 0.62);
  pointer-events: none;
}

.phone img,
.screenshot-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-main {
  z-index: 3;
  top: 7px;
  left: 50%;
  width: 294px;
  height: 588px;
  transform: translateX(-50%) rotateY(-5deg) rotateZ(1deg);
}

.phone-back {
  z-index: 1;
  top: 74px;
  width: 235px;
  height: 470px;
  opacity: 0.77;
  filter: saturate(0.82) brightness(0.82);
}

.phone-left {
  left: 0;
  transform: rotateY(18deg) rotateZ(-6deg);
}

.phone-right {
  right: 0;
  transform: rotateY(-18deg) rotateZ(6deg);
}

.stage-orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(125, 255, 179, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  inset: 84px -36px 64px;
  transform: rotate(-8deg);
}

.orbit-two {
  inset: 130px -72px 110px;
  border-color: rgba(154, 122, 209, 0.15);
  transform: rotate(12deg);
}

.project-facts {
  border-block: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(17, 19, 34, 0.46);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.facts-grid > div {
  min-height: 114px;
  padding: 27px 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
}

.facts-grid > div:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.055);
}

.facts-grid span {
  display: block;
  margin-bottom: 7px;
  color: #747893;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.facts-grid strong {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.project-section {
  padding-block: 112px;
}

.project-section + .project-section {
  padding-top: 34px;
}

.project-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
  gap: 60px;
  align-items: end;
  margin-bottom: 42px;
}

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

.project-section-heading h2,
.tech-panel h2,
.privacy-panel h2,
.project-cta h2 {
  margin: 0;
  font-size: clamp(2.45rem, 5.5vw, 4.25rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.project-section-heading > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

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

.feature-card {
  position: relative;
  min-height: 315px;
  padding: 27px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(23, 26, 48, 0.88), rgba(13, 15, 28, 0.9));
  transition: transform 180ms ease, border-color 180ms ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.feature-card-wide {
  grid-column: span 1;
  background:
    radial-gradient(circle at 92% 10%, rgba(92, 58, 158, 0.23), transparent 38%),
    linear-gradient(145deg, rgba(23, 26, 48, 0.94), rgba(13, 15, 28, 0.94));
}

.feature-index {
  position: absolute;
  top: 25px;
  right: 26px;
  color: #5e627f;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 42px;
  border: 1px solid rgba(125, 255, 179, 0.13);
  border-radius: 12px;
  background: rgba(125, 255, 179, 0.06);
  color: var(--code);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 600;
}

.feature-card h3 {
  margin: 74px 0 11px;
  max-width: 380px;
  font-size: 1.4rem;
  letter-spacing: -0.032em;
}

.feature-card p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1.12fr auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(13, 15, 28, 0.72);
}

.pipeline-node {
  min-height: 150px;
  padding: 24px;
  border: 1px solid #282d4c;
  border-radius: 18px;
  background: #121525;
}

.pipeline-node span {
  display: block;
  margin-bottom: 30px;
  color: #626783;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
}

.pipeline-node strong {
  display: block;
  font-size: 1.15rem;
}

.pipeline-node small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.pipeline-primary {
  border-color: rgba(154, 122, 209, 0.35);
  background: rgba(92, 58, 158, 0.14);
}

.pipeline-result {
  border-color: rgba(125, 255, 179, 0.24);
  background: rgba(125, 255, 179, 0.055);
}

.pipeline-split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.pipeline-arrow {
  color: #6f738f;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.35rem;
}

.project-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 0;
  padding: 17px 19px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
  color: #8589a7;
  font-size: 0.86rem;
  line-height: 1.55;
}

.project-note span {
  flex: 0 0 auto;
  color: #efc15d;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.screenshots-section {
  width: 100%;
  max-width: none;
  overflow: visible;
  padding-bottom: 122px;
}

.screenshot-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: min(calc(100% - 48px), var(--max-width));
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 8px 0 26px;
  overflow: visible;
}

.screenshot-card,
.screenshot-featured {
  width: auto;
  min-width: 0;
  margin: 0;
}

.screenshot-phone {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 2;
  overflow: hidden;
  border: 1px solid #2d324d;
  border-radius: 30px;
  background: #10111b;
  box-shadow: 0 23px 55px rgba(0, 0, 0, 0.28);
}

.screenshot-featured .screenshot-phone {
  height: auto;
}

.screenshot-card figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}

.screenshot-card figcaption span {
  color: #686c88;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
}

.screenshot-card figcaption strong {
  font-size: 0.92rem;
}

.project-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tech-panel,
.privacy-panel {
  min-height: 520px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(23, 26, 48, 0.9), rgba(13, 15, 28, 0.94));
}

.tech-panel h2,
.privacy-panel h2 {
  font-size: clamp(2.35rem, 4vw, 3.5rem);
}

.tech-list {
  margin-top: 54px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tech-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tech-list strong {
  font-size: 0.95rem;
}

.tech-list span {
  color: #777b98;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
}

.privacy-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 5%, rgba(125, 255, 179, 0.12), transparent 40%),
    linear-gradient(145deg, rgba(20, 27, 39, 0.92), rgba(13, 15, 28, 0.95));
}

.privacy-badge {
  display: inline-block;
  margin: 32px 0 23px;
  padding: 7px 10px;
  border: 1px solid rgba(125, 255, 179, 0.18);
  border-radius: 999px;
  background: var(--code-soft);
  color: var(--code);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.privacy-panel p:not(.code-label) {
  max-width: 500px;
  margin: 25px 0 34px;
  color: var(--muted);
  line-height: 1.7;
}

.privacy-panel > a {
  color: var(--muted-strong);
  font-size: 0.9rem;
}

.privacy-panel > a:hover {
  color: var(--code);
}

.project-cta {
  position: relative;
  margin-block: 20px 112px;
  padding: 88px 36px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 10%, rgba(92, 58, 158, 0.3), transparent 37%),
    linear-gradient(145deg, #171a30, #0d0f1c);
  text-align: center;
}

.project-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black, transparent 73%);
  pointer-events: none;
}

.project-cta > * {
  position: relative;
  z-index: 1;
}

.project-cta > img {
  width: 76px;
  height: 76px;
  margin: 0 auto 24px;
  object-fit: contain;
  border-radius: 19px;
}

.project-cta h2 {
  max-width: 760px;
  margin-inline: auto;
}

.project-cta > p:not(.code-label) {
  margin: 20px 0 0;
  color: var(--muted);
}

.project-actions-center {
  justify-content: center;
}

.project-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 112px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #737793;
  font-size: 0.82rem;
}

.project-footer-contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  justify-self: end;
}

.project-footer a:hover {
  color: var(--muted-strong);
}

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

  .project-hero-copy {
    max-width: 780px;
  }

  .phone-stage {
    width: min(100%, 650px);
    margin-inline: auto;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card-wide {
    grid-column: span 1;
  }

  .screenshot-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .pipeline-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }
}

@media (max-width: 760px) {
  .project-shell {
    width: min(calc(100% - 30px), var(--max-width));
  }

  .project-header {
    min-height: 72px;
  }

  .project-nav {
    gap: 8px;
  }

  .project-nav > a:not(.project-nav-github) {
    display: none;
  }

  .project-nav-github {
    padding: 8px 12px;
  }

  .project-hero {
    gap: 20px;
    min-height: 0;
    padding-block: 48px 58px;
  }

  .project-breadcrumb {
    margin-bottom: 28px;
  }

  .project-identity {
    margin-bottom: 22px;
  }

  .project-logo {
    width: 50px;
    height: 50px;
  }

  .project-hero h1 {
    font-size: clamp(3.6rem, 19vw, 5.4rem);
  }

  .project-lead {
    margin-top: 27px;
    font-size: 1.25rem;
  }

  .project-summary {
    font-size: 0.94rem;
  }

  .phone-stage {
    min-height: 500px;
    transform: scale(0.87);
    transform-origin: top center;
    margin-bottom: -70px;
  }

  .facts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .facts-grid > div,
  .facts-grid > div:first-child {
    min-height: 98px;
    border-left: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.055);
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  }

  .project-section {
    padding-block: 78px;
  }

  .project-section + .project-section {
    padding-top: 20px;
  }

  .project-section-heading {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
  }

  .feature-grid,
  .project-two-column {
    grid-template-columns: 1fr;
  }

  .feature-card-wide {
    grid-column: span 1;
  }

  .feature-card {
    min-height: 275px;
  }

  .feature-card h3 {
    margin-top: 56px;
  }

  .pipeline {
    padding: 15px;
  }

  .pipeline-split {
    grid-template-columns: 1fr;
  }

  .screenshot-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(calc(100% - 30px), var(--max-width));
    padding: 8px 0 20px;
  }

  .screenshot-card,
  .screenshot-featured {
    width: auto;
  }

  .screenshot-phone,
  .screenshot-featured .screenshot-phone {
    height: auto;
  }

  .tech-panel,
  .privacy-panel {
    min-height: 0;
    padding: 28px 24px;
  }

  .project-cta {
    width: min(calc(100% - 30px), var(--max-width));
    margin-bottom: 78px;
    padding: 64px 22px;
  }

  .project-footer {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-block: 30px;
  }

  .project-footer-contacts {
    align-items: flex-start;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .screenshot-rail {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  .phone-stage {
    min-height: 420px;
    transform: scale(0.72);
    margin: 0 -14% -122px;
    width: 128%;
  }

  .phone-left {
    left: 4%;
  }

  .phone-right {
    right: 4%;
  }

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

  .facts-grid > div {
    padding: 21px 17px;
  }

  .project-actions .button {
    width: 100%;
  }
}
