@charset "utf-8";

@media screen and (max-width: 768px) {
  body {
    min-width: 0;
    background:
      radial-gradient(circle at 50% 20%, rgba(249, 216, 74, 0.18), transparent 34%),
      radial-gradient(circle at 50% 80%, rgba(0, 213, 255, 0.22), transparent 38%),
      linear-gradient(160deg, #060711 0%, #121a2f 55%, #060711 100%);
  }

  .section {
    padding: 0;
  }

  .section.about {
    padding: 64px 0;
  }

  .inner,
  .site-header__inner,
  .footer__inner {
    width: calc(100% - 40px);
  }

  .section__ttl {
    margin-bottom: 22px;
    font-size: 28px;
  }

  .site-header {
    height: 64px;
  }

  body.is-menu-open {
    overflow: hidden;
  }

  .top.is-menu-open .site-header {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hero-switch {
    top: 14px;
    right: 14px;
    gap: 4px;
    padding: 5px;
  }

  .hero-switch__button {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .hero-switch__button--pause {
    margin-left: 5px;
  }

  .site-header__logo {
    position: relative;
    z-index: 61;
    gap: 6px;
    font-size: 11px;
    font-weight: 300;
  }

  .site-header__menu {
    position: relative;
    z-index: 61;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
  }

  .site-header__menu-line {
    display: block;
    width: 18px;
    height: 1px;
    background: var(--color-text);
    transform-origin: center;
    transition: transform 0.22s ease, opacity 0.18s ease, background 0.22s ease;
  }

  .is-menu-open .site-header__menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .is-menu-open .site-header__menu-line:nth-child(2) {
    opacity: 0;
  }

  .is-menu-open .site-header__menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .global-nav {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 96px 24px 34px;
    box-sizing: border-box;
    background:
      radial-gradient(circle at 18% 12%, rgba(0, 213, 255, 0.18), transparent 34%),
      radial-gradient(circle at 86% 78%, rgba(255, 61, 139, 0.16), transparent 36%),
      rgba(3, 4, 10, 0.98);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    backdrop-filter: blur(24px) saturate(1.25);
    -webkit-backdrop-filter: blur(24px) saturate(1.25);
    transition: opacity 0.24s ease, visibility 0.24s ease, transform 0.24s ease;
  }

  .is-menu-open .global-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .global-nav__list {
    display: grid;
    gap: 8px;
    width: min(340px, 100%);
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 14px;
    background: rgba(247, 251, 255, 0.94);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  }

  .global-nav__link {
    padding: 18px 18px;
    border: 1px solid rgba(5, 6, 11, 0.1);
    border-radius: 9px;
    background: rgba(5, 6, 11, 0.04);
    box-shadow: none;
    color: #05060b;
    font-size: 18px;
    font-weight: 400;
    text-align: left;
  }

  .global-nav__link:hover {
    background: rgba(5, 6, 11, 0.08);
    color: #05060b;
  }

  .global-nav__link--active {
    border-color: rgba(5, 6, 11, 0.92);
    background:
      linear-gradient(135deg, rgba(5, 6, 11, 0.98), rgba(23, 27, 39, 0.98));
    color: #fff;
  }

  .hero {
    min-height: calc(100svh - 64px);
  }

  .top .hero {
    min-height: 100svh;
  }

  .box {
    height: calc(100svh - 64px);
  }

  .top .box {
    height: 100svh;
  }

  .stage {
    min-height: calc(100svh - 64px);
  }

  .top .stage {
    min-height: 100svh;
  }

  .stage::before {
    background-size: 38px 38px;
    transform: perspective(420px) rotateX(64deg) translateY(34%);
  }

  .aura {
    width: 84vw;
  }

  .hello {
    max-width: 100%;
    font-size: clamp(42px, calc(var(--hello-size) * 0.5), 72px);
    line-height: 1.05;
    overflow-wrap: anywhere;
    text-shadow:
      0 0 10px color-mix(in srgb, var(--hello-color) 76%, transparent),
      0 0 28px color-mix(in srgb, var(--hello-glow) 64%, transparent),
      0 12px 24px rgba(0, 0, 0, 0.42);
  }

  .hero__lead {
    bottom: 54px;
    width: calc(100% - 48px);
    font-size: 14px;
  }

  .top_head h1 {
    width: min(400px, calc(100% - 32px));
    height: 50px;
    background-size: 400px 50px;
  }

  .legacy-type {
    width: 210px;
  }

  .top_head a.link {
    padding: 18px 24px;
    font-size: 13px;
  }

  .terminal-boot {
    min-height: 100svh;
    padding: 80px 14px 28px;
    gap: 20px;
  }

  .terminal-boot__logo {
    width: min(520px, 92vw);
    max-height: 210px;
  }

  .terminal-boot__frame {
    width: 100%;
  }

  .terminal-boot__head {
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 46px;
    padding: 9px 12px;
    font-size: 10px;
  }

  .terminal-boot__head span:last-child {
    text-align: left;
  }

  .terminal-boot__body {
    padding: 16px 14px 18px;
    font-size: 11px;
    overflow-x: auto;
  }

  .terminal-boot__log {
    width: 100%;
    margin-top: 18px;
  }

  .terminal-boot__grid {
    grid-template-columns: 1fr;
  }

  .terminal-boot__grid div,
  .terminal-boot__grid div:last-child {
    min-height: 48px;
    border-right: 0;
    border-bottom: 1px solid #ffb908;
  }

  .terminal-boot__grid div:last-child {
    border-bottom: 0;
  }

  .terminal-boot__queue p {
    grid-template-columns: 36px minmax(160px, 1fr) 74px;
    min-height: 32px;
  }

  .terminal-boot__queue span {
    padding-left: 10px;
  }

  .terminal-boot__queue i {
    padding-right: 10px;
    font-size: 9px;
  }

  .desktop-chaos {
    min-height: 100svh;
  }

  .desktop-chaos__bar {
    top: 18px;
    width: calc(100% - 36px);
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .desktop-chaos__canvas {
    width: calc(100% - 28px);
    min-height: 100svh;
    padding: 72px 0 92px;
    box-sizing: border-box;
  }

  .desktop-chaos__brand {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin: 0 auto 34px;
    transform: none;
  }

  .desktop-chaos__brand p,
  .desktop-chaos__brand small {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .desktop-chaos__brand h2 {
    margin: 16px 0 18px;
    font-size: clamp(54px, 18vw, 86px);
    line-height: 0.84;
  }

  .desktop-window,
  .desktop-note,
  .desktop-chaos__dock {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    margin: 0;
    transform: none;
  }

  .desktop-window + .desktop-window,
  .desktop-window + .desktop-note,
  .desktop-note + .desktop-note {
    margin-top: 14px;
  }

  .desktop-window--browser {
    padding: 18px;
  }

  .desktop-window--browser h3 {
    margin-top: 18px;
    font-size: 20px;
    line-height: 1.45;
  }

  .desktop-window--code {
    width: 86%;
    margin-left: auto;
  }

  .desktop-window--ai {
    width: 88%;
    margin-right: auto;
  }

  .desktop-window--code,
  .desktop-window--ai {
    padding: 18px;
  }

  .desktop-window dl div {
    grid-template-columns: 48px 1fr;
    gap: 10px;
  }

  .desktop-window dd,
  .desktop-window--ai p,
  .desktop-window li {
    font-size: 12px;
  }

  .desktop-note {
    width: 72%;
    padding: 15px;
  }

  .desktop-note--one {
    margin-top: -12px;
    margin-left: 8%;
    transform: rotate(-3deg);
  }

  .desktop-note--two {
    margin-top: 14px;
    margin-left: auto;
    transform: rotate(2deg);
  }

  .desktop-chaos__dock {
    position: absolute;
    bottom: 24px;
    left: 50%;
    width: auto;
    margin: 0;
    transform: translateX(-50%);
  }

  .desktop-chaos__dock span {
    width: 36px;
    height: 36px;
    font-size: 10px;
  }

  .galaxy-opening {
    min-height: 100svh;
  }

  .galaxy-opening__logo {
    width: min(720px, 90vw);
  }

  .about__body,
  .contact-block__form {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .about__cta {
    flex-wrap: wrap;
  }

  .btn {
    min-width: 132px;
  }

  .about__body .btn {
    width: 100%;
  }

  .page-hero {
    padding-top: 78px;
    padding-bottom: 48px;
  }

  .page-hero__ttl {
    font-size: 42px;
  }

  .page-hero__mark {
    margin-left: 4px;
    font-size: 11px;
  }

  .page-hero__lead,
  .about__desc,
  .about-block__desc,
  .works-block__desc {
    font-size: 15px;
  }

  .about-block__list,
  .works-block__list {
    grid-template-columns: 1fr;
  }

  .about-block__item,
  .works-block__item {
    min-height: 0;
    padding: 22px;
  }

  .about-block__item:hover,
  .works-block__item:hover {
    transform: none;
  }

  .contact-block__field--wide,
  .contact-block__cta {
    grid-column: auto;
  }

  .footer__inner {
    display: grid;
    gap: 20px;
    justify-items: start;
  }

  .footer__nav-list {
    flex-wrap: wrap;
  }
}
