:root {
  --brand-purple: #6a3df6;
  --brand-violet: #8b5cff;
  --brand-blue: #3d7bff;
  --brand-cyan: #00b2ff;
  --ink: #06143d;
  --text: #162449;
  --muted: #65738f;
  --soft: #f7f9ff;
  --line: #dfe6fb;
  --white: #ffffff;
  --gradient: linear-gradient(135deg, #6a3df6 0%, #3d7bff 55%, #00b2ff 100%);
  --shadow: 0 24px 70px rgba(26, 45, 102, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background-color: #f4f8ff;
  background-image:
    linear-gradient(rgba(61, 123, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 178, 255, 0.052) 1px, transparent 1px),
    radial-gradient(circle at 18px 18px, rgba(106, 61, 246, 0.095) 0 1.4px, transparent 1.8px),
    linear-gradient(135deg, rgba(106, 61, 246, 0.095) 0%, rgba(61, 123, 255, 0.045) 34%, rgba(0, 178, 255, 0.075) 100%),
    linear-gradient(180deg, #f1f6ff 0%, #f8fbff 52%, #edf5ff 100%);
  background-size: 36px 36px, 36px 36px, 72px 72px, auto, auto;
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

.site-header,
.hero,
.section,
.studio,
.setup,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  width: clamp(210px, 19vw, 260px);
}

.brand img {
  aspect-ratio: 1405 / 389;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.site-nav a,
.site-nav button,
.nav-dropdown summary {
  border: 0;
  border-radius: 999px;
  color: inherit;
  cursor: pointer;
  font: inherit;
  list-style: none;
  padding: 10px 13px;
  background: transparent;
  transition: background 180ms ease, color 180ms ease;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav button:hover,
.site-nav button:focus-visible,
.nav-dropdown summary:hover,
.nav-dropdown summary:focus-visible {
  color: var(--ink);
  background: rgba(106, 61, 246, 0.08);
  outline: none;
}

.nav-dropdown {
  position: relative;
}

.project-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  width: 260px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-dropdown:hover .project-menu,
.nav-dropdown:focus-within .project-menu,
.nav-dropdown[open] .project-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.project-menu a {
  display: grid;
  gap: 4px;
  border-radius: 6px;
  padding: 13px 14px;
}

.project-menu strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.project-menu span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.hero {
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: center;
  gap: clamp(36px, 7vw, 92px);
  padding: 52px 0 86px;
}

.hero-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(4rem, 10vw, 8.8rem);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 650px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 1.8vw, 1.35rem);
  line-height: 1.6;
}

.now-building {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(61, 123, 255, 0.16);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(26, 45, 102, 0.06);
}

.hero-copy .now-building {
  margin-top: 18px;
  color: #41506f;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button-primary {
  color: var(--white);
  background: var(--gradient);
  box-shadow: 0 18px 36px rgba(61, 123, 255, 0.24);
}

.button-secondary {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.hub-card {
  border: 1px solid rgba(106, 61, 246, 0.15);
  border-radius: 8px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.hub-card img {
  width: min(100%, 300px);
  display: block;
  margin: 0 auto 32px;
}

.hub-card span,
.project-kind {
  color: var(--brand-purple);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hub-card strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.hub-card p {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.poster-card {
  display: block;
  padding: 10px;
  overflow: hidden;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.poster-rotator {
  aspect-ratio: 1074 / 1465;
  position: relative;
  width: 100%;
}

.poster-rotator .poster-card {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translateY(8px) scale(0.985);
  transition: opacity 480ms ease, transform 480ms ease, box-shadow 180ms ease;
}

.poster-rotator .poster-card.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  z-index: 1;
}

.poster-card:hover,
.poster-card:focus-visible {
  box-shadow: 0 28px 80px rgba(26, 45, 102, 0.16);
  outline: none;
  transform: translateY(-3px);
}

.poster-rotator .poster-card.is-active:hover,
.poster-rotator .poster-card.is-active:focus-visible {
  transform: translateY(-3px) scale(1);
}

.poster-card img {
  aspect-ratio: 1074 / 1465;
  border-radius: 6px;
  display: block;
  height: auto;
  margin: 0;
  object-fit: cover;
  width: 100%;
}

.poster-card.poster-contain img {
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 8%, rgba(139, 92, 255, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.9));
}

.section {
  padding: 24px 0 92px;
}

.section-heading {
  max-width: 730px;
}

.section-rule {
  display: block;
  width: 76px;
  height: 5px;
  border-radius: 999px;
  background: var(--gradient);
}

h2 {
  margin: 18px 0 0;
  color: var(--ink);
  font-size: clamp(2.15rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-heading p,
.studio-copy p,
.setup p,
.project-card p {
  color: var(--muted);
  line-height: 1.62;
}

.section-heading p {
  margin: 18px 0 0;
  font-size: 1.08rem;
}

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

.project-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(61, 123, 255, 0.14);
  border-radius: 8px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(26, 45, 102, 0.08);
}

.accent-card {
  color: var(--white);
  border: 0;
  background: var(--gradient);
  box-shadow: 0 24px 70px rgba(61, 123, 255, 0.24);
}

.accent-card .project-kind,
.accent-card p,
.accent-card .project-links span {
  color: rgba(255, 255, 255, 0.82);
}

.project-card h3 {
  margin: 16px 0 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1;
}

.accent-card h3,
.accent-card .project-links a {
  color: var(--white);
}

.project-card p {
  margin: 18px 0 30px;
}

.project-links {
  display: grid;
  gap: 8px;
}

.project-links a {
  width: fit-content;
  color: var(--ink);
  font-weight: 800;
  border-bottom: 2px solid rgba(106, 61, 246, 0.36);
  padding-bottom: 5px;
}

.accent-card .project-links a {
  border-color: rgba(255, 255, 255, 0.58);
}

.project-links span {
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.soft-card {
  background: rgba(246, 248, 255, 0.82);
}

.studio {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: clamp(28px, 6vw, 86px);
  border-top: 1px solid var(--line);
  padding: 92px 0 70px;
}

.studio-copy {
  font-size: 1.12rem;
}

.studio-copy p {
  margin: 0;
}

.studio-copy p + p {
  margin-top: 24px;
}

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

.setup article {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.setup strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.setup span {
  display: block;
  margin-top: 8px;
  color: var(--brand-purple);
  font-size: 0.92rem;
  font-weight: 800;
}

.setup p {
  margin: 10px 0 0;
}

.site-footer {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer strong {
  color: var(--ink);
}

.site-footer span {
  margin-top: 4px;
}

.site-footer a {
  color: var(--brand-purple);
  font-weight: 800;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(106, 61, 246, 0.18);
  border-radius: 999px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(26, 45, 102, 0.06);
  color: var(--ink);
  font-size: 0.9rem;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.footer-button:hover,
.footer-button:focus-visible {
  background: var(--white);
  box-shadow: 0 16px 34px rgba(26, 45, 102, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.footer-icon-button {
  width: 38px;
  padding: 0;
}

.footer-icon-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.not-found-page {
  min-height: 100vh;
}

.not-found {
  width: min(1120px, calc(100% - 40px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 52px 0 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: clamp(36px, 7vw, 92px);
}

.not-found-copy {
  min-width: 0;
}

.error-code {
  width: fit-content;
  margin: 0 0 22px;
  border: 1px solid rgba(61, 123, 255, 0.16);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(26, 45, 102, 0.06);
  color: var(--brand-purple);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.not-found h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(4rem, 10vw, 8.5rem);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: 0;
}

.not-found-copy > p:not(.error-code) {
  max-width: 650px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 1.8vw, 1.35rem);
  line-height: 1.6;
}

.signal-panel {
  min-width: 0;
}

.signal-display {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(61, 123, 255, 0.16);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 32px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(145deg, rgba(6, 20, 61, 0.96), rgba(20, 42, 96, 0.94));
  background-size: 18px 18px, 18px 18px, auto;
  box-shadow: var(--shadow);
  color: var(--white);
}

.signal-display::before {
  content: "";
  position: absolute;
  inset: -35% -20% auto;
  height: 62%;
  background: radial-gradient(circle, rgba(0, 178, 255, 0.24), transparent 58%);
  pointer-events: none;
}

.signal-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  font-weight: 800;
}

.signal-header strong {
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #9ee8ff;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.signal-bars {
  position: relative;
  z-index: 1;
  height: 160px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 12px;
  margin-bottom: 34px;
}

.signal-bars span {
  width: 16px;
  min-height: 30px;
  border-radius: 999px 999px 4px 4px;
  background: var(--gradient);
  opacity: 0.9;
  box-shadow: 0 0 26px rgba(0, 178, 255, 0.18);
}

.signal-bars span:nth-child(1) { height: 42px; opacity: 0.45; }
.signal-bars span:nth-child(2) { height: 74px; opacity: 0.58; }
.signal-bars span:nth-child(3) { height: 112px; }
.signal-bars span:nth-child(4) { height: 64px; opacity: 0.68; }
.signal-bars span:nth-child(5) { height: 138px; background: linear-gradient(180deg, #ff4e9a, #6a3df6); }
.signal-bars span:nth-child(6) { height: 92px; }
.signal-bars span:nth-child(7) { height: 126px; opacity: 0.82; }
.signal-bars span:nth-child(8) { height: 70px; opacity: 0.64; }
.signal-bars span:nth-child(9) { height: 48px; opacity: 0.48; }

.scanner-log {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scanner-log li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}

.scanner-log strong {
  color: var(--white);
}

.contact-modal {
  width: min(560px, calc(100% - 32px));
  max-height: min(760px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  background: transparent;
}

.contact-modal::backdrop {
  background: rgba(6, 20, 61, 0.42);
  backdrop-filter: blur(10px);
}

.contact-panel {
  border: 1px solid rgba(106, 61, 246, 0.16);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 34px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96)),
    var(--white);
  box-shadow: 0 34px 90px rgba(6, 20, 61, 0.24);
}

.contact-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.contact-heading span,
.contact-form label span {
  color: var(--brand-purple);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-heading h2 {
  max-width: 390px;
  margin: 8px 0 0;
  font-size: clamp(1.9rem, 6vw, 2.85rem);
  line-height: 1;
}

.modal-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(106, 61, 246, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  position: relative;
  transition: background 180ms ease, transform 180ms ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: var(--white);
  outline: none;
  transform: translateY(-1px);
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 19px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.modal-close::before {
  transform: rotate(45deg);
}

.modal-close::after {
  transform: rotate(-45deg);
}

.contact-form {
  display: grid;
  gap: 15px;
  margin-top: 26px;
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  line-height: 1.35;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.contact-form textarea {
  min-height: 132px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(61, 123, 255, 0.68);
  box-shadow: 0 0 0 4px rgba(61, 123, 255, 0.12);
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.contact-actions p {
  max-width: 230px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.contact-actions .button {
  border: 0;
  cursor: pointer;
}

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

.subdomain-hero {
  width: min(960px, calc(100% - 40px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: 28px;
  padding: 64px 0 90px;
}

.subdomain-mark {
  width: 132px;
}

.subdomain-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3.4rem, 10vw, 7.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.subdomain-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.6;
}

.subdomain-note {
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.86);
}

.fun-page {
  background:
    linear-gradient(135deg, rgba(106, 61, 246, 0.1), rgba(0, 178, 255, 0.1)),
    var(--white);
}

.focus-page {
  background:
    linear-gradient(180deg, rgba(246, 248, 255, 0.96), rgba(255, 255, 255, 0) 500px),
    var(--white);
}

@media (max-width: 900px) {
  .hero,
  .not-found,
  .studio,
  .project-grid,
  .setup {
    grid-template-columns: 1fr;
  }

  .hero,
  .not-found {
    min-height: auto;
  }

  .hub-card {
    max-width: 520px;
  }

  .poster-rotator {
    max-width: 520px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .hero,
  .not-found,
  .section,
  .studio,
  .setup,
  .site-footer,
  .subdomain-hero {
    width: calc(100% - 28px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.9rem 0 0;
  }

  .brand {
    flex-basis: auto;
    width: 210px;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 14px;
  }

  .site-nav a,
  .site-nav button,
  .nav-dropdown summary {
    padding: 8px 4px;
  }

  .project-menu {
    left: 0;
    right: auto;
    width: min(260px, calc(100vw - 28px));
  }

  .hero-copy h1 {
    font-size: clamp(3.4rem, 21vw, 5.2rem);
  }

  .not-found h1 {
    font-size: clamp(3.4rem, 21vw, 5.2rem);
  }

  .hero-copy,
  .not-found-copy,
  .hero-actions,
  .hub-card,
  .hub-card div,
  .project-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .hero-copy p,
  .not-found-copy > p:not(.error-code),
  .hub-card p,
  .subdomain-hero p {
    max-width: 22rem;
    font-size: 1rem;
    overflow-wrap: break-word;
  }

  .hub-card strong {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .button {
    width: 100%;
  }

  .hub-card,
  .project-card {
    padding: 24px;
  }

  .signal-bars {
    height: 128px;
    gap: 8px;
  }

  .signal-bars span {
    width: 12px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 28px 0;
  }

  .contact-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-actions p {
    max-width: none;
  }
}
